<feed xmlns='http://www.w3.org/2005/Atom'>
<title>emacs/lib-src, branch scratch/static_assert</title>
<subtitle>Emacs is the extensible, customizable, self-documenting real-time display editor. 
</subtitle>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/'/>
<entry>
<title>Prefer static_assert to verify</title>
<updated>2024-07-23T22:11:37+00:00</updated>
<author>
<name>Stefan Kangas</name>
</author>
<published>2024-07-23T22:09:49+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=e25655756315ac398d15b308511a8e9abf20bb0e'/>
<id>e25655756315ac398d15b308511a8e9abf20bb0e</id>
<content type='text'>
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 (u, 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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 (u, 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.
</pre>
</div>
</content>
</entry>
<entry>
<title>Support --no-window-system option in emacsclient</title>
<updated>2024-06-12T11:10:32+00:00</updated>
<author>
<name>Eli Zaretskii</name>
</author>
<published>2024-06-12T11:10:32+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=ebb0a3036d2256c214b3116b029ecbcc63040be0'/>
<id>ebb0a3036d2256c214b3116b029ecbcc63040be0</id>
<content type='text'>
* lib-src/emacsclient.c (print_help_and_exit, longopts): Add
'--no-window-system' alias for -t.  (Bug#71509)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* lib-src/emacsclient.c (print_help_and_exit, longopts): Add
'--no-window-system' alias for -t.  (Bug#71509)
</pre>
</div>
</content>
</entry>
<entry>
<title>Restore functionality on Android 2.2</title>
<updated>2024-06-12T08:44:21+00:00</updated>
<author>
<name>Po Lu</name>
</author>
<published>2024-06-12T08:44:21+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=02e70821b3800a082aec215a9ab8adbfafe9ad76'/>
<id>02e70821b3800a082aec215a9ab8adbfafe9ad76</id>
<content type='text'>
* java/Makefile.in (install_temp): Do not compress
directory-tree and generate such files in a special format that
stores file sizes.

* lib-src/asset-directory-tool.c (struct directory_tree): New
field st_size.
(need_file_size): New variable.
(main_1, main_2, main): Write file sizes before sibling offsets
if `--api-8' is specified.

* src/android-asset.h (struct android_asset_manager): New field
open.
(struct android_asset): New field name.
(AAssetManager_fromJava): Load AssetManager#open.
(AAssetManager_open): If a directory tree has already been
loaded, search for a matching asset and load its size thence, to
avoid the requirement of an AssetFileDescriptor.
(AAsset_close): Don't assume asset-&gt;fd exists.  Release
asset-&gt;name.
(AAsset_getLength): Likewise.
(android_asset_create_stream): If asset-&gt;name exists, call
AssetManager#open, in order to open compressed files.

* src/androidvfs.c (OLD_ANDROID_ASSETS): Define to 1 on API 8.
(android_extract_long, android_scan_directory_tree): Mark
arguments as const.  Adjust offsets when OLD_ANDROID_ASSETS.
(android_is_directory, android_init_assets, android_afs_readdir):
Likewise.

* src/lread.c (lread_fstat): Define to sys_fstat, not fstat.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* java/Makefile.in (install_temp): Do not compress
directory-tree and generate such files in a special format that
stores file sizes.

* lib-src/asset-directory-tool.c (struct directory_tree): New
field st_size.
(need_file_size): New variable.
(main_1, main_2, main): Write file sizes before sibling offsets
if `--api-8' is specified.

* src/android-asset.h (struct android_asset_manager): New field
open.
(struct android_asset): New field name.
(AAssetManager_fromJava): Load AssetManager#open.
(AAssetManager_open): If a directory tree has already been
loaded, search for a matching asset and load its size thence, to
avoid the requirement of an AssetFileDescriptor.
(AAsset_close): Don't assume asset-&gt;fd exists.  Release
asset-&gt;name.
(AAsset_getLength): Likewise.
(android_asset_create_stream): If asset-&gt;name exists, call
AssetManager#open, in order to open compressed files.

* src/androidvfs.c (OLD_ANDROID_ASSETS): Define to 1 on API 8.
(android_extract_long, android_scan_directory_tree): Mark
arguments as const.  Adjust offsets when OLD_ANDROID_ASSETS.
(android_is_directory, android_init_assets, android_afs_readdir):
Likewise.

* src/lread.c (lread_fstat): Define to sys_fstat, not fstat.
</pre>
</div>
</content>
</entry>
<entry>
<title>Pacify gcc -Wmissing-variable-declarations</title>
<updated>2024-05-12T01:46:27+00:00</updated>
<author>
<name>Paul Eggert</name>
</author>
<published>2024-05-04T17:08:48+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=99a5c75f3b0916affdc8ea4a25d4bc87e67bca88'/>
<id>99a5c75f3b0916affdc8ea4a25d4bc87e67bca88</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
<entry>
<title>; * lib-src/emacsclient.c (local_sockname): Whitespace.</title>
<updated>2024-05-07T11:24:40+00:00</updated>
<author>
<name>Eli Zaretskii</name>
</author>
<published>2024-05-07T11:24:40+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=a06b365cbf8c1b12f785ad0988cb27b26c1ab463'/>
<id>a06b365cbf8c1b12f785ad0988cb27b26c1ab463</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Simplify Emacs server detection on Android</title>
<updated>2024-05-07T01:21:59+00:00</updated>
<author>
<name>Po Lu</name>
</author>
<published>2024-05-07T01:21:59+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=3bc9c38c471983431bc6768dd6cfe9e059e44a3b'/>
<id>3bc9c38c471983431bc6768dd6cfe9e059e44a3b</id>
<content type='text'>
* lib-src/emacsclient.c (set_local_socket) [HAVE_ANDROID]: Do
not consider XDG_RUNTIME_DIR or test the ownership or
accessibility of TMPDIR.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* lib-src/emacsclient.c (set_local_socket) [HAVE_ANDROID]: Do
not consider XDG_RUNTIME_DIR or test the ownership or
accessibility of TMPDIR.
</pre>
</div>
</content>
</entry>
<entry>
<title>etags: work around GCC bug 114882</title>
<updated>2024-04-30T08:26:22+00:00</updated>
<author>
<name>Paul Eggert</name>
</author>
<published>2024-04-30T08:20:12+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=ca4f0705be544986f11971bd8ee7dc30a8d444f1'/>
<id>ca4f0705be544986f11971bd8ee7dc30a8d444f1</id>
<content type='text'>
* lib-src/etags.c: Ignore -Wanalyzer-use-of-uninitialized-value.
This applies to the whole source file, not just to areas where GCC
has bugs, as it was too tricky to ignore more selectively.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* lib-src/etags.c: Ignore -Wanalyzer-use-of-uninitialized-value.
This applies to the whole source file, not just to areas where GCC
has bugs, as it was too tricky to ignore more selectively.
</pre>
</div>
</content>
</entry>
<entry>
<title>etags: fix #line parsing (\\", long lines)</title>
<updated>2024-04-30T08:26:21+00:00</updated>
<author>
<name>Paul Eggert</name>
</author>
<published>2024-04-30T08:20:12+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=7e2309c6fc67b8149cc4c75f8d7f5f93e60b86c7'/>
<id>7e2309c6fc67b8149cc4c75f8d7f5f93e60b86c7</id>
<content type='text'>
* lib-src/etags.c (readline): Don’t mishandle lines like
‘#line 1 "a//"’, which has an escaped backslash before ‘"’.
Don’t mishandle lines so long that sscanf overflows %n.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* lib-src/etags.c (readline): Don’t mishandle lines like
‘#line 1 "a//"’, which has an escaped backslash before ‘"’.
Don’t mishandle lines so long that sscanf overflows %n.
</pre>
</div>
</content>
</entry>
<entry>
<title>Simplify etags.c by omitting a macro</title>
<updated>2024-04-30T08:26:21+00:00</updated>
<author>
<name>Paul Eggert</name>
</author>
<published>2024-04-30T08:20:12+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=de59c02c685189413c7c5a136224d10152dc8a61'/>
<id>de59c02c685189413c7c5a136224d10152dc8a61</id>
<content type='text'>
* lib-src/etags.c (xnew): Remove.  All uses removed.
xnew was confusing, as sometimes it was used with n=1,
sometimes with Type=char, and it’s easier just to use xmalloc
or xnmalloc.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* lib-src/etags.c (xnew): Remove.  All uses removed.
xnew was confusing, as sometimes it was used with n=1,
sometimes with Type=char, and it’s easier just to use xmalloc
or xnmalloc.
</pre>
</div>
</content>
</entry>
<entry>
<title>rcs2log now groks add-log-time-zone rule</title>
<updated>2024-04-12T20:14:29+00:00</updated>
<author>
<name>Paul Eggert</name>
</author>
<published>2024-04-12T20:14:29+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=c26261c027ef7594427d477208b8126d6e4982bd'/>
<id>c26261c027ef7594427d477208b8126d6e4982bd</id>
<content type='text'>
* lib-src/rcs2log (extractTZ): Adjust to renaming of
change-log-time-zone-rule to add-log-time-zone rule, by allowing
either spelling.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* lib-src/rcs2log (extractTZ): Adjust to renaming of
change-log-time-zone-rule to add-log-time-zone rule, by allowing
either spelling.
</pre>
</div>
</content>
</entry>
</feed>
