Skip to content

Commit 4edc6e8

Browse files
author
wolf python london
committed
rename getline to get_line, in glibc(>=2.10) getline is included in stdio.h
1 parent 15ac171 commit 4edc6e8

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

ref.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ typedef enum
4242

4343
#if USE_PROTOTYPES
4444
static void usage(char *argv0);
45-
static char *getline(FILE *fp);
45+
static char *get_line(FILE *fp);
4646
static void store(char *line, char **list);
4747
static LINECLS classify(char *line, LINECLS prev);
4848
static void lookup(TAG *tag);
@@ -171,7 +171,7 @@ ELVBOOL ioclose()
171171
/* This function reads a single line, and replaces the terminating newline with
172172
* a '\0' byte. The string will be in a static buffer. Returns NULL at EOF.
173173
*/
174-
static char *getline(fp)
174+
static char *get_line(fp)
175175
FILE *fp;
176176
{
177177
int ch;
@@ -348,7 +348,7 @@ static void lookup(tag)
348348
}
349349

350350
/* for each line... */
351-
for (lnum = 1, lc = LC_COMPLETE; (line = getline(fp)) != NULL; lnum++)
351+
for (lnum = 1, lc = LC_COMPLETE; (line = get_line(fp)) != NULL; lnum++)
352352
{
353353
/* is this the tag definition? */
354354
if (taglnum > 0 ? taglnum == lnum : !strncmp(tagline, line, len))
@@ -377,7 +377,7 @@ static void lookup(tag)
377377
{
378378
if (strchr(line, '(') != NULL)
379379
{
380-
while ((line = getline(fp)) != NULL
380+
while ((line = get_line(fp)) != NULL
381381
&& *line
382382
&& ((*line != '#' && *line != '{')
383383
|| line[strlen(line) - 1] == '\\'))
@@ -387,7 +387,7 @@ static void lookup(tag)
387387
}
388388
else if ((lc = classify(line, lc)) == LC_PARTIAL)
389389
{
390-
while ((line = getline(fp)) != NULL
390+
while ((line = get_line(fp)) != NULL
391391
&& (lc = classify(line, lc)) == LC_PARTIAL)
392392
{
393393
puts(line);

0 commit comments

Comments
 (0)