diff options
| author | Eli Zaretskii | 2022-03-19 22:18:47 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2022-03-19 22:18:47 +0200 |
| commit | d2ac7447db52f492f9cbb52566de2e452c8bc65d (patch) | |
| tree | 42368147e419249f6f5e67e2c8716fc53b55a545 /src | |
| parent | 6887bf555f12e2059f237862159e19deddf596e1 (diff) | |
| parent | ccf4a4fa482f61938a9495c862b74f4a2d3ade0c (diff) | |
| download | emacs-d2ac7447db52f492f9cbb52566de2e452c8bc65d.tar.gz emacs-d2ac7447db52f492f9cbb52566de2e452c8bc65d.zip | |
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Diffstat (limited to 'src')
| -rw-r--r-- | src/alloc.c | 25 | ||||
| -rw-r--r-- | src/bytecode.c | 2 | ||||
| -rw-r--r-- | src/comp.c | 48 | ||||
| -rw-r--r-- | src/comp.h | 4 | ||||
| -rw-r--r-- | src/decompress.c | 10 | ||||
| -rw-r--r-- | src/dynlib.c | 4 | ||||
| -rw-r--r-- | src/emacs.c | 4 | ||||
| -rw-r--r-- | src/eval.c | 84 | ||||
| -rw-r--r-- | src/fileio.c | 4 | ||||
| -rw-r--r-- | src/fns.c | 38 | ||||
| -rw-r--r-- | src/frame.c | 2 | ||||
| -rw-r--r-- | src/frame.h | 2 | ||||
| -rw-r--r-- | src/gnutls.c | 2 | ||||
| -rw-r--r-- | src/gnutls.h | 1 | ||||
| -rw-r--r-- | src/lisp.h | 6 | ||||
| -rw-r--r-- | src/minibuf.c | 2 | ||||
| -rw-r--r-- | src/syntax.c | 2 | ||||
| -rw-r--r-- | src/syntax.h | 4 | ||||
| -rw-r--r-- | src/systime.h | 1 | ||||
| -rw-r--r-- | src/thread.h | 6 | ||||
| -rw-r--r-- | src/timefns.c | 2 | ||||
| -rw-r--r-- | src/window.c | 9 | ||||
| -rw-r--r-- | src/window.h | 1 | ||||
| -rw-r--r-- | src/xterm.c | 124 | ||||
| -rw-r--r-- | src/xterm.h | 4 |
25 files changed, 129 insertions, 262 deletions
diff --git a/src/alloc.c b/src/alloc.c index b0fbc91fe50..b06dd943ba5 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -445,26 +445,11 @@ static void compact_small_strings (void); | |||
| 445 | static void free_large_strings (void); | 445 | static void free_large_strings (void); |
| 446 | extern Lisp_Object which_symbols (Lisp_Object, EMACS_INT) EXTERNALLY_VISIBLE; | 446 | extern Lisp_Object which_symbols (Lisp_Object, EMACS_INT) EXTERNALLY_VISIBLE; |
| 447 | 447 | ||
| 448 | /* Forward declare mark accessor functions: they're used all over the | 448 | static bool vector_marked_p (struct Lisp_Vector const *); |
| 449 | place. */ | 449 | static bool vectorlike_marked_p (union vectorlike_header const *); |
| 450 | 450 | static void set_vectorlike_marked (union vectorlike_header *); | |
| 451 | inline static bool vector_marked_p (const struct Lisp_Vector *v); | 451 | static bool interval_marked_p (INTERVAL); |
| 452 | inline static void set_vector_marked (struct Lisp_Vector *v); | 452 | static void set_interval_marked (INTERVAL); |
| 453 | |||
| 454 | inline static bool vectorlike_marked_p (const union vectorlike_header *v); | ||
| 455 | inline static void set_vectorlike_marked (union vectorlike_header *v); | ||
| 456 | |||
| 457 | inline static bool cons_marked_p (const struct Lisp_Cons *c); | ||
| 458 | inline static void set_cons_marked (struct Lisp_Cons *c); | ||
| 459 | |||
| 460 | inline static bool string_marked_p (const struct Lisp_String *s); | ||
| 461 | inline static void set_string_marked (struct Lisp_String *s); | ||
| 462 | |||
| 463 | inline static bool symbol_marked_p (const struct Lisp_Symbol *s); | ||
| 464 | inline static void set_symbol_marked (struct Lisp_Symbol *s); | ||
| 465 | |||
| 466 | inline static bool interval_marked_p (INTERVAL i); | ||
| 467 | inline static void set_interval_marked (INTERVAL i); | ||
| 468 | 453 | ||
| 469 | /* When scanning the C stack for live Lisp objects, Emacs keeps track of | 454 | /* When scanning the C stack for live Lisp objects, Emacs keeps track of |
| 470 | what memory allocated via lisp_malloc and lisp_align_malloc is intended | 455 | what memory allocated via lisp_malloc and lisp_align_malloc is intended |
diff --git a/src/bytecode.c b/src/bytecode.c index ed1f6ca4a85..62464986160 100644 --- a/src/bytecode.c +++ b/src/bytecode.c | |||
| @@ -452,7 +452,7 @@ DEFUN ("internal-stack-stats", Finternal_stack_stats, Sinternal_stack_stats, | |||
| 452 | } | 452 | } |
| 453 | 453 | ||
| 454 | /* Whether a stack pointer is valid in the current frame. */ | 454 | /* Whether a stack pointer is valid in the current frame. */ |
| 455 | INLINE bool | 455 | static bool |
| 456 | valid_sp (struct bc_thread_state *bc, Lisp_Object *sp) | 456 | valid_sp (struct bc_thread_state *bc, Lisp_Object *sp) |
| 457 | { | 457 | { |
| 458 | struct bc_frame *fp = bc->fp; | 458 | struct bc_frame *fp = bc->fp; |
diff --git a/src/comp.c b/src/comp.c index 499eee7e709..50f92fe2cfe 100644 --- a/src/comp.c +++ b/src/comp.c | |||
| @@ -516,8 +516,6 @@ typedef struct { | |||
| 516 | ptrdiff_t size; | 516 | ptrdiff_t size; |
| 517 | } f_reloc_t; | 517 | } f_reloc_t; |
| 518 | 518 | ||
| 519 | sigset_t saved_sigset; | ||
| 520 | |||
| 521 | static f_reloc_t freloc; | 519 | static f_reloc_t freloc; |
| 522 | 520 | ||
| 523 | #define NUM_CAST_TYPES 15 | 521 | #define NUM_CAST_TYPES 15 |
| @@ -648,7 +646,7 @@ typedef struct { | |||
| 648 | 646 | ||
| 649 | static comp_t comp; | 647 | static comp_t comp; |
| 650 | 648 | ||
| 651 | FILE *logfile = NULL; | 649 | static FILE *logfile; |
| 652 | 650 | ||
| 653 | /* This is used for serialized objects by the reload mechanism. */ | 651 | /* This is used for serialized objects by the reload mechanism. */ |
| 654 | typedef struct { | 652 | typedef struct { |
| @@ -666,16 +664,16 @@ typedef struct { | |||
| 666 | Helper functions called by the run-time. | 664 | Helper functions called by the run-time. |
| 667 | */ | 665 | */ |
| 668 | 666 | ||
| 669 | void helper_unwind_protect (Lisp_Object handler); | 667 | static void helper_unwind_protect (Lisp_Object); |
| 670 | Lisp_Object helper_temp_output_buffer_setup (Lisp_Object x); | 668 | static Lisp_Object helper_unbind_n (Lisp_Object); |
| 671 | Lisp_Object helper_unbind_n (Lisp_Object n); | 669 | static void helper_save_restriction (void); |
| 672 | void helper_save_restriction (void); | 670 | static bool helper_PSEUDOVECTOR_TYPEP_XUNTAG (Lisp_Object, enum pvec_type); |
| 673 | bool helper_PSEUDOVECTOR_TYPEP_XUNTAG (Lisp_Object a, enum pvec_type code); | 671 | static struct Lisp_Symbol_With_Pos * |
| 674 | struct Lisp_Symbol_With_Pos *helper_GET_SYMBOL_WITH_POSITION (Lisp_Object a); | 672 | helper_GET_SYMBOL_WITH_POSITION (Lisp_Object); |
| 675 | 673 | ||
| 676 | /* Note: helper_link_table must match the list created by | 674 | /* Note: helper_link_table must match the list created by |
| 677 | `declare_runtime_imported_funcs'. */ | 675 | `declare_runtime_imported_funcs'. */ |
| 678 | void *helper_link_table[] = | 676 | static void *helper_link_table[] = |
| 679 | { wrong_type_argument, | 677 | { wrong_type_argument, |
| 680 | helper_PSEUDOVECTOR_TYPEP_XUNTAG, | 678 | helper_PSEUDOVECTOR_TYPEP_XUNTAG, |
| 681 | pure_write_error, | 679 | pure_write_error, |
| @@ -4976,7 +4974,7 @@ unknown (before GCC version 10). */) | |||
| 4976 | /* for laziness. Change this if a performance impact is measured. */ | 4974 | /* for laziness. Change this if a performance impact is measured. */ |
| 4977 | /******************************************************************************/ | 4975 | /******************************************************************************/ |
| 4978 | 4976 | ||
| 4979 | void | 4977 | static void |
| 4980 | helper_unwind_protect (Lisp_Object handler) | 4978 | helper_unwind_protect (Lisp_Object handler) |
| 4981 | { | 4979 | { |
| 4982 | /* Support for a function here is new in 24.4. */ | 4980 | /* Support for a function here is new in 24.4. */ |
| @@ -4984,28 +4982,20 @@ helper_unwind_protect (Lisp_Object handler) | |||
| 4984 | handler); | 4982 | handler); |
| 4985 | } | 4983 | } |
| 4986 | 4984 | ||
| 4987 | Lisp_Object | 4985 | static Lisp_Object |
| 4988 | helper_temp_output_buffer_setup (Lisp_Object x) | ||
| 4989 | { | ||
| 4990 | CHECK_STRING (x); | ||
| 4991 | temp_output_buffer_setup (SSDATA (x)); | ||
| 4992 | return Vstandard_output; | ||
| 4993 | } | ||
| 4994 | |||
| 4995 | Lisp_Object | ||
| 4996 | helper_unbind_n (Lisp_Object n) | 4986 | helper_unbind_n (Lisp_Object n) |
| 4997 | { | 4987 | { |
| 4998 | return unbind_to (specpdl_ref_add (SPECPDL_INDEX (), -XFIXNUM (n)), Qnil); | 4988 | return unbind_to (specpdl_ref_add (SPECPDL_INDEX (), -XFIXNUM (n)), Qnil); |
| 4999 | } | 4989 | } |
| 5000 | 4990 | ||
| 5001 | void | 4991 | static void |
| 5002 | helper_save_restriction (void) | 4992 | helper_save_restriction (void) |
| 5003 | { | 4993 | { |
| 5004 | record_unwind_protect (save_restriction_restore, | 4994 | record_unwind_protect (save_restriction_restore, |
| 5005 | save_restriction_save ()); | 4995 | save_restriction_save ()); |
| 5006 | } | 4996 | } |
| 5007 | 4997 | ||
| 5008 | bool | 4998 | static bool |
| 5009 | helper_PSEUDOVECTOR_TYPEP_XUNTAG (Lisp_Object a, enum pvec_type code) | 4999 | helper_PSEUDOVECTOR_TYPEP_XUNTAG (Lisp_Object a, enum pvec_type code) |
| 5010 | { | 5000 | { |
| 5011 | return PSEUDOVECTOR_TYPEP (XUNTAG (a, Lisp_Vectorlike, | 5001 | return PSEUDOVECTOR_TYPEP (XUNTAG (a, Lisp_Vectorlike, |
| @@ -5013,7 +5003,7 @@ helper_PSEUDOVECTOR_TYPEP_XUNTAG (Lisp_Object a, enum pvec_type code) | |||
| 5013 | code); | 5003 | code); |
| 5014 | } | 5004 | } |
| 5015 | 5005 | ||
| 5016 | struct Lisp_Symbol_With_Pos * | 5006 | static struct Lisp_Symbol_With_Pos * |
| 5017 | helper_GET_SYMBOL_WITH_POSITION (Lisp_Object a) | 5007 | helper_GET_SYMBOL_WITH_POSITION (Lisp_Object a) |
| 5018 | { | 5008 | { |
| 5019 | if (!SYMBOL_WITH_POS_P (a)) | 5009 | if (!SYMBOL_WITH_POS_P (a)) |
| @@ -5032,6 +5022,12 @@ return_nil (Lisp_Object arg) | |||
| 5032 | { | 5022 | { |
| 5033 | return Qnil; | 5023 | return Qnil; |
| 5034 | } | 5024 | } |
| 5025 | |||
| 5026 | static Lisp_Object | ||
| 5027 | directory_files_matching (Lisp_Object name, Lisp_Object match) | ||
| 5028 | { | ||
| 5029 | return Fdirectory_files (name, Qt, match, Qnil, Qnil); | ||
| 5030 | } | ||
| 5035 | #endif | 5031 | #endif |
| 5036 | 5032 | ||
| 5037 | /* Windows does not let us delete a .eln file that is currently loaded | 5033 | /* Windows does not let us delete a .eln file that is currently loaded |
| @@ -5049,11 +5045,11 @@ eln_load_path_final_clean_up (void) | |||
| 5049 | FOR_EACH_TAIL (dir_tail) | 5045 | FOR_EACH_TAIL (dir_tail) |
| 5050 | { | 5046 | { |
| 5051 | Lisp_Object files_in_dir = | 5047 | Lisp_Object files_in_dir = |
| 5052 | internal_condition_case_5 (Fdirectory_files, | 5048 | internal_condition_case_2 (directory_files_matching, |
| 5053 | Fexpand_file_name (Vcomp_native_version_dir, | 5049 | Fexpand_file_name (Vcomp_native_version_dir, |
| 5054 | XCAR (dir_tail)), | 5050 | XCAR (dir_tail)), |
| 5055 | Qt, build_string ("\\.eln\\.old\\'"), Qnil, | 5051 | build_string ("\\.eln\\.old\\'"), |
| 5056 | Qnil, Qt, return_nil); | 5052 | Qt, return_nil); |
| 5057 | FOR_EACH_TAIL (files_in_dir) | 5053 | FOR_EACH_TAIL (files_in_dir) |
| 5058 | internal_delete_file (XCAR (files_in_dir)); | 5054 | internal_delete_file (XCAR (files_in_dir)); |
| 5059 | } | 5055 | } |
diff --git a/src/comp.h b/src/comp.h index 40f1e9b979c..da53f32971e 100644 --- a/src/comp.h +++ b/src/comp.h | |||
| @@ -53,6 +53,8 @@ struct Lisp_Native_Comp_Unit | |||
| 53 | 53 | ||
| 54 | #ifdef HAVE_NATIVE_COMP | 54 | #ifdef HAVE_NATIVE_COMP |
| 55 | 55 | ||
| 56 | INLINE_HEADER_BEGIN | ||
| 57 | |||
| 56 | INLINE bool | 58 | INLINE bool |
| 57 | NATIVE_COMP_UNITP (Lisp_Object a) | 59 | NATIVE_COMP_UNITP (Lisp_Object a) |
| 58 | { | 60 | { |
| @@ -99,6 +101,8 @@ void unload_comp_unit (struct Lisp_Native_Comp_Unit *cu) | |||
| 99 | 101 | ||
| 100 | extern void syms_of_comp (void); | 102 | extern void syms_of_comp (void); |
| 101 | 103 | ||
| 104 | INLINE_HEADER_END | ||
| 105 | |||
| 102 | #endif /* #ifdef HAVE_NATIVE_COMP */ | 106 | #endif /* #ifdef HAVE_NATIVE_COMP */ |
| 103 | 107 | ||
| 104 | #endif /* #ifndef COMP_H */ | 108 | #endif /* #ifndef COMP_H */ |
diff --git a/src/decompress.c b/src/decompress.c index ddd8abbf27c..dbdc9104a37 100644 --- a/src/decompress.c +++ b/src/decompress.c | |||
| @@ -67,8 +67,9 @@ init_zlib_functions (void) | |||
| 67 | #endif /* WINDOWSNT */ | 67 | #endif /* WINDOWSNT */ |
| 68 | 68 | ||
| 69 | 69 | ||
| 70 | #ifdef HAVE_NATIVE_COMP | ||
| 70 | 71 | ||
| 71 | #define MD5_BLOCKSIZE 32768 /* From md5.c */ | 72 | # define MD5_BLOCKSIZE 32768 /* From md5.c */ |
| 72 | 73 | ||
| 73 | static char acc_buff[2 * MD5_BLOCKSIZE]; | 74 | static char acc_buff[2 * MD5_BLOCKSIZE]; |
| 74 | static size_t acc_size; | 75 | static size_t acc_size; |
| @@ -106,7 +107,7 @@ md5_gz_stream (FILE *source, void *resblock) | |||
| 106 | unsigned char in[MD5_BLOCKSIZE]; | 107 | unsigned char in[MD5_BLOCKSIZE]; |
| 107 | unsigned char out[MD5_BLOCKSIZE]; | 108 | unsigned char out[MD5_BLOCKSIZE]; |
| 108 | 109 | ||
| 109 | #ifdef WINDOWSNT | 110 | # ifdef WINDOWSNT |
| 110 | if (!zlib_initialized) | 111 | if (!zlib_initialized) |
| 111 | zlib_initialized = init_zlib_functions (); | 112 | zlib_initialized = init_zlib_functions (); |
| 112 | if (!zlib_initialized) | 113 | if (!zlib_initialized) |
| @@ -114,7 +115,7 @@ md5_gz_stream (FILE *source, void *resblock) | |||
| 114 | message1 ("zlib library not found"); | 115 | message1 ("zlib library not found"); |
| 115 | return -1; | 116 | return -1; |
| 116 | } | 117 | } |
| 117 | #endif | 118 | # endif |
| 118 | 119 | ||
| 119 | eassert (!acc_size); | 120 | eassert (!acc_size); |
| 120 | 121 | ||
| @@ -164,7 +165,8 @@ md5_gz_stream (FILE *source, void *resblock) | |||
| 164 | 165 | ||
| 165 | return 0; | 166 | return 0; |
| 166 | } | 167 | } |
| 167 | #undef MD5_BLOCKSIZE | 168 | # undef MD5_BLOCKSIZE |
| 169 | #endif | ||
| 168 | 170 | ||
| 169 | 171 | ||
| 170 | 172 | ||
diff --git a/src/dynlib.c b/src/dynlib.c index 8cb9a233745..e2c71f14489 100644 --- a/src/dynlib.c +++ b/src/dynlib.c | |||
| @@ -279,11 +279,13 @@ dynlib_open (const char *path) | |||
| 279 | return dlopen (path, RTLD_LAZY | RTLD_GLOBAL); | 279 | return dlopen (path, RTLD_LAZY | RTLD_GLOBAL); |
| 280 | } | 280 | } |
| 281 | 281 | ||
| 282 | # ifdef HAVE_NATIVE_COMP | ||
| 282 | dynlib_handle_ptr | 283 | dynlib_handle_ptr |
| 283 | dynlib_open_for_eln (const char *path) | 284 | dynlib_open_for_eln (const char *path) |
| 284 | { | 285 | { |
| 285 | return dlopen (path, RTLD_LAZY); | 286 | return dlopen (path, RTLD_LAZY); |
| 286 | } | 287 | } |
| 288 | # endif | ||
| 287 | 289 | ||
| 288 | void * | 290 | void * |
| 289 | dynlib_sym (dynlib_handle_ptr h, const char *sym) | 291 | dynlib_sym (dynlib_handle_ptr h, const char *sym) |
| @@ -313,11 +315,13 @@ dynlib_error (void) | |||
| 313 | return dlerror (); | 315 | return dlerror (); |
| 314 | } | 316 | } |
| 315 | 317 | ||
| 318 | # ifdef HAVE_NATIVE_COMP | ||
| 316 | int | 319 | int |
| 317 | dynlib_close (dynlib_handle_ptr h) | 320 | dynlib_close (dynlib_handle_ptr h) |
| 318 | { | 321 | { |
| 319 | return dlclose (h) == 0; | 322 | return dlclose (h) == 0; |
| 320 | } | 323 | } |
| 324 | # endif | ||
| 321 | 325 | ||
| 322 | #else | 326 | #else |
| 323 | 327 | ||
diff --git a/src/emacs.c b/src/emacs.c index d1060bca0b3..0ff916b18b8 100644 --- a/src/emacs.c +++ b/src/emacs.c | |||
| @@ -140,6 +140,10 @@ extern char etext; | |||
| 140 | #include "fingerprint.h" | 140 | #include "fingerprint.h" |
| 141 | #include "epaths.h" | 141 | #include "epaths.h" |
| 142 | 142 | ||
| 143 | /* Include these only because of INLINE. */ | ||
| 144 | #include "comp.h" | ||
| 145 | #include "thread.h" | ||
| 146 | |||
| 143 | static const char emacs_version[] = PACKAGE_VERSION; | 147 | static const char emacs_version[] = PACKAGE_VERSION; |
| 144 | static const char emacs_copyright[] = COPYRIGHT; | 148 | static const char emacs_copyright[] = COPYRIGHT; |
| 145 | static const char emacs_bugreport[] = PACKAGE_BUGREPORT; | 149 | static const char emacs_bugreport[] = PACKAGE_BUGREPORT; |
diff --git a/src/eval.c b/src/eval.c index c46b74ac40c..39c328ea1fa 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -1501,90 +1501,6 @@ internal_condition_case_2 (Lisp_Object (*bfun) (Lisp_Object, Lisp_Object), | |||
| 1501 | } | 1501 | } |
| 1502 | } | 1502 | } |
| 1503 | 1503 | ||
| 1504 | /* Like internal_condition_case_1 but call BFUN with ARG1, ARG2, ARG3 as | ||
| 1505 | its arguments. */ | ||
| 1506 | |||
| 1507 | Lisp_Object | ||
| 1508 | internal_condition_case_3 (Lisp_Object (*bfun) (Lisp_Object, Lisp_Object, | ||
| 1509 | Lisp_Object), | ||
| 1510 | Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3, | ||
| 1511 | Lisp_Object handlers, | ||
| 1512 | Lisp_Object (*hfun) (Lisp_Object)) | ||
| 1513 | { | ||
| 1514 | struct handler *c = push_handler (handlers, CONDITION_CASE); | ||
| 1515 | if (sys_setjmp (c->jmp)) | ||
| 1516 | { | ||
| 1517 | Lisp_Object val = handlerlist->val; | ||
| 1518 | clobbered_eassert (handlerlist == c); | ||
| 1519 | handlerlist = handlerlist->next; | ||
| 1520 | return hfun (val); | ||
| 1521 | } | ||
| 1522 | else | ||
| 1523 | { | ||
| 1524 | Lisp_Object val = bfun (arg1, arg2, arg3); | ||
| 1525 | eassert (handlerlist == c); | ||
| 1526 | handlerlist = c->next; | ||
| 1527 | return val; | ||
| 1528 | } | ||
| 1529 | } | ||
| 1530 | |||
| 1531 | /* Like internal_condition_case_1 but call BFUN with ARG1, ARG2, ARG3, ARG4 as | ||
| 1532 | its arguments. */ | ||
| 1533 | |||
| 1534 | Lisp_Object | ||
| 1535 | internal_condition_case_4 (Lisp_Object (*bfun) (Lisp_Object, Lisp_Object, | ||
| 1536 | Lisp_Object, Lisp_Object), | ||
| 1537 | Lisp_Object arg1, Lisp_Object arg2, | ||
| 1538 | Lisp_Object arg3, Lisp_Object arg4, | ||
| 1539 | Lisp_Object handlers, | ||
| 1540 | Lisp_Object (*hfun) (Lisp_Object)) | ||
| 1541 | { | ||
| 1542 | struct handler *c = push_handler (handlers, CONDITION_CASE); | ||
| 1543 | if (sys_setjmp (c->jmp)) | ||
| 1544 | { | ||
| 1545 | Lisp_Object val = handlerlist->val; | ||
| 1546 | clobbered_eassert (handlerlist == c); | ||
| 1547 | handlerlist = handlerlist->next; | ||
| 1548 | return hfun (val); | ||
| 1549 | } | ||
| 1550 | else | ||
| 1551 | { | ||
| 1552 | Lisp_Object val = bfun (arg1, arg2, arg3, arg4); | ||
| 1553 | eassert (handlerlist == c); | ||
| 1554 | handlerlist = c->next; | ||
| 1555 | return val; | ||
| 1556 | } | ||
| 1557 | } | ||
| 1558 | |||
| 1559 | /* Like internal_condition_case_1 but call BFUN with ARG1, ARG2, ARG3, | ||
| 1560 | ARG4, ARG5 as its arguments. */ | ||
| 1561 | |||
| 1562 | Lisp_Object | ||
| 1563 | internal_condition_case_5 (Lisp_Object (*bfun) (Lisp_Object, Lisp_Object, | ||
| 1564 | Lisp_Object, Lisp_Object, | ||
| 1565 | Lisp_Object), | ||
| 1566 | Lisp_Object arg1, Lisp_Object arg2, | ||
| 1567 | Lisp_Object arg3, Lisp_Object arg4, | ||
| 1568 | Lisp_Object arg5, Lisp_Object handlers, | ||
| 1569 | Lisp_Object (*hfun) (Lisp_Object)) | ||
| 1570 | { | ||
| 1571 | struct handler *c = push_handler (handlers, CONDITION_CASE); | ||
| 1572 | if (sys_setjmp (c->jmp)) | ||
| 1573 | { | ||
| 1574 | Lisp_Object val = handlerlist->val; | ||
| 1575 | clobbered_eassert (handlerlist == c); | ||
| 1576 | handlerlist = handlerlist->next; | ||
| 1577 | return hfun (val); | ||
| 1578 | } | ||
| 1579 | else | ||
| 1580 | { | ||
| 1581 | Lisp_Object val = bfun (arg1, arg2, arg3, arg4, arg5); | ||
| 1582 | eassert (handlerlist == c); | ||
| 1583 | handlerlist = c->next; | ||
| 1584 | return val; | ||
| 1585 | } | ||
| 1586 | } | ||
| 1587 | |||
| 1588 | /* Like internal_condition_case but call BFUN with NARGS as first, | 1504 | /* Like internal_condition_case but call BFUN with NARGS as first, |
| 1589 | and ARGS as second argument. */ | 1505 | and ARGS as second argument. */ |
| 1590 | 1506 | ||
diff --git a/src/fileio.c b/src/fileio.c index a0282204de8..5d66a93ac6a 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -2505,6 +2505,8 @@ With a prefix argument, TRASH is nil. */) | |||
| 2505 | return Qnil; | 2505 | return Qnil; |
| 2506 | } | 2506 | } |
| 2507 | 2507 | ||
| 2508 | #if defined HAVE_NATIVE_COMP && defined WINDOWSNT | ||
| 2509 | |||
| 2508 | static Lisp_Object | 2510 | static Lisp_Object |
| 2509 | internal_delete_file_1 (Lisp_Object ignore) | 2511 | internal_delete_file_1 (Lisp_Object ignore) |
| 2510 | { | 2512 | { |
| @@ -2523,6 +2525,8 @@ internal_delete_file (Lisp_Object filename) | |||
| 2523 | Qt, internal_delete_file_1); | 2525 | Qt, internal_delete_file_1); |
| 2524 | return NILP (tem); | 2526 | return NILP (tem); |
| 2525 | } | 2527 | } |
| 2528 | |||
| 2529 | #endif | ||
| 2526 | 2530 | ||
| 2527 | /* Return -1 if FILE is a case-insensitive file name, 0 if not, | 2531 | /* Return -1 if FILE is a case-insensitive file name, 0 if not, |
| 2528 | and a positive errno value if the result cannot be determined. */ | 2532 | and a positive errno value if the result cannot be determined. */ |
| @@ -485,37 +485,9 @@ Symbols are also allowed; their print names are used instead. */) | |||
| 485 | string2 = SYMBOL_NAME (string2); | 485 | string2 = SYMBOL_NAME (string2); |
| 486 | CHECK_STRING (string1); | 486 | CHECK_STRING (string1); |
| 487 | CHECK_STRING (string2); | 487 | CHECK_STRING (string2); |
| 488 | return string_version_cmp (string1, string2) < 0 ? Qt : Qnil; | 488 | int cmp = filenvercmp (SSDATA (string1), SBYTES (string1), |
| 489 | } | 489 | SSDATA (string2), SBYTES (string2)); |
| 490 | 490 | return cmp < 0 ? Qt : Qnil; | |
| 491 | /* Return negative, 0, positive if STRING1 is <, =, > STRING2 as per | ||
| 492 | string-version-lessp. */ | ||
| 493 | int | ||
| 494 | string_version_cmp (Lisp_Object string1, Lisp_Object string2) | ||
| 495 | { | ||
| 496 | char *p1 = SSDATA (string1); | ||
| 497 | char *p2 = SSDATA (string2); | ||
| 498 | char *lim1 = p1 + SBYTES (string1); | ||
| 499 | char *lim2 = p2 + SBYTES (string2); | ||
| 500 | int cmp; | ||
| 501 | |||
| 502 | while ((cmp = filevercmp (p1, p2)) == 0) | ||
| 503 | { | ||
| 504 | /* If the strings are identical through their first null bytes, | ||
| 505 | skip past identical prefixes and try again. */ | ||
| 506 | ptrdiff_t size = strlen (p1) + 1; | ||
| 507 | eassert (size == strlen (p2) + 1); | ||
| 508 | p1 += size; | ||
| 509 | p2 += size; | ||
| 510 | bool more1 = p1 <= lim1; | ||
| 511 | bool more2 = p2 <= lim2; | ||
| 512 | if (!more1) | ||
| 513 | return more2; | ||
| 514 | if (!more2) | ||
| 515 | return -1; | ||
| 516 | } | ||
| 517 | |||
| 518 | return cmp; | ||
| 519 | } | 491 | } |
| 520 | 492 | ||
| 521 | DEFUN ("string-collate-lessp", Fstring_collate_lessp, Sstring_collate_lessp, 2, 4, 0, | 493 | DEFUN ("string-collate-lessp", Fstring_collate_lessp, Sstring_collate_lessp, 2, 4, 0, |
| @@ -4242,7 +4214,7 @@ hashfn_eq (Lisp_Object key, struct Lisp_Hash_Table *h) | |||
| 4242 | /* Ignore HT and return a hash code for KEY which uses 'equal' to compare keys. | 4214 | /* Ignore HT and return a hash code for KEY which uses 'equal' to compare keys. |
| 4243 | The hash code is at most INTMASK. */ | 4215 | The hash code is at most INTMASK. */ |
| 4244 | 4216 | ||
| 4245 | Lisp_Object | 4217 | static Lisp_Object |
| 4246 | hashfn_equal (Lisp_Object key, struct Lisp_Hash_Table *h) | 4218 | hashfn_equal (Lisp_Object key, struct Lisp_Hash_Table *h) |
| 4247 | { | 4219 | { |
| 4248 | return make_ufixnum (sxhash (key)); | 4220 | return make_ufixnum (sxhash (key)); |
| @@ -4251,7 +4223,7 @@ hashfn_equal (Lisp_Object key, struct Lisp_Hash_Table *h) | |||
| 4251 | /* Ignore HT and return a hash code for KEY which uses 'eql' to compare keys. | 4223 | /* Ignore HT and return a hash code for KEY which uses 'eql' to compare keys. |
| 4252 | The hash code is at most INTMASK. */ | 4224 | The hash code is at most INTMASK. */ |
| 4253 | 4225 | ||
| 4254 | Lisp_Object | 4226 | static Lisp_Object |
| 4255 | hashfn_eql (Lisp_Object key, struct Lisp_Hash_Table *h) | 4227 | hashfn_eql (Lisp_Object key, struct Lisp_Hash_Table *h) |
| 4256 | { | 4228 | { |
| 4257 | return (FLOATP (key) || BIGNUMP (key) ? hashfn_equal : hashfn_eq) (key, h); | 4229 | return (FLOATP (key) || BIGNUMP (key) ? hashfn_equal : hashfn_eq) (key, h); |
diff --git a/src/frame.c b/src/frame.c index 0ec7057db20..8f8df8f8e0d 100644 --- a/src/frame.c +++ b/src/frame.c | |||
| @@ -335,7 +335,7 @@ DEFUN ("frame-windows-min-size", Fframe_windows_min_size, | |||
| 335 | * additionally limit the minimum frame height to a value large enough | 335 | * additionally limit the minimum frame height to a value large enough |
| 336 | * to support menu bar, tab bar, mode line and echo area. | 336 | * to support menu bar, tab bar, mode line and echo area. |
| 337 | */ | 337 | */ |
| 338 | int | 338 | static int |
| 339 | frame_windows_min_size (Lisp_Object frame, Lisp_Object horizontal, | 339 | frame_windows_min_size (Lisp_Object frame, Lisp_Object horizontal, |
| 340 | Lisp_Object ignore, Lisp_Object pixelwise) | 340 | Lisp_Object ignore, Lisp_Object pixelwise) |
| 341 | { | 341 | { |
diff --git a/src/frame.h b/src/frame.h index 5d5f2122fbb..61df57e966a 100644 --- a/src/frame.h +++ b/src/frame.h | |||
| @@ -1338,8 +1338,6 @@ extern bool frame_inhibit_resize (struct frame *, bool, Lisp_Object); | |||
| 1338 | extern void adjust_frame_size (struct frame *, int, int, int, bool, | 1338 | extern void adjust_frame_size (struct frame *, int, int, int, bool, |
| 1339 | Lisp_Object); | 1339 | Lisp_Object); |
| 1340 | extern Lisp_Object mouse_position (bool); | 1340 | extern Lisp_Object mouse_position (bool); |
| 1341 | extern int frame_windows_min_size (Lisp_Object, Lisp_Object, Lisp_Object, | ||
| 1342 | Lisp_Object); | ||
| 1343 | extern void frame_size_history_plain (struct frame *, Lisp_Object); | 1341 | extern void frame_size_history_plain (struct frame *, Lisp_Object); |
| 1344 | extern void frame_size_history_extra (struct frame *, Lisp_Object, | 1342 | extern void frame_size_history_extra (struct frame *, Lisp_Object, |
| 1345 | int, int, int, int, int, int); | 1343 | int, int, int, int, int, int); |
diff --git a/src/gnutls.c b/src/gnutls.c index 09590ca005c..0e1e63e157a 100644 --- a/src/gnutls.c +++ b/src/gnutls.c | |||
| @@ -1521,7 +1521,7 @@ returned as the :certificate entry. */) | |||
| 1521 | /* Initialize global GnuTLS state to defaults. | 1521 | /* Initialize global GnuTLS state to defaults. |
| 1522 | Call 'gnutls-global-deinit' when GnuTLS usage is no longer needed. | 1522 | Call 'gnutls-global-deinit' when GnuTLS usage is no longer needed. |
| 1523 | Return zero on success. */ | 1523 | Return zero on success. */ |
| 1524 | Lisp_Object | 1524 | static Lisp_Object |
| 1525 | emacs_gnutls_global_init (void) | 1525 | emacs_gnutls_global_init (void) |
| 1526 | { | 1526 | { |
| 1527 | int ret = GNUTLS_E_SUCCESS; | 1527 | int ret = GNUTLS_E_SUCCESS; |
diff --git a/src/gnutls.h b/src/gnutls.h index 791e5340c2d..19d3d3f5bc6 100644 --- a/src/gnutls.h +++ b/src/gnutls.h | |||
| @@ -90,7 +90,6 @@ extern void emacs_gnutls_transport_set_errno (gnutls_session_t state, int err); | |||
| 90 | extern int w32_gnutls_rnd (gnutls_rnd_level_t, void *, size_t); | 90 | extern int w32_gnutls_rnd (gnutls_rnd_level_t, void *, size_t); |
| 91 | #endif | 91 | #endif |
| 92 | extern Lisp_Object emacs_gnutls_deinit (Lisp_Object); | 92 | extern Lisp_Object emacs_gnutls_deinit (Lisp_Object); |
| 93 | extern Lisp_Object emacs_gnutls_global_init (void); | ||
| 94 | extern int gnutls_try_handshake (struct Lisp_Process *p); | 93 | extern int gnutls_try_handshake (struct Lisp_Process *p); |
| 95 | extern Lisp_Object gnutls_verify_boot (Lisp_Object proc, Lisp_Object proplist); | 94 | extern Lisp_Object gnutls_verify_boot (Lisp_Object proc, Lisp_Object proplist); |
| 96 | 95 | ||
diff --git a/src/lisp.h b/src/lisp.h index b558d311a80..9599934c1fa 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -3910,8 +3910,6 @@ extern void hexbuf_digest (char *, void const *, int); | |||
| 3910 | extern char *extract_data_from_object (Lisp_Object, ptrdiff_t *, ptrdiff_t *); | 3910 | extern char *extract_data_from_object (Lisp_Object, ptrdiff_t *, ptrdiff_t *); |
| 3911 | EMACS_UINT hash_string (char const *, ptrdiff_t); | 3911 | EMACS_UINT hash_string (char const *, ptrdiff_t); |
| 3912 | EMACS_UINT sxhash (Lisp_Object); | 3912 | EMACS_UINT sxhash (Lisp_Object); |
| 3913 | Lisp_Object hashfn_eql (Lisp_Object, struct Lisp_Hash_Table *); | ||
| 3914 | Lisp_Object hashfn_equal (Lisp_Object, struct Lisp_Hash_Table *); | ||
| 3915 | Lisp_Object hashfn_user_defined (Lisp_Object, struct Lisp_Hash_Table *); | 3913 | Lisp_Object hashfn_user_defined (Lisp_Object, struct Lisp_Hash_Table *); |
| 3916 | Lisp_Object make_hash_table (struct hash_table_test, EMACS_INT, float, float, | 3914 | Lisp_Object make_hash_table (struct hash_table_test, EMACS_INT, float, float, |
| 3917 | Lisp_Object, bool); | 3915 | Lisp_Object, bool); |
| @@ -3927,7 +3925,6 @@ extern Lisp_Object substring_both (Lisp_Object, ptrdiff_t, ptrdiff_t, | |||
| 3927 | extern Lisp_Object merge (Lisp_Object, Lisp_Object, Lisp_Object); | 3925 | extern Lisp_Object merge (Lisp_Object, Lisp_Object, Lisp_Object); |
| 3928 | extern Lisp_Object merge_c (Lisp_Object, Lisp_Object, bool (*) (Lisp_Object, Lisp_Object)); | 3926 | extern Lisp_Object merge_c (Lisp_Object, Lisp_Object, bool (*) (Lisp_Object, Lisp_Object)); |
| 3929 | extern Lisp_Object do_yes_or_no_p (Lisp_Object); | 3927 | extern Lisp_Object do_yes_or_no_p (Lisp_Object); |
| 3930 | extern int string_version_cmp (Lisp_Object, Lisp_Object); | ||
| 3931 | extern Lisp_Object concat2 (Lisp_Object, Lisp_Object); | 3928 | extern Lisp_Object concat2 (Lisp_Object, Lisp_Object); |
| 3932 | extern Lisp_Object concat3 (Lisp_Object, Lisp_Object, Lisp_Object); | 3929 | extern Lisp_Object concat3 (Lisp_Object, Lisp_Object, Lisp_Object); |
| 3933 | extern bool equal_no_quit (Lisp_Object, Lisp_Object); | 3930 | extern bool equal_no_quit (Lisp_Object, Lisp_Object); |
| @@ -4466,9 +4463,6 @@ extern Lisp_Object internal_lisp_condition_case (Lisp_Object, Lisp_Object, Lisp_ | |||
| 4466 | extern Lisp_Object internal_condition_case (Lisp_Object (*) (void), Lisp_Object, Lisp_Object (*) (Lisp_Object)); | 4463 | extern Lisp_Object internal_condition_case (Lisp_Object (*) (void), Lisp_Object, Lisp_Object (*) (Lisp_Object)); |
| 4467 | extern Lisp_Object internal_condition_case_1 (Lisp_Object (*) (Lisp_Object), Lisp_Object, Lisp_Object, Lisp_Object (*) (Lisp_Object)); | 4464 | extern Lisp_Object internal_condition_case_1 (Lisp_Object (*) (Lisp_Object), Lisp_Object, Lisp_Object, Lisp_Object (*) (Lisp_Object)); |
| 4468 | extern Lisp_Object internal_condition_case_2 (Lisp_Object (*) (Lisp_Object, Lisp_Object), Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object (*) (Lisp_Object)); | 4465 | extern Lisp_Object internal_condition_case_2 (Lisp_Object (*) (Lisp_Object, Lisp_Object), Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object (*) (Lisp_Object)); |
| 4469 | extern Lisp_Object internal_condition_case_3 (Lisp_Object (*) (Lisp_Object, Lisp_Object, Lisp_Object), Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object (*) (Lisp_Object)); | ||
| 4470 | extern Lisp_Object internal_condition_case_4 (Lisp_Object (*) (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object), Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object (*) (Lisp_Object)); | ||
| 4471 | extern Lisp_Object internal_condition_case_5 (Lisp_Object (*) (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object), Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object (*) (Lisp_Object)); | ||
| 4472 | extern Lisp_Object internal_condition_case_n | 4466 | extern Lisp_Object internal_condition_case_n |
| 4473 | (Lisp_Object (*) (ptrdiff_t, Lisp_Object *), ptrdiff_t, Lisp_Object *, | 4467 | (Lisp_Object (*) (ptrdiff_t, Lisp_Object *), ptrdiff_t, Lisp_Object *, |
| 4474 | Lisp_Object, Lisp_Object (*) (Lisp_Object, ptrdiff_t, Lisp_Object *)); | 4468 | Lisp_Object, Lisp_Object (*) (Lisp_Object, ptrdiff_t, Lisp_Object *)); |
diff --git a/src/minibuf.c b/src/minibuf.c index 49a474dd492..97a6ec69011 100644 --- a/src/minibuf.c +++ b/src/minibuf.c | |||
| @@ -41,7 +41,7 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */ | |||
| 41 | minibuffer recursions are encountered. */ | 41 | minibuffer recursions are encountered. */ |
| 42 | 42 | ||
| 43 | Lisp_Object Vminibuffer_list; | 43 | Lisp_Object Vminibuffer_list; |
| 44 | Lisp_Object Vcommand_loop_level_list; | 44 | static Lisp_Object Vcommand_loop_level_list; |
| 45 | 45 | ||
| 46 | /* Data to remember during recursive minibuffer invocations. */ | 46 | /* Data to remember during recursive minibuffer invocations. */ |
| 47 | 47 | ||
diff --git a/src/syntax.c b/src/syntax.c index 13c36fdf3cd..f9022d18d26 100644 --- a/src/syntax.c +++ b/src/syntax.c | |||
| @@ -1074,7 +1074,7 @@ unsigned char const syntax_spec_code[0400] = | |||
| 1074 | 1074 | ||
| 1075 | /* Indexed by syntax code, give the letter that describes it. */ | 1075 | /* Indexed by syntax code, give the letter that describes it. */ |
| 1076 | 1076 | ||
| 1077 | char const syntax_code_spec[16] = | 1077 | static char const syntax_code_spec[16] = |
| 1078 | { | 1078 | { |
| 1079 | ' ', '.', 'w', '_', '(', ')', '\'', '\"', '$', '\\', '/', '<', '>', '@', | 1079 | ' ', '.', 'w', '_', '(', ')', '\'', '\"', '$', '\\', '/', '<', '>', '@', |
| 1080 | '!', '|' | 1080 | '!', '|' |
diff --git a/src/syntax.h b/src/syntax.h index c1bb9274d00..5949a95a73b 100644 --- a/src/syntax.h +++ b/src/syntax.h | |||
| @@ -147,10 +147,6 @@ extern bool syntax_prefix_flag_p (int c); | |||
| 147 | 147 | ||
| 148 | extern unsigned char const syntax_spec_code[0400]; | 148 | extern unsigned char const syntax_spec_code[0400]; |
| 149 | 149 | ||
| 150 | /* Indexed by syntax code, give the letter that describes it. */ | ||
| 151 | |||
| 152 | extern char const syntax_code_spec[16]; | ||
| 153 | |||
| 154 | /* Convert the byte offset BYTEPOS into a character position, | 150 | /* Convert the byte offset BYTEPOS into a character position, |
| 155 | for the object recorded in gl_state with SETUP_SYNTAX_TABLE_FOR_OBJECT. | 151 | for the object recorded in gl_state with SETUP_SYNTAX_TABLE_FOR_OBJECT. |
| 156 | 152 | ||
diff --git a/src/systime.h b/src/systime.h index 41d728f1c29..75088bd4a62 100644 --- a/src/systime.h +++ b/src/systime.h | |||
| @@ -91,7 +91,6 @@ extern Lisp_Object timespec_to_lisp (struct timespec); | |||
| 91 | extern bool list4_to_timespec (Lisp_Object, Lisp_Object, Lisp_Object, | 91 | extern bool list4_to_timespec (Lisp_Object, Lisp_Object, Lisp_Object, |
| 92 | Lisp_Object, struct timespec *); | 92 | Lisp_Object, struct timespec *); |
| 93 | extern struct timespec lisp_time_argument (Lisp_Object); | 93 | extern struct timespec lisp_time_argument (Lisp_Object); |
| 94 | extern AVOID time_overflow (void); | ||
| 95 | extern double float_time (Lisp_Object); | 94 | extern double float_time (Lisp_Object); |
| 96 | extern void init_timefns (void); | 95 | extern void init_timefns (void); |
| 97 | extern void syms_of_timefns (void); | 96 | extern void syms_of_timefns (void); |
diff --git a/src/thread.h b/src/thread.h index ddba1a2d994..b34ca3d57c8 100644 --- a/src/thread.h +++ b/src/thread.h | |||
| @@ -33,6 +33,8 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */ | |||
| 33 | #include "sysselect.h" /* FIXME */ | 33 | #include "sysselect.h" /* FIXME */ |
| 34 | #include "systhread.h" | 34 | #include "systhread.h" |
| 35 | 35 | ||
| 36 | INLINE_HEADER_BEGIN | ||
| 37 | |||
| 36 | /* Byte-code interpreter thread state. */ | 38 | /* Byte-code interpreter thread state. */ |
| 37 | struct bc_thread_state { | 39 | struct bc_thread_state { |
| 38 | struct bc_frame *fp; /* current frame pointer */ | 40 | struct bc_frame *fp; /* current frame pointer */ |
| @@ -194,6 +196,8 @@ struct thread_state | |||
| 194 | struct bc_thread_state bc; | 196 | struct bc_thread_state bc; |
| 195 | } GCALIGNED_STRUCT; | 197 | } GCALIGNED_STRUCT; |
| 196 | 198 | ||
| 199 | INLINE_HEADER_BEGIN | ||
| 200 | |||
| 197 | INLINE bool | 201 | INLINE bool |
| 198 | THREADP (Lisp_Object a) | 202 | THREADP (Lisp_Object a) |
| 199 | { | 203 | { |
| @@ -315,4 +319,6 @@ int thread_select (select_func *func, int max_fds, fd_set *rfds, | |||
| 315 | 319 | ||
| 316 | bool thread_check_current_buffer (struct buffer *); | 320 | bool thread_check_current_buffer (struct buffer *); |
| 317 | 321 | ||
| 322 | INLINE_HEADER_END | ||
| 323 | |||
| 318 | #endif /* THREAD_H */ | 324 | #endif /* THREAD_H */ |
diff --git a/src/timefns.c b/src/timefns.c index 9b5b090ba71..9e8592d35ac 100644 --- a/src/timefns.c +++ b/src/timefns.c | |||
| @@ -342,7 +342,7 @@ init_timefns (void) | |||
| 342 | } | 342 | } |
| 343 | 343 | ||
| 344 | /* Report that a time value is out of range for Emacs. */ | 344 | /* Report that a time value is out of range for Emacs. */ |
| 345 | void | 345 | static AVOID |
| 346 | time_overflow (void) | 346 | time_overflow (void) |
| 347 | { | 347 | { |
| 348 | error ("Specified time is not representable"); | 348 | error ("Specified time is not representable"); |
diff --git a/src/window.c b/src/window.c index 59e21f11cb1..8f92b46afd6 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -3181,14 +3181,6 @@ resize_root_window (Lisp_Object window, Lisp_Object delta, | |||
| 3181 | horizontal, ignore, pixelwise); | 3181 | horizontal, ignore, pixelwise); |
| 3182 | } | 3182 | } |
| 3183 | 3183 | ||
| 3184 | void | ||
| 3185 | sanitize_window_sizes (Lisp_Object horizontal) | ||
| 3186 | { | ||
| 3187 | /* Don't burp in temacs -nw before window.el is loaded. */ | ||
| 3188 | if (!NILP (Fsymbol_function (Qwindow__sanitize_window_sizes))) | ||
| 3189 | call1 (Qwindow__sanitize_window_sizes, horizontal); | ||
| 3190 | } | ||
| 3191 | |||
| 3192 | 3184 | ||
| 3193 | static Lisp_Object | 3185 | static Lisp_Object |
| 3194 | window_pixel_to_total (Lisp_Object frame, Lisp_Object horizontal) | 3186 | window_pixel_to_total (Lisp_Object frame, Lisp_Object horizontal) |
| @@ -8232,7 +8224,6 @@ syms_of_window (void) | |||
| 8232 | DEFSYM (Qwindow__resize_root_window_vertically, | 8224 | DEFSYM (Qwindow__resize_root_window_vertically, |
| 8233 | "window--resize-root-window-vertically"); | 8225 | "window--resize-root-window-vertically"); |
| 8234 | DEFSYM (Qwindow__resize_mini_frame, "window--resize-mini-frame"); | 8226 | DEFSYM (Qwindow__resize_mini_frame, "window--resize-mini-frame"); |
| 8235 | DEFSYM (Qwindow__sanitize_window_sizes, "window--sanitize-window-sizes"); | ||
| 8236 | DEFSYM (Qwindow__pixel_to_total, "window--pixel-to-total"); | 8227 | DEFSYM (Qwindow__pixel_to_total, "window--pixel-to-total"); |
| 8237 | DEFSYM (Qsafe, "safe"); | 8228 | DEFSYM (Qsafe, "safe"); |
| 8238 | DEFSYM (Qdisplay_buffer, "display-buffer"); | 8229 | DEFSYM (Qdisplay_buffer, "display-buffer"); |
diff --git a/src/window.h b/src/window.h index 141c29e8100..94c9b7124f3 100644 --- a/src/window.h +++ b/src/window.h | |||
| @@ -1188,7 +1188,6 @@ extern int window_scroll_margin (struct window *, enum margin_unit); | |||
| 1188 | extern void temp_output_buffer_show (Lisp_Object); | 1188 | extern void temp_output_buffer_show (Lisp_Object); |
| 1189 | extern void replace_buffer_in_windows (Lisp_Object); | 1189 | extern void replace_buffer_in_windows (Lisp_Object); |
| 1190 | extern void replace_buffer_in_windows_safely (Lisp_Object); | 1190 | extern void replace_buffer_in_windows_safely (Lisp_Object); |
| 1191 | extern void sanitize_window_sizes (Lisp_Object horizontal); | ||
| 1192 | /* This looks like a setter, but it is a bit special. */ | 1191 | /* This looks like a setter, but it is a bit special. */ |
| 1193 | extern void wset_buffer (struct window *, Lisp_Object); | 1192 | extern void wset_buffer (struct window *, Lisp_Object); |
| 1194 | extern bool window_outdated (struct window *); | 1193 | extern bool window_outdated (struct window *); |
diff --git a/src/xterm.c b/src/xterm.c index fb0fc66ae59..4f8accbda3a 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -2339,6 +2339,68 @@ x_reset_clip_rectangles (struct frame *f, GC gc) | |||
| 2339 | #endif | 2339 | #endif |
| 2340 | } | 2340 | } |
| 2341 | 2341 | ||
| 2342 | #ifdef HAVE_XRENDER | ||
| 2343 | # if !defined USE_CAIRO && (RENDER_MAJOR > 0 || RENDER_MINOR >= 2) | ||
| 2344 | static void | ||
| 2345 | x_xrender_color_from_gc_foreground (struct frame *f, GC gc, XRenderColor *color, | ||
| 2346 | bool apply_alpha_background) | ||
| 2347 | { | ||
| 2348 | XGCValues xgcv; | ||
| 2349 | XColor xc; | ||
| 2350 | |||
| 2351 | XGetGCValues (FRAME_X_DISPLAY (f), gc, GCForeground, &xgcv); | ||
| 2352 | xc.pixel = xgcv.foreground; | ||
| 2353 | x_query_colors (f, &xc, 1); | ||
| 2354 | |||
| 2355 | color->alpha = (apply_alpha_background | ||
| 2356 | ? 65535 * f->alpha_background | ||
| 2357 | : 65535); | ||
| 2358 | |||
| 2359 | if (color->alpha == 65535) | ||
| 2360 | { | ||
| 2361 | color->red = xc.red; | ||
| 2362 | color->blue = xc.blue; | ||
| 2363 | color->green = xc.green; | ||
| 2364 | } | ||
| 2365 | else | ||
| 2366 | { | ||
| 2367 | color->red = (xc.red * color->alpha) / 65535; | ||
| 2368 | color->blue = (xc.blue * color->alpha) / 65535; | ||
| 2369 | color->green = (xc.green * color->alpha) / 65535; | ||
| 2370 | } | ||
| 2371 | } | ||
| 2372 | # endif | ||
| 2373 | |||
| 2374 | void | ||
| 2375 | x_xrender_color_from_gc_background (struct frame *f, GC gc, XRenderColor *color, | ||
| 2376 | bool apply_alpha_background) | ||
| 2377 | { | ||
| 2378 | XGCValues xgcv; | ||
| 2379 | XColor xc; | ||
| 2380 | |||
| 2381 | XGetGCValues (FRAME_X_DISPLAY (f), gc, GCBackground, &xgcv); | ||
| 2382 | xc.pixel = xgcv.background; | ||
| 2383 | x_query_colors (f, &xc, 1); | ||
| 2384 | |||
| 2385 | color->alpha = (apply_alpha_background | ||
| 2386 | ? 65535 * f->alpha_background | ||
| 2387 | : 65535); | ||
| 2388 | |||
| 2389 | if (color->alpha == 65535) | ||
| 2390 | { | ||
| 2391 | color->red = xc.red; | ||
| 2392 | color->blue = xc.blue; | ||
| 2393 | color->green = xc.green; | ||
| 2394 | } | ||
| 2395 | else | ||
| 2396 | { | ||
| 2397 | color->red = (xc.red * color->alpha) / 65535; | ||
| 2398 | color->blue = (xc.blue * color->alpha) / 65535; | ||
| 2399 | color->green = (xc.green * color->alpha) / 65535; | ||
| 2400 | } | ||
| 2401 | } | ||
| 2402 | #endif | ||
| 2403 | |||
| 2342 | static void | 2404 | static void |
| 2343 | x_fill_rectangle (struct frame *f, GC gc, int x, int y, int width, int height, | 2405 | x_fill_rectangle (struct frame *f, GC gc, int x, int y, int width, int height, |
| 2344 | bool respect_alpha_background) | 2406 | bool respect_alpha_background) |
| @@ -3299,7 +3361,7 @@ static void x_scroll_bar_clear (struct frame *); | |||
| 3299 | static void x_check_font (struct frame *, struct font *); | 3361 | static void x_check_font (struct frame *, struct font *); |
| 3300 | #endif | 3362 | #endif |
| 3301 | 3363 | ||
| 3302 | void | 3364 | static void |
| 3303 | x_display_set_last_user_time (struct x_display_info *dpyinfo, Time time) | 3365 | x_display_set_last_user_time (struct x_display_info *dpyinfo, Time time) |
| 3304 | { | 3366 | { |
| 3305 | #ifndef USE_GTK | 3367 | #ifndef USE_GTK |
| @@ -19311,66 +19373,6 @@ init_xterm (void) | |||
| 19311 | } | 19373 | } |
| 19312 | #endif | 19374 | #endif |
| 19313 | 19375 | ||
| 19314 | #ifdef HAVE_XRENDER | ||
| 19315 | void | ||
| 19316 | x_xrender_color_from_gc_foreground (struct frame *f, GC gc, XRenderColor *color, | ||
| 19317 | bool apply_alpha_background) | ||
| 19318 | { | ||
| 19319 | XGCValues xgcv; | ||
| 19320 | XColor xc; | ||
| 19321 | |||
| 19322 | XGetGCValues (FRAME_X_DISPLAY (f), gc, GCForeground, &xgcv); | ||
| 19323 | xc.pixel = xgcv.foreground; | ||
| 19324 | x_query_colors (f, &xc, 1); | ||
| 19325 | |||
| 19326 | color->alpha = (apply_alpha_background | ||
| 19327 | ? 65535 * f->alpha_background | ||
| 19328 | : 65535); | ||
| 19329 | |||
| 19330 | if (color->alpha == 65535) | ||
| 19331 | { | ||
| 19332 | color->red = xc.red; | ||
| 19333 | color->blue = xc.blue; | ||
| 19334 | color->green = xc.green; | ||
| 19335 | } | ||
| 19336 | else | ||
| 19337 | { | ||
| 19338 | color->red = (xc.red * color->alpha) / 65535; | ||
| 19339 | color->blue = (xc.blue * color->alpha) / 65535; | ||
| 19340 | color->green = (xc.green * color->alpha) / 65535; | ||
| 19341 | } | ||
| 19342 | } | ||
| 19343 | |||
| 19344 | void | ||
| 19345 | x_xrender_color_from_gc_background (struct frame *f, GC gc, XRenderColor *color, | ||
| 19346 | bool apply_alpha_background) | ||
| 19347 | { | ||
| 19348 | XGCValues xgcv; | ||
| 19349 | XColor xc; | ||
| 19350 | |||
| 19351 | XGetGCValues (FRAME_X_DISPLAY (f), gc, GCBackground, &xgcv); | ||
| 19352 | xc.pixel = xgcv.background; | ||
| 19353 | x_query_colors (f, &xc, 1); | ||
| 19354 | |||
| 19355 | color->alpha = (apply_alpha_background | ||
| 19356 | ? 65535 * f->alpha_background | ||
| 19357 | : 65535); | ||
| 19358 | |||
| 19359 | if (color->alpha == 65535) | ||
| 19360 | { | ||
| 19361 | color->red = xc.red; | ||
| 19362 | color->blue = xc.blue; | ||
| 19363 | color->green = xc.green; | ||
| 19364 | } | ||
| 19365 | else | ||
| 19366 | { | ||
| 19367 | color->red = (xc.red * color->alpha) / 65535; | ||
| 19368 | color->blue = (xc.blue * color->alpha) / 65535; | ||
| 19369 | color->green = (xc.green * color->alpha) / 65535; | ||
| 19370 | } | ||
| 19371 | } | ||
| 19372 | #endif | ||
| 19373 | |||
| 19374 | void | 19376 | void |
| 19375 | syms_of_xterm (void) | 19377 | syms_of_xterm (void) |
| 19376 | { | 19378 | { |
diff --git a/src/xterm.h b/src/xterm.h index 05d5e08dc01..ed612c3c1e9 100644 --- a/src/xterm.h +++ b/src/xterm.h | |||
| @@ -1361,8 +1361,6 @@ extern Lisp_Object x_cr_export_frames (Lisp_Object, cairo_surface_type_t); | |||
| 1361 | #endif | 1361 | #endif |
| 1362 | 1362 | ||
| 1363 | #ifdef HAVE_XRENDER | 1363 | #ifdef HAVE_XRENDER |
| 1364 | extern void x_xrender_color_from_gc_foreground (struct frame *, GC, | ||
| 1365 | XRenderColor *, bool); | ||
| 1366 | extern void x_xrender_color_from_gc_background (struct frame *, GC, | 1364 | extern void x_xrender_color_from_gc_background (struct frame *, GC, |
| 1367 | XRenderColor *, bool); | 1365 | XRenderColor *, bool); |
| 1368 | extern void x_xr_ensure_picture (struct frame *f); | 1366 | extern void x_xr_ensure_picture (struct frame *f); |
| @@ -1374,8 +1372,6 @@ extern void x_xr_reset_ext_clip (struct frame *f); | |||
| 1374 | extern void x_scroll_bar_configure (GdkEvent *); | 1372 | extern void x_scroll_bar_configure (GdkEvent *); |
| 1375 | #endif | 1373 | #endif |
| 1376 | 1374 | ||
| 1377 | extern void x_display_set_last_user_time (struct x_display_info *, Time); | ||
| 1378 | |||
| 1379 | extern Lisp_Object x_dnd_begin_drag_and_drop (struct frame *, Time, Atom, | 1375 | extern Lisp_Object x_dnd_begin_drag_and_drop (struct frame *, Time, Atom, |
| 1380 | bool); | 1376 | bool); |
| 1381 | extern void x_set_dnd_targets (Atom *, int); | 1377 | extern void x_set_dnd_targets (Atom *, int); |