Update the changelog
[opencv] / apps / Hawk / CVEiCL / EiC / src / preproc.h
1 #ifndef PREPROC_H_
2 #define PREPROC_H_
3
4 /* cmode states */
5 #define CMcmt 1                 /* in comment */
6 #define CMstr 2                 /* in string */
7 #define CMchr 3                 /* in character constant */
8 #define CMang 4                 /* in < > */
9
10 #define REBUFF_INCREMENT   80
11
12 #define skipall(a)      while(*(a)) ++a;
13 #define skipfws(a)      while(*(a) && isspace(*(a))) ++a;
14 #define skipbws(a)      while(*(a) && isspace(*(a))) --a;
15 #define skip2char(a,b)  while(*(a) && *(a) != b) ++a;
16 #define skipnws(a)      while(*(a) && !isspace(*(a))) ++a;
17
18
19
20
21 typedef struct fitem_t{
22     int fd;                  /* file descriptor */
23     char * fname;            /* file name */
24     unsigned int lineno;     /* file lineno */
25     unsigned char * buf;              /* file buffer */
26     unsigned char * bufp;             /* file buffer pointer  */
27     int n;                   /* number of chars left in buffer */
28     struct fitem_t * next;
29 } fitem_t;
30
31 extern fitem_t *EiC_Infile;
32 #define CurrentFileName()   EiC_Infile->fname
33 #define CurrentLineNo()     EiC_Infile->lineno
34
35
36 /* preproc.c
37 -------------*/
38 int EiC_initpp(void);
39 char * EiC_nextproline(void);
40 void dodefine(char *);
41 int EiC_insertpath(char *);
42 char * EiC_strsave(char *s);
43 char *EiC_prolineString(char *str);
44
45 void EiC_ClearFileMacros(char *fname);
46 void EiC_showFileMacros(char *fname);
47 int EiC_IsIncluded(char *fname);
48 void EiC_showIncludedFiles(void);
49 void EiC_rmIncludeFileName(char *fname);
50 int EiC_Include_file(char *e, int mode);
51 int EiC_setinfile(char * fname);
52 void EiC_listpath(void);
53 int EiC_removepath(char *path);
54
55 char * EiC_process2(char * line,int bot,int top);
56 void EiC_pre_error(char *msg, ...);
57 int EiC_ismacroid(char *id);
58 int EiC_showMacro(char *id);
59 void EiC_markmacros(char mark);
60 void EiC_pp_CleanUp(size_t bot);
61 size_t EiC_pp_NextEntryNum(void);
62
63 extern int EiC_ptrSafe;
64 extern char cmode;
65
66 /* preexpr.c
67 -------------*/
68 int EiC_cpp_parse(char *s);
69
70 #endif
71
72
73
74