Skip to content
Myr

locfile.h

This file

Path

src/locfile.h

29 lines · 578 bytes · C

Last changed by

Not known.

History of this file

Take it

1#ifndef LOCFILE_H2#define LOCFILE_H34#include "jq.h"56typedef struct {7  int start, end;8} location;910static const location UNKNOWN_LOCATION = {-1, -1};1112struct locfile {13  jv fname;14  const char* data;15  int length;16  int* linemap;17  int nlines;18  char *error;19  jq_state *jq;20  int refct;21};2223struct locfile* locfile_init(jq_state *, const char *, const char *, int);24struct locfile* locfile_retain(struct locfile *);25int locfile_get_line(struct locfile *, int);26void locfile_free(struct locfile *);27void locfile_locate(struct locfile *, location, const char *, ...);2829#endif