summaryrefslogtreecommitdiff
path: root/src/w16select.c
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/w16select.c
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/w16select.c')
-rw-r--r--src/w16select.c16
1 files changed, 8 insertions, 8 deletions
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;