[BACK]Return to getcap.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / lib / libc / gen

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/lib/libc/gen/getcap.c between version 1.4 and 1.6

version 1.4, 1993/08/26 00:44:35 version 1.6, 1994/01/04 05:36:22
Line 658  cgetnext(bp, db_array)
Line 658  cgetnext(bp, db_array)
                         gottoprec = 1;                          gottoprec = 1;
                         line = toprec;                          line = toprec;
                 } else {                  } else {
                         line = fgetline(pfp, &len);                          line = fgetln(pfp, &len);
                         if (line == NULL && pfp) {                          if (line == NULL && pfp) {
                                 (void)fclose(pfp);                                  (void)fclose(pfp);
                                 if (ferror(pfp)) {                                  if (ferror(pfp)) {
Line 675  cgetnext(bp, db_array)
Line 675  cgetnext(bp, db_array)
                                         } else                                          } else
                                                 continue;                                                  continue;
                                 }                                  }
                         }                          } else
                         if (len == 0) {                                  line[len - 1] = '\0';
                           if (len == 1) {
                                 slash = 0;                                  slash = 0;
                                 continue;                                  continue;
                         }                          }
                         if (isspace(*line) ||                          if (isspace(*line) ||
                             *line == ':' || *line == '#' || slash) {                              *line == ':' || *line == '#' || slash) {
                                 if (line[len - 1] == '\\')                                  if (line[len - 2] == '\\')
                                         slash = 1;                                          slash = 1;
                                 else                                  else
                                         slash = 0;                                          slash = 0;
                                 continue;                                  continue;
                         }                          }
                         if (line[len - 1] == '\\')                          if (line[len - 2] == '\\')
                                 slash = 1;                                  slash = 1;
                         else                          else
                                 slash = 0;                                  slash = 0;
Line 716  cgetnext(bp, db_array)
Line 717  cgetnext(bp, db_array)
                                 *np = '\0';                                  *np = '\0';
                                 break;                                  break;
                         } else { /* name field extends beyond the line */                          } else { /* name field extends beyond the line */
                                 line = fgetline(pfp, &len);                                  line = fgetln(pfp, &len);
                                 if (line == NULL && pfp) {                                  if (line == NULL && pfp) {
                                         (void)fclose(pfp);                                          (void)fclose(pfp);
                                         if (ferror(pfp)) {                                          if (ferror(pfp)) {
                                                 (void)cgetclose();                                                  (void)cgetclose();
                                                 return (-1);                                                  return (-1);
                                         }                                          }
                                 }                                  } else
                                           line[len - 1] = '\0';
                         }                          }
                 }                  }
                 rp = buf;                  rp = buf;

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.6

CVSweb <webmaster@jp.NetBSD.org>