Files
jq/locfile.h
T

23 lines
416 B
C
Raw Normal View History

#ifndef _LOCFILE_H
#define _LOCFILE_H
2013-05-26 12:42:04 +10:00
typedef struct {
int start, end;
} location;
static const location UNKNOWN_LOCATION = {-1, -1};
struct locfile {
const char* data;
int length;
int* linemap;
int nlines;
};
2013-05-26 12:42:04 +10:00
void locfile_init(struct locfile* l, const char* data, int length);
2013-05-26 12:42:04 +10:00
void locfile_free(struct locfile* l);
2013-05-26 12:42:04 +10:00
void locfile_locate(struct locfile* l, location loc, const char* fmt, ...);
#endif