-
Notifications
You must be signed in to change notification settings - Fork 0
/
compiler.h
25 lines (22 loc) · 1015 Bytes
/
compiler.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
/* compiler.h */
#ifndef COMPILER_H
#define COMPILER_H
#define MAX_BUFFER_SIZE 100
#include "stringbuf.h"
#include "settings.h"
/* session - information required for a
complete invocation of a compiler process */
typedef struct {
compiler* compiler_info; /* compiler information for session */
stringbuf project; /* project name; based on first target minus extension */
stringbuf* targets; /* list of target files to pass to compiler */
stringbuf* options; /* list of options supplied by user on command line */
int targets_c; /* number of targets */
int options_c; /* number of user supplied options used in options_user */
int alloc_size; /* allocated number of elements per list */
} session;
void init_session(session*,int size); /* allocate string buffers for at most 'size' options per type */
void destroy_session(session*);
void load_session(session*,int argc,const char** argv); /* returns 0 on success */
int compile_session(session*); /* returns 0 on success */
#endif