summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2019-03-21 23:55:28 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2019-03-21 23:55:28 -0400
commit76fea1eba1332440eab2e3daecce053daccd3782 (patch)
tree944ea8279b8a52cb715fe3493d909bc581776430 /src
parent57a60db2b88dfa5dea41a3a05b736cd7cd17a953 (diff)
downloademacs-76fea1eba1332440eab2e3daecce053daccd3782.tar.gz
Fix misuses of NULL when talking about the NUL character
* lisp/subr.el (inhibit-null-byte-detection): Make it an obsolete alias. * src/coding.c (setup_coding_system): Use new name. (detect_coding): Rename null_byte_found => nul_byte_found. (detect_coding_system): Use new name. Rename null_byte_found => nul_byte_found. (Fdefine_coding_system_internal): Use new name. (syms_of_coding): Rename inhibit-null-byte-detection to inhibit-nul-byte-detection. * src/w16select.c (get_clipboard_data): null_char => nul_char. * src/json.c (check_string_without_embedded_nuls): Rename from check_string_without_embedded_nulls. (Fjson_parse_string): Adjust accordingly. * src/coding.h (enum define_coding_undecided_arg_index) (enum coding_attr_index): ...null_byte... => ...nul_byte.... * lisp/info.el (info-insert-file-contents, Info-insert-dir): * lisp/international/mule.el (define-coding-system): * lisp/vc/vc-git.el (vc-git--call): * doc/lispref/nonascii.texi (Lisp and Coding Systems): Use the new name.
Diffstat (limited to 'src')
-rw-r--r--src/alloc.c2
-rw-r--r--src/bidi.c4
-rw-r--r--src/bignum.c4
-rw-r--r--src/callint.c2
-rw-r--r--src/coding.c60
-rw-r--r--src/coding.h6
-rw-r--r--src/dired.c2
-rw-r--r--src/dispextern.h2
-rw-r--r--src/doc.c2
-rw-r--r--src/doprnt.c4
-rw-r--r--src/editfns.c2
-rw-r--r--src/emacs-module.c2
-rw-r--r--src/emacs.c2
-rw-r--r--src/fileio.c2
-rw-r--r--src/filelock.c2
-rw-r--r--src/fns.c2
-rw-r--r--src/font.c6
-rw-r--r--src/insdel.c2
-rw-r--r--src/json.c18
-rw-r--r--src/keyboard.c5
-rw-r--r--src/lisp.h14
-rw-r--r--src/lread.c2
-rw-r--r--src/module-env-25.h4
-rw-r--r--src/syntax.c5
-rw-r--r--src/sysdep.c6
-rw-r--r--src/termcap.c8
-rw-r--r--src/timefns.c6
-rw-r--r--src/unexmacosx.c2
-rw-r--r--src/w16select.c16
-rw-r--r--src/w32.c12
-rw-r--r--src/w32fns.c4
-rw-r--r--src/w32proc.c10
-rw-r--r--src/w32select.c2
-rw-r--r--src/xdisp.c10
-rw-r--r--src/xfont.c2
35 files changed, 116 insertions, 118 deletions
diff --git a/src/alloc.c b/src/alloc.c
index 8fb514f78fb..f929a37271b 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -1814,7 +1814,7 @@ static char const string_overrun_cookie[GC_STRING_OVERRUN_COOKIE_SIZE] =
#define GC_STRING_EXTRA (GC_STRING_OVERRUN_COOKIE_SIZE)
/* Exact bound on the number of bytes in a string, not counting the
- terminating null. A string cannot contain more bytes than
+ terminating NUL. A string cannot contain more bytes than
STRING_BYTES_BOUND, nor can it be so long that the size_t
arithmetic in allocate_string_data would overflow while it is
calculating a value to be passed to malloc. */
diff --git a/src/bidi.c b/src/bidi.c
index a62b888432e..c530d49c107 100644
--- a/src/bidi.c
+++ b/src/bidi.c
@@ -2335,7 +2335,7 @@ bidi_resolve_weak (struct bidi_it *bidi_it)
and make it L right away, to avoid the
potentially costly loop below. This is
important when the buffer has a long series of
- control characters, like binary nulls, and no
+ control characters, like binary NULs, and no
R2L characters at all. */
&& new_level == 0
&& !bidi_explicit_dir_char (bidi_it->ch)
@@ -2993,7 +2993,7 @@ bidi_resolve_neutral (struct bidi_it *bidi_it)
}
/* The next two "else if" clauses are shortcuts for the
important special case when we have a long sequence of
- neutral or WEAK_BN characters, such as whitespace or nulls or
+ neutral or WEAK_BN characters, such as whitespace or NULs or
other control characters, on the base embedding level of the
paragraph, and that sequence goes all the way to the end of
the paragraph and follows a character whose resolved
diff --git a/src/bignum.c b/src/bignum.c
index 14c4cdb82ac..4118601e108 100644
--- a/src/bignum.c
+++ b/src/bignum.c
@@ -271,7 +271,7 @@ bignum_to_uintmax (Lisp_Object x)
/* Yield an upper bound on the buffer size needed to contain a C
string representing the NUM in base BASE. This includes any
- preceding '-' and the terminating null. */
+ preceding '-' and the terminating NUL. */
static ptrdiff_t
mpz_bufsize (mpz_t const num, int base)
{
@@ -336,7 +336,7 @@ bignum_to_string (Lisp_Object num, int base)
/* Create a bignum by scanning NUM, with digits in BASE.
NUM must consist of an optional '-', a nonempty sequence
- of base-BASE digits, and a terminating null byte, and
+ of base-BASE digits, and a terminating NUL byte, and
the represented number must not be in fixnum range. */
Lisp_Object
diff --git a/src/callint.c b/src/callint.c
index 9993e732fb4..88a3c348d0a 100644
--- a/src/callint.c
+++ b/src/callint.c
@@ -714,7 +714,7 @@ invoke it. If KEYS is omitted or nil, the return value of
default:
{
/* How many bytes are left unprocessed in the specs string?
- (Note that this excludes the trailing null byte.) */
+ (Note that this excludes the trailing NUL byte.) */
ptrdiff_t bytes_left = string_len - (tem - string);
unsigned letter;
diff --git a/src/coding.c b/src/coding.c
index a216460fc2c..905c7ced849 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -5719,7 +5719,7 @@ setup_coding_system (Lisp_Object coding_system, struct coding_system *coding)
coding->common_flags |= CODING_REQUIRE_DETECTION_MASK;
coding->spec.undecided.inhibit_nbd
= (encode_inhibit_flag
- (AREF (attrs, coding_attr_undecided_inhibit_null_byte_detection)));
+ (AREF (attrs, coding_attr_undecided_inhibit_nul_byte_detection)));
coding->spec.undecided.inhibit_ied
= (encode_inhibit_flag
(AREF (attrs, coding_attr_undecided_inhibit_iso_escape_detection)));
@@ -6514,9 +6514,9 @@ detect_coding (struct coding_system *coding)
{
int c, i;
struct coding_detection_info detect_info;
- bool null_byte_found = 0, eight_bit_found = 0;
+ bool nul_byte_found = 0, eight_bit_found = 0;
bool inhibit_nbd = inhibit_flag (coding->spec.undecided.inhibit_nbd,
- inhibit_null_byte_detection);
+ inhibit_nul_byte_detection);
bool inhibit_ied = inhibit_flag (coding->spec.undecided.inhibit_ied,
inhibit_iso_escape_detection);
bool prefer_utf_8 = coding->spec.undecided.prefer_utf_8;
@@ -6529,7 +6529,7 @@ detect_coding (struct coding_system *coding)
if (c & 0x80)
{
eight_bit_found = 1;
- if (null_byte_found)
+ if (nul_byte_found)
break;
}
else if (c < 0x20)
@@ -6544,7 +6544,7 @@ detect_coding (struct coding_system *coding)
if (! (detect_info.rejected & CATEGORY_MASK_ISO_7_ELSE))
{
/* We didn't find an 8-bit code. We may
- have found a null-byte, but it's very
+ have found a NUL-byte, but it's very
rare that a binary file conforms to
ISO-2022. */
src = src_end;
@@ -6556,7 +6556,7 @@ detect_coding (struct coding_system *coding)
}
else if (! c && !inhibit_nbd)
{
- null_byte_found = 1;
+ nul_byte_found = 1;
if (eight_bit_found)
break;
}
@@ -6588,7 +6588,7 @@ detect_coding (struct coding_system *coding)
coding->head_ascii++;
}
- if (null_byte_found || eight_bit_found
+ if (nul_byte_found || eight_bit_found
|| coding->head_ascii < coding->src_bytes
|| detect_info.found)
{
@@ -6606,7 +6606,7 @@ detect_coding (struct coding_system *coding)
}
else
{
- if (null_byte_found)
+ if (nul_byte_found)
{
detect_info.checked |= ~CATEGORY_MASK_UTF_16;
detect_info.rejected |= ~CATEGORY_MASK_UTF_16;
@@ -6679,7 +6679,7 @@ detect_coding (struct coding_system *coding)
else
found = CODING_ID_NAME (this->id);
}
- else if (null_byte_found)
+ else if (nul_byte_found)
found = Qno_conversion;
else if ((detect_info.rejected & CATEGORY_MASK_ANY)
== CATEGORY_MASK_ANY)
@@ -8448,7 +8448,7 @@ from_unicode (Lisp_Object str)
Lisp_Object
from_unicode_buffer (const wchar_t *wstr)
{
- /* We get one of the two final null bytes for free. */
+ /* We get one of the two final NUL bytes for free. */
ptrdiff_t len = 1 + sizeof (wchar_t) * wcslen (wstr);
AUTO_STRING_WITH_LEN (str, (char *) wstr, len);
return from_unicode (str);
@@ -8461,7 +8461,7 @@ to_unicode (Lisp_Object str, Lisp_Object *buf)
/* We need to make another copy (in addition to the one made by
code_convert_string_norecord) to ensure that the final string is
_doubly_ zero terminated --- that is, that the string is
- terminated by two zero bytes and one utf-16le null character.
+ terminated by two zero bytes and one utf-16le NUL character.
Because strings are already terminated with a single zero byte,
we just add one additional zero. */
str = make_uninit_string (SBYTES (*buf) + 1);
@@ -8577,7 +8577,7 @@ detect_coding_system (const unsigned char *src,
ptrdiff_t id;
struct coding_detection_info detect_info;
enum coding_category base_category;
- bool null_byte_found = 0, eight_bit_found = 0;
+ bool nul_byte_found = 0, eight_bit_found = 0;
if (NILP (coding_system))
coding_system = Qundecided;
@@ -8604,7 +8604,7 @@ detect_coding_system (const unsigned char *src,
struct coding_system *this UNINIT;
int c, i;
bool inhibit_nbd = inhibit_flag (coding.spec.undecided.inhibit_nbd,
- inhibit_null_byte_detection);
+ inhibit_nul_byte_detection);
bool inhibit_ied = inhibit_flag (coding.spec.undecided.inhibit_ied,
inhibit_iso_escape_detection);
bool prefer_utf_8 = coding.spec.undecided.prefer_utf_8;
@@ -8616,7 +8616,7 @@ detect_coding_system (const unsigned char *src,
if (c & 0x80)
{
eight_bit_found = 1;
- if (null_byte_found)
+ if (nul_byte_found)
break;
}
else if (c < 0x20)
@@ -8631,7 +8631,7 @@ detect_coding_system (const unsigned char *src,
if (! (detect_info.rejected & CATEGORY_MASK_ISO_7_ELSE))
{
/* We didn't find an 8-bit code. We may
- have found a null-byte, but it's very
+ have found a NUL-byte, but it's very
rare that a binary file confirm to
ISO-2022. */
src = src_end;
@@ -8643,7 +8643,7 @@ detect_coding_system (const unsigned char *src,
}
else if (! c && !inhibit_nbd)
{
- null_byte_found = 1;
+ nul_byte_found = 1;
if (eight_bit_found)
break;
}
@@ -8654,7 +8654,7 @@ detect_coding_system (const unsigned char *src,
coding.head_ascii++;
}
- if (null_byte_found || eight_bit_found
+ if (nul_byte_found || eight_bit_found
|| coding.head_ascii < coding.src_bytes
|| detect_info.found)
{
@@ -8669,7 +8669,7 @@ detect_coding_system (const unsigned char *src,
}
else
{
- if (null_byte_found)
+ if (nul_byte_found)
{
detect_info.checked |= ~CATEGORY_MASK_UTF_16;
detect_info.rejected |= ~CATEGORY_MASK_UTF_16;
@@ -8716,7 +8716,7 @@ detect_coding_system (const unsigned char *src,
}
if ((detect_info.rejected & CATEGORY_MASK_ANY) == CATEGORY_MASK_ANY
- || null_byte_found)
+ || nul_byte_found)
{
detect_info.found = CATEGORY_MASK_RAW_TEXT;
id = CODING_SYSTEM_ID (Qno_conversion);
@@ -8818,7 +8818,7 @@ detect_coding_system (const unsigned char *src,
{
if (detect_info.found & ~CATEGORY_MASK_UTF_16)
{
- if (null_byte_found)
+ if (nul_byte_found)
normal_eol = EOL_SEEN_LF;
else
normal_eol = detect_eol (coding.source, src_bytes,
@@ -10478,8 +10478,8 @@ usage: (define-coding-system-internal ...) */)
{
if (nargs < coding_arg_undecided_max)
goto short_args;
- ASET (attrs, coding_attr_undecided_inhibit_null_byte_detection,
- args[coding_arg_undecided_inhibit_null_byte_detection]);
+ ASET (attrs, coding_attr_undecided_inhibit_nul_byte_detection,
+ args[coding_arg_undecided_inhibit_nul_byte_detection]);
ASET (attrs, coding_attr_undecided_inhibit_iso_escape_detection,
args[coding_arg_undecided_inhibit_iso_escape_detection]);
ASET (attrs, coding_attr_undecided_prefer_utf_8,
@@ -11234,18 +11234,18 @@ to explicitly specify some coding system that doesn't use ISO-2022
escape sequence (e.g., `latin-1') on reading by \\[universal-coding-system-argument]. */);
inhibit_iso_escape_detection = 0;
- DEFVAR_BOOL ("inhibit-null-byte-detection",
- inhibit_null_byte_detection,
- doc: /* If non-nil, Emacs ignores null bytes on code detection.
+ DEFVAR_BOOL ("inhibit-nul-byte-detection",
+ inhibit_nul_byte_detection,
+ doc: /* If non-nil, Emacs ignores NUL bytes on code detection.
By default, Emacs treats it as binary data, and does not attempt to
decode it. The effect is as if you specified `no-conversion' for
reading that text.
-Set this to non-nil when a regular text happens to include null bytes.
-Examples are Index nodes of Info files and null-byte delimited output
-from GNU Find and GNU Grep. Emacs will then ignore the null bytes and
+Set this to non-nil when a regular text happens to include NUL bytes.
+Examples are Index nodes of Info files and NUL-byte delimited output
+from GNU Find and GNU Grep. Emacs will then ignore the NUL bytes and
decode text as usual. */);
- inhibit_null_byte_detection = 0;
+ inhibit_nul_byte_detection = 0;
DEFVAR_BOOL ("disable-ascii-optimization", disable_ascii_optimization,
doc: /* If non-nil, Emacs does not optimize code decoder for ASCII files.
@@ -11304,7 +11304,7 @@ internal character representation. */);
"automatic conversion on decoding.");
plist[15] = args[coding_arg_eol_type] = Qnil;
args[coding_arg_plist] = CALLMANY (Flist, plist);
- args[coding_arg_undecided_inhibit_null_byte_detection] = make_fixnum (0);
+ args[coding_arg_undecided_inhibit_nul_byte_detection] = make_fixnum (0);
args[coding_arg_undecided_inhibit_iso_escape_detection] = make_fixnum (0);
Fdefine_coding_system_internal (coding_arg_undecided_max, args);
diff --git a/src/coding.h b/src/coding.h
index 58e12d6176a..e38c0ee3968 100644
--- a/src/coding.h
+++ b/src/coding.h
@@ -82,7 +82,7 @@ enum define_coding_ccl_arg_index
enum define_coding_undecided_arg_index
{
- coding_arg_undecided_inhibit_null_byte_detection = coding_arg_max,
+ coding_arg_undecided_inhibit_nul_byte_detection = coding_arg_max,
coding_arg_undecided_inhibit_iso_escape_detection,
coding_arg_undecided_prefer_utf_8,
coding_arg_undecided_max
@@ -137,7 +137,7 @@ enum coding_attr_index
coding_attr_emacs_mule_full,
- coding_attr_undecided_inhibit_null_byte_detection,
+ coding_attr_undecided_inhibit_nul_byte_detection,
coding_attr_undecided_inhibit_iso_escape_detection,
coding_attr_undecided_prefer_utf_8,
@@ -351,7 +351,7 @@ struct emacs_mule_spec
struct undecided_spec
{
- /* Inhibit null byte detection. 1 means always inhibit,
+ /* Inhibit NUL byte detection. 1 means always inhibit,
-1 means do not inhibit, 0 means rely on user variable. */
int inhibit_nbd;
diff --git a/src/dired.c b/src/dired.c
index 17a21b07e3e..493758292b9 100644
--- a/src/dired.c
+++ b/src/dired.c
@@ -930,7 +930,7 @@ file_attributes (int fd, char const *name,
struct stat s;
/* An array to hold the mode string generated by filemodestring,
- including its terminating space and null byte. */
+ including its terminating space and NUL byte. */
char modes[sizeof "-rwxr-xr-x "];
char *uname = NULL, *gname = NULL;
diff --git a/src/dispextern.h b/src/dispextern.h
index 894753669d0..7947dc2dba3 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -1937,7 +1937,7 @@ struct bidi_string_data {
Lisp_Object lstring; /* Lisp string to reorder, or nil */
const unsigned char *s; /* string data, or NULL if reordering buffer */
ptrdiff_t schars; /* the number of characters in the string,
- excluding the terminating null */
+ excluding the terminating NUL */
ptrdiff_t bufpos; /* buffer position of lstring, or 0 if N/A */
bool_bf from_disp_str : 1; /* True means the string comes from a
display property */
diff --git a/src/doc.c b/src/doc.c
index 3e43d6db069..372e376c625 100644
--- a/src/doc.c
+++ b/src/doc.c
@@ -233,7 +233,7 @@ get_doc_string (Lisp_Object filepos, bool unibyte, bool definition)
}
/* Scan the text and perform quoting with ^A (char code 1).
- ^A^A becomes ^A, ^A0 becomes a null char, and ^A_ becomes a ^_. */
+ ^A^A becomes ^A, ^A0 becomes a NUL char, and ^A_ becomes a ^_. */
from = get_doc_string_buffer + offset;
to = get_doc_string_buffer + offset;
while (from != p)
diff --git a/src/doprnt.c b/src/doprnt.c
index d0c703398fa..5fb70634048 100644
--- a/src/doprnt.c
+++ b/src/doprnt.c
@@ -35,7 +35,7 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
sequence.
. It accepts a pointer to the end of the format string, so the format string
- could include embedded null characters.
+ could include embedded NUL characters.
. It signals an error if the length of the formatted string is about to
overflow ptrdiff_t or size_t, to avoid producing strings longer than what
@@ -123,7 +123,7 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
to fit and return BUFSIZE - 1; if this truncates a multibyte
sequence, store '\0' into the sequence's first byte.
Returns the number of bytes stored into BUFFER, excluding
- the terminating null byte. Output is always null-terminated.
+ the terminating NUL byte. Output is always NUL-terminated.
String arguments are passed as C strings.
Integers are passed as C integers. */
diff --git a/src/editfns.c b/src/editfns.c
index d6ad7474fe8..ac9b871835e 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -3086,7 +3086,7 @@ styled_format (ptrdiff_t nargs, Lisp_Object *args, bool message)
: FLT_RADIX == 16 ? 4
: -1)),
- /* Maximum number of bytes (including terminating null) generated
+ /* Maximum number of bytes (including terminating NUL) generated
by any format, if precision is no more than USEFUL_PRECISION_MAX.
On all practical hosts, %Lf is the worst case. */
SPRINTF_BUFSIZE = (sizeof "-." + (LDBL_MAX_10_EXP + 1)
diff --git a/src/emacs-module.c b/src/emacs-module.c
index 4e2411cb295..530a8ebefef 100644
--- a/src/emacs-module.c
+++ b/src/emacs-module.c
@@ -584,7 +584,7 @@ module_make_string (emacs_env *env, const char *str, ptrdiff_t length)
MODULE_FUNCTION_BEGIN (module_nil);
if (! (0 <= length && length <= STRING_BYTES_BOUND))
overflow_error ();
- /* FIXME: AUTO_STRING_WITH_LEN requires STR to be null-terminated,
+ /* FIXME: AUTO_STRING_WITH_LEN requires STR to be NUL-terminated,
but we shouldn't require that. */
AUTO_STRING_WITH_LEN (lstr, str, length);
return lisp_to_value (env,
diff --git a/src/emacs.c b/src/emacs.c
index e16e230b4ac..68835cac985 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -2639,7 +2639,7 @@ decode_env_path (const char *evarname, const char *defalt, bool empty)
}
}
else if (cnv_result != 0 && d > path_utf8)
- d[-1] = '\0'; /* remove last semi-colon and null-terminate PATH */
+ d[-1] = '\0'; /* remove last semi-colon and NUL-terminate PATH */
} while (q);
path_copy = path_utf8;
#else /* MSDOS */
diff --git a/src/fileio.c b/src/fileio.c
index 7b9446c7e12..4ee125d7de2 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -1639,7 +1639,7 @@ file_name_absolute_p (const char *filename)
}
/* Put into BUF the concatenation of DIR and FILE, with an intervening
- directory separator if needed. Return a pointer to the null byte
+ directory separator if needed. Return a pointer to the NUL byte
at the end of the concatenated string. */
char *
splice_dir_file (char *buf, char const *dir, char const *file)
diff --git a/src/filelock.c b/src/filelock.c
index 64310f5c538..5cec1996201 100644
--- a/src/filelock.c
+++ b/src/filelock.c
@@ -296,7 +296,7 @@ typedef struct
/* Write the name of the lock file for FNAME into LOCKNAME. Length
will be that of FNAME plus two more for the leading ".#", plus one
- for the null. */
+ for the NUL. */
#define MAKE_LOCK_NAME(lockname, fname) \
(lockname = SAFE_ALLOCA (SBYTES (fname) + 2 + 1), \
fill_in_lock_file_name (lockname, fname))
diff --git a/src/fns.c b/src/fns.c
index 6573124a935..b97b132b0fe 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -412,7 +412,7 @@ Symbols are also allowed; their print names are used instead. */)
while ((cmp = filevercmp (p1, p2)) == 0)
{
- /* If the strings are identical through their first null bytes,
+ /* If the strings are identical through their first NUL bytes,
skip past identical prefixes and try again. */
ptrdiff_t size = strlen (p1) + 1;
p1 += size;
diff --git a/src/font.c b/src/font.c
index 9220fb1cd24..5ca89c97dcf 100644
--- a/src/font.c
+++ b/src/font.c
@@ -1007,7 +1007,7 @@ font_expand_wildcards (Lisp_Object *field, int n)
}
-/* Parse NAME (null terminated) as XLFD and store information in FONT
+/* Parse NAME (NUL terminated) as XLFD and store information in FONT
(font-spec or font-entity). Size property of FONT is set as
follows:
specified XLFD fields FONT property
@@ -1353,7 +1353,7 @@ font_unparse_xlfd (Lisp_Object font, int pixel_size, char *name, int nbytes)
return len < nbytes ? len : -1;
}
-/* Parse NAME (null terminated) and store information in FONT
+/* Parse NAME (NUL terminated) and store information in FONT
(font-spec or font-entity). NAME is supplied in either the
Fontconfig or GTK font name format. If NAME is successfully
parsed, return 0. Otherwise return -1.
@@ -1725,7 +1725,7 @@ font_unparse_fcname (Lisp_Object font, int pixel_size, char *name, int nbytes)
#endif
-/* Parse NAME (null terminated) and store information in FONT
+/* Parse NAME (NUL terminated) and store information in FONT
(font-spec or font-entity). If NAME is successfully parsed, return
0. Otherwise return -1. */
diff --git a/src/insdel.c b/src/insdel.c
index fd725ac8785..1231bb2682b 100644
--- a/src/insdel.c
+++ b/src/insdel.c
@@ -708,7 +708,7 @@ insert_char (int c)
insert ((char *) str, len);
}
-/* Insert the null-terminated string S before point. */
+/* Insert the NUL-terminated string S before point. */
void
insert_string (const char *s)
diff --git a/src/json.c b/src/json.c
index b5fb3fee059..5e1439f881a 100644
--- a/src/json.c
+++ b/src/json.c
@@ -229,7 +229,7 @@ json_make_string (const char *data, ptrdiff_t size)
Qutf_8_unix, Qt, false, true, true);
}
-/* Create a multibyte Lisp string from the null-terminated UTF-8
+/* Create a multibyte Lisp string from the NUL-terminated UTF-8
string beginning at DATA. If the string is not a valid UTF-8
string, an unspecified string is returned. Note that all callers
below either pass only value UTF-8 strings or use this function for
@@ -301,10 +301,10 @@ json_release_object (void *object)
}
/* Signal an error if OBJECT is not a string, or if OBJECT contains
- embedded null characters. */
+ embedded NUL characters. */
static void
-check_string_without_embedded_nulls (Lisp_Object object)
+check_string_without_embedded_nuls (Lisp_Object object)
{
CHECK_STRING (object);
CHECK_TYPE (memchr (SDATA (object), '\0', SBYTES (object)) == NULL,
@@ -381,8 +381,8 @@ lisp_to_json_toplevel_1 (Lisp_Object lisp,
{
Lisp_Object key = json_encode (HASH_KEY (h, i));
/* We can't specify the length, so the string must be
- null-terminated. */
- check_string_without_embedded_nulls (key);
+ NUL-terminated. */
+ check_string_without_embedded_nuls (key);
const char *key_str = SSDATA (key);
/* Reject duplicate keys. These are possible if the hash
table test is not `equal'. */
@@ -432,8 +432,8 @@ lisp_to_json_toplevel_1 (Lisp_Object lisp,
CHECK_SYMBOL (key_symbol);
Lisp_Object key = SYMBOL_NAME (key_symbol);
/* We can't specify the length, so the string must be
- null-terminated. */
- check_string_without_embedded_nulls (key);
+ NUL-terminated. */
+ check_string_without_embedded_nuls (key);
key_str = SSDATA (key);
/* In plists, ensure leading ":" in keys is stripped. It
will be reconstructed later in `json_to_lisp'.*/
@@ -568,7 +568,7 @@ false values, t, numbers, strings, or other vectors hashtables, alists
or plists. t will be converted to the JSON true value. Vectors will
be converted to JSON arrays, whereas hashtables, alists and plists are
converted to JSON objects. Hashtable keys must be strings without
-embedded null characters and must be unique within each object. Alist
+embedded NUL characters and must be unique within each object. Alist
and plist keys must be symbols; if a key is duplicate, the first
instance is used.
@@ -945,7 +945,7 @@ usage: (json-parse-string STRING &rest ARGS) */)
Lisp_Object string = args[0];
Lisp_Object encoded = json_encode (string);
- check_string_without_embedded_nulls (encoded);
+ check_string_without_embedded_nuls (encoded);
struct json_configuration conf = {json_object_hashtable, QCnull, QCfalse};
json_parse_args (nargs - 1, args + 1, &conf, true);
diff --git a/src/keyboard.c b/src/keyboard.c
index 362bd663878..8fb6db987b5 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -737,7 +737,8 @@ void
force_auto_save_soon (void)
{
last_auto_save = - auto_save_interval - 1;
-
+ /* FIXME: What's the relationship between forcing auto-save and adding
+ a buffer-switch event? */
record_asynch_buffer_change ();
}
#endif
@@ -6191,7 +6192,7 @@ parse_modifiers_uncached (Lisp_Object symbol, ptrdiff_t *modifier_end)
static Lisp_Object
apply_modifiers_uncached (int modifiers, char *base, int base_len, int base_len_byte)
{
- /* Since BASE could contain nulls, we can't use intern here; we have
+ /* Since BASE could contain NULs, we can't use intern here; we have
to use Fintern, which expects a genuine Lisp_String, and keeps a
reference to it. */
char new_mods[sizeof "A-C-H-M-S-s-up-down-drag-double-triple-"];
diff --git a/src/lisp.h b/src/lisp.h
index 8ec892f17b9..c33c311b4ac 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -1530,11 +1530,11 @@ STRING_MULTIBYTE (Lisp_Object str)
}
/* An upper bound on the number of bytes in a Lisp string, not
- counting the terminating null. This a tight enough bound to
+ counting the terminating NUL. This a tight enough bound to
prevent integer overflow errors that would otherwise occur during
string size calculations. A string cannot contain more bytes than
a fixnum can represent, nor can it be so long that C pointer
- arithmetic stops working on the string plus its terminating null.
+ arithmetic stops working on the string plus its terminating NUL.
Although the actual size limit (see STRING_BYTES_MAX in alloc.c)
may be a bit smaller than STRING_BYTES_BOUND, calculating it here
would expose alloc.c internal details that we'd rather keep
@@ -3045,7 +3045,7 @@ CHECK_INTEGER (Lisp_Object x)
/* Define a built-in function for calling from Lisp.
`lname' should be the name to give the function in Lisp,
- as a null-terminated C string.
+ as a NUL-terminated C string.
`fnname' should be the name of the function in C.
By convention, it starts with F.
`sname' should be the name for the C constant structure
@@ -4729,7 +4729,7 @@ extern char *xlispstrdup (Lisp_Object) ATTRIBUTE_MALLOC;
extern void dupstring (char **, char const *);
/* Make DEST a copy of STRING's data. Return a pointer to DEST's terminating
- null byte. This is like stpcpy, except the source is a Lisp string. */
+ NUL byte. This is like stpcpy, except the source is a Lisp string. */
INLINE char *
lispstpcpy (char *dest, Lisp_Object string)
@@ -4933,7 +4933,7 @@ enum
: list4 (a, b, c, d))
/* Declare NAME as an auto Lisp string if possible, a GC-based one if not.
- Take its unibyte value from the null-terminated string STR,
+ Take its unibyte value from the NUL-terminated string STR,
an expression that should not have side effects.
STR's value is not necessarily copied. The resulting Lisp string
should not be modified or given text properties or made visible to
@@ -4943,8 +4943,8 @@ enum
AUTO_STRING_WITH_LEN (name, str, strlen (str))
/* Declare NAME as an auto Lisp string if possible, a GC-based one if not.
- Take its unibyte value from the null-terminated string STR with length LEN.
- STR may have side effects and may contain null bytes.
+ Take its unibyte value from the NUL-terminated string STR with length LEN.
+ STR may have side effects and may contain NUL bytes.
STR's value is not necessarily copied. The resulting Lisp string
should not be modified or given text properties or made visible to
user code. */
diff --git a/src/lread.c b/src/lread.c
index 8b0d693daf2..2d64b638ff5 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -2659,7 +2659,7 @@ free_contents (void *p)
static Lisp_Object
read_integer (Lisp_Object readcharfun, EMACS_INT radix)
{
- /* Room for sign, leading 0, other digits, trailing null byte.
+ /* Room for sign, leading 0, other digits, trailing NUL byte.
Also, room for invalid syntax diagnostic. */
size_t len = max (1 + 1 + UINTMAX_WIDTH + 1,
sizeof "integer, radix " + INT_STRLEN_BOUND (EMACS_INT));
diff --git a/src/module-env-25.h b/src/module-env-25.h
index 675010b995b..d8f8eb68119 100644
--- a/src/module-env-25.h
+++ b/src/module-env-25.h
@@ -88,13 +88,13 @@
EMACS_ATTRIBUTE_NONNULL(1);
/* Copy the content of the Lisp string VALUE to BUFFER as an utf8
- null-terminated string.
+ NUL-terminated string.
SIZE must point to the total size of the buffer. If BUFFER is
NULL or if SIZE is not big enough, write the required buffer size
to SIZE and return true.
- Note that SIZE must include the last null byte (e.g. "abc" needs
+ Note that SIZE must include the last NUL byte (e.g. "abc" needs
a buffer of size 4).
Return true if the string was successfully copied. */
diff --git a/src/syntax.c b/src/syntax.c
index 5c38e92026e..edfdae22590 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -3477,10 +3477,7 @@ internalize_parse_state (Lisp_Object external, struct lisp_parse_state *state)
else
{
tem = Fcar (external);
- if (!NILP (tem))
- state->depth = XFIXNUM (tem);
- else
- state->depth = 0;
+ state->depth = FIXNUMP (tem) ? XFIXNUM (tem) : 0;
external = Fcdr (external);
external = Fcdr (external);
diff --git a/src/sysdep.c b/src/sysdep.c
index fe5a44ea2da..57ea8220cac 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -257,12 +257,12 @@ get_current_dir_name_or_unreachable (void)
char *pwd;
- /* The maximum size of a directory name, including the terminating null.
+ /* The maximum size of a directory name, including the terminating NUL.
Leave room so that the caller can append a trailing slash. */
ptrdiff_t dirsize_max = min (PTRDIFF_MAX, SIZE_MAX) - 1;
/* The maximum size of a buffer for a file name, including the
- terminating null. This is bounded by MAXPATHLEN, if available. */
+ terminating NUL. This is bounded by MAXPATHLEN, if available. */
ptrdiff_t bufsize_max = dirsize_max;
#ifdef MAXPATHLEN
bufsize_max = min (bufsize_max, MAXPATHLEN);
@@ -3435,7 +3435,7 @@ system_process_attributes (Lisp_Object pid)
if (nread)
{
- /* We don't want trailing null characters. */
+ /* We don't want trailing NUL characters. */
for (p = cmdline + nread; cmdline < p && !p[-1]; p--)
continue;
diff --git a/src/termcap.c b/src/termcap.c
index 9e081baa62e..7dc0d572888 100644
--- a/src/termcap.c
+++ b/src/termcap.c
@@ -162,7 +162,7 @@ tgetst1 (char *ptr, char **area)
else
ret = *area;
- /* Copy the string value, stopping at null or colon.
+ /* Copy the string value, stopping at NUL or colon.
Also process ^ and \ abbreviations. */
p = ptr;
r = ret;
@@ -424,7 +424,7 @@ tgetent (char *bp, const char *name)
return -1;
buf.size = BUFSIZE;
- /* Add 1 to size to ensure room for terminating null. */
+ /* Add 1 to size to ensure room for terminating NUL. */
buf.beg = xmalloc (buf.size + 1);
term = indirect ? indirect : (char *)name;
@@ -480,7 +480,7 @@ tgetent (char *bp, const char *name)
*bp1 = '\0';
/* Does this entry refer to another terminal type's entry?
- If something is found, copy it into heap and null-terminate it. */
+ If something is found, copy it into heap and NUL-terminate it. */
tc_search_point = find_capability (tc_search_point, "tc");
term = tgetst1 (tc_search_point, 0);
}
@@ -618,7 +618,7 @@ gobble_line (int fd, register struct termcap_buffer *bufp, char *append_end)
{
ptrdiff_t ptr_offset = bufp->ptr - buf;
ptrdiff_t append_end_offset = append_end - buf;
- /* Add 1 to size to ensure room for terminating null. */
+ /* Add 1 to size to ensure room for terminating NUL. */
ptrdiff_t size = bufp->size + 1;
bufp->beg = buf = xpalloc (buf, &size, 1, -1, 1);
bufp->size = size - 1;
diff --git a/src/timefns.c b/src/timefns.c
index 5beeaf57a25..514fa24f8b9 100644
--- a/src/timefns.c
+++ b/src/timefns.c
@@ -1133,7 +1133,7 @@ or (if you need time as a string) `format-time-string'. */)
determine how many bytes would be written, use NULL for S and
((size_t) -1) for MAXSIZE.
- This function behaves like nstrftime, except it allows null
+ This function behaves like nstrftime, except it allows NUL
bytes in FORMAT and it does not support nanoseconds. */
static size_t
emacs_nmemftime (char *s, size_t maxsize, const char *format,
@@ -1141,8 +1141,8 @@ emacs_nmemftime (char *s, size_t maxsize, const char *format,
{
size_t total = 0;
- /* Loop through all the null-terminated strings in the format
- argument. Normally there's just one null-terminated string, but
+ /* Loop through all the NUL-terminated strings in the format
+ argument. Normally there's just one NUL-terminated string, but
there can be arbitrarily many, concatenated together, if the
format contains '\0' bytes. nstrftime stops at the first
'\0' byte so we must invoke it separately for each such string. */
diff --git a/src/unexmacosx.c b/src/unexmacosx.c
index 53a30e36278..a94c0cccb6b 100644
--- a/src/unexmacosx.c
+++ b/src/unexmacosx.c
@@ -447,7 +447,7 @@ unexec_regions_recorder (task_t task, void *rr, unsigned type,
while (num && num_unexec_regions < MAX_UNEXEC_REGIONS)
{
- /* Subtract the size of trailing null bytes from filesize. It
+ /* Subtract the size of trailing NUL bytes from filesize. It
can be smaller than vmsize in segment commands. In such a
case, trailing bytes are initialized with zeros. */
for (p = ranges->address + ranges->size; p > ranges->address; p--)
diff --git a/src/w16select.c b/src/w16select.c
index b935b9f4f54..3eb219954af 100644
--- a/src/w16select.c
+++ b/src/w16select.c
@@ -220,7 +220,7 @@ set_clipboard_data (unsigned Format, void *Data, unsigned Size, int Raw)
/* need to know final size after '\r' chars are inserted (the
standard CF_OEMTEXT clipboard format uses CRLF line endings,
while Emacs uses just LF internally). */
- truelen = Size + 1; /* +1 for the terminating null */
+ truelen = Size + 1; /* +1 for the terminating NUL */
if (!Raw)
{
@@ -243,7 +243,7 @@ set_clipboard_data (unsigned Format, void *Data, unsigned Size, int Raw)
{
dosmemput (Data, Size, xbuf_addr);
- /* Terminate with a null, otherwise Windows does strange things
+ /* Terminate with a NUL, otherwise Windows does strange things
when the text size is an integral multiple of 32 bytes. */
_farpokeb (_dos_ds, xbuf_addr + Size, '\0');
}
@@ -255,7 +255,7 @@ set_clipboard_data (unsigned Format, void *Data, unsigned Size, int Raw)
while (Size--)
{
/* Don't allow them to put binary data into the clipboard, since
- it will cause yanked data to be truncated at the first null. */
+ it will cause yanked data to be truncated at the first NUL. */
if (*dp == '\0')
return 2;
if (*dp == '\n')
@@ -263,7 +263,7 @@ set_clipboard_data (unsigned Format, void *Data, unsigned Size, int Raw)
_farnspokeb (buf_offset++, *dp++);
}
- /* Terminate with a null, otherwise Windows does strange things
+ /* Terminate with a NUL, otherwise Windows does strange things
when the text size is an integral multiple of 32 bytes. */
_farnspokeb (buf_offset, '\0');
}
@@ -354,13 +354,13 @@ get_clipboard_data (unsigned Format, void *Data, unsigned Size, int Raw)
__dpmi_int (0x2f, &regs);
if (regs.x.ax != 0)
{
- unsigned char null_char = '\0';
+ unsigned char nul_char = '\0';
unsigned long xbuf_beg = xbuf_addr;
/* If last_clipboard_text is NULL, we don't want to slow down
the next loop by an additional test. */
register unsigned char *lcdp =
- last_clipboard_text == NULL ? &null_char : last_clipboard_text;
+ last_clipboard_text == NULL ? &nul_char : last_clipboard_text;
/* Copy data from low memory, remove CR
characters before LF if needed. */
@@ -383,7 +383,7 @@ get_clipboard_data (unsigned Format, void *Data, unsigned Size, int Raw)
/* Windows reportedly rounds up the size of clipboard data
(passed in SIZE) to a multiple of 32, and removes trailing
spaces from each line without updating SIZE. We therefore
- bail out when we see the first null character. */
+ bail out when we see the first NUL character. */
else if (c == '\0')
break;
}
@@ -392,7 +392,7 @@ get_clipboard_data (unsigned Format, void *Data, unsigned Size, int Raw)
last time set_clipboard_data was called, pretend there's no
data in the clipboard. This is so we don't pass our own text
from the clipboard (which might be troublesome if the killed
- text includes null characters). */
+ text includes NUL characters). */
if (last_clipboard_text &&
xbuf_addr - xbuf_beg == (long)(lcdp - last_clipboard_text))
dp = (unsigned char *)Data + 1;
diff --git a/src/w32.c b/src/w32.c
index f3e88afd5bf..082a66b7384 100644
--- a/src/w32.c
+++ b/src/w32.c
@@ -5941,7 +5941,7 @@ is_symlink (const char *filename)
/* If NAME identifies a symbolic link, copy into BUF the file name of
the symlink's target. Copy at most BUF_SIZE bytes, and do NOT
- null-terminate the target name, even if it fits. Return the number
+ NUL-terminate the target name, even if it fits. Return the number
of bytes copied, or -1 if NAME is not a symlink or any error was
encountered while resolving it. The file name copied into BUF is
encoded in the current ANSI codepage. */
@@ -6045,10 +6045,10 @@ readlink (const char *name, char *buf, size_t buf_size)
size_t size_to_copy = buf_size;
/* According to MSDN, PrintNameLength does not include the
- terminating null character. */
+ terminating NUL character. */
lwname = alloca ((lwname_len + 1) * sizeof(WCHAR));
memcpy (lwname, lwname_src, lwname_len);
- lwname[lwname_len/sizeof(WCHAR)] = 0; /* null-terminate */
+ lwname[lwname_len/sizeof(WCHAR)] = 0; /* NUL-terminate */
filename_from_utf16 (lwname, resolved);
dostounix_filename (resolved);
lname_size = strlen (resolved) + 1;
@@ -9384,7 +9384,7 @@ w32_read_registry (HKEY rootkey, Lisp_Object lkey, Lisp_Object lname)
/* Convert input strings to UTF-16. */
encoded_key = code_convert_string_norecord (lkey, Qutf_16le, 1);
memcpy (key_w, SSDATA (encoded_key), SBYTES (encoded_key));
- /* wchar_t strings need to be terminated by 2 null bytes. */
+ /* wchar_t strings need to be terminated by 2 NUL bytes. */
key_w [SBYTES (encoded_key)/2] = L'\0';
encoded_vname = code_convert_string_norecord (lname, Qutf_16le, 1);
memcpy (value_w, SSDATA (encoded_vname), SBYTES (encoded_vname));
@@ -9476,7 +9476,7 @@ w32_read_registry (HKEY rootkey, Lisp_Object lkey, Lisp_Object lname)
case REG_SZ:
if (use_unicode)
{
- /* pvalue ends with 2 null bytes, but we need only one,
+ /* pvalue ends with 2 NUL bytes, but we need only one,
and AUTO_STRING_WITH_LEN will add it. */
if (pvalue[vsize - 1] == '\0')
vsize -= 2;
@@ -9485,7 +9485,7 @@ w32_read_registry (HKEY rootkey, Lisp_Object lkey, Lisp_Object lname)
}
else
{
- /* Don't waste a byte on the terminating null character,
+ /* Don't waste a byte on the terminating NUL character,
since make_unibyte_string will add one anyway. */
if (pvalue[vsize - 1] == '\0')
vsize--;
diff --git a/src/w32fns.c b/src/w32fns.c
index 1fbf32760dd..25900c54c88 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -7965,7 +7965,7 @@ DEFUN ("system-move-file-to-trash", Fsystem_move_file_to_trash,
{
SHFILEOPSTRUCTW file_op_w;
/* We need one more element beyond MAX_PATH because this is
- a list of file names, with the last element double-null
+ a list of file names, with the last element double-NUL
terminated. */
wchar_t tmp_path_w[MAX_PATH + 1];
@@ -9724,7 +9724,7 @@ get_dll_version (const char *dll_name)
/* Return the number of bytes in UTF-8 encoded string STR that
corresponds to at most LIM characters. If STR ends before LIM
characters, return the number of bytes in STR including the
- terminating null byte. */
+ terminating NUL byte. */
static int
utf8_mbslen_lim (const char *str, int lim)
{
diff --git a/src/w32proc.c b/src/w32proc.c
index ab0bf0fff08..8e878e6ef3e 100644
--- a/src/w32proc.c
+++ b/src/w32proc.c
@@ -2002,9 +2002,9 @@ sys_spawnve (int mode, char *cmdname, char **argv, char **envp)
}
/* we have to do some conjuring here to put argv and envp into the
- form CreateProcess wants... argv needs to be a space separated/null
- terminated list of parameters, and envp is a null
- separated/double-null terminated list of parameters.
+ form CreateProcess wants... argv needs to be a space separated/NUL
+ terminated list of parameters, and envp is a NUL
+ separated/double-NUL terminated list of parameters.
Additionally, zero-length args and args containing whitespace or
quote chars need to be wrapped in double quotes - for this to work,
@@ -3393,10 +3393,10 @@ If LCID (a 16-bit number) is not a valid locale, the result is nil. */)
got_full = GetLocaleInfo (XFIXNUM (lcid),
XFIXNUM (longform),
full_name, sizeof (full_name));
- /* GetLocaleInfo's return value includes the terminating null
+ /* GetLocaleInfo's return value includes the terminating NUL
character, when the returned information is a string, whereas
make_unibyte_string needs the string length without the
- terminating null. */
+ terminating NUL. */
if (got_full)
return make_unibyte_string (full_name, got_full - 1);
}
diff --git a/src/w32select.c b/src/w32select.c
index 1c84cb47eb1..af4f0496ed9 100644
--- a/src/w32select.c
+++ b/src/w32select.c
@@ -803,7 +803,7 @@ DEFUN ("w32-get-clipboard-data", Fw32_get_clipboard_data,
(void) ignored;
/* Don't pass our own text from the clipboard (which might be
- troublesome if the killed text includes null characters). */
+ troublesome if the killed text includes NUL characters). */
if (!NILP (current_text))
return ret;
diff --git a/src/xdisp.c b/src/xdisp.c
index 3172b3be890..a88fc698b85 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -10568,7 +10568,7 @@ message_log_check_duplicate (ptrdiff_t prev_bol_byte, ptrdiff_t this_bol_byte)
/* Display an echo area message M with a specified length of NBYTES
- bytes. The string may include null characters. If M is not a
+ bytes. The string may include NUL characters. If M is not a
string, clear out any existing message, and let the mini-buffer
text show through.
@@ -10672,7 +10672,7 @@ message3_nolog (Lisp_Object m)
}
-/* Display a null-terminated echo area message M. If M is 0, clear
+/* Display a NUL-terminated echo area message M. If M is 0, clear
out any existing message, and let the mini-buffer text show through.
The buffer M must continue to exist until after the echo area gets
@@ -24272,7 +24272,7 @@ are the selected window and the WINDOW's buffer). */)
return unbind_to (count, str);
}
-/* Write a null-terminated, right justified decimal representation of
+/* Write a NUL-terminated, right justified decimal representation of
the positive integer D to BUF using a minimal field width WIDTH. */
static void
@@ -24302,7 +24302,7 @@ pint2str (register char *buf, register int width, register ptrdiff_t d)
}
}
-/* Write a null-terminated, right justified decimal and "human
+/* Write a NUL-terminated, right justified decimal and "human
readable" representation of the nonnegative integer D to BUF using
a minimal field width WIDTH. D should be smaller than 999.5e24. */
@@ -24522,7 +24522,7 @@ decode_mode_spec (struct window *w, register int c, int field_width,
produce strings from numerical values, so limit preposterously
large values of FIELD_WIDTH to avoid overrunning the buffer's
end. The size of the buffer is enough for FRAME_MESSAGE_BUF_SIZE
- bytes plus the terminating null. */
+ bytes plus the terminating NUL. */
int width = min (field_width, FRAME_MESSAGE_BUF_SIZE (f));
struct buffer *b = current_buffer;
diff --git a/src/xfont.c b/src/xfont.c
index e40a31004f6..5ecbd6de33b 100644
--- a/src/xfont.c
+++ b/src/xfont.c
@@ -132,7 +132,7 @@ compare_font_names (const void *name1, const void *name2)
/* Decode XLFD as iso-8859-1 into OUTPUT, and return the byte length
of the decoding result. LEN is the byte length of XLFD, or -1 if
- XLFD is NULL terminated. The caller must assure that OUTPUT is at
+ XLFD is NUL terminated. The caller must assure that OUTPUT is at
least twice (plus 1) as large as XLFD. */
static ptrdiff_t