66 register int i = 0, cnt = 0;
74 if((CapFile = fopen(mfbcapFile,
"r")) ==
NULL)
76 mfbcapDesc = fileno(CapFile);
86 cnt = read(mfbcapDesc, inputBuffer,
BUFSIZE);
87 if(cnt <= 0 && !NewLine){
88 if(close(mfbcapDesc) < 0)
98 if(NewLine && c !=
' ' && c !=
'\t'){
125 if(close(mfbcapDesc) < 0)
144 register char *
p, *q;
158 while(*p ==
',' || *p ==
' ' || *p ==
'\t')
162 if(p[0] !=
'M' || p[1] !=
'C' || p[2] !=
'E')
return(
MFBOK);
163 (void)
strcpy(mfbname,p+4);
165 while(q && *q !=
',')
171 if((l =
MFBGetEnt(mfbbuf,mfbname,mfbcapFile)) != 1){
174 for(q=mfbbuf; *q !=
','; q++) ;
175 l = p - holdgbuf + strlen(q);
195 register char *Np, *Bp;
198 if(*Bp ==
'#')
return(
FALSE);
200 for(Np = np; *Np && *Bp == *Np; Bp++, Np++)
continue;
201 if(*Np == 0 && (*Bp ==
'|' || *Bp ==
',' || *Bp == 0))
203 while(*Bp && *Bp !=
',' && *Bp !=
'|') Bp++;
204 if(*Bp == 0 || *Bp ==
',')
return(
FALSE);
218 while(*bp && !(*bp ==
',' && *(bp - 1) !=
'\\'))
222 while(*bp ==
',' || *bp ==
' ' || *bp ==
'\t')
247 while(*cp != 0 && *bp != 0){
254 if(!*bp || *bp ==
',')
282 if(!*bp)
return(
NULL);
285 while(*cp != 0 && *bp != 0){
291 if(i || *bp !=
'=')
continue;
313 while((c = *str++) && c !=
','){
320 dp =
"E\033^^\\\\,,n\nr\rt\tb\bf\f";
333 c <<= 3, c |= *str++ -
'0';
334 while(--i && isdigit(*str));
363 register char negative = 0 ;
368 if(*bp == 0)
return(
BADNUM);
371 while(*cp != 0 && *bp != 0){
377 if(*bp == 0)
return(
BADNUM);
378 if(i || *bp !=
'#')
continue;
380 if((negative=(*bp ==
'-'))) bp++ ;
382 while( (j = ((
int)(*bp) - 060)) >= 0 && (j < 10) ) {
383 bp++; i *= 10; i += j;
static char * MFBCapDecod()