miller/c/lib/context.h
2016-07-31 18:28:12 -04:00

17 lines
431 B
C

#ifndef CONTEXT_H
#define CONTEXT_H
// File-level context for Miller's NR, FNR, FILENAME, and FILENUM variables, as
// well as for error messages
typedef struct _context_t {
long long nr;
long long fnr;
int filenum;
char* filename;
int force_eof; // e.g. mlr head
} context_t;
void context_init(context_t* pctx, char* first_file_name);
void context_print(context_t* pctx, char* indent);
#endif // CONTEXT_H