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