Module Name: src Committed By: uwe Date: Thu Jun 8 15:59:45 UTC 2017
Modified Files: src/lib/libc/stdio: fgetln.c fgetstr.c getdelim.c Log Message: Don't use "NULL" to talk about null-terminated strings. The C standard seems to be inconsistent about dash vs. space. Old text uses dash, Annex K uses space. I'll let wizd(8) to sort that out. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/lib/libc/stdio/fgetln.c cvs rdiff -u -r1.11 -r1.12 src/lib/libc/stdio/fgetstr.c cvs rdiff -u -r1.13 -r1.14 src/lib/libc/stdio/getdelim.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/lib/libc/stdio/fgetln.c diff -u src/lib/libc/stdio/fgetln.c:1.16 src/lib/libc/stdio/fgetln.c:1.17 --- src/lib/libc/stdio/fgetln.c:1.16 Wed Dec 2 09:03:13 2009 +++ src/lib/libc/stdio/fgetln.c Thu Jun 8 15:59:45 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: fgetln.c,v 1.16 2009/12/02 09:03:13 roy Exp $ */ +/* $NetBSD: fgetln.c,v 1.17 2017/06/08 15:59:45 uwe Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -33,7 +33,7 @@ */ #include <sys/cdefs.h> -__RCSID("$NetBSD: fgetln.c,v 1.16 2009/12/02 09:03:13 roy Exp $"); +__RCSID("$NetBSD: fgetln.c,v 1.17 2017/06/08 15:59:45 uwe Exp $"); #include "namespace.h" @@ -49,7 +49,7 @@ __weak_alias(fgetln,_fgetln) /* * Get an input line. * This now uses getdelim(3) for a code reduction. - * The upside is that strings are now always NULL terminated, but relying + * The upside is that strings are now always null-terminated, but relying * on this is non portable - better to use the POSIX getdelim(3) function. */ char * Index: src/lib/libc/stdio/fgetstr.c diff -u src/lib/libc/stdio/fgetstr.c:1.11 src/lib/libc/stdio/fgetstr.c:1.12 --- src/lib/libc/stdio/fgetstr.c:1.11 Mon Jan 11 20:39:29 2010 +++ src/lib/libc/stdio/fgetstr.c Thu Jun 8 15:59:45 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: fgetstr.c,v 1.11 2010/01/11 20:39:29 joerg Exp $ */ +/* $NetBSD: fgetstr.c,v 1.12 2017/06/08 15:59:45 uwe Exp $ */ /* * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -28,7 +28,7 @@ */ #include <sys/cdefs.h> -__RCSID("$NetBSD: fgetstr.c,v 1.11 2010/01/11 20:39:29 joerg Exp $"); +__RCSID("$NetBSD: fgetstr.c,v 1.12 2017/06/08 15:59:45 uwe Exp $"); #include "namespace.h" @@ -43,7 +43,7 @@ __RCSID("$NetBSD: fgetstr.c,v 1.11 2010/ /* * Get an input line. * This now uses getdelim(3) for a code reduction. - * The upside is that strings are now always NULL terminated, but relying + * The upside is that strings are now always null-terminated, but relying * on this is non portable - better to use the POSIX getdelim(3) function. */ char * Index: src/lib/libc/stdio/getdelim.c diff -u src/lib/libc/stdio/getdelim.c:1.13 src/lib/libc/stdio/getdelim.c:1.14 --- src/lib/libc/stdio/getdelim.c:1.13 Fri Jul 22 23:12:30 2011 +++ src/lib/libc/stdio/getdelim.c Thu Jun 8 15:59:45 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: getdelim.c,v 1.13 2011/07/22 23:12:30 joerg Exp $ */ +/* $NetBSD: getdelim.c,v 1.14 2017/06/08 15:59:45 uwe Exp $ */ /* * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -28,7 +28,7 @@ */ #include <sys/cdefs.h> -__RCSID("$NetBSD: getdelim.c,v 1.13 2011/07/22 23:12:30 joerg Exp $"); +__RCSID("$NetBSD: getdelim.c,v 1.14 2017/06/08 15:59:45 uwe Exp $"); #include "namespace.h" @@ -96,7 +96,7 @@ __getdelim(char **__restrict buf, size_t errno = EOVERFLOW; goto error; } - newlen++; /* reserve space for the NULL terminator */ + newlen++; /* reserve space for the null terminator */ if (newlen > *buflen) { if (newlen < MINBUF) newlen = MINBUF;