1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 06:20:55 -08:00
Commit graph

1614 commits

Author SHA1 Message Date
Po Lu
a5f8ce9f1e Re-port to 32-bit systems without alignment primitives
* configure.ac (ALIGNOF_INT, ALIGNOF_LONG, ALIGNOF_LONG_LONG):
New variables.
(emacs_cv_alignas_unavailable): Define if alignas and structure
alignment primitives are unavailable.  In such an environment,
the MSB tagging scheme must be enabled, as must the GNU malloc.

* msdos/sed2v2.inp: Adjust correspondingly.

* src/alloc.c (union emacs_align_type): Remove types which
contain flexible array members.  The address of a field
subsequent to an aggregate with flexible array members cannot
validly be taken.
(mark_memory) [!USE_LSB_TAG && !WIDE_EMACS_INT]: Strip type bits
before scanning memory.

* src/emacs.c (main):

* src/eval.c (Fautoload_do_load):

* src/fns.c (Frequire): Rename a number of illogically named
fields.

* src/lisp.h (ALIGNOF_EMACS_INT): Define to the natural
alignment of EMACS_INT.
(IDEAL_GCALIGNMENT): New macro.
(USE_LSB_TAG): Disable if no alignment specifiers are available,
WIDE_EMACS_INT is undefined, and the natural alignment of
EMACS_INT falls short of LSB tagging's requirements.
(gflags): Rename illogically named fields and don't define them
as bitfields, which runs afoul of certain compiler issues.
(will_dump_p, will_bootstrap_p, will_dump_with_pdumper_p)
(dumped_with_pdumper_p): Adjust accordingly.

* src/pdumper.c (VM_SUPPORTED): Define to 0 when !USE_LSB_TAG.
It is better to read dump files into the heap by hand than to be
supplied with an address that is not representable.
(_dump_object_start_pseudovector): Rename to
dump_object_start_pseudovector, to avoid encroaching on reserved
names.
(START_DUMP_PVEC): Adjust correspondingly.
(dump_mmap_contiguous_vm): Preserve errno around failure
cleanup.
(dump_bitset_bit_set_p): Work around certain compiler issues.
(pdumper_load) [!USE_LSB_TAG]: Reject dump file allocations
that are not representable as Lisp_Objects.

Tested on i386-unknown-solaris2.10, sparc-sun-solaris2.10.
2025-03-09 23:07:33 +08:00
Paul Eggert
7ac05c33b1 Improve malloc Lisp alignment commentary
Prompted by a private email from Pip Cet.
2025-02-01 22:55:30 -08:00
Po Lu
532ff6e29d Fix compilation warnings on Android
* src/alloc.c (pointer_align): Only define if
!USE_ALIGNED_ALLOC.
2025-02-01 20:59:24 +08:00
Stefan Kangas
bf97946d7d Merge branch 'scratch/no-purespace' into 'master' 2025-02-01 04:56:52 +01:00
Paul Eggert
1f1088188e Avoid some make_formatted_string mallocs
* src/alloc.c (make_formatted_string):
Grow the local buffer from 64 to MAX_ALLOCA bytes.
2025-01-27 17:16:44 -08:00
Paul Eggert
f885806fdf Simplify make_formatted_string API
From a suggestion by Pip Cet.
* src/alloc.c (make_formatted_string): Omit first argument,
to simplify the calling convention.  All callers changed.
* src/doprnt.c (doprnt): Also support %u.  Update doc.
2025-01-26 23:05:50 -08:00
Stefan Kangas
278d1994af Remove redundant case_Lisp_Int macro
The case_Lisp_Int macro was originally introduced with different
definitions depending on USE_2_TAGS_FOR_INTS.  However, since commit
2b57012478, we have assumed that USE_2_TAGS_FOR_INTS is always
defined, and the macro has only a single definition.  As a result, the
macro is now unnecessary, and replacing it with standard C case labels
improves readability and understanding.

* src/lisp.h (case_Lisp_Int): Delete macro.
* src/alloc.c (process_mark_stack, survives_gc_p):
* src/data.c (Fcl_type_of):
* src/fns.c (value_cmp, sxhash_obj):
* src/pdumper.c (dump_object):
* src/print.c (print_object):
* src/xfaces.c (face_attr_equal_p): Remove uses of above macro.
2025-01-20 02:14:08 +01:00
Stefan Kangas
251e3d2654 Replace call[1-8] with calln
Since the introduction of the 'calln' macro, the 'call1', 'call2', ...,
'call8' macros are just aliases for the former.  This is slightly
misleading and potentially unhelpful.  The number of arguments N can
also easily go out-of-synch with the used alias callN.  There is no
reason not to replace these aliases with using 'calln' directly.

To reduce the risk for mistakes, the tool Coccinelle was used to make
these changes.  See <https://coccinelle.gitlabpages.inria.fr/website/>.

* src/alloc.c, src/androidvfs.c, src/androidfns.c, src/buffer.c:
* src/callint.c, src/callproc.c, src/casefiddle.c, src/charset.c:
* src/chartab.c, src/cmds.c, src/coding.c, src/composite.c:
* src/data.c, src/dbusbind.c, src/dired.c, src/doc.c:
* src/emacs.c, src/eval.c, src/fileio.c, src/filelock.c:
* src/fns.c, src/frame.c, src/gtkutil.c, src/haikufns.c:
* src/haikumenu.c, src/image.c, src/insdel.c, src/intervals.c:
* src/keyboard.c, src/keymap.c, src/lisp.h, src/lread.c:
* src/minibuf.c, src/nsfns.m, src/nsselect.m, src/pgtkfns.c:
* src/pgtkselect.c, src/print.c, src/process.c, src/sort.c:
* src/syntax.c, src/textconv.c, src/textprop.c, src/undo.c:
* src/w32fns.c, src/window.c, src/xfaces.c, src/xfns.c:
* src/xmenu.c, src/xselect.c, src/xterm.c:
Replace all uses of 'call1', 'call2', ..., 'call8' with 'calln'.
2025-01-19 14:29:41 +01:00
Paul Eggert
d3a2ec5210 Simplify alloc by assuming MALLOC_IS_LISP_ALIGNED
Problem reported by Hong Xu <https://bugs.gnu.org/75551#14>.
* src/alloc.c (MALLOC_IS_LISP_ALIGNED): static_assert it,
since it is true on all current Emacs platforms.
All uses simplified to assume it is true.
(xmalloc, xzalloc, xrealloc, lisp_malloc): Just use
malloc/calloc/realloc.  Since we are using the malloc-gnu
and realloc-posix modules, we need not worry about whether
these functions return a null pointer for zero-size requests.
(xrealloc): Stop worrying about no-longer-existing platforms
where realloc (nullptr, ...) did not work.
(laligned, lmalloc, lrealloc): Remove.  All uses removed.
2025-01-17 15:56:30 -08:00
Paul Eggert
4da38c6321 Update copyright year to 2025
Run "TZ=UTC0 admin/update-copyright".
2025-01-01 07:39:17 +00:00
Stefan Kangas
f818744cd4 Improve purify-flag docstring
* src/alloc.c (syms_of_alloc): Improve purify-flag docstring.
2024-12-15 19:33:59 +01:00
Stefan Kangas
d6b05b1282 Make 'purecopy' an obsolete function alias for 'identity'
* lisp/subr.el (purecopy): New obsolete function alias for 'identity'.
* src/alloc.c (purecopy): Remove function.
(Fpurecopy): Remove DEFUN.
(syms_of_alloc): Remove defsubr for above DEFUN.
* lisp/loadup.el (purify-flag): Don't set to hash table.

* doc/lispref/spellfile:
* doc/lispref/keymaps.texi (Tool Bar):
* lisp/emacs-lisp/byte-opt.el (side-effect-free-fns): Delete
references to 'purecopy'
2024-12-12 22:48:21 +01:00
Stefan Kangas
b299a5d184 Delete obsolete comment about using purespace
* src/alloc.c (Fmake_byte_code): Delete obsolete comment.
2024-12-12 22:48:20 +01:00
Stefan Kangas
ad9adab042 Remove unused function my_heap_start
* src/alloc.c (my_heap_start) [DOUG_LEA_MALLOC && GNU_LINUX]:
Remove unused function.  Update callers.
2024-12-12 22:48:20 +01:00
Stefan Kangas
892be3b3d7 Remove check for working malloc_set_state
This check was added to 'malloc_initialize_hook' in order to "insulate
Emacs better from configuration screwups" (commit b4788b9394).  With
unexec gone, we no longer use 'malloc_set_state', and thus don't need
this check.

Note that this patch removes the last uses of the deprecated glibc
functions 'malloc_set_state' and 'malloc_get_state' from our code.

* src/alloc.c (malloc_initialize_hook) [DOUG_LEA_MALLOC]:
Remove check for working 'malloc_set_state'.
(alloc_unexec_pre) [DOUG_LEA_MALLOC]: Delete unused function.
(alloc_unexec_post) [DOUG_LEA_MALLOC]: Delete function.
(malloc_state_ptr) [DOUG_LEA_MALLOC]: Delete variable.
* configure.ac (emacs_cv_var_doug_lea_malloc): Don't check for
malloc_set_state and malloc_get_state.
2024-12-12 22:48:20 +01:00
Pip Cet
c951fd415c Avoid compiler warning in process_mark_stack
* src/alloc.c (process_mark_stack): Only declare and assign to 'po' if
it's needed.
Problem reported by: Stefan Kangas <stefankangas@gmail.com>.
2024-12-12 22:48:15 +01:00
Pip Cet
c9ab325876 Pure storage removal: Remove documentation
As pure storage is now gone, it no longer needs to be documented.

* doc/lispref/elisp.texi (Top):
* doc/lispref/internals.texi (GNU Emacs Internals): Remove "Pure
Storage" section.
(Building Emacs, Garbage Collection, Writing Emacs Primitives):
* doc/lispref/symbols.texi (Standard Properties): Remove references to
pure storage.
* src/alloc.c (Fgarbage_collect): Remove docstring text referring to
pure storage.
2024-12-12 22:48:12 +01:00
Pip Cet
e1e101c6c1 Pure storage removal: Remove support for pinned objects
* src/alloc.c (symbol_block_pinned): Remove variable.
(init_symbol): Don't initialize 'pinned flag'.
(pinned_objects): Remove variable.
(mark_pinned_objects, mark_pinned_symbols): Remove functions.
(garbage_collect): Don't call 'mark_pinned_objects',
'mark_pinned_symbols'.
* src/lisp.h (struct Lisp_Symbol): Remove 'pinned' flag.
* src/pdumper.c (dump_symbol): Remove 'pinned' flag from dump.
2024-12-12 22:48:12 +01:00
Pip Cet
5ec8696663 Pure storage removal: Replace calls to removed functions
* src/alloc.c (string_bytes, pin_string, valid_lisp_object_p)
(process_mark_stack, survives_gc_p, syms_of_alloc):
* src/androidterm.c (android_term_init): Replace call to
'build_pure_c_string'.
* src/buffer.c (init_buffer_once, syms_of_buffer):
* src/bytecode.c (exec_byte_code):
* src/callint.c (syms_of_callint):
* src/callproc.c (syms_of_callproc):
* src/category.c (Fdefine_category):
* src/coding.c (syms_of_coding):
* src/comp.c (Fcomp__compile_ctxt_to_file0)
(maybe_defer_native_compilation, syms_of_comp):
* src/data.c (Fsetcar, Fsetcdr, Fdefalias, Faset, syms_of_data):
* src/dbusbind.c (syms_of_dbusbind):
* src/doc.c (Fsnarf_documentation):
* src/emacs-module.c (syms_of_module):
* src/eval.c (Finternal__define_uninitialized_variable)
(Fdefconst_1, define_error, syms_of_eval):
* src/fileio.c (syms_of_fileio):
* src/fns.c (Ffillarray, Fclear_string, check_mutable_hash_table):
* src/fontset.c (syms_of_fontset):
* src/frame.c (make_initial_frame):
* src/haikufns.c (syms_of_haikufns):
* src/intervals.c (create_root_interval):
* src/keyboard.c (syms_of_keyboard):
* src/keymap.c (Fmake_sparse_keymap, Fset_keymap_parent)
(store_in_keymap, syms_of_keymap):
* src/lisp.h:
* src/lread.c (Fload, read0, intern_c_string_1, define_symbol)
(Fintern, defsubr, syms_of_lread):
* src/pdumper.c (Fdump_emacs_portable):
* src/pgtkfns.c (syms_of_pgtkfns):
* src/pgtkterm.c (syms_of_pgtkterm):
* src/process.c (syms_of_process):
* src/search.c (syms_of_search):
* src/sqlite.c (syms_of_sqlite):
* src/syntax.c (syms_of_syntax):
* src/treesit.c (syms_of_treesit):
* src/w32fns.c (syms_of_w32fns):
* src/xdisp.c (syms_of_xdisp):
* src/xfaces.c (syms_of_xfaces):
* src/xfns.c (syms_of_xfns):
* src/xftfont.c (syms_of_xftfont):
* src/xterm.c (syms_of_xterm): Remove calls to 'PURE_P', 'CHECK_IMPURE',
'Fpurecopy', and replace calls to 'build_pure_c_string', 'pure_list',
'pure_listn', etc., by impure equivalents.
2024-12-12 22:48:11 +01:00
Pip Cet
f84ccff5a6 Pure storage removal: Main part
* src/alloc.c (pure, PUREBEG, purebeg, pure_size)
(pure_bytes_used_before_overflow, pure_bytes_used_lisp)
(pure_bytes_used_non_lisp): Remove definitions.
(init_strings): Make empty strings impure.
(cons_listn): Drop 'cons' argument.
(pure_listn): Remove function.
(init_vectors): Allocate zero vector manually to avoid freelist issues.
(pure_alloc, check_pure_size, find_string_data_in_pure)
(make_pure_string, make_pure_c_string, pure_cons, make_pure_float)
(make_pure_bignum, make_pure_vector, purecopy_hash_table): Remove
functions.
(purecopy): Reduce to hash consing our argument.
(init_alloc_once_for_pdumper): Adjust to lack of pure space.
(pure-bytes-used): Adjust docstring to mark as obsolete.
(purify-flag): Keep for hash consing, but adjust docstring.
* src/bytecode.c:
* src/comp.c: Don't include "puresize.h".
* src/conf_post.h (SYSTEM_PURESIZE_EXTRA): Remove definition.
* src/data.c (pure_write_error): Remove function.
* src/deps.mk: Remove puresize.h dependency throughout.
* src/emacs.c:
* src/fns.c:
* src/intervals.c:
* src/keymap.c: Don't include "puresize.h".
* src/lisp.h (struct Lisp_Hash_Table): Adjust comment.
(pure_listn, pure_list, build_pure_c_string): Remove.
* src/w32heap.c (FREEABLE_P): Don't do use 'dumped_data'.
(malloc_before_dump, realloc_before_dump, free_before_dump): Remove
functions.
* src/w32heap.h: Adjust prototype.
* lisp/loadup.el:
* lisp/startup.el: Remove purespace code.
2024-12-12 22:48:11 +01:00
Pip Cet
b2bc337a5f Unexec removal: Remove HYBRID_MALLOC support
* src/gmalloc.c (gdefault_morecore): Remove HYBRID_MALLOC code.
(allocated_via_gmalloc, hybrid_malloc, hybrid_calloc, hybrid_free_1)
(hybrid_free, hybrid_aligned_alloc, hybrid_realloc): Remove functions.

* msdos/sed1v2.inp:
* msdos/sedlibmk.inp:
* src/alloc.c (GC_MALLOC_CHECK, USE_ALIGNED_ALLOC)
(refill_memory_reserve, aligned_alloc):
* src/emacs.c (main):
* src/lastfile.c (my_edata):
* src/lisp.h:
* src/ralloc.c:
* src/sysdep.c (get_current_dir_name_or_unreachable):
* src/xdisp.c (decode_mode_spec): Remove HYBRID_MALLOC conditions.

* configure.ac (hybrid_malloc, HYBRID_MALLOC): Remove variables and
dependent code.
* src/conf_post.h (hybrid_malloc, hybrid_calloc, hybrid_free)
(hybrid_aligned_alloc, hybrid_realloc): Remove conditional prototypes.
* src/Makefile.in (HYBRID_MALLOC): Remove variable.
(base_obj): Remove sheap.o
(LIBEGNU_ARCHIVE):
* lib/Makefile.in (libgnu_a_OBJECTS): Remove libegnu.a support.
2024-12-12 22:48:11 +01:00
Pip Cet
15e2b14f03 Unexec removal: Main part
* configure.ac: Remove unexec-specific parts.
(EMACS_CONFIG_FEATURES): Always report that we do not have the UNEXEC
feature.
(AC_ECHO): No longer display a line about the unexec feature.
* lisp/loadup.el:
* lisp/startup.el: Remove unexec-specific code.
* src/Makefile.in (base_obj): Drop 'UNEXEC_OBJ'.
* src/alloc.c (staticvec): Never initialize this variable.
(BLOCK_ALIGN): Always allow large blocks.
(mmap_lisp_allowed_p): Remove unexec-specific code.
* src/buffer.c (init_buffer):
* src/conf_post.h (ADDRESS_SANITIZER):
* src/emacs.c (load_pdump, main): Remove unexec-specific code.
(Fdump_emacs): Remove function.
(syms_of_emacs): Remove 'Fdump_emacs'.
* src/lastfile.c: Remove unexec-specific code.
* src/lisp.h (gflags): Remove unexec-specific flags.
(will_dump_p, will_bootstrap_p, will_dump_with_unexec_p)
(dumped_with_unexec_p, definitely_will_not_unexec_p): Remove or adjust
predicates.
(SUBR_SECTION_ATTRIBUTE): Remove unexec-specific definition.
* src/pdumper.c (Fdump_emacs_portable): Remove unexec-specific warning.
* src/process.c (init_process_emacs): Remove !unexec condition
* src/sysdep.c (maybe_disable_address_randomization): Adjust comment.
(init_signals):
* src/timefns.c (init_timefns): Remove unexec-specific code.
* src/w32heap.c (report_temacs_memory_usage): Remove function.
* src/w32heap.h: Adjust comment.
* src/w32image.c (globals_of_w32image): Remove unexec-specific code.
2024-12-12 22:48:11 +01:00
Gerd Möllmann
414de92a56 Initial child frames based on master
This is based on a diff from 2024-10-15 which still applied.
Since then, I've inadvertantly modified the igc branch so that
it is no longer possible to get a clean diff of what has changed
since I created the branch.
2024-10-22 06:40:19 +02:00
Eli Zaretskii
83b0e604ce Merge from origin/emacs-30
4b9a8fd607 etags-regen-file-extensions: Add .pm
956f14ae5e * src/treesit.c (treesit_debug_print_parser_list): Fix co...
300d05ecb4 Type-check argument to network-lookup-address-info
0f0f21b7f2 ; Improve doc strings of options related to numbered backups
f0daa2f215 Conservative heuristic for tree-sitter parser ranges (bug...
035024b4e5 ; Fix treesit.c printing
8771310a10 ; * admin/notes/unicode: Need to run textsec-tests (bug#7...
4c6f45fa8e Re-enable GC mark trace buffer by default
c607701589 ; * src/haiku_support.cc: Correct last change.
ae22ad7f62 ; Add even more tests for previous commit
460b9d705a Fix treesit_sync_visible_region's range fixup code (bug#7...
81347c1aaf ; * etc/PROBLEMS: Fix last change (bug#73207).
a82b7f3e82 Document unavailability of frame geometry on Wayland
2024-09-21 07:30:19 -04:00
Mattias Engdegård
4c6f45fa8e Re-enable GC mark trace buffer by default
Enable GC_REMEMBER_LAST_MARKED by default (it was disabled in Emacs 29)
to make it easier to debug difficult-to-reproduce GC problems
encountered by users.  This increases GC costs by about 5 %, which can
be avoided by turning the mark trace buffer back off using the new
--disable-gc-mark-trace option.

See discussion at
https://lists.gnu.org/archive/html/emacs-devel/2024-09/msg00240.html

* configure.ac (--disable-gc-mark-trace): New config option.
* etc/NEWS: Mention it.
* src/alloc.c: Enable it by default and avoid a compiler warning.
2024-09-17 13:27:35 +02:00
Eli Zaretskii
358208dfaa Remove low-level keyboard hook when attaching GDB to Emacs on Windows
This fixes the problem whereby attaching GDB to a running Emacs
on MS-Windows would slow down keyboard input, because the
low-level keyboard hook installed by Emacs at startup was still
installed, but with Emacs stopped, the hook code couldn't run,
and therefore the OS would time-out waiting for the hook to
return.  Now when GDB is attached to Emacs, it will remove the
hook right away.
* src/.gdbinit: Call 'remove_w32_kbdhook' if the keyboard hook is
already installed.
* src/alloc.c (defined_WINDOWSNT): New enum.
(gdb_make_enums_visible): Add 'defined_WINDOWSNT'.
2024-09-07 11:15:43 +03:00
Stefan Kangas
7c8e28607b Prefer static_assert to verify
Although static_assert is C11-specific, and Emacs remains on C99, it
has been backported to older compilers by Gnulib.  Gnulib has already
changed to prefer static_assert, and we can do the same.

* lib-src/asset-directory-tool.c (main_2):
* src/alloc.c (BLOCK_ALIGN, aligned_alloc, lisp_align_malloc)
(vectorlike_nbytes, allocate_pseudovector):
* src/android.c (android_globalize_reference, android_set_dashes):
* src/android.h:
* src/androidfont.c (androidfont_draw, androidfont_text_extents):
* src/androidvfs.c:
* src/bidi.c (BIDI_CACHE_MAX_ELTS_PER_SLOT, bidi_find_bracket_pairs):
* src/buffer.c (init_buffer_once):
* src/casefiddle.c (do_casify_multibyte_string):
* src/dispnew.c (scrolling_window, scrolling):
* src/editfns.c (styled_format):
* src/emacs-module.c (module_extract_big_integer):
* src/fileio.c (Fdo_auto_save):
* src/fns.c (next_almost_prime, hash_string):
* src/fringe.c (init_fringe):
* src/keyboard.h (kbd_buffer_store_event_hold):
* src/keymap.c:
* src/lisp.h (memclear, reduce_emacs_uint_to_hash_hash, modiff_incr):
* src/lread.c (skip_lazy_string):
* src/pdumper.c (dump_bignum, Fdump_emacs_portable)
(dump_do_dump_relocation, pdumper_load):
* src/process.c (make_process, Fmake_process, connect_network_socket):
* src/regex-emacs.c:
* src/sort.c (tim_sort):
* src/sysdep.c (init_random, SSIZE_MAX):
* src/thread.c:
* src/timefns.c (trillion_factor):
* src/unexelf.c:
* src/xterm.c (x_send_scroll_bar_event): Prefer static_assert to Gnulib
verify.  Remove import of verify.h, except when used for other reasons.
2024-08-22 00:51:55 +02:00
Martin Rudalics
27381d71c6 Improve window/buffer handling code
The purpose of these changes is to improve the code handling the
display of buffers in windows, switching to previous and next
buffers in windows and restoring a previous state after quitting
or killing buffers.  In particular it does:

- Add a new window parameter 'quit-restore-prev' so a window can
keep its initial 'quit-restore' parameter and undoing a sequence
of quit window operations becomes more reliable (Bug#59862).

- Optionally have 'kill-buffer' call 'quit-restore-window' for
all windows showing the argument buffer (Bug#59862).

- Add a new hook so it's possible to avoid that a window gets
deleted implicitly by functions like 'kill-buffer' (Bug#71386).

- Add a new option to make 'quit-restore-window' delete windows
more aggressively (Bug#59862).

- Immediately remove killed buffers from all windows' previous
and next buffers.  For windows that are already dead, use a weak
hash table to be used by 'kill-buffer'.  This avoids any special
handling of such windows by the garbage collector.

- Immediately remove 'quit-restore' and 'quit-restore-prev'
window parameters that reference killed buffers.  These
parameters have no more use once their buffers got killed.

- Make sure that internal windows do not have any previous and
next buffers.  This fixes a silly memory leak.

- Make sure that after set_window_buffer and some wset_buffer
calls the buffer now shown in the window does not appear in the
lists of that window's previous and next buffers.  The old
behavior could make functions investigating these lists
erroneously believe that there still existed some other buffer
to switch to.

* src/alloc.c (mark_discard_killed_buffers): Remove function.
(mark_window): No more filter previous and next buffer lists.
* src/window.h (struct window): Move up prev_buffers and
next-buffers in structure; they are now treated by the collector
as usual.
* src/window.c (window_discard_buffer_from_alist)
(window_discard_buffer_from_list)
(window_discard_buffer_from_window)
(window_discard_buffer_from_dead_windows)
(Fwindow_discard_buffer): New functions.
(set_window_buffer): Discard BUFFER from WINDOW's previous and
next buffers.
(make_parent_window): Make sure internal windows have no previous
and next buffers.
(make_window): Don't initialize window's previous and next
buffers, they are handled by allocate_window now.
(Fdelete_window_internal): Add WINDOW to window_dead_windows_table.
(Fset_window_configuration): Remove resurrected window from
window_dead_windows_table.  Make sure buffers set by wset_buffer
calls are not recorded in window's previous and next buffers.
(delete_all_child_windows): Add deleted windows to
window_dead_windows_table.
(window_dead_windows_table): New weak hash table to record dead
windows that are stored in saved window configurations.
* src/buffer.c (Fkill_buffer): Call new function
'window_discard_buffer_from_dead_windows'.
* lisp/window.el (window-deletable-functions): New hook.
(window-deletable-p): Update doc-string.  Run
'window-deletable-functions' (Bug#71386).
(unrecord-window-buffer): New argument ALL.  Move body to
'window-discard-buffer-from-window' so that if ALL is non-nil,
WINDOW's 'quit-restore' and 'quit-restore-prev' parameters get
removed too.
(switch-to-prev-buffer): Don't care about killed buffers here;
'replace-buffer-in-windows' should have done that already.  Use
'unrecord-window-buffer'.
(switch-to-next-buffer): Don't care about killed buffers here;
'replace-buffer-in-windows' should do that now.
(kill-buffer-quit-windows): New option.
(delete-windows-on): Update doc-string.  Handle new option
'kill-buffer-quit-windows'.  Update 'unrecord-window-buffer'
calls.
(replace-buffer-in-windows): Update doc-string.  Handle new
option 'kill-buffer-quit-windows' (Bug#59862).  Update call to
'unrecord-window-buffer'.
(quit-restore-window-no-switch): New option.
(quit-restore-window): Update doc-string.  Handle additional
values of BURY-OR-KILL so to not kill a buffer about to be
killed by the caller.  Handle 'quit-restore-prev' parameter
(Bug#59862).  Handle new option 'quit-restore-window-no-switch'
(Bug#59862).
(quit-windows-on): Update doc-string.  Call 'quit-window-hook'
and call 'quit-restore-window' directly so that the buffer does
not get buried or killed by the latter.  Update
'unrecord-window-buffer' call.
(display-buffer-record-window): Update doc-string.  Handle new
`quit-restore-prev' parameter (Bug#59862).
(switch-to-buffer): Call 'display-buffer-record-window' so a
latter 'quit-restore-window' can use its parameters.
* doc/lispref/windows.texi (Deleting Windows): Describe implicit
deletion of windows and new hook 'window-deletable-functions'.
(Buffers and Windows): Update description of
'replace-buffer-in-windows'.  Describe new option
'kill-buffer-quit-windows'.
(Quitting Windows): Describe 'quit-restore-prev' parameter and
new option 'quit-restore-window-no-switch'.  Update description
of 'quit-restore-window'.
(Window Parameters): Mention 'quit-restore-prev' parameter.
* etc/NEWS: Add entries for 'window-deletable-functions',
'kill-buffer-quit-windows', 'quit-restore-window-no-switch'.
mention new parameter 'quit-restore-prev' and new argument
values for 'quit-restore-window'.
2024-08-01 09:37:50 +02:00
Paul Eggert
515e5ad0de Fix bool vector length overflow
* src/alloc.c (make_clear_bool_vector): It’s now the caller’s
responsibility to make sure the bool vector length is in range.
Add an eassert to double-check this.  This lets some locals be
ptrdiff_t not EMACS_INT.
(Fmake_bool_vector, Fbool_vector):
Check that bool vector lengths are in range.
* src/lisp.h (BOOL_VECTOR_LENGTH_MAX): New macro.
(bool_vector_words, bool_vector_bytes): Avoid undefined
behavior if size == EMACS_INT_MAX - (BITS_PER_BITS_WORD - 1).
This is mostly theoretical but it’s easy to do it right.
* src/lread.c (read_bool_vector): Use EMACS_INT, not just ptrdiff_t.
Check that length doesn’t exceed BOOL_VECTOR_LENGTH_MAX.
This fixes an unlikely integer overflow where the calculated size
went negative.
2024-07-20 16:16:22 -07:00
Paul Eggert
79b9f05d3a Avoid accessing uninitialized bool_vector words
Although loading uninitialized works from memory and then ignoring
the result works fine on conventional architectures, it
technically has undefined behavior in C, so redo bool_vector
allocation so that the code never does that.  This can improve
performance when allocating large vectors of nil, since calloc can
clear the memory lazily.
* src/alloc.c (make_clear_bool_vector): New function,
a generalization of make_uninit_bool_vector.
(make_uninit_bool_vector): Use it.
(Fmake_bool_vector): If !INIT, rely on make_clear_bool_vector.
* src/alloc.c (Fbool_vector):
* src/fns.c (Freverse): Don’t access uninitialized bool_vector words.
2024-07-20 00:19:33 -07:00
Paul Eggert
b77abd2bfe alloc.c: ckd_add, not by-hand checks
* src/alloc.c (lmalloc, lrealloc): Prefer ckd_add to
by-hand checks for integer addition overflow.
2024-07-16 15:37:20 -07:00
Paul Eggert
a4bafce01e Pacify -Wmissing-variable-declarations for lisp_malloc_user
* src/alloc.c (lisp_malloc_user) [!USE_LSB_TAG]:
Provide extern decl.
2024-07-16 15:37:20 -07:00
Po Lu
cebca072c3 Correctly cache images when frames vary in their font metrics
* src/alloc.c (mark_frame): Mark this frame's image cache, if it
exist.
(mark_terminals): Cease marking T->image_cache.

* src/androidfns.c (unwind_create_frame, Fx_create_frame)
(android_create_tip_frame):

* src/haikufns.c (unwind_create_frame, haiku_create_frame)
(haiku_create_tip_frame):

* src/nsfns.m (unwind_create_frame):

* src/pgtkfns.c (unwind_create_frame, Fx_create_frame)
(x_create_tip_frame):

* src/xfns.c (unwind_create_frame, Fx_create_frame)
(x_create_tip_frame):

* src/w32fns.c (unwind_create_frame, Fx_create_frame)
(w32_create_tip_frame): Remove adjustments of the frame image
cache's reference count rendered redundant by the assignment of
image caches to individual frames rather than terminals.

* src/dispextern.h (struct image_cache) <scaling_col_width>: New
field.

* src/frame.c (gui_set_font): In lieu of clearing F's image
cache unconditionally, establish whether the column width as
considered by compute_image_size has changed, and if so, adjust
or reassign the frame's image cache.
(make_frame): Clear F->image_cache.

* src/frame.h (struct frame) <image_cache>: New field.
(FRAME_IMAGE_CACHE): Return F->image_cache.

* src/image.c (make_image_cache): Clear C->scaling_col_width.
(cache_image): Adjust to new means of assigning image caches to
frames.

* src/termhooks.h (struct terminal) <image_cache>: Delete field.

* src/xfaces.c (init_frame_faces): Do image cache assignment
with all new frames.
2024-06-20 17:03:36 +08:00
Stefan Monnier
3480ca8351 Rename SUBR_NATIVE_COMPILED to NATIVE_COMP_FUNCTION (bug#71123)
Keep the name consistent with the naming used in the ELisp world.

* src/pdumper.c (dump_object_emacs_ptr, dump_do_fixup):
* src/eval.c (eval_sub, funcall_general, funcall_lambda):
* src/alloc.c (CHECK_ALLOCATED_AND_LIVE_SYMBOL, survives_gc_p):
* src/data.c (Fcl_type_of, Ffset, Fnative_comp_function_p)
(Fsubr_native_lambda_list, Finteractive_form):
* src/comp.c (check_comp_unit_relocs):
* src/bytecode.c (exec_byte_code):

* src/lisp.h (NATIVE_COMP_FUNCTIONP, NATIVE_COMP_FUNCTION_DYNP):
Rename from `SUBR_NATIVE_COMPILEDP` and `SUBR_NATIVE_COMPILED_DYNP`.
2024-05-28 20:53:33 -04:00
Paul Eggert
99a5c75f3b Pacify gcc -Wmissing-variable-declarations
This is a new warning diagnostic in GCC 14.
* lib-src/etags.c (mercury_heuristics_ratio):
* src/pgtkselect.c, src/xselect.c (selection_request_stack):
* src/xselect.c (outstanding_transfers):
* src/xterm.c (pending_selection_requests)
(x_dnd_waiting_for_motif_finish_display):
Now static.
* lib-src/make-docfile.c (close_emacs_globals):
Arrange for lispsym to be declared with extern first,
when compiling lread.c.
* src/alloc.c (gdb_make_enums_visible) [__GNUC__]:
* src/emacs.c (RCS_Id):
* src/keyboard.c (stop_character):
* src/print.c (print_output_debug_flag):
Now declared with extern first.
* src/lisp.h (DEFINE_GDB_SYMBOL_BEGIN) [MAIN_PROGRAM]:
Arrange for ID to be declared extern first.
* src/lisp.h (garbage_collection_inhibited):
* src/xterm.h (x_frame_parm_handlers):
Declare here, so that its interface is properly checked.  Other decls
removed.
2024-05-11 18:46:27 -07:00
Po Lu
67ab6bcdba Replace calls to intern with a constant string with DEFSYMs
* src/alloc.c (display_malloc_warning, syms_of_alloc):

* src/buffer.c (Fmake_indirect_buffer, Fbuffer_local_variables)
(Frename_buffer, Fkill_buffer, Fset_buffer_major_mode)
(Fset_buffer_multibyte, syms_of_buffer):

* src/callint.c (read_file_name, Fcall_interactively)
(syms_of_callint):

* src/callproc.c (call_process, create_temp_file)
(syms_of_callproc):

* src/charset.c (Fdefine_charset_internal, syms_of_charset):

* src/cmds.c (internal_self_insert, syms_of_cmds):

* src/coding.c (record_conversion_result)
(Fdefine_coding_system_internal, syms_of_coding):

* src/dbusbind.c (xd_signature, Fdbus_message_internal)
(syms_of_dbusbind):

* src/dispnew.c (init_faces_initial):

* src/doc.c (Fsnarf_documentation, syms_of_doc):

* src/dosfns.c (system_process_attributes, syms_of_dosfns):

* src/emacs.c (init_cmdargs, Fdump_emacs, decode_env_path)
(syms_of_emacs):

* src/eval.c (call_debugger, Fdefvaralias, syms_of_eval):

* src/fileio.c (barf_or_query_if_file_exists)
(Finsert_file_contents, auto_save_error, Fdo_auto_save)
(syms_of_fileio):

* src/filelock.c (lock_file_1, syms_of_filelock):

* src/fontset.c (fontset_from_font, syms_of_fontset):

* src/frame.c (make_frame_without_minibuffer, syms_of_frame):

* src/gnutls.c (emacs_gnutls_certificate_details)
(Fgnutls_peer_status_warning_describe, Fgnutls_peer_status)
(gnutls_verify_boot, syms_of_gnutls):

* src/gtkutil.c (style_changed_cb, find_rtl_image):

* src/image.c (imagemagick_filename_hint, gs_load)
(syms_of_image):

* src/keyboard.c (command_loop_1, read_char, timer_start_idle)
(read_char_minibuf_menu_prompt, Fsuspend_emacs)
(syms_of_keyboard):

* src/keymap.c (Fmap_keymap, Flookup_key, Fdescribe_vector)
(describe_vector, syms_of_keymap):

* src/lread.c (Fread, Fread_positioning_symbols, syms_of_lread):

* src/minibuf.c (Fabort_minibuffers, Fread_buffer)
(Fcompleting_read, syms_of_minibuf):

* src/msdos.c (XMenuActivate, run_msdos_command, syms_of_msdos):

* src/nsfns.m (Fx_display_backing_store, Fx_display_visual_class)
(Fns_hide_emacs, Fsystem_move_file_to_trash, ns_create_tip_frame)
(x_hide_tip, Fx_show_tip, syms_of_nsfns):

* src/nsfont.m (ns_spec_to_descriptor, ns_descriptor_to_entity)
(syms_of_nsfont):

* src/pdumper.c (Fdump_emacs_portable):

* src/pgtkfns.c (Fx_display_visual_class, x_create_tip_frame)
(Fx_show_tip, syms_of_pgtkfns):

* src/pgtkterm.c (syms_of_pgtkterm, pgtk_cr_export_frames):

* src/term.c (term_get_fkeys_1, set_tty_color_mode, Fsuspend_tty)
(Fresume_tty, tty_menu_activate, syms_of_term):

* src/terminal.c (create_terminal, syms_of_terminal):

* src/w32fns.c (Fx_display_backing_store)
(Fx_display_visual_class, Fset_message_beep, Fx_open_connection)
(Fx_show_tip, Fx_file_dialog, Fsystem_move_file_to_trash)
(Fw32_toggle_lock_key, syms_of_w32fns):

* src/w32font.c (w32_enumfont_pattern_entity, syms_of_w32font):

* src/w32term.c (w32_bitmap_icon, syms_of_w32term):

* src/xdisp.c (message_dolog, define_frame_cursor1)
(syms_of_xdisp):

* src/xfaces.c (tty_lookup_color, syms_of_xfaces):

* src/xml.c (make_dom, syms_of_xml):

* src/xterm.c (syms_of_xterm):

* src/xwidget.c (store_xwidget_download_callback_event)
(store_xwidget_js_callback_event, syms_of_xwidget): Define
symbols for symbols interned with `intern' from a constant
string, delete duplicate DEFSYM directives, and substitute them
for such calls to intern.  This excludes only those symbols
which are interned and referenced only once during Emacs's
initialization, the timing of whose interning is
inconsequential, and symbols in w32.c, which would need to be
transferred to a new syms_of_w32 function that I cannot test.
2024-05-09 15:07:22 +08:00
Po Lu
430088c9cc Take fields into account during text conversion
* lisp/cus-edit.el (Custom-mode): Enable text conversion, now
that fields are correctly treated.

* src/alloc.c (mark_frame): Mark f->conversion.field.

* src/androidterm.c (android_update_selection): Adjust
conversion region and selection position by the field start and
end.

* src/editfns.c (find_field): Export function.

* src/frame.c (make_frame): Clear f->conversion.field.

* src/frame.h (struct text_conversion_state) <field>: New field.

* src/lisp.h (find_fields, reset_frame_conversion): Export
functions.

* src/minibuf.c (Fread_from_minibuffer): Reset frame conversion
if Voverriding_text_conversion_style is set.

* src/textconv.c (textconv_query): Narrow to field.
(reset_frame_conversion): New function.
(reset_frame_state): Clear conversion field.
(really_delete_surrounding_text): Narrow to field.
(locate_and_save_position_in_field): New function.
(really_request_point_update, really_set_point_and_mark)
(complete_edit_check, handle_pending_conversion_events_1)
(handle_pending_conversion_events, get_conversion_field)
(set_composing_region, textconv_set_point_and_mark, replace_text)
(get_extracted_text, get_surrounding_text, report_point_change):
Compute, narrow to and offset by the currently active field
whenever point is updated or a command is received.
(syms_of_textconv): Revise doc strings.

* src/textconv.h (get_conversion_field): Export function.
2024-04-29 12:34:39 +08:00
Stefan Monnier
2fa839c188 (COMPILED): Rename to CLOSURE
In preparation for the use of `PVEC_COMPILED` objects for
interpreted functions, rename them to use a more neutral name.

* src/lisp.h (enum pvec_type): Rename `PVEC_COMPILED` to `PVEC_CLOSURE`.
(enum Lisp_Compiled): Use `CLOSURE_` prefix i.s.o `COMPILED_`.
Also use `CODE` rather than `BYTECODE`.
(CLOSUREP): Rename from `COMPILEDP`.
(enum Lisp_Closure): Rename from `Lisp_Compiled`.

* src/alloc.c, src/bytecode.c, src/comp.c, src/data.c, src/eval.c,
* src/fns.c, src/lisp.h, src/lread.c, src/pdumper.c, src/print.c,
* src/profiler.c: Rename all uses accordingly.
* src/.gdbinit (xclosure): Rename from `xcompiled`.
(xcompiled): New obsolete alias.
(xpr): Adjust accordingly.  Also adjust to new PVEC_CLOSURE tag name.
2024-04-28 11:58:05 -04:00
Eli Zaretskii
02e795738b ; * src/alloc.c (process_mark_stack): Fix commentary. 2024-04-13 11:15:18 +03:00
Mattias Engdegård
11ffb4656d Revert "Replace XSETSYMBOL with make_lisp_symbol"
This reverts commit de6b1e1efb.

While it did simplify code, there aren't much in the way of technical
benefits the change at this time, and there were protest against the
unwarranted style change.
2024-03-04 14:14:05 +01:00
Mattias Engdegård
de6b1e1efb Replace XSETSYMBOL with make_lisp_symbol
* src/lisp.h (XSETSYMBOL): Remove.  All callers changed to use
make_lisp_symbol.
2024-02-24 18:36:30 +01:00
Mattias Engdegård
462d8ba813 Add a proper type for obarrays
The new opaque type replaces the previous use of vectors for obarrays.
`obarray-make` now returns objects of this type.  Functions that take
obarrays continue to accept vectors for compatibility, now just using
their first slot to store an actual obarray object.

obarray-size and obarray-default-size now obsolete.

* lisp/obarray.el (obarray-default-size, obarray-size):
Declare obsolete.
(obarray-make, obarrayp, obarray-clear): Remove from here.
* src/fns.c (reduce_emacs_uint_to_hash_hash): Remove from here.
* src/lisp.h (struct Lisp_Obarray, OBARRAYP, XOBARRAY, CHECK_OBARRAY)
(make_lisp_obarray, obarray_size, check_obarray)
(obarray_iter_t, make_obarray_iter, obarray_iter_at_end)
(obarray_iter_step, obarray_iter_symbol, DOOBARRAY, knuth_hash): New.
(reduce_emacs_uint_to_hash_hash): Moved here.
* src/lread.c (check_obarray): Renamed and reworked as...
(checked_obarray_slow): ...this.
(intern_sym, Funintern, oblookup, map_obarray)
(Finternal__obarray_buckets): Adapt to new type.
(obarray_index, allocate_obarray, make_obarray, grow_obarray)
(obarray_default_bits, Fobarray_make, Fobarrayp, Fobarray_clear): New.
* etc/emacs_lldb.py (Lisp_Object):
* lisp/emacs-lisp/cl-macs.el (`(,type . ,pred)):
* lisp/emacs-lisp/cl-preloaded.el (cl--typeof-types):
* lisp/emacs-lisp/comp-common.el (comp-known-type-specifiers):
* lisp/emacs-lisp/comp.el (comp-known-predicates):
* src/alloc.c (cleanup_vector, process_mark_stack):
* src/data.c (Ftype_of, syms_of_data):
* src/minibuf.c (Ftry_completion, Fall_completions, Ftest_completion):
* src/pdumper.c (dump_obarray_buckets, dump_obarray, dump_vectorlike):
* src/print.c (print_vectorlike_unreadable):
* test/lisp/abbrev-tests.el (abbrev-make-abbrev-table-test):
* test/lisp/obarray-tests.el (obarrayp-test)
(obarrayp-unchecked-content-test, obarray-make-default-test)
(obarray-make-with-size-test):
Adapt to new type.
2024-02-23 13:02:27 +01:00
Mattias Engdegård
188fe6bffa Replace XSET_HASH_TABLE with make_lisp_hash_table
* src/lisp.h (XSET_HASH_TABLE): Remove, replace with...
(make_lisp_hash_table): ...this.  All callers adapted.
2024-02-19 15:57:05 +01:00
Mattias Engdegård
e66870400d Change hash range reduction from remainder to multiplication
This makes both lookups and rehashing cheaper.  The index vector size
is now always a power of 2.  The first table size is reduced to
6 (from 8), because index vectors would become excessively big
otherwise.

* src/lisp.h (struct Lisp_Hash_Table): Replace index_size with
index_bits.  All references adapted.
(hash_table_index_size): New accessor; use it where applicable.
* src/fns.c (hash_index_size): Replace with...
(compute_hash_index_bits): ...this new function, returning the log2 of the
index size.  All callers adapted.
(hash_index_index): Knuth multiplicative hashing instead of remainder.
(maybe_resize_hash_table): Reduce first table size from 8 to 6.
2024-02-06 14:50:40 +01:00
Paul Eggert
ad2c81082a Prefer C23 ckd_* to Gnulib *_WRAPV and *_OK macros
* src/alloc.c (android_make_lisp_symbol) [HAVE_ANDROID && !__clang__]:
* src/android.c (android_blit_copy, android_blit_xor)
(android_get_image):
* src/androidmenu.c (android_menu_show):
* src/androidselect.c (Fandroid_get_clipboard_data)
(android_notifications_notify_1):
* src/androidterm.c (android_decode_utf16)
(android_text_to_string):
* src/haiku_select.cc (be_display_notification):
* src/sfnt.c (sfnt_read_cmap_format_8, sfnt_read_cmap_format_12)
(sfnt_read_cmap_format_14, sfnt_read_cmap_table_1)
(sfnt_expand_compound_glyph_context, sfnt_poly_edges_exact)
(sfnt_read_meta_table, sfnt_read_ttc_header)
(sfnt_read_cvt_table, sfnt_read_fpgm_table)
(sfnt_read_prep_table, sfnt_make_interpreter)
(sfnt_interpret_simple_glyph, sfnt_interpret_compound_glyph_2)
(sfnt_interpret_compound_glyph, sfnt_read_default_uvs_table)
(sfnt_read_nondefault_uvs_table, sfnt_create_uvs_context)
(sfnt_read_fvar_table, sfnt_read_gvar_table)
(sfnt_read_avar_table, sfnt_read_cvar_table):
* src/sfntfont-android.c (GET_SCANLINE_BUFFER):
* src/textconv.c (really_commit_text, really_set_composing_text)
(really_replace_text, get_surrounding_text):
Prefer C2x stdckdint.h macros to intprops.h macros.
2024-01-28 00:26:44 -08:00
Paul Eggert
a3d7092114 Rename TAG_PTR to TAG_PTR_INITIALLY
* src/lisp.h (TAG_PTR_INITIALLY): Rename from TAG_PTR, since calls
can be used only as initializers, and the convention elsewhere in
lisp.c is to give these macros names ending in ‘_INITIALLY’.
This should help avoid confusion such as we recently experienced
in make_lisp_symbol_internal.  All uses changed.
2024-01-28 00:26:44 -08:00
Stefan Monnier
cc861fc528 (struct composition): Remove dependency on hash-table internals
`struct composition` kept an index into the internal `key_and_value` array
of hash tables, which only worked because of details of how
hash-tables are handled.  Replace it with a reference to the
key stored at that location in the hash-table, which saves us an
indirection while at it.

* src/composite.h (struct composition): Replace `hash_index` with
the actual `key`.
(COMPOSITION_KEY): Simplify accordingly.
(mark_composite): Declare.
* src/composite.c (get_composition_id): Adjust accordingly.
(mark_composite): New function.

* src/charset.c (mark_charset): Uncomment.
* src/lisp.h (mark_charset): Declare.
* src/alloc.c (garbage_collect): Call `mark_charset` and `mark_composite`.
* src/pdumper.c (hash_table_contents): Remove invalid comment, since
compositions aren't dumped.
2024-01-24 08:16:41 -05:00
Mattias Engdegård
1d754c7960 Change HASH_UNUSED_ENTRY_KEY from Qunbound to NULL float
This removes hacks from code that had to be careful not to use
Qunbound as a hash table key, at the cost of a minor hack in
the GC marker.

* src/lisp.h (INVALID_LISP_VALUE, HASH_UNUSED_ENTRY_KEY):
Define as a null-pointer float.
* src/alloc.c (process_mark_stack): Add hack to ignore that value.
* src/pdumper.c (dump_object_needs_dumping_p)
(pdumper_init_symbol_unbound, pdumper_load):
* src/print.c (PRINT_CIRCLE_CANDIDATE_P): Remove hacks for Qunbound.
2024-01-21 11:21:51 +01:00
Paul Eggert
b6ed79b71c Be more systematic about parens in C source code
Be more systematic about putting space before paren in calls,
and in avoiding unnecessary parentheses in macros.
This was partly inspired by my wading through gcc -E output
while debugging something else, and seeing too many parens.

This patch does not change the generated .o files on my platform.
2024-01-20 17:28:53 -08:00
Mattias Engdegård
7d93a0147a Share hash table test structs
This saves several words in the hash table object at the cost of an
indirection at runtime.  This seems to be a gain in overall
performance.

FIXME: We cache hash test objects in a rather clumsy way. A better
solution is sought.

* src/lisp.h (struct Lisp_Hash_Table): Use a pointer to the test
struct.  All references adapted.
* src/alloc.c (garbage_collect):
* src/fns.c (struct hash_table_user_test, hash_table_user_tests)
(mark_fns, get_hash_table_user_test): New state for caching test
structs, and functions managing it.
2024-01-13 20:50:38 +01:00