diff options
| author | Stefan Monnier | 2019-03-21 23:55:28 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2019-03-21 23:55:28 -0400 |
| commit | 76fea1eba1332440eab2e3daecce053daccd3782 (patch) | |
| tree | 944ea8279b8a52cb715fe3493d909bc581776430 /src/sysdep.c | |
| parent | 57a60db2b88dfa5dea41a3a05b736cd7cd17a953 (diff) | |
| download | emacs-76fea1eba1332440eab2e3daecce053daccd3782.tar.gz emacs-76fea1eba1332440eab2e3daecce053daccd3782.zip | |
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/sysdep.c')
| -rw-r--r-- | src/sysdep.c | 6 |
1 files changed, 3 insertions, 3 deletions
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) | |||
| 257 | 257 | ||
| 258 | char *pwd; | 258 | char *pwd; |
| 259 | 259 | ||
| 260 | /* The maximum size of a directory name, including the terminating null. | 260 | /* The maximum size of a directory name, including the terminating NUL. |
| 261 | Leave room so that the caller can append a trailing slash. */ | 261 | Leave room so that the caller can append a trailing slash. */ |
| 262 | ptrdiff_t dirsize_max = min (PTRDIFF_MAX, SIZE_MAX) - 1; | 262 | ptrdiff_t dirsize_max = min (PTRDIFF_MAX, SIZE_MAX) - 1; |
| 263 | 263 | ||
| 264 | /* The maximum size of a buffer for a file name, including the | 264 | /* The maximum size of a buffer for a file name, including the |
| 265 | terminating null. This is bounded by MAXPATHLEN, if available. */ | 265 | terminating NUL. This is bounded by MAXPATHLEN, if available. */ |
| 266 | ptrdiff_t bufsize_max = dirsize_max; | 266 | ptrdiff_t bufsize_max = dirsize_max; |
| 267 | #ifdef MAXPATHLEN | 267 | #ifdef MAXPATHLEN |
| 268 | bufsize_max = min (bufsize_max, MAXPATHLEN); | 268 | bufsize_max = min (bufsize_max, MAXPATHLEN); |
| @@ -3435,7 +3435,7 @@ system_process_attributes (Lisp_Object pid) | |||
| 3435 | 3435 | ||
| 3436 | if (nread) | 3436 | if (nread) |
| 3437 | { | 3437 | { |
| 3438 | /* We don't want trailing null characters. */ | 3438 | /* We don't want trailing NUL characters. */ |
| 3439 | for (p = cmdline + nread; cmdline < p && !p[-1]; p--) | 3439 | for (p = cmdline + nread; cmdline < p && !p[-1]; p--) |
| 3440 | continue; | 3440 | continue; |
| 3441 | 3441 | ||