Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/lib/libc/gen/getcap.c,v rcsdiff: /ftp/cvs/cvsroot/src/lib/libc/gen/getcap.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.1 retrieving revision 1.3 diff -u -p -r1.1 -r1.3 --- src/lib/libc/gen/getcap.c 1993/05/18 07:37:54 1.1 +++ src/lib/libc/gen/getcap.c 1993/07/30 08:22:19 1.3 @@ -35,7 +35,8 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char sccsid[] = "@(#)getcap.c 5.15 (Berkeley) 3/19/93"; +/*static char sccsid[] = "from: @(#)getcap.c 5.15 (Berkeley) 3/19/93";*/ +static char rcsid[] = "$Id: getcap.c,v 1.3 1993/07/30 08:22:19 mycroft Exp $"; #endif /* LIBC_SCCS and not lint */ #include @@ -674,21 +675,20 @@ cgetnext(bp, db_array) } else continue; } - } else - line[len - 1] = '\0'; - if (len == 1) { + } + if (len == 0) { slash = 0; continue; } if (isspace(*line) || *line == ':' || *line == '#' || slash) { - if (line[len - 2] == '\\') + if (line[len - 1] == '\\') slash = 1; else slash = 0; continue; } - if (line[len - 2] == '\\') + if (line[len - 1] == '\\') slash = 1; else slash = 0; @@ -723,8 +723,7 @@ cgetnext(bp, db_array) (void)cgetclose(); return (-1); } - } else - line[len - 1] = '\0'; + } } } rp = buf;