Rev 8122 | Rev 8185 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 8122 | Rev 8136 | ||
---|---|---|---|
Line 27... | Line 27... | ||
27 | char *reqtype; |
27 | char *reqtype; |
28 | int logdir, linelogdir; |
28 | int logdir, linelogdir; |
29 | char *fnd_position; |
29 | char *fnd_position; |
30 | char *fnd_nextpos; |
30 | char *fnd_nextpos; |
31 | 31 | ||
32 | struct { |
- | |
33 | char *srcreg; |
- | |
34 | regex_t cmpreg; |
- | |
35 | int isvar; |
- | |
36 |
|
32 | regex regexchk[MAX_REGEX]; |
- | 33 | ||
37 | int regexcnt=0; |
34 | int regexcnt=0; |
38 | - | ||
39 | #include "tables.c" |
- | |
40 | #include "basic.c" |
- | |
41 | #include "extract.c" |
- | |
42 | #include "type.c" |
- | |
43 | #include "not.c" |
- | |
44 | 35 | ||
45 | struct { |
36 | struct { |
46 | char *name; |
37 | char *name; |
47 | void (*routine)(void); |
38 | void (*routine)(void); |
48 | } req[]={ |
39 | } req[]={ |
Line 61... | Line 52... | ||
61 | for(pp=parmbuf;*pp;pp++) if(*pp==' ') *pp='\n'; |
52 | for(pp=parmbuf;*pp;pp++) if(*pp==' ') *pp='\n'; |
62 | for(objlinecnt=0,p=parmbuf; *p && objlinecnt<MAX_OBJLINES; p=pp) { |
53 | for(objlinecnt=0,p=parmbuf; *p && objlinecnt<MAX_OBJLINES; p=pp) { |
63 | pp=strchr(p,'\n'); if(pp) *pp++=0; else pp=p+strlen(p); |
54 | pp=strchr(p,'\n'); if(pp) *pp++=0; else pp=p+strlen(p); |
64 | strip_trailing_spaces(p); |
55 | strip_trailing_spaces(p); |
65 | objline[objlinecnt]=p; objlinecnt++; |
56 | objline[objlinecnt]=p; objlinecnt++; |
66 | } |
57 | } |
67 | if(objlinecnt<1) error("Empty input data."); |
58 | if(objlinecnt<1) error("Empty input data."); |
68 | logdir=0; |
59 | logdir=0; |
69 | if((p=wordchr(objline[0],"<"))!=NULL) { |
60 | if((p=wordchr(objline[0],"<"))!=NULL) { |
70 | logdir=-1; ovlstrcpy(p,p+1); |
61 | logdir=-1; ovlstrcpy(p,p+1); |
71 | } |
62 | } |
72 | if((p=wordchr(objline[0],">"))!=NULL) { |
63 | if((p=wordchr(objline[0],">"))!=NULL) { |
73 | logdir=1; ovlstrcpy(p,p+1); |
64 | logdir=1; ovlstrcpy(p,p+1); |
74 | } |
65 | } |
75 | p=find_word_start(objline[0]); pp=find_word_end(p); if(*pp) *pp++=0; |
66 | p=find_word_start(objline[0]); pp=find_word_end(p); if(*pp) *pp++=0; |
76 | objline[0]=pp; |
67 | objline[0]=pp; |
77 | for(request=0;request<reqcnt && strcasecmp(req[request].name,p)!=0; request++); |
68 | for(request=0;request<reqcnt && strcasecmp(req[request].name,p)!=0; request++); |
78 | if(request>=reqcnt) error("Bad request."); |
69 | if(request>=reqcnt) error("Bad request."); |
79 | p=find_word_start(pp); pp=find_word_end(p); if(*pp) *pp++=0; |
70 | p=find_word_start(pp); pp=find_word_end(p); if(*pp) *pp++=0; |
80 | objline[0]=pp; reqtype=p; |
71 | objline[0]=pp; reqtype=p; |
81 | } |
72 | } |
82 | - | ||
83 | /*void (*string_modify)(char *start, char *bad_beg, char *bad_end, char *good,...)=string_modify1;*/ |
- | |
84 | 73 | ||
85 | int main() |
74 | int main() |
86 | { |
75 | { |
87 | char *p; |
76 | char *p; |
88 | int i; |
77 | int i; |