^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) #ifndef SRCCODE_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) #define SRCCODE_H 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) struct srccode_state {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) char *srcfile;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) unsigned line;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) static inline void srccode_state_init(struct srccode_state *state)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) state->srcfile = NULL;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) state->line = 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) void srccode_state_free(struct srccode_state *state);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) /* Result is not 0 terminated */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) char *find_sourceline(char *fn, unsigned line, int *lenp);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) #endif