Ticket #37056: patch-src-ref.c.diff
File patch-src-ref.c.diff, 1.4 KB (added by Crosmatron, 12 years ago) |
---|
-
ref.c
old new 42 42 43 43 #if USE_PROTOTYPES 44 44 static void usage(char *argv0); 45 static char * getline(FILE *fp);45 static char *static_getline(FILE *fp); 46 46 static void store(char *line, char **list); 47 47 static LINECLS classify(char *line, LINECLS prev); 48 48 static void lookup(TAG *tag); … … 171 171 /* This function reads a single line, and replaces the terminating newline with 172 172 * a '\0' byte. The string will be in a static buffer. Returns NULL at EOF. 173 173 */ 174 static char * getline(fp)174 static char *static_getline(fp) 175 175 FILE *fp; 176 176 { 177 177 int ch; … … 348 348 } 349 349 350 350 /* for each line... */ 351 for (lnum = 1, lc = LC_COMPLETE; (line = getline(fp)) != NULL; lnum++)351 for (lnum = 1, lc = LC_COMPLETE; (line = static_getline(fp)) != NULL; lnum++) 352 352 { 353 353 /* is this the tag definition? */ 354 354 if (taglnum > 0 ? taglnum == lnum : !strncmp(tagline, line, len)) … … 377 377 { 378 378 if (strchr(line, '(') != NULL) 379 379 { 380 while ((line = getline(fp)) != NULL380 while ((line = static_getline(fp)) != NULL 381 381 && *line 382 382 && ((*line != '#' && *line != '{') 383 383 || line[strlen(line) - 1] == '\\')) … … 387 387 } 388 388 else if ((lc = classify(line, lc)) == LC_PARTIAL) 389 389 { 390 while ((line = getline(fp)) != NULL390 while ((line = static_getline(fp)) != NULL 391 391 && (lc = classify(line, lc)) == LC_PARTIAL) 392 392 { 393 393 puts(line);