updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / elvis_slack / getline.patch
blob7840d6e0cf0115161987c11e5864189c9f5b02ea
1 --- ref.c 2010-02-18 01:02:00.388009759 +0000
2 +++ ref2.c 2010-02-18 01:01:04.638036985 +0000
3 @@ -42,7 +42,7 @@
5 #if USE_PROTOTYPES
6 static void usage(char *argv0);
7 -static char *getline(FILE *fp);
8 +static char *getline_(FILE *fp);
9 static void store(char *line, char **list);
10 static LINECLS classify(char *line, LINECLS prev);
11 static void lookup(TAG *tag);
12 @@ -171,7 +171,7 @@
13 /* This function reads a single line, and replaces the terminating newline with
14 * a '\0' byte. The string will be in a static buffer. Returns NULL at EOF.
16 -static char *getline(fp)
17 +static char *getline_(fp)
18 FILE *fp;
20 int ch;
21 @@ -348,7 +348,7 @@
24 /* for each line... */
25 - for (lnum = 1, lc = LC_COMPLETE; (line = getline(fp)) != NULL; lnum++)
26 + for (lnum = 1, lc = LC_COMPLETE; (line = getline_(fp)) != NULL; lnum++)
28 /* is this the tag definition? */
29 if (taglnum > 0 ? taglnum == lnum : !strncmp(tagline, line, len))
30 @@ -377,7 +377,7 @@
32 if (strchr(line, '(') != NULL)
34 - while ((line = getline(fp)) != NULL
35 + while ((line = getline_(fp)) != NULL
36 && *line
37 && ((*line != '#' && *line != '{')
38 || line[strlen(line) - 1] == '\\'))
39 @@ -387,7 +387,7 @@
41 else if ((lc = classify(line, lc)) == LC_PARTIAL)
43 - while ((line = getline(fp)) != NULL
44 + while ((line = getline_(fp)) != NULL
45 && (lc = classify(line, lc)) == LC_PARTIAL)
47 puts(line);