Ticket #37056: patch-src-ref.c.diff

File patch-src-ref.c.diff, 1.4 KB (added by Crosmatron, 11 years ago)

Patch to fix compilation.

  • ref.c

    old new  
    4242
    4343#if USE_PROTOTYPES
    4444static void usage(char *argv0);
    45 static char *getline(FILE *fp);
     45static char *static_getline(FILE *fp);
    4646static void store(char *line, char **list);
    4747static LINECLS classify(char *line, LINECLS prev);
    4848static void lookup(TAG *tag);
     
    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)
     174static char *static_getline(fp)
    175175        FILE    *fp;
    176176{
    177177        int     ch;
     
    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 = static_getline(fp)) != NULL; lnum++)
    352352        {
    353353                /* is this the tag definition? */
    354354                if (taglnum > 0 ? taglnum == lnum : !strncmp(tagline, line, len))
     
    377377                        {
    378378                                if (strchr(line, '(') != NULL)
    379379                                {
    380                                         while ((line = getline(fp)) != NULL
     380                                        while ((line = static_getline(fp)) != NULL
    381381                                            && *line
    382382                                            && ((*line != '#' && *line != '{')
    383383                                                || line[strlen(line) - 1] == '\\'))
     
    387387                                }
    388388                                else if ((lc = classify(line, lc)) == LC_PARTIAL)
    389389                                {
    390                                         while ((line = getline(fp)) != NULL
     390                                        while ((line = static_getline(fp)) != NULL
    391391                                            && (lc = classify(line, lc)) == LC_PARTIAL)
    392392                                        {
    393393                                                puts(line);