aboutsummaryrefslogtreecommitdiffstats
path: root/src/timefns.c
diff options
context:
space:
mode:
authorStefan Monnier2019-03-21 23:55:28 -0400
committerStefan Monnier2019-03-21 23:55:28 -0400
commit76fea1eba1332440eab2e3daecce053daccd3782 (patch)
tree944ea8279b8a52cb715fe3493d909bc581776430 /src/timefns.c
parent57a60db2b88dfa5dea41a3a05b736cd7cd17a953 (diff)
downloademacs-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/timefns.c')
-rw-r--r--src/timefns.c6
1 files changed, 3 insertions, 3 deletions
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'. */)
1133 determine how many bytes would be written, use NULL for S and 1133 determine how many bytes would be written, use NULL for S and
1134 ((size_t) -1) for MAXSIZE. 1134 ((size_t) -1) for MAXSIZE.
1135 1135
1136 This function behaves like nstrftime, except it allows null 1136 This function behaves like nstrftime, except it allows NUL
1137 bytes in FORMAT and it does not support nanoseconds. */ 1137 bytes in FORMAT and it does not support nanoseconds. */
1138static size_t 1138static size_t
1139emacs_nmemftime (char *s, size_t maxsize, const char *format, 1139emacs_nmemftime (char *s, size_t maxsize, const char *format,
@@ -1141,8 +1141,8 @@ emacs_nmemftime (char *s, size_t maxsize, const char *format,
1141{ 1141{
1142 size_t total = 0; 1142 size_t total = 0;
1143 1143
1144 /* Loop through all the null-terminated strings in the format 1144 /* Loop through all the NUL-terminated strings in the format
1145 argument. Normally there's just one null-terminated string, but 1145 argument. Normally there's just one NUL-terminated string, but
1146 there can be arbitrarily many, concatenated together, if the 1146 there can be arbitrarily many, concatenated together, if the
1147 format contains '\0' bytes. nstrftime stops at the first 1147 format contains '\0' bytes. nstrftime stops at the first
1148 '\0' byte so we must invoke it separately for each such string. */ 1148 '\0' byte so we must invoke it separately for each such string. */