-
Notifications
You must be signed in to change notification settings - Fork 9
/
source.h
82 lines (73 loc) · 1.65 KB
/
source.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
/* source.h - source files, include paths and dependencies */
/* (c) in 2020,2022 by Volker Barthelmann and Frank Wille */
#ifndef SOURCE_H
#define SOURCE_H
/* include paths */
struct include_path {
struct include_path *next;
char *path;
int compdir_based;
};
/* source files */
struct source_file {
struct source_file *next;
struct include_path *incpath;
int index;
char *name;
char *text;
size_t size;
};
/* source texts (main file, include files or macros) */
struct source {
struct source *parent;
int parent_line;
struct source_file *srcfile;
char *name;
char *text;
size_t size;
struct source *defsrc;
int defline;
int srcdebug;
macro *macro;
unsigned long repeat;
char *irpname;
struct macarg *irpvals;
int cond_level;
struct macarg *argnames;
int num_params;
char *param[MAXMACPARAMS+1];
int param_len[MAXMACPARAMS+1];
#if MAX_QUALIFIERS > 0
int num_quals;
char *qual[MAX_QUALIFIERS];
int qual_len[MAX_QUALIFIERS];
#endif
unsigned long id;
char *srcptr;
int line;
size_t bufsize;
char *linebuf;
#ifdef CARGSYM
expr *cargexp;
#endif
#ifdef REPTNSYM
long reptn;
#endif
};
#define DEPEND_LIST 1
#define DEPEND_MAKE 2
struct deplist {
struct deplist *next;
char *filename;
};
extern char *compile_dir;
extern int ignore_multinc,nocompdir,depend,depend_all;
void write_depends(FILE *);
source *new_source(char *,struct source_file *,char *,size_t);
void end_source(source *);
source *stdin_source(void);
source *include_source(char *);
void include_binary_file(char *,long,unsigned long);
void source_debug_init(int,void *);
struct include_path *new_include_path(char *);
#endif /* SOURCE_H */