change_lf.cc 448 B

123456789101112131415161718192021222324
  1. /* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
  2. Written by James Clark (jjc@jclark.com) */
  3. #include <string.h>
  4. extern char *strsave(const char *);
  5. extern const char *current_filename;
  6. extern int current_lineno;
  7. void
  8. change_filename(const char *f)
  9. {
  10. if (current_filename != 0 && strcmp(current_filename, f) == 0)
  11. return;
  12. current_filename = strsave(f);
  13. }
  14. void
  15. change_lineno(int ln)
  16. {
  17. current_lineno = ln;
  18. }