1
0
mirror of https://github.com/stedolan/jq.git synced 2024-05-11 05:55:39 +00:00
stedolan-jq/locfile.h

29 lines
535 B
C
Raw Normal View History

#ifndef _LOCFILE_H
#define _LOCFILE_H
#include "jq.h"
typedef struct {
int start, end;
} location;
static const location UNKNOWN_LOCATION = {-1, -1};
struct locfile {
jv fname;
const char* data;
int length;
int* linemap;
int nlines;
char *error;
jq_state *jq;
int refct;
};
struct locfile* locfile_init(jq_state *, const char *, const char *, int);
struct locfile* locfile_retain(struct locfile *);
void locfile_free(struct locfile *);
void locfile_locate(struct locfile *, location, const char *, ...);
#endif