/[anubis]/anubis/src/rcfile.l
ViewVC logotype

Diff of /anubis/src/rcfile.l

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.12 by gray, Fri Jul 18 14:37:38 2003 UTC revision 1.13 by gray, Sun Jul 20 08:34:52 2003 UTC
# Line 88  BEGIN          return T_BEGIN; Line 88  BEGIN          return T_BEGIN;
88          char *q;          char *q;
89          int len;          int len;
90    
91          for (; *p && isspace(*p); p++)          for (; *p && isspace(*(u_char*)p); p++)
92                  ;                  ;
93          for (q = yytext + yyleng - 4; q > p && isspace(*q); q--)          for (q = yytext + yyleng - 4; q > p && isspace(*(u_char*)q); q--)
94                  ;                  ;
95          len = q - p + 1;          len = q - p + 1;
96          yylval.string = xmalloc(len + 1);          yylval.string = xmalloc(len + 1);
# Line 276  multiline_begin(void) Line 276  multiline_begin(void)
276    
277          /* Find the delimiter */          /* Find the delimiter */
278          for (endp = p; *endp; endp++)          for (endp = p; *endp; endp++)
279                  if (isspace(*endp))                  if (isspace(*(u_char*)endp))
280                          break;                          break;
281    
282          len = endp - p;          len = endp - p;
# Line 297  multiline_finish(void) Line 297  multiline_finish(void)
297  int  int
298  isemptystr(char *text)  isemptystr(char *text)
299  {  {
300          for (; *text && isspace(*text); text++)          for (; *text && isspace(*(u_char*)text); text++)
301                  ;                  ;
302          return *text == 0;          return *text == 0;
303  }  }
# Line 346  trimws(char *s) Line 346  trimws(char *s)
346  {  {
347          int len;          int len;
348    
349          for (len = strlen(s) - 1; len > 0 && isspace(s[len]); len--)          for (len = strlen(s) - 1; len > 0 && isspace((u_char)s[len]); len--)
350                  ;                  ;
351          if (len > 0)          if (len > 0)
352                  s[len+1] = 0;                  s[len+1] = 0;
# Line 359  trimcpy(void) Line 359  trimcpy(void)
359          char *string;          char *string;
360          int i, j, len;          int i, j, len;
361    
362          for (i = 0; i < yyleng && isspace(yytext[i]); i++)          for (i = 0; i < yyleng && isspace((u_char)yytext[i]); i++)
363                  ;                  ;
364          for (j = yyleng - 1; j > i && isspace(yytext[i]); j--)          for (j = yyleng - 1; j > i && isspace((u_char)yytext[i]); j--)
365                  ;                  ;
366          len = j - i + 1;          len = j - i + 1;
367          string = xmalloc(len + 1);          string = xmalloc(len + 1);

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

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26