| 1 | < | /* Copyright (c) 1988 Regents of the University of California */ | 
| 1 | > | /* Copyright (c) 1991 Regents of the University of California */ | 
| 2 |  |  | 
| 3 |  | #ifndef lint | 
| 4 |  | static char SCCSid[] = "$SunId$ LBL"; | 
| 134 |  | case '*':                       /* match any string */ | 
| 135 |  | while (p[1] == '*') p++; | 
| 136 |  | do | 
| 137 | < | if ( (p[1] == '?' || p[1] == *s) | 
| 137 | > | if ( (p[1]=='?' || p[1]==*s) | 
| 138 |  | && copymatch(p+1,s) ) { | 
| 139 |  | strcpy(pat, str); | 
| 140 |  | return(1); | 
| 164 |  | * Checkheader(fin,fmt,fout) returns a value of 1 if the input format | 
| 165 |  | * matches the specification in fmt, 0 if no input format was found, | 
| 166 |  | * and -1 if the input format does not match or there is an | 
| 167 | < | * error reading the header.  If fmt is NULL, then -1 is returned | 
| 167 | > | * error reading the header.  If fmt is empty, then -1 is returned | 
| 168 |  | * if any input format is found (or there is an error), and 0 otherwise. | 
| 169 |  | * If fmt contains any '*' or '?' characters, then checkheader | 
| 170 |  | * does wildcard expansion and copies a matching result into fmt. | 
| 183 |  | cdat.fp = fout; | 
| 184 |  | cdat.fs[0] = '\0'; | 
| 185 |  | if (getheader(fin, mycheck, &cdat) < 0) | 
| 186 | – | return(-1); | 
| 187 | – | if (fmt == NULL && cdat.fs[0] != '\0') | 
| 186 |  | return(-1); | 
| 187 |  | if (cdat.fs[0] != '\0') | 
| 188 |  | return(copymatch(fmt, cdat.fs) ? 1 : -1); |