srccode.h 371 B

1234567891011121314151617181920
  1. #ifndef SRCCODE_H
  2. #define SRCCODE_H 1
  3. struct srccode_state {
  4. char *srcfile;
  5. unsigned line;
  6. };
  7. static inline void srccode_state_init(struct srccode_state *state)
  8. {
  9. state->srcfile = NULL;
  10. state->line = 0;
  11. }
  12. void srccode_state_free(struct srccode_state *state);
  13. /* Result is not 0 terminated */
  14. char *find_sourceline(char *fn, unsigned line, int *lenp);
  15. #endif