bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-gnulib] null vs. `NUL byte'


From: Jim Meyering
Subject: [bug-gnulib] null vs. `NUL byte'
Date: Sat, 26 Mar 2005 12:16:53 +0100

I've always written `NUL' to indicate the zero byte, '\0', not `null',
because the latter is easy to confuse with the NULL pointer, which is
usually at least 4 bytes.  Paul, any objection?

2005-03-26  Jim Meyering  <address@hidden>

        * intprops.h: Say `terminating NUL byte' rather than `terminating null'.
        * quotearg.c: Likewise.
        * filemode.c: Likewise.

Index: filemode.c
===================================================================
RCS file: /cvsroot/gnulib/gnulib/lib/filemode.c,v
retrieving revision 1.14
diff -u -p -r1.14 filemode.c
--- filemode.c  7 Aug 2004 00:09:39 -0000       1.14
+++ filemode.c  26 Mar 2005 11:14:32 -0000
@@ -1,5 +1,5 @@
 /* filemode.c -- make a string describing file modes
-   Copyright (C) 1985, 1990, 1993, 1998-2000, 2004 Free Software Foundation, 
Inc.
+   Copyright (C) 1985, 1990, 1993, 1998-2000, 2004, 2005 Free Software 
Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -135,7 +135,7 @@ mode_string (mode_t mode, char *str)
 
 /* filemodestring - fill in string STR with an ls-style ASCII
    representation of the st_mode field of file stats block STATP.
-   10 characters are stored in STR; no terminating null is added.
+   10 characters are stored in STR; no terminating NUL byte is added.
    The characters stored in STR are:
 
    0   File type.  'd' for directory, 'c' for character
Index: intprops.h
===================================================================
RCS file: /cvsroot/gnulib/gnulib/lib/intprops.h,v
retrieving revision 1.3
diff -u -p -r1.3 intprops.h
--- intprops.h  26 Mar 2005 11:10:52 -0000      1.3
+++ intprops.h  26 Mar 2005 11:14:32 -0000
@@ -61,5 +61,5 @@
   ((sizeof (t) * CHAR_BIT - 1) * 146 / 485 + 2)
 
 /* Bound on buffer size needed to represent an integer value of type T,
-   including the terminating null.  */
+   including the terminating NUL byte.  */
 #define INT_BUFSIZE_BOUND(t) (INT_STRLEN_BOUND (t) + 1)
Index: quotearg.c
===================================================================
RCS file: /cvsroot/gnulib/gnulib/lib/quotearg.c,v
retrieving revision 1.43
diff -u -p -r1.43 quotearg.c
--- quotearg.c  11 Nov 2004 05:58:47 -0000      1.43
+++ quotearg.c  26 Mar 2005 11:14:32 -0000
@@ -1,6 +1,6 @@
 /* quotearg.c - quote arguments for output
 
-   Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004 Free Software
+   Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2005 Free Software
    Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
@@ -175,7 +175,7 @@ gettext_quote (char const *msgid, enum q
    argument ARG (of size ARGSIZE), using QUOTING_STYLE and the
    non-quoting-style part of O to control quoting.
    Terminate the output with a null character, and return the written
-   size of the output, not counting the terminating null.
+   size of the output, not counting the terminating NUL byte.
    If BUFFERSIZE is too small to store the output string, return the
    value that would have been returned had BUFFERSIZE been large enough.
    If ARGSIZE is SIZE_MAX, use the string length of the argument for ARGSIZE.
@@ -517,7 +517,7 @@ quotearg_buffer_restyled (char *buffer, 
    argument ARG (of size ARGSIZE), using O to control quoting.
    If O is null, use the default.
    Terminate the output with a null character, and return the written
-   size of the output, not counting the terminating null.
+   size of the output, not counting the terminating NUL byte.
    If BUFFERSIZE is too small to store the output string, return the
    value that would have been returned had BUFFERSIZE been large enough.
    If ARGSIZE is SIZE_MAX, use the string length of the argument for




reply via email to

[Prev in Thread] Current Thread [Next in Thread]