[BACK]Return to ruserpass.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / ftp

Diff for /src/usr.bin/ftp/ruserpass.c between version 1.9 and 1.10

version 1.9, 1997/07/25 21:56:22 version 1.10, 1997/09/05 00:02:30
Line 189 
Line 189 
                                 (void)fclose(cfile);                                  (void)fclose(cfile);
                                 return (0);                                  return (0);
                         }                          }
                         while ((c=getc(cfile)) != EOF)                          while ((c = fgetc(cfile)) != EOF)
                                 if (c != ' ' && c != '\t')                                  if (c != ' ' && c != '\t')
                                         break;                                          break;
                         if (c == EOF || c == '\n') {                          if (c == EOF || c == '\n') {
Line 203 
Line 203 
                         }                          }
                         tmp = macros[macnum].mac_name;                          tmp = macros[macnum].mac_name;
                         *tmp++ = c;                          *tmp++ = c;
                         for (i=0; i < 8 && (c=getc(cfile)) != EOF &&                          for (i=0; i < 8 && (c = fgetc(cfile)) != EOF &&
                             !isspace(c); ++i) {                              !isspace(c); ++i) {
                                 *tmp++ = c;                                  *tmp++ = c;
                         }                          }
Line 214 
Line 214 
                         }                          }
                         *tmp = '\0';                          *tmp = '\0';
                         if (c != '\n') {                          if (c != '\n') {
                                 while ((c=getc(cfile)) != EOF && c != '\n');                                  while ((c = fgetc(cfile)) != EOF && c != '\n');
                         }                          }
                         if (c == EOF) {                          if (c == EOF) {
                                 fputs(                                  fputs(
Line 230 
Line 230 
                         }                          }
                         tmp = macros[macnum].mac_start;                          tmp = macros[macnum].mac_start;
                         while (tmp != macbuf + 4096) {                          while (tmp != macbuf + 4096) {
                                 if ((c=getc(cfile)) == EOF) {                                  if ((c = fgetc(cfile)) == EOF) {
                                 fputs(                                  fputs(
 "Macro definition missing null line terminator.\n", ttyout);  "Macro definition missing null line terminator.\n", ttyout);
                                         goto bad;                                          goto bad;
Line 273 
Line 273 
   
         if (feof(cfile) || ferror(cfile))          if (feof(cfile) || ferror(cfile))
                 return (0);                  return (0);
         while ((c = getc(cfile)) != EOF &&          while ((c = fgetc(cfile)) != EOF &&
             (c == '\n' || c == '\t' || c == ' ' || c == ','))              (c == '\n' || c == '\t' || c == ' ' || c == ','))
                 continue;                  continue;
         if (c == EOF)          if (c == EOF)
                 return (0);                  return (0);
         cp = tokval;          cp = tokval;
         if (c == '"') {          if (c == '"') {
                 while ((c = getc(cfile)) != EOF && c != '"') {                  while ((c = fgetc(cfile)) != EOF && c != '"') {
                         if (c == '\\')                          if (c == '\\')
                                 c = getc(cfile);                                  c = fgetc(cfile);
                         *cp++ = c;                          *cp++ = c;
                 }                  }
         } else {          } else {
                 *cp++ = c;                  *cp++ = c;
                 while ((c = getc(cfile)) != EOF                  while ((c = fgetc(cfile)) != EOF
                     && c != '\n' && c != '\t' && c != ' ' && c != ',') {                      && c != '\n' && c != '\t' && c != ' ' && c != ',') {
                         if (c == '\\')                          if (c == '\\')
                                 c = getc(cfile);                                  c = fgetc(cfile);
                         *cp++ = c;                          *cp++ = c;
                 }                  }
         }          }

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10