aboutsummaryrefslogtreecommitdiffstats
path: root/src/termcap.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/termcap.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/termcap.c')
-rw-r--r--src/termcap.c8
1 files changed, 4 insertions, 4 deletions
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)
162 else 162 else
163 ret = *area; 163 ret = *area;
164 164
165 /* Copy the string value, stopping at null or colon. 165 /* Copy the string value, stopping at NUL or colon.
166 Also process ^ and \ abbreviations. */ 166 Also process ^ and \ abbreviations. */
167 p = ptr; 167 p = ptr;
168 r = ret; 168 r = ret;
@@ -424,7 +424,7 @@ tgetent (char *bp, const char *name)
424 return -1; 424 return -1;
425 425
426 buf.size = BUFSIZE; 426 buf.size = BUFSIZE;
427 /* Add 1 to size to ensure room for terminating null. */ 427 /* Add 1 to size to ensure room for terminating NUL. */
428 buf.beg = xmalloc (buf.size + 1); 428 buf.beg = xmalloc (buf.size + 1);
429 term = indirect ? indirect : (char *)name; 429 term = indirect ? indirect : (char *)name;
430 430
@@ -480,7 +480,7 @@ tgetent (char *bp, const char *name)
480 *bp1 = '\0'; 480 *bp1 = '\0';
481 481
482 /* Does this entry refer to another terminal type's entry? 482 /* Does this entry refer to another terminal type's entry?
483 If something is found, copy it into heap and null-terminate it. */ 483 If something is found, copy it into heap and NUL-terminate it. */
484 tc_search_point = find_capability (tc_search_point, "tc"); 484 tc_search_point = find_capability (tc_search_point, "tc");
485 term = tgetst1 (tc_search_point, 0); 485 term = tgetst1 (tc_search_point, 0);
486 } 486 }
@@ -618,7 +618,7 @@ gobble_line (int fd, register struct termcap_buffer *bufp, char *append_end)
618 { 618 {
619 ptrdiff_t ptr_offset = bufp->ptr - buf; 619 ptrdiff_t ptr_offset = bufp->ptr - buf;
620 ptrdiff_t append_end_offset = append_end - buf; 620 ptrdiff_t append_end_offset = append_end - buf;
621 /* Add 1 to size to ensure room for terminating null. */ 621 /* Add 1 to size to ensure room for terminating NUL. */
622 ptrdiff_t size = bufp->size + 1; 622 ptrdiff_t size = bufp->size + 1;
623 bufp->beg = buf = xpalloc (buf, &size, 1, -1, 1); 623 bufp->beg = buf = xpalloc (buf, &size, 1, -1, 1);
624 bufp->size = size - 1; 624 bufp->size = size - 1;