summaryrefslogtreecommitdiff
path: root/src/w32.c
Commit message (Collapse)AuthorAgeFilesLines
* ; Add 2022 to copyright years.Eli Zaretskii2022-01-011-1/+1
|
* Fix ACL errors with WebDAV volumes on MS-WindowsEli Zaretskii2021-11-111-5/+7
| | | | | | * src/w32.c (acl_get_file): Handle ERROR_INVALID_FUNCTION from WebDAV. Patch from Ioannis Kappas <ioannis.kappas@gmail.com>. (Bug#51773)
* Adapt the recent 'num_processors' change to MS-WindowsEli Zaretskii2021-10-111-0/+11
| | | | | | | * nt/gnulib-cfg.mk (OMIT_GNULIB_MODULE_nproc): Omit nproc. * src/w32.c (num_processors): New function. * src/w32proc.c (Fw32_get_nproc): Remove.
* * src/w32.c (_sys_read_ahead): Pacify a silly compiler warning.Eli Zaretskii2021-08-141-1/+1
|
* Fix 'random' on MS-Windows when integers are wider than 30 bitsEli Zaretskii2021-08-141-1/+6
| | | | | * src/w32.c (random): Provide more random bits for MS-Windows builds with EMACS_INT that is wider than 32 bits. (Bug#32605)
* Fix resolution of symlinks during dumpingEli Zaretskii2021-05-271-0/+39
| | | | | | | | | | | | | * src/comp.c (Fcomp_el_to_eln_rel_filename): Don't use 'file-truename', as it is only available once files.el is loaded, which doesn't work during dumping, until loadup loads files.el. Instead, use 'realpath'. (Bug#48578) * src/w32.c (realpath): New function. * src/w32.h (realpath): Add prototype. * nt/mingw-cfg.site (ac_cv_func_realpath) (gl_cv_func_realpath_works): Define to "yes", as this function is now implemented in w32.c.
* Merge from origin/emacs-27Glenn Morris2021-05-131-2/+2
|\ | | | | | | | | | | | | | | | | | | | | bcd92b5708 (origin/emacs-27) Improve documentation of Hexl mode c233f4eccd ; * etc/NEWS: Fix decoded-time-set-defaults typo. 4c3abb3dd1 Fix compilation errors with latest w32 API headers 127f1f330b Improve doc strings in log-edit.el e36183ff46 ; * etc/TODO (etc/DOC): Update the todo entries. # Conflicts: # etc/NEWS
| * Fix compilation errors with latest w32 API headersEli Zaretskii2021-05-091-2/+2
| | | | | | | | | | | | * src/w32common.h: Rename OS_* to OS_SUBTYPE__*, as w32 API headers started defining OS_NT, which breaks the use of the enumeration. All users changed. (Bug#48303)
* | Do not load native code when `load' is explicitly called on a .elc fileAndrea Corallo2021-03-191-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/lread.c (Fload): Do not load native code when `load' is explicitly called on a .elc file. (Flocate_file_internal): Update 'openp' call sites. (maybe_swap_for_eln): Add new 'no_native' parameter. (openp): Likewise + update 'maybe_swap_for_eln' and 'openp' call sites. * src/lisp.h: Update 'openp' signature. * src/w32proc.c (sys_spawnve): Update 'openp' call sites. * src/w32.c (check_windows_init_file): Likewise. * src/sound.c (Fplay_sound_internal): Likewise. * src/process.c (Fmake_process): Likewise. * src/image.c (image_create_bitmap_from_file) (image_find_image_fd): Likewise. * src/emacs.c (set_invocation_vars): Likewise. * src/charset.c (load_charset_map_from_file): Likewise. * src/callproc.c (call_process): Likewise.
* | Avoid aborts in native-comp subprocesses when exiting Emacs on WindowsEli Zaretskii2021-03-071-0/+7
| | | | | | | | | | | | | | * src/w32.c (shutdown_handler): Clear the message stack when being shut down in noninteractive mode, to avoid aborting in shut_down_emacs when a native-compilation subprocess is killed because the parent Emacs exits.
* | Use MS-Windows system APIs to get number of processorsEli Zaretskii2021-03-071-3/+11
| | | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/comp.el: Use 'w32-get-nproc' instead of the environment variable NUMBER_OF_PROCESSORS. * src/w32proc.c (Fw32_get_nproc): New primitive. * src/w32.c (w32_get_nproc): New function. (sample_system_load): Call w32_get_nproc to initialize the number of processors on this system. * src/w32.h (w32_get_nproc): Add prototype.
* | Merge remote-tracking branch 'savannah/master' into HEADAndrea Corallo2021-02-211-0/+51
|\ \
| * | Merge from origin/emacs-27Glenn Morris2021-02-191-0/+51
| |\| | | | | | | | | | | | | | | | 4712c75ab8 Clarify when activate-mark-hook is run abedf3a865 Fix language-environment and font selection on MS-Windows 8b8708eadd Fix example in Sequence Functions node in the manual
| | * Fix language-environment and font selection on MS-WindowsEli Zaretskii2021-02-071-0/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These changes improve setting the language-environment and font selection when MS-Windows returns useless "ZZZ" as the "language name", which then disrupts all the setup of the locale-dependent stuff, and in particular font selection. * lisp/w32-fns.el (w32-charset-info-alist): Add an element for "iso8859-5", in case LANG is set to something unusable, like "ZZZ". This allows fonts capable of displaying Cyrillic characters to be used even when language preferences are screwed. * src/w32.c (init_environment): If GetLocaleInfo returns "ZZZ" as the "language name" for LOCALE_USER_DEFAULT, try again with locale ID based on what GetUserDefaultUILanguage returns. (Bug#39286)
| | * Update copyright year to 2021Paul Eggert2021-01-011-1/+1
| | | | | | | | | | | | Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
* | | Merge remote-tracking branch 'savannah/master' into HEADAndrea Corallo2021-01-021-1/+6
|\| |
| * | Update copyright year to 2021Paul Eggert2021-01-011-1/+1
| | | | | | | | | | | | Run "TZ=UTC0 admin/update-copyright".
| * | A better fix for process-tests on MS-WindowsEli Zaretskii2020-12-291-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | * src/w32.c (pipe2): When forcibly closing pipe handles due to overflow of FD_SETSIZE, set the handles to -1, to avoid assertion violations in emacs_close. * test/src/process-tests.el (process-tests/fd-setsize-no-crash): No need to skip this test anymore.
* | | Merge remote-tracking branch 'savannah/master' into HEADAndrea Corallo2020-10-101-6/+6
|\| |
| * | Use the full name of the null byte/character, not its abbreviationAndreas Schwab2020-10-051-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/subr.el (inhibit-nul-byte-detection): Make it an obsolete alias. * src/coding.c (setup_coding_system): Use original name. (detect_coding): Rename nul_byte_found => null_byte_found. (detect_coding_system): Use original name. Rename nul_byte_found => null_byte_found. (Fdefine_coding_system_internal): Use original name. (syms_of_coding): Rename inhibit-nul-byte-detection to inhibit-null-byte-detection. * src/w16select.c (get_clipboard_data): Rename nul_char to null_char. * src/json.c (check_string_without_embedded_nulls): Rename from check_string_without_embedded_nuls. (Fjson_parse_string): Adjust accordingly. * src/coding.h (enum define_coding_undecided_arg_index) (enum coding_attr_index): Rename ...nul_byte... to ...null_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 original name.
* | | Merge remote-tracking branch 'savannah/master' into HEADAndrea Corallo2020-10-041-2/+7
|\| |
| * | Merge from origin/emacs-27Glenn Morris2020-10-021-2/+7
| |\| | | | | | | | | | | | | | | | | | | | | | 2af6b3147d Clarification in Tramp manual 8fbaca7d41 Check Emacs version used for Tramp compilation 90e5549f02 Don't signal an error when saving files on WdebDAV volumes 6f73cc3579 ; * lisp/net/eww.el (eww-search-words): Doc fix. ce0842a165 * lisp/hi-lock.el (hi-lock-find-patterns): Autoload it. (...
| | * Don't signal an error when saving files on WdebDAV volumesEli Zaretskii2020-09-291-2/+7
| | | | | | | | | | | | | | | * src/w32.c (acl_get_file): If get_file_security raises the ERROR_ACCESS_DENIED error, treat that like unsupported ACLs.
* | | Merge remote-tracking branch 'savannah/master' into HEADAndrea Corallo2020-05-241-1/+11
|\| |
| * | Merge from origin/emacs-27Glenn Morris2020-05-231-1/+11
| |\| | | | | | | | | | | | | | | | | | | | | | | | | d6a0b66a0c (origin/emacs-27) * lisp/subr.el (save-match-data): Clarif... 1a6d59eeba Improve the documentation of setting up fontsets c7737d40f2 ; * etc/TODO (Ligatures): Update the entry based on recent... fb2e34cd21 ; * etc/TODO (Ligatures): Update the entry based on recent... 13b6dfd4f7 * doc/emacs/killing.texi (Rectangles): Improve indexing. a10254dd46 Fix accessing files on networked drives on MS-Windows
| | * Fix accessing files on networked drives on MS-WindowsEli Zaretskii2020-05-231-1/+11
| | | | | | | | | | | | | | | * src/w32.c (acl_get_file): Set errno to ENOTSUP if get_file_security returns ERROR_NOT_SUPPORTED. (Bug#41463)
* | | Load libgccjit dynamically in Windows.Nicolás Bértolo2020-05-231-0/+4
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure.ac: don't add linker flags if compiling on Windows. Compile dynlib.c if modules or native compilation are enabled. Always compile comp.c * lisp/term/w32-win.el: Map 'gccjit to "libgccjit.dll" in `dynamic-library-alist`. * src/Makefile.in: Update comments. Update to handle changes in configure.ac. * src/comp.c: Add declarations of used libgccjit functions using DEF_DLL_FN. Add calls to load_gccjit_if_necessary() where necessary. Add `native-comp-available-p` * src/comp.h: Remove Fnative_elisp_load. Add syms_of_comp(). * src/emacs.c (main): Always call syms_of_comp() * src/w32.c (globals_of_w32): Clear Vlibrary_cache when starting because the libraries loaded when dumping will not be loaded when starting. * src/w32fns.c: Add Qgccjit symbol.
* | Don't use Gnulib's explicit_bzero on MS-WindowsEli Zaretskii2020-04-191-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | This is a preventive change, since Gnulib was recently changed its explicit_bzero to call SecureZeroMemory on MS-Windows, disregarding systems older than XP, which didn't have it. * src/w32.c (explicit_bzero): New function. * nt/mingw-cfg.site (ac_cv_func_explicit_bzero): Avoid using the Gnulib replacement for explicit_bzero. * nt/inc/ms-w32.h (explicit_bzero): Add prototype.
* | File-handling cleanup in w32image.cEli Zaretskii2020-04-161-2/+0
| | | | | | | | | | | | | | | | | | * src/w32image.c (w32_load_image): Encode the image file name and convert it via 'map_w32_filename'. No need to do anything special when 'w32_unicode_filenames' is zero, since file names are in UTF-8 internally, and this code will never run on Windows 9X. * src/w32.h (map_w32_filename): Add prototype; removed prototypes from all *.c files.
* | Make use of MS-Windows native image API be selectable at run timeEli Zaretskii2020-04-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure.ac: Minor cleanup in how w32image.o is added to the build when native image APIs are requested. * src/w32gui.h (w32_load_image, w32_can_use_native_image_api) (w32_gdiplus_shutdown): Move prototypes from w32term.h here, since w32.c doesn't include w32term.h. * src/image.c (struct image_type): No need to pass TYPE to the 'valid_p' method. All callers changed. (initialize_image_type) [HAVE_NATIVE_IMAGE_API]: Call 'image_can_use_native_api' before trying image-specific methods. (image_can_use_native_api): New function. (image_types): Remove the native_image_type parts. (syms_of_image): New symbol 'native-image'. (parse_image_spec): Accept native-image "type" for any image type. * src/w32term.c (syms_of_w32term): New variable 'w32-use-native-image-API'. * src/w32image.c: (w32_can_use_native_image_api): New function. (gdiplus_init): Rename from w32_gdiplus_startup. Simplify code. Move the call to GdiplusStartup to a separate function. Use ordinal number for SHCreateMemStream if cannot load it by name. (w32_load_image): Ignore Win32Error status from w32_select_active_frame. Move DEFSYMs from here... * src/image.c (syms_of_image) [HAVE_NATIVE_IMAGE_API]: ...to here. * etc/NEWS: Update the entry about native image API use.
* | Initial version of native image API support for MS-WindowsJuan José García-Ripoll2020-04-141-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/w32image.c: New file. * src/w32term.h: Add prototypes of 'w32_load_image', 'w32_gdiplus_startup', 'w32_gdiplus_shutdown', and 'w32_query_frame_background_color'. * src/w32term.c (w32_query_frame_background_color): No longer static. * src/w32.c (term_ntproc) [HAVE_GDIPLUS]: Call 'w32_gdiplus_shutdown'. * src/image.c (struct image_type) <valid_p>: Accept an additional argument, the image type. All implementations changed. (init_native_image_functions, native_image_p, native_image_load) [HAVE_NATIVE_IMAGE_API]: New methods for "native image type". (initialize_image_type) [HAVE_NATIVE_IMAGE_API]: Call 'init_native_image_functions'. (image_types) [HAVE_NATIVE_IMAGE_API]: Add settings for native image API. (lookup_image_type) [HAVE_NATIVE_IMAGE_API]: Initialize native functions if needed. * lisp/term/w32-win.el (dynamic-library-alist): Add gdiplus and shlwapi. * etc/NEWS: Announce the new feature. * configure.ac (native-image-api): New option, OFF by default. (HAVE_NATIVE_IMAGE_API): If native-image-api is selected, add w32image.o to W32_OBJ.
* | Fix the MinGW build as followup to recent "nofollow" changesEli Zaretskii2020-03-081-45/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/w32.c (fdutimens): Call utimensat instead of utime. (set_file_times): Function deleted. (convert_from_timespec): Renamed from convert_from_time_t and modified to accept 'struct timespec' argument instead of 'time_t'. (utimensat): Renamed from utime and modified to accept 'struct timespec [2]' argument and an additional argument FLAG. Emulate Posix 'utimensat'. Call 'convert_from_timespec'. (w32_copy_file): Call 'utimensat' instead of 'set_file_times'. * src/fileio.c (Fcopy_file) [WINDOWSNT]: Make the error message be identical to that on Posix platforms. * nt/inc/sys/stat.h (utimensat): Provide prototype. * nt/mingw-cfg.site (ac_cv_func_futimens) (gl_cv_func_futimens_works, ac_cv_func_utimensat) (gl_cv_func_utimensat_works): Override Gnulib tests. * nt/gnulib-cfg.mk (OMIT_GNULIB_MODULE_futimens) (OMIT_GNULIB_MODULE_utimensat): Disable these Gnulib modules.
* | Add ‘nofollow’ flag to set-file-timesPaul Eggert2020-03-071-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a companion to the recent set-file-modes patch. It adds support for a ‘nofollow’ flag to set-file-times (Bug#39773). Like the set-file-modes patch, it needs work in the w32 port. * admin/merge-gnulib (GNULIB_MODULES): Add futimens, utimensat. Remove utimens. * doc/lispref/files.texi (Changing Files): * etc/NEWS: Mention the change. * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate. * lisp/files.el (copy-directory): * lisp/gnus/gnus-cloud.el (gnus-cloud-replace-file): * lisp/net/tramp-adb.el (tramp-adb-handle-copy-file): * lisp/net/tramp-smb.el (tramp-smb-handle-copy-file): * lisp/tar-mode.el (tar-copy): * test/lisp/filenotify-tests.el (file-notify-test03-events): * test/lisp/files-tests.el: (files-tests-file-name-non-special-set-file-times): * test/lisp/net/tramp-tests.el (tramp-test22-file-times): When setting file times, avoid following symbolic links when the file is not supposed to be a symbolic link. * lib/futimens.c, lib/utimensat.c, m4/futimens.m4, m4/utimensat.m4: New files, copied from Gnulib. * lisp/gnus/gnus-cloud.el (gnus-cloud-replace-file): When creating a file that is not supposed to exist already, use the excl flag to check this. * lisp/net/tramp-adb.el (tramp-adb-handle-set-file-times): * lisp/net/tramp-sh.el (tramp-sh-handle-set-file-times): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-set-file-times): Accept an optional FLAG arg that is currently ignored, and add a FIXME comment for it. * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-set-file-times): * src/fileio.c (Fset_file_times): Support an optional FLAG arg. * src/fileio.c (Fcopy_file): Use futimens instead of set_file_times, as it’s simpler and is a POSIX API. * src/sysdep.c (set_file_times): Move from here ... * src/w32.c (set_file_times): ... to here, and make it static, since it is now used only in w32.c. Presumably w32.c should also add support for futimens and utimensat (the POSIX APIs, which Emacs now uses) and it can remove fdutimens (the Gnulib API, which Emacs no longer uses).
* | Adapt the MS-Windows build to 'nofollow' changesEli Zaretskii2020-02-241-3/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | * nt/gnulib-cfg.mk (OMIT_GNULIB_MODULE_fchmodat) (OMIT_GNULIB_MODULE_lchmod): Set to true to omit building these modules on MS-Windows. * nt/mingw-cfg.site (ac_cv_func_fchmodat) (gl_cv_func_fchmodat_works, ac_cv_func_lchmod): Disable tests on MS-Windows. * src/w32.c (chmod_worker, lchmod, fchmodat): New functions. (sys_chmod): Move most of the code to chmod_worker. * src/w32.h (fchmodat, lchmod): Add prototypes.
* | Unbreak the MS-Windows buildEli Zaretskii2020-01-201-0/+21
|/ | | | | * src/w32.c (openat): New function. * src/w32.h (openat): Add prototype.
* Update copyright year to 2020Paul Eggert2020-01-011-1/+1
| | | | Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
* Support wlan in network-interface-list on pre-Vista WindowsRobert Pluim2019-11-281-2/+17
| | | | | * src/w32.c (network_interface_list): Check for 'Wireless' in adapter description to support pre-Vista Windows.
* ; Fix recent change in w32.cEli Zaretskii2019-11-271-10/+9
| | | | | * src/w32.c (network_interface_list): Correct an embarrassing typo and cleanup the code.
* Fix MS-Windows build with mingw.org's MinGWEli Zaretskii2019-11-261-1/+79
| | | | | | | | | | | | | | | | | | mingw.org's MinGW by default targets Windows 9X, so _WIN32_WINNT is set to a value that bypasses declarations in system headers we need to compile network_interface_list. Also, the code needed a workaround for Windows XP, where some functionality is missing from the GetAdaptersAddresses API. * src/w32.c (_WIN32_WINNT): Define to 0x0501, if the value is lower, temporarily while processing iphlpapi.h. (address_prefix_match): New helper function. (network_interface_list): Work around the fact that the OnLinkPrefixLength member of IP_ADAPTER_UNICAST_ADDRESS is not available when _WIN32_WINNT < 0x0600. On Windows XP use special code that calls address_prefix_match to compute the network prefix length.
* Extend network-interface-list to return IPv6 and network infoRobert Pluim2019-11-261-2/+242
| | | | | | | | | | | | | | | | | | | | | | | | | | | Bug#38218 * src/process.c (Fnetwork_interface_list): Extend argument list to allow requesting full network info and/or IPv4/IPv6 info. (network_interface_list) [HAVE_GETIFADDRS]: Use getifaddrs to retrieve interface IP addresses. * src/process.h: Update prototype of network_interface_list. * src/w32.c (g_b_init_get_adapters_addresses): New init flag. (globals_of_w32): Initialize it. (GetAdaptersAddresses_Proc): New function typedef. (get_adapters_addresses): New wrapper function. (init_winsock): Load htonl and ntohl. (sys_htonl, sys_ntohl): New wrapper functions. (network_interface_list): Implement in terms of get_adapters_addresses. * nt/inc/sys/socket.h: Add sys_htonl and sys_ntohl prototypes. * etc/NEWS: Announce IPv4/IPv6 changes in network-interface-list. * doc/lispref/processes.texi (Misc Network): Document updated arglist and return values for network-interface-list.
* Silence compiler warningJuanma Barranquero2019-10-091-1/+1
| | | | * src/w32.c (acl_to_text): Add ATTRIBUTE_MALLOC.
* Fix MS-Windows error when a directory on PATH doesn't existEli Zaretskii2019-10-021-0/+4
| | | | | * src/w32.c (faccessat): Support more MS-Windows native error codes that should be translated to ENOENT. (Bug#37576)
* Improve error reporting in file_accessible_directory_pEli Zaretskii2019-09-161-3/+26
| | | | | | * src/w32.c (w32_accessible_directory_p): Set errno, so that file_accessible_directory_p does on MS-Windows, to live up to its callers' expectations.
* Avoid a compilation warning in w32.cEli Zaretskii2019-08-231-1/+1
| | | | | * src/w32.c (logon_network_drive): Avoid compilation warning about strncpy arguments.
* Support invoking Emacs via a symlink on MS-WindowsEli Zaretskii2019-06-261-4/+20
| | | | | | | | * src/w32.c (w32_my_exename): Resolve symlinks in the executable name, to support searching for the pdumper file when the executable is found via a symlink. * src/emacs.c (load_pdump): Add a comment about symlink resolution on Windows.
* Fix MS-Windows build as followup to pdumper executable lookupEli Zaretskii2019-06-241-0/+15
| | | | | | | | | | | | | | * src/w32.c (w32_my_exename): New function. * src/w32.h (w32_my_exename): Add prototype. * src/emacs.c (load_pdump_find_executable) [WINDOWSNT]: Find the actual file name of the program without looking along PATH, by calling w32_my_exename. * nt/mingw-cfg.site (ac_cv_func_canonicalize_file_name) (ac_cv_func_realpath, gl_cv_func_realpath_works): Disable testing. * nt/gnulib-cfg.mk (OMIT_GNULIB_MODULE_canonicalize-lgpl): Set to true.
* Fix 'load-average' on MS-WindowsEli Zaretskii2019-05-071-0/+7
| | | | | * src/w32.c (getloadavg): Always return at least one element of the array.
* Avoid compilation warnings in w32.cEli Zaretskii2019-04-291-2/+2
| | | | | | * src/w32.c (unsetenv, readlink): Use memcpy instead of strncpy, to avoid a compiler warning about calculating the bound of the copy.
* Fix misuses of NULL when talking about the NUL characterStefan Monnier2019-03-211-6/+6
| | | | | | | | | | | | | | | | | | | | | | * 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.
* Simplify list creation in C codePaul Eggert2019-03-041-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The main new thing here is that C code can now say ‘list (a, b, c, d, e, f)’ instead of ‘listn (CONSTYPE_HEAP, 6, a, b, c, d, e, f)’, thus relieving callers of the responsibility of counting arguments (plus, the code feels more like Lisp). The old list1 ... list5 functions remain, as they’re probably a bit faster for small lists. * src/alloc.c (cons_listn, pure_listn): New functions. (listn): Omit enum argument. All callers changed to use either new ‘list’ or ‘pure_list’ macros. * src/charset.c (Fdefine_charset_internal): * src/coding.c (detect_coding_system) (Fset_terminal_coding_system_internal): * src/frame.c (frame_size_history_add, adjust_frame_size): * src/gtkutil.c (xg_frame_set_char_size): * src/keyboard.c (command_loop_1): * src/nsfns.m (frame_geometry): * src/widget.c (set_frame_size): * src/xfaces.c (Fcolor_distance): * src/xfns.c (frame_geometry): * src/xterm.c (x_set_window_size_1): * src/xwidget.c (Fxwidget_size_request): Prefer list1i, list2i, etc. to open-coding them. * src/charset.c (Fset_charset_priority): * src/nsterm.m (append2): * src/window.c (window_list): * src/xfaces.c (Fx_list_fonts): Use nconc2 instead of open-coding it. * src/eval.c (eval_sub, backtrace_frame_apply): * src/kqueue.c (kqueue_generate_event): * src/nsterm.m (performDragOperation:): * src/pdumper.c (Fpdumper_stats): * src/w32.c (init_environment): Prefer list1, list2, etc. to open-coding them. * src/font.c (font_list_entities): Parenthesize to avoid expanding new ‘list’ macro. * src/gtkutil.c (GETSETUP): Rename from MAKE_FLOAT_PAGE_SETUP to get lines to fit. Move outside the ‘list’ call, since it’s now a macro. * src/keymap.c (Fmake_keymap): Simplify. * src/lisp.h (list, pure_list): New macros. (list1i): New function.