aboutsummaryrefslogtreecommitdiffstats
path: root/src/lread.c
diff options
context:
space:
mode:
authorPaul Eggert2023-05-17 15:36:54 -0700
committerPaul Eggert2023-05-17 15:41:00 -0700
commit5ef169ed701fa4f850fdca5563cdd468207d5d4f (patch)
tree949560affb29a8d9b114bac310a317a8209542ab /src/lread.c
parentafbdae00ab59bbda971780fa04dd75dc7d1e7df7 (diff)
downloademacs-5ef169ed701fa4f850fdca5563cdd468207d5d4f.tar.gz
emacs-5ef169ed701fa4f850fdca5563cdd468207d5d4f.zip
Prefer C23 ckd_* to Gnulib *_WRAPV macros
C23 has added ckd_add etc. macros with functionality equivalent to the older Gnulib INT_ADD_WRAPV macros, so switch to the more-standard names. * admin/merge-gnulib (GNULIB_MODULES): Add stdckdint. This merely makes the dependency explicit, as we were already using this Gnulib module indirectly. * lib-src/etags.c, src/lisp.h: Include stdckdint.h. * lib-src/etags.c (xnmalloc, xnrealloc): * src/alloc.c (xnmalloc, xnrealloc, xpalloc, Fmake_string) (mark_memory): * src/bignum.c (emacs_mpz_pow_ui): * src/buffer.c (record_overlay_string, overlay_strings): * src/bytecode.c (exec_byte_code): * src/casefiddle.c (do_casify_multibyte_string): * src/ccl.c (ccl_driver, Fccl_execute_on_string): * src/character.c (char_width, c_string_width) (lisp_string_width, count_size_as_multibyte) (string_escape_byte8): * src/cmds.c (internal_self_insert): * src/coding.c (coding_alloc_by_realloc, produce_chars): * src/data.c (arith_driver): * src/dispnew.c (realloc_glyph_pool, init_display_interactive): * src/doprnt.c (parse_format_integer): * src/editfns.c (Freplace_buffer_contents, str2num) (styled_format): * src/emacs-module.c (module_global_reference_p) (module_make_global_ref, module_funcall): * src/eval.c (max_ensure_room): * src/fileio.c (blocks_to_bytes): * src/fns.c (Ffillarray): * src/font.c (font_intern_prop): * src/frame.c (check_frame_pixels): * src/gnutls.c (gnutls_hex_string, gnutls_symmetric_aead): * src/gtkutil.c (get_utf8_string): * src/haikuterm.c (haiku_term_init): * src/image.c (xbm_scan, image_to_emacs_colors) (image_detect_edges, png_load_body): * src/keyboard.c (Frecursion_depth): * src/keymap.c (Flookup_key, Fkey_description): * src/lisp.h (modiff_incr, SAFE_ALLOCA_LISP_EXTRA): * src/lread.c (read_bool_vector): * src/pgtkterm.c (pgtk_term_init): * src/regex-emacs.c (regex_compile): * src/term.c (encode_terminal_code): * src/termcap.c (tputs): * src/textconv.c (textconv_query): * src/timefns.c (timespec_ticks, lisp_time_hz_ticks) (Fdecode_time, check_tm_member): * src/tparam.c (tparam1): * src/w32term.c (w32_initialize_display_info): * src/xdisp.c (fill_column_indicator_column, decode_mode_spec): * src/xselect.c (selection_data_size, x_property_data_to_lisp): * src/xsmfns.c (smc_save_yourself_CB): * src/xterm.c (xm_setup_dnd_targets, x_sync_get_monotonic_time) (x_sync_current_monotonic_time, x_sync_note_frame_times) (x_display_set_last_user_time, x_term_init): Prefer the C23 stdckdint macros to their Gnulib intprops.h counterparts, since C23 is standard.
Diffstat (limited to 'src/lread.c')
-rw-r--r--src/lread.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lread.c b/src/lread.c
index 4f1d29d80b2..d2e544afef9 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -3377,8 +3377,8 @@ read_bool_vector (Lisp_Object readcharfun)
3377 invalid_syntax ("#&", readcharfun); 3377 invalid_syntax ("#&", readcharfun);
3378 break; 3378 break;
3379 } 3379 }
3380 if (INT_MULTIPLY_WRAPV (length, 10, &length) 3380 if (ckd_mul (&length, length, 10)
3381 || INT_ADD_WRAPV (length, c - '0', &length)) 3381 || ckd_add (&length, length, c - '0'))
3382 invalid_syntax ("#&", readcharfun); 3382 invalid_syntax ("#&", readcharfun);
3383 } 3383 }
3384 3384
@@ -3423,8 +3423,8 @@ skip_lazy_string (Lisp_Object readcharfun)
3423 UNREAD (c); 3423 UNREAD (c);
3424 break; 3424 break;
3425 } 3425 }
3426 if (INT_MULTIPLY_WRAPV (nskip, 10, &nskip) 3426 if (ckd_mul (&nskip, nskip, 10)
3427 || INT_ADD_WRAPV (nskip, c - '0', &nskip)) 3427 || ckd_add (&nskip, nskip, c - '0'))
3428 invalid_syntax ("#@", readcharfun); 3428 invalid_syntax ("#@", readcharfun);
3429 digits++; 3429 digits++;
3430 if (digits == 2 && nskip == 0) 3430 if (digits == 2 && nskip == 0)
@@ -3988,8 +3988,8 @@ read0 (Lisp_Object readcharfun, bool locate_syms)
3988 c = READCHAR; 3988 c = READCHAR;
3989 if (c < '0' || c > '9') 3989 if (c < '0' || c > '9')
3990 break; 3990 break;
3991 if (INT_MULTIPLY_WRAPV (n, 10, &n) 3991 if (ckd_mul (&n, n, 10)
3992 || INT_ADD_WRAPV (n, c - '0', &n)) 3992 || ckd_add (&n, n, c - '0'))
3993 invalid_syntax ("#", readcharfun); 3993 invalid_syntax ("#", readcharfun);
3994 } 3994 }
3995 if (c == 'r' || c == 'R') 3995 if (c == 'r' || c == 'R')