[BACK]Return to parse.y CVS log [TXT][DIR] Up to [local] / src / usr.bin / doas

Diff for /src/usr.bin/doas/parse.y between version 1.13 and 1.14

version 1.13, 2015/11/27 21:10:17 version 1.14, 2015/12/04 09:41:49
Line 223 
Line 223 
                         /* skip comments; NUL is allowed; no continuation */                          /* skip comments; NUL is allowed; no continuation */
                         while ((c = getc(yyfp)) != '\n')                          while ((c = getc(yyfp)) != '\n')
                                 if (c == EOF)                                  if (c == EOF)
                                         return 0;                                          goto eof;
                         yylval.colno = 0;                          yylval.colno = 0;
                         yylval.lineno++;                          yylval.lineno++;
                         return c;                          return c;
                 case EOF:                  case EOF:
                         return 0;                          goto eof;
         }          }
   
         /* parsing next word */          /* parsing next word */
Line 302 
Line 302 
                  * the main loop.                   * the main loop.
                  */                   */
                 if (c == EOF)                  if (c == EOF)
                         return 0;                          goto eof;
                 else if (qpos == -1)    /* accept, e.g., empty args: cmd foo args "" */                  else if (qpos == -1)    /* accept, e.g., empty args: cmd foo args "" */
                         goto repeat;                          goto repeat;
         }          }
Line 316 
Line 316 
                 err(1, "strdup");                  err(1, "strdup");
         yylval.str = str;          yylval.str = str;
         return TSTRING;          return TSTRING;
   
   eof:
           if (ferror(yyfp))
                   yyerror("input error reading config");
           return 0;
 }  }

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.14