From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Antipov Newsgroups: gmane.emacs.devel Subject: Subsystem initialization functions in normal binary Date: Mon, 12 Jan 2015 13:59:40 +0300 Message-ID: <54B3A91C.5060404@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------060703000806050809080705" X-Trace: ger.gmane.org 1421060408 10364 80.91.229.3 (12 Jan 2015 11:00:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 12 Jan 2015 11:00:08 +0000 (UTC) To: Emacs development discussions Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jan 12 12:00:04 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YAcj1-0004hI-QH for ged-emacs-devel@m.gmane.org; Mon, 12 Jan 2015 12:00:00 +0100 Original-Received: from localhost ([::1]:33202 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YAcj0-0006VW-Uw for ged-emacs-devel@m.gmane.org; Mon, 12 Jan 2015 05:59:58 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36625) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YAcis-0006Uy-PB for emacs-devel@gnu.org; Mon, 12 Jan 2015 05:59:54 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YAcin-0002Mx-Bd for emacs-devel@gnu.org; Mon, 12 Jan 2015 05:59:50 -0500 Original-Received: from forward1h.mail.yandex.net ([84.201.187.146]:39641) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YAcim-0002MM-PC for emacs-devel@gnu.org; Mon, 12 Jan 2015 05:59:45 -0500 Original-Received: from smtp1h.mail.yandex.net (smtp1h.mail.yandex.net [84.201.187.144]) by forward1h.mail.yandex.net (Yandex) with ESMTP id 0112B9E0FF8 for ; Mon, 12 Jan 2015 13:59:40 +0300 (MSK) Original-Received: from smtp1h.mail.yandex.net (localhost [127.0.0.1]) by smtp1h.mail.yandex.net (Yandex) with ESMTP id C2CDB134143B for ; Mon, 12 Jan 2015 13:59:40 +0300 (MSK) Original-Received: from unknown (unknown [195.239.22.162]) by smtp1h.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id I9dsHG8Ynf-xe0C0Qg6; Mon, 12 Jan 2015 13:59:40 +0300 (using TLSv1.2 with cipher AES128-SHA (128/128 bits)) (Client certificate not present) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1421060380; bh=zjseGaFhhJsDCKwvvoD32fzPdqaObpfXE9Fsz0K+NRM=; h=Message-ID:Date:From:User-Agent:MIME-Version:To:Subject: Content-Type; b=oHcEDzJFaeq0widvMlMsaNH+h3TSIk594WSBmcUGUnbAg9gwPfaNBTDRTMLfSwWID yrx46Wp5vFjNigCz33mWQ+Jlde/BEKpkMcr9lZdNTJmGLAwhh2emvKOMBUemZLY9+a xDIWZhEt0uw/oaH7thOWV50XMJwsei5nHQB0sK1A= Authentication-Results: smtp1h.mail.yandex.net; dkim=pass header.i=@yandex.ru User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 84.201.187.146 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:181172 Archived-At: This is a multi-part message in MIME format. --------------060703000806050809080705 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit IIUC functions syms_of_XXX, keys_of_YYY and init_ZZZ_once are never called in a normal (dumped) executable; so what's about putting them into a special section and strip the latter at all? This patch illustrates an idea, with yet another make-docfile trick. (Also we can offload lisp.h and other headers from declarations which are easy to generate and put into globals.h instead). Dmitry --------------060703000806050809080705 Content-Type: text/x-diff; name="strip_once.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="strip_once.patch" diff --git a/configure.ac b/configure.ac index 4cad214..bb9eb37 100644 --- a/configure.ac +++ b/configure.ac @@ -4818,6 +4818,18 @@ if test "$emacs_cv_struct_alignment" =3D yes; then= structure to an N-byte boundary.]) fi =20 +AC_CACHE_CHECK([whether function may be placed in a specified section], + [emacs_cv_function_section], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[void __attribute__ ((section (".once"))) f (void= ) {}]])], + [emacs_cv_function_section=3Dyes], + [emacs_cv_function_section=3Dno])]) +if test "$emacs_cv_function_section" =3D yes; then + AC_DEFINE([HAVE_FUNCTION_ATTRIBUTE_SECTION], 1, + [Define to 1 if function '__attribute__ ((section (NAME)))' is suppo= rted.]) + AC_CHECK_TOOL(STRIP, strip, :) +fi + if test "${GNU_MALLOC}" =3D "yes" ; then AC_DEFINE(GNU_MALLOC, 1, [Define to 1 if you want to use the GNU memory allocator.]) diff --git a/lib-src/make-docfile.c b/lib-src/make-docfile.c index bc5420e..b54a87d 100644 --- a/lib-src/make-docfile.c +++ b/lib-src/make-docfile.c @@ -39,6 +39,7 @@ along with GNU Emacs. If not, see . */ #include #include #include /* config.h unconditionally includes this anyway *= / +#include =20 #ifdef WINDOWSNT /* Defined to be sys_fopen in ms-w32.h, but only #ifdef emacs, so this @@ -246,6 +247,12 @@ start_globals (void) =0C static char input_buffer[128]; =20 +static char * +copy_input_buffer (size_t len) +{ + return memcpy (xmalloc (len), input_buffer, len); +} + /* Some state during the execution of `read_c_string_or_comment'. */ struct rcsoc_state { @@ -554,7 +561,8 @@ enum global_type EMACS_INTEGER, BOOLEAN, SYMBOL, - FUNCTION + FUNCTION, + ONCEFN }; =20 /* A single global. */ @@ -643,7 +651,7 @@ static void write_globals (void) { int i, j; - bool seen_defun =3D false; + bool seen_defun =3D false, seen_oncefn =3D false; int symnum =3D 0; int num_symbols =3D 0; qsort (globals, num_globals, sizeof (struct global), compare_globals);= @@ -680,6 +688,13 @@ write_globals (void) case LISP_OBJECT: type =3D "Lisp_Object"; break; + case ONCEFN: + if (!seen_oncefn) + { + putchar ('\n'); + seen_oncefn =3D true; + } + /* Fallthrough case. */ case SYMBOL: case FUNCTION: if (!seen_defun) @@ -706,7 +721,7 @@ write_globals (void) "DEFINE_LISP_SYMBOL_END (%s)\n\n"), globals[i].name, globals[i].name, symnum++, globals[i].name, globals[i].name, globals[i].name); - else + else if (globals[i].type =3D=3D FUNCTION) { /* It would be nice to have a cleaner way to deal with these special hacks. */ @@ -760,6 +775,19 @@ write_globals (void) =20 puts (";"); } + else if (globals[i].type =3D=3D ONCEFN) + { + fputs ("extern void ", stdout); +#ifdef HAVE_FUNCTION_ATTRIBUTE_SECTION + fputs ("__attribute__ ((section (\".once\"))) ", stdout); +#endif + fputs (globals[i].name, stdout); + fputs (" (void);\n", stdout); + if (i =3D=3D num_globals - 1) + puts (""); + } + else + abort (); } =20 if (!seen_defun) @@ -817,6 +845,23 @@ scan_c_file (char *filename, const char *mode) return scan_c_stream (infile); } =20 +/* Return 1 if next input from INFILE is equal to P, -1 if EOF, + 0 if input doesn't match. */ + +static int +stream_match (FILE *infile, const char *p) +{ + for (; *p; p++) + { + int c =3D getc (infile); + if (c =3D=3D EOF) + return -1; + if (c !=3D *p) + return 0; + } + return 1; +} + static int scan_c_stream (FILE *infile) { @@ -910,6 +955,105 @@ scan_c_stream (FILE *infile) c =3D getc (infile); defunflag =3D c =3D=3D 'U'; } + else if (c =3D=3D 's') + { + /* Try syms_of_XXX. */ + if (stream_match (infile, "yms_of_") !=3D 1) + continue; + else + { + char *p =3D input_buffer + 8; + + memcpy (input_buffer, "syms_of_", 8); + + while (1) + { + c =3D getc (infile); + if (c < 0) + goto eof; + else if (p - input_buffer > sizeof (input_buffer) - 1) + abort (); + else if (isalnum (c) || c =3D=3D '_') + *p++ =3D c; + else + break; + } + if (p !=3D input_buffer + 8) + { + *p =3D '\0'; + name =3D copy_input_buffer (p - input_buffer + 1); + add_global (ONCEFN, name, 0, 0); + continue; + } + } + } + else if (c =3D=3D 'k') + { + /* Try keys_of_YYY. */ + if (stream_match (infile, "eys_of_") !=3D 1) + continue; + else + { + char *p =3D input_buffer + 8; + + memcpy (input_buffer, "keys_of_", 8); + + while (1) + { + c =3D getc (infile); + if (c < 0) + goto eof; + else if (p - input_buffer > sizeof (input_buffer) - 1) + abort (); + else if (isalnum (c) || c =3D=3D '_') + *p++ =3D c; + else + break; + } + if (p !=3D input_buffer + 8) + { + *p =3D '\0'; + name =3D copy_input_buffer (p - input_buffer + 1); + add_global (ONCEFN, name, 0, 0); + continue; + } + } + } + else if (c =3D=3D 'i') + { + /* Try init_ZZZ_once. */ + if (stream_match (infile, "nit_") !=3D 1) + continue; + else + { + char *p =3D input_buffer + 5; + + memcpy (input_buffer, "init_", 5); + + while (1) + { + c =3D getc (infile); + if (c < 0) + goto eof; + else if (p - input_buffer > sizeof (input_buffer) - 1) + abort (); + else if (isalnum (c) || c =3D=3D '_') + *p++ =3D c; + else + break; + } + if (p !=3D input_buffer + 5) + { + *p =3D '\0'; + if (p > input_buffer + 9 && !strcmp (p - 5, "_once")) + { + name =3D copy_input_buffer (p - input_buffer + 1); + add_global (ONCEFN, name, 0, 0); + continue; + } + } + } + } else continue; =20 if (generate_globals @@ -957,8 +1101,7 @@ scan_c_stream (FILE *infile) || c =3D=3D '\n' || c =3D=3D '\r')); input_buffer[i] =3D '\0'; =20 - name =3D xmalloc (i + 1); - memcpy (name, input_buffer, i + 1); + name =3D copy_input_buffer (i + 1); =20 if (type =3D=3D SYMBOL) { diff --git a/src/Makefile.in b/src/Makefile.in index 2ac34f5..a126fe5 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -117,6 +117,10 @@ SETFATTR =3D @SETFATTR@ PAXCTL_if_present =3D $(or $(PAXCTL),: paxctl) SETFATTR_if_present =3D $(or $(SETFATTR),: setfattr) =20 +## Substituted only if we strip .once section. +STRIP =3D @STRIP@ +STRIP_if_present =3D $(or $(STRIP),: strip) + ## Some systems define this to request special libraries. LIBS_SYSTEM=3D@LIBS_SYSTEM@ =20 @@ -456,6 +460,7 @@ ifeq ($(CANNOT_DUMP),yes) else LC_ALL=3DC $(RUN_TEMACS) -batch -l loadup dump $(PAXCTL_if_present) -zex $@ + $(STRIP_if_present) -R .once $@ ln -f $@ bootstrap-emacs$(EXEEXT) endif =20 diff --git a/src/composite.h b/src/composite.h index fb9f9eb..5a9ca45 100644 --- a/src/composite.h +++ b/src/composite.h @@ -197,7 +197,6 @@ extern bool find_composition (ptrdiff_t, ptrdiff_t, p= trdiff_t *, ptrdiff_t *, Lisp_Object *, Lisp_Object); extern void update_compositions (ptrdiff_t, ptrdiff_t, int); extern void make_composition_value_copy (Lisp_Object); -extern void syms_of_composite (void); extern void compose_text (ptrdiff_t, ptrdiff_t, Lisp_Object, Lisp_Object= , Lisp_Object); =20 diff --git a/src/cygw32.h b/src/cygw32.h index e14e3d1..628ee6d 100644 --- a/src/cygw32.h +++ b/src/cygw32.h @@ -33,7 +33,6 @@ along with GNU Emacs. If not, see . */ #include "lisp.h" #include "coding.h" =20 -extern void syms_of_cygw32 (void); extern char * w32_strerror (int error_no); =20 #endif /* CYGW32_H */ diff --git a/src/dispextern.h b/src/dispextern.h index e9e6f70..3760ba0 100644 --- a/src/dispextern.h +++ b/src/dispextern.h @@ -3488,7 +3488,6 @@ void update_single_window (struct window *); void do_pending_window_change (bool); void change_frame_size (struct frame *, int, int, bool, bool, bool, bool= ); void init_display (void); -void syms_of_display (void); extern void spec_glyph_lookup_face (struct window *, GLYPH *); extern void fill_up_frame_row_with_spaces (struct glyph_row *, int); =20 diff --git a/src/emacs.c b/src/emacs.c index d09c3c3..f61cf07 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -209,7 +209,6 @@ char **initial_argv; int initial_argc; static void sort_args (int argc, char **argv); -static void syms_of_emacs (void); =20 /* C99 needs each string to be at most 4095 characters, and the usage strings below are split to not overflow this limit. */ diff --git a/src/font.h b/src/font.h index 5a3e38a..34800b9 100644 --- a/src/font.h +++ b/src/font.h @@ -772,32 +772,22 @@ extern void font_filter_properties (Lisp_Object fon= t, =20 #ifdef HAVE_FREETYPE extern struct font_driver ftfont_driver; -extern void syms_of_ftfont (void); #endif /* HAVE_FREETYPE */ #ifdef HAVE_X_WINDOWS extern struct font_driver xfont_driver; -extern void syms_of_xfont (void); -extern void syms_of_ftxfont (void); #ifdef HAVE_XFT extern struct font_driver xftfont_driver; #endif #if defined HAVE_FREETYPE || defined HAVE_XFT extern struct font_driver ftxfont_driver; -extern void syms_of_xftfont (void); #endif -#ifdef HAVE_BDFFONT -extern void syms_of_bdffont (void); -#endif /* HAVE_BDFFONT */ #endif /* HAVE_X_WINDOWS */ #ifdef HAVE_NTGUI extern struct font_driver w32font_driver; extern struct font_driver uniscribe_font_driver; -extern void syms_of_w32font (void); #endif /* HAVE_NTGUI */ #ifdef HAVE_NS extern struct font_driver nsfont_driver; -extern void syms_of_nsfont (void); -extern void syms_of_macfont (void); #endif /* HAVE_NS */ =20 #ifndef FONT_DEBUG diff --git a/src/gnutls.h b/src/gnutls.h index fd69682..1ec68ec 100644 --- a/src/gnutls.h +++ b/src/gnutls.h @@ -83,7 +83,4 @@ extern void emacs_gnutls_transport_set_errno (gnutls_se= ssion_t state, int err); extern Lisp_Object emacs_gnutls_deinit (Lisp_Object); =20 #endif - -extern void syms_of_gnutls (void); - #endif diff --git a/src/intervals.h b/src/intervals.h index b2260d0..0880ee3 100644 --- a/src/intervals.h +++ b/src/intervals.h @@ -290,8 +290,6 @@ Lisp_Object get_char_property_and_overlay (Lisp_Objec= t, Lisp_Object, extern int text_property_stickiness (Lisp_Object prop, Lisp_Object pos, Lisp_Object buffer); =20 -extern void syms_of_textprop (void); - #include "composite.h" =20 INLINE_HEADER_END diff --git a/src/keymap.h b/src/keymap.h index 215dd3f..17b1350 100644 --- a/src/keymap.h +++ b/src/keymap.h @@ -39,8 +39,6 @@ extern void describe_map_tree (Lisp_Object, bool, Lisp_= Object, Lisp_Object, extern ptrdiff_t current_minor_maps (Lisp_Object **, Lisp_Object **); extern void initial_define_key (Lisp_Object, int, const char *); extern void initial_define_lispy_key (Lisp_Object, const char *, const c= har *); -extern void syms_of_keymap (void); -extern void keys_of_keymap (void); =20 typedef void (*map_keymap_function_t) (Lisp_Object key, Lisp_Object val, Lisp_Object args, void *data); diff --git a/src/lisp.h b/src/lisp.h index 9ed9375..caeb34c 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -3480,36 +3480,22 @@ extern _Noreturn void args_out_of_range_3 (Lisp_O= bject, Lisp_Object, Lisp_Object); extern Lisp_Object do_symval_forwarding (union Lisp_Fwd *); extern void set_internal (Lisp_Object, Lisp_Object, Lisp_Object, bool); -extern void syms_of_data (void); extern void swap_in_global_binding (struct Lisp_Symbol *); =20 -/* Defined in cmds.c */ -extern void syms_of_cmds (void); -extern void keys_of_cmds (void); - /* Defined in coding.c. */ extern Lisp_Object detect_coding_system (const unsigned char *, ptrdiff_= t, ptrdiff_t, bool, bool, Lisp_Obj= ect); extern void init_coding (void); -extern void init_coding_once (void); -extern void syms_of_coding (void); =20 /* Defined in character.c. */ extern ptrdiff_t chars_in_text (const unsigned char *, ptrdiff_t); extern ptrdiff_t multibyte_chars_in_text (const unsigned char *, ptrdiff= _t); -extern void syms_of_character (void); =20 /* Defined in charset.c. */ extern void init_charset (void); -extern void init_charset_once (void); -extern void syms_of_charset (void); /* Structure forward declarations. */ struct charset; =20 -/* Defined in syntax.c. */ -extern void init_syntax_once (void); -extern void syms_of_syntax (void); - /* Defined in fns.c. */ enum { NEXT_ALMOST_PRIME_LIMIT =3D 11 }; extern EMACS_INT next_almost_prime (EMACS_INT) ATTRIBUTE_CONST; @@ -3539,24 +3525,19 @@ extern ptrdiff_t string_char_to_byte (Lisp_Object= , ptrdiff_t); extern ptrdiff_t string_byte_to_char (Lisp_Object, ptrdiff_t); extern Lisp_Object string_to_multibyte (Lisp_Object); extern Lisp_Object string_make_unibyte (Lisp_Object); -extern void syms_of_fns (void); =20 /* Defined in floatfns.c. */ -extern void syms_of_floatfns (void); extern Lisp_Object fmod_float (Lisp_Object x, Lisp_Object y); =20 /* Defined in fringe.c. */ -extern void syms_of_fringe (void); extern void init_fringe (void); #ifdef HAVE_WINDOW_SYSTEM extern void mark_fringe_data (void); -extern void init_fringe_once (void); #endif /* HAVE_WINDOW_SYSTEM */ =20 /* Defined in image.c. */ extern int x_bitmap_mask (struct frame *, ptrdiff_t); extern void reset_image_types (void); -extern void syms_of_image (void); =20 /* Defined in insdel.c. */ extern void move_gap_both (ptrdiff_t, ptrdiff_t); @@ -3602,7 +3583,6 @@ extern void adjust_markers_for_delete (ptrdiff_t, p= trdiff_t, extern void replace_range (ptrdiff_t, ptrdiff_t, Lisp_Object, bool, bool= , bool); extern void replace_range_2 (ptrdiff_t, ptrdiff_t, ptrdiff_t, ptrdiff_t,= const char *, ptrdiff_t, ptrdiff_t, bool); -extern void syms_of_insdel (void); =20 /* Defined in dispnew.c. */ #if (defined PROFILING \ @@ -3637,15 +3617,11 @@ extern void truncate_echo_area (ptrdiff_t); extern void redisplay (void); =20 void set_frame_cursor_types (struct frame *, Lisp_Object); -extern void syms_of_xdisp (void); extern void init_xdisp (void); extern Lisp_Object safe_eval (Lisp_Object); extern int pos_visible_p (struct window *, ptrdiff_t, int *, int *, int *, int *, int *, int *); =20 -/* Defined in xsettings.c. */ -extern void syms_of_xsettings (void); - /* Defined in vm-limit.c. */ extern void memory_warnings (void *, void (*warnfun) (const char *)); =20 @@ -3810,9 +3786,7 @@ extern void free_save_value (Lisp_Object); extern Lisp_Object build_overlay (Lisp_Object, Lisp_Object, Lisp_Object)= ; extern void free_marker (Lisp_Object); extern void free_cons (struct Lisp_Cons *); -extern void init_alloc_once (void); extern void init_alloc (void); -extern void syms_of_alloc (void); extern struct buffer * allocate_buffer (void); extern int valid_lisp_object_p (Lisp_Object); extern int relocatable_string_data_p (const char *); @@ -3844,7 +3818,6 @@ extern void map_char_table_for_charset (void (*c_fu= nction) (Lisp_Object, Lisp_Ob Lisp_Object, struct charset *, unsigned, unsigned); extern Lisp_Object uniprop_table (Lisp_Object); -extern void syms_of_chartab (void); =20 /* Defined in print.c. */ extern Lisp_Object Vprin1_to_string_buffer; @@ -3858,8 +3831,6 @@ extern Lisp_Object internal_with_output_to_temp_buf= fer (const char *, Lisp_Object (*) (Lisp_Object), Lisp_Object); #define FLOAT_TO_STRING_BUFSIZE 350 extern int float_to_string (char *, double); -extern void init_print_once (void); -extern void syms_of_print (void); =20 /* Defined in doprnt.c. */ extern ptrdiff_t doprnt (char *, ptrdiff_t, const char *, const char *, @@ -3894,7 +3865,6 @@ extern void map_obarray (Lisp_Object, void (*) (Lis= p_Object, Lisp_Object), extern void dir_warning (const char *, Lisp_Object); extern void init_obarray (void); extern void init_lread (void); -extern void syms_of_lread (void); =20 INLINE Lisp_Object intern (const char *str) @@ -3968,12 +3938,10 @@ extern _Noreturn void verror (const char *, va_li= st) ATTRIBUTE_FORMAT_PRINTF (1, 0); extern void un_autoload (Lisp_Object); extern Lisp_Object call_debugger (Lisp_Object arg); -extern void init_eval_once (void); extern Lisp_Object safe_call (ptrdiff_t, Lisp_Object, ...); extern Lisp_Object safe_call1 (Lisp_Object, Lisp_Object); extern Lisp_Object safe_call2 (Lisp_Object, Lisp_Object, Lisp_Object); extern void init_eval (void); -extern void syms_of_eval (void); extern void unwind_body (Lisp_Object); extern ptrdiff_t record_in_backtrace (Lisp_Object, Lisp_Object *, ptrdif= f_t); extern void mark_specpdl (void); @@ -3995,7 +3963,6 @@ extern Lisp_Object make_buffer_string (ptrdiff_t, p= trdiff_t, bool); extern Lisp_Object make_buffer_string_both (ptrdiff_t, ptrdiff_t, ptrdif= f_t, ptrdiff_t, bool); extern void init_editfns (void); -extern void syms_of_editfns (void); =20 /* Defined in buffer.c. */ extern bool mouse_face_overlay_overlaps (Lisp_Object); @@ -4008,10 +3975,7 @@ extern void report_overlay_modification (Lisp_Obje= ct, Lisp_Object, bool, extern bool overlay_touches_p (ptrdiff_t); extern Lisp_Object other_buffer_safely (Lisp_Object); extern Lisp_Object get_truename_buffer (Lisp_Object); -extern void init_buffer_once (void); extern void init_buffer (int); -extern void syms_of_buffer (void); -extern void keys_of_buffer (void); =20 /* Defined in marker.c. */ =20 @@ -4026,7 +3990,6 @@ extern Lisp_Object set_marker_both (Lisp_Object, Li= sp_Object, ptrdiff_t, ptrdiff extern Lisp_Object set_marker_restricted_both (Lisp_Object, Lisp_Object,= ptrdiff_t, ptrdiff_t); extern Lisp_Object build_marker (struct buffer *, ptrdiff_t, ptrdiff_t);= -extern void syms_of_marker (void); =20 /* Defined in fileio.c. */ =20 @@ -4044,7 +4007,6 @@ extern Lisp_Object emacs_readlinkat (int, const cha= r *); extern bool file_directory_p (const char *); extern bool file_accessible_directory_p (Lisp_Object); extern void init_fileio (void); -extern void syms_of_fileio (void); extern Lisp_Object make_temp_name (Lisp_Object, bool); =20 /* Defined in search.c. */ @@ -4070,7 +4032,6 @@ extern ptrdiff_t find_newline_no_quit (ptrdiff_t, p= trdiff_t, ptrdiff_t, ptrdiff_t *); extern ptrdiff_t find_before_next_newline (ptrdiff_t, ptrdiff_t, ptrdiff_t, ptrdiff_t *); -extern void syms_of_search (void); extern void clear_regexp_cache (void); =20 /* Defined in minibuf.c. */ @@ -4078,22 +4039,6 @@ extern void clear_regexp_cache (void); extern Lisp_Object Vminibuffer_list; extern Lisp_Object last_minibuf_string; extern Lisp_Object get_minibuffer (EMACS_INT); -extern void init_minibuf_once (void); -extern void syms_of_minibuf (void); - -/* Defined in callint.c. */ - -extern void syms_of_callint (void); - -/* Defined in casefiddle.c. */ - -extern void syms_of_casefiddle (void); -extern void keys_of_casefiddle (void); - -/* Defined in casetab.c. */ - -extern void init_casetab_once (void); -extern void syms_of_casetab (void); =20 /* Defined in keyboard.c. */ =20 @@ -4123,14 +4068,11 @@ extern Lisp_Object recursive_edit_1 (void); extern void record_auto_save (void); extern void force_auto_save_soon (void); extern void init_keyboard (void); -extern void syms_of_keyboard (void); -extern void keys_of_keyboard (void); =20 /* Defined in indent.c. */ extern ptrdiff_t current_column (void); extern void invalidate_current_column (void); extern bool indented_beyond_p (ptrdiff_t, ptrdiff_t, EMACS_INT); -extern void syms_of_indent (void); =20 /* Defined in frame.c. */ extern void store_frame_param (struct frame *, Lisp_Object, Lisp_Object)= ; @@ -4138,7 +4080,6 @@ extern void store_in_alist (Lisp_Object *, Lisp_Obj= ect, Lisp_Object); extern Lisp_Object do_switch_frame (Lisp_Object, int, int, Lisp_Object);= extern Lisp_Object get_frame_param (struct frame *, Lisp_Object); extern void frames_discard_buffer (Lisp_Object); -extern void syms_of_frame (void); =20 /* Defined in emacs.c. */ extern char **initial_argv; @@ -4204,7 +4145,6 @@ extern void add_gpm_wait_descriptor (int); extern void delete_gpm_wait_descriptor (int); #endif extern void init_process_emacs (void); -extern void syms_of_process (void); extern void setup_process_coding_systems (Lisp_Object); =20 /* Defined in callproc.c. */ @@ -4215,16 +4155,13 @@ extern int child_setup (int, int, int, char **, b= ool, Lisp_Object); extern void init_callproc_1 (void); extern void init_callproc (void); extern void set_initial_environment (void); -extern void syms_of_callproc (void); =20 /* Defined in doc.c. */ extern Lisp_Object read_doc_string (Lisp_Object); extern Lisp_Object get_doc_string (Lisp_Object, bool, bool); -extern void syms_of_doc (void); extern int read_bytecode_char (bool); =20 /* Defined in bytecode.c. */ -extern void syms_of_bytecode (void); extern struct byte_stack *byte_stack_list; #if BYTE_MARK_STACK extern void mark_byte_stack (void); @@ -4235,7 +4172,6 @@ extern Lisp_Object exec_byte_code (Lisp_Object, Lis= p_Object, Lisp_Object, =20 /* Defined in macros.c. */ extern void init_macros (void); -extern void syms_of_macros (void); =20 /* Defined in undo.c. */ extern void truncate_undo_list (struct buffer *); @@ -4246,17 +4182,10 @@ extern void record_change (ptrdiff_t, ptrdiff_t);= extern void record_property_change (ptrdiff_t, ptrdiff_t, Lisp_Object, Lisp_Object, Lisp_Object); -extern void syms_of_undo (void); =20 /* Defined in textprop.c. */ extern void report_interval_modification (Lisp_Object, Lisp_Object); =20 -/* Defined in menu.c. */ -extern void syms_of_menu (void); - -/* Defined in xmenu.c. */ -extern void syms_of_xmenu (void); - /* Defined in termchar.h. */ struct tty_display_info; =20 @@ -4296,79 +4225,32 @@ extern void unlock_all_files (void); extern void lock_file (Lisp_Object); extern void unlock_file (Lisp_Object); extern void unlock_buffer (struct buffer *); -extern void syms_of_filelock (void); extern int str_collate (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Obje= ct); =20 -/* Defined in sound.c. */ -extern void syms_of_sound (void); - /* Defined in category.c. */ -extern void init_category_once (void); extern Lisp_Object char_category_set (int); -extern void syms_of_category (void); - -/* Defined in ccl.c. */ -extern void syms_of_ccl (void); =20 /* Defined in dired.c. */ -extern void syms_of_dired (void); extern Lisp_Object directory_files_internal (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, bool, Lisp_Object); =20 /* Defined in term.c. */ extern int *char_ins_del_vector; -extern void syms_of_term (void); extern _Noreturn void fatal (const char *msgid, ...) ATTRIBUTE_FORMAT_PRINTF (1, 2); =20 -/* Defined in terminal.c. */ -extern void syms_of_terminal (void); - /* Defined in font.c. */ -extern void syms_of_font (void); extern void init_font (void); =20 -#ifdef HAVE_WINDOW_SYSTEM -/* Defined in fontset.c. */ -extern void syms_of_fontset (void); -#endif - /* Defined in gfilenotify.c */ #ifdef HAVE_GFILENOTIFY extern void globals_of_gfilenotify (void); -extern void syms_of_gfilenotify (void); -#endif - -/* Defined in inotify.c */ -#ifdef HAVE_INOTIFY -extern void syms_of_inotify (void); -#endif - -#ifdef HAVE_W32NOTIFY -/* Defined on w32notify.c. */ -extern void syms_of_w32notify (void); #endif =20 /* Defined in xfaces.c. */ extern Lisp_Object Vface_alternative_font_family_alist; extern Lisp_Object Vface_alternative_font_registry_alist; -extern void syms_of_xfaces (void); - -#ifdef HAVE_X_WINDOWS -/* Defined in xfns.c. */ -extern void syms_of_xfns (void); - -/* Defined in xsmfns.c. */ -extern void syms_of_xsmfns (void); - -/* Defined in xselect.c. */ -extern void syms_of_xselect (void); - -/* Defined in xterm.c. */ -extern void init_xterm (void); -extern void syms_of_xterm (void); -#endif /* HAVE_X_WINDOWS */ =20 #ifdef HAVE_WINDOW_SYSTEM /* Defined in xterm.c, nsterm.m, w32term.c. */ @@ -4377,26 +4259,18 @@ extern char *x_get_keysym_name (int); =20 #ifdef HAVE_LIBXML2 /* Defined in xml.c. */ -extern void syms_of_xml (void); extern void xml_cleanup_parser (void); #endif =20 -#ifdef HAVE_ZLIB -/* Defined in decompress.c. */ -extern void syms_of_decompress (void); -#endif - #ifdef HAVE_DBUS /* Defined in dbusbind.c. */ void init_dbusbind (void); -void syms_of_dbusbind (void); #endif =20 =20 /* Defined in profiler.c. */ extern bool profiler_memory_running; extern void malloc_probe (size_t); -extern void syms_of_profiler (void); =20 =20 #ifdef DOS_NT diff --git a/src/nsterm.h b/src/nsterm.h index 9035ee1..258c9f1 100644 --- a/src/nsterm.h +++ b/src/nsterm.h @@ -857,10 +857,6 @@ extern void ns_run_file_dialog (void); extern const char *ns_etc_directory (void); extern const char *ns_exec_path (void); extern const char *ns_load_path (void); -extern void syms_of_nsterm (void); -extern void syms_of_nsfns (void); -extern void syms_of_nsmenu (void); -extern void syms_of_nsselect (void); =20 /* From nsimage.m, needed in image.c */ struct image; diff --git a/src/w32.h b/src/w32.h index 835557d..32b9d89 100644 --- a/src/w32.h +++ b/src/w32.h @@ -179,8 +179,6 @@ extern int (WINAPI *pWideCharToMultiByte)(UINT,DWORD,= LPCWSTR,int,LPSTR,int,LPCST =20 extern void init_environment (char **); extern void check_windows_init_file (void); -extern void syms_of_ntproc (void); -extern void syms_of_ntterm (void); extern void dostounix_filename (register char *); extern void unixtodos_filename (register char *); extern int filename_from_ansi (const char *, char *); diff --git a/src/w32fns.c b/src/w32fns.c index 789a91a..4f79210 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -79,7 +79,6 @@ along with GNU Emacs. If not, see . */ #define FOF_NO_CONNECTED_ELEMENTS 0x2000 #endif =20 -void syms_of_w32fns (void); void globals_of_w32fns (void); =20 extern void free_frame_menubar (struct frame *); @@ -214,7 +213,6 @@ extern HMENU current_popup_menu; int menubar_in_use =3D 0; =20 /* From w32uniscribe.c */ -extern void syms_of_w32uniscribe (void); extern int uniscribe_available; =20 #ifdef WINDOWSNT diff --git a/src/w32font.h b/src/w32font.h index 82c5e09..dbad23f 100644 --- a/src/w32font.h +++ b/src/w32font.h @@ -84,7 +84,6 @@ int uniscribe_check_otf (LOGFONT *font, Lisp_Object otf= _spec); =20 Lisp_Object intern_font_name (char *); =20 -extern void syms_of_w32font (void); extern void globals_of_w32font (void); =20 #endif diff --git a/src/w32menu.c b/src/w32menu.c index 7a946d2..a5dea2c 100644 --- a/src/w32menu.c +++ b/src/w32menu.c @@ -67,7 +67,6 @@ along with GNU Emacs. If not, see . */ =20 HMENU current_popup_menu; =20 -void syms_of_w32menu (void); void globals_of_w32menu (void); =20 typedef BOOL (WINAPI * GetMenuItemInfoA_Proc) ( diff --git a/src/w32select.h b/src/w32select.h index 0fa9f18..3c7412e 100644 --- a/src/w32select.h +++ b/src/w32select.h @@ -21,7 +21,6 @@ along with GNU Emacs. If not, see . */ #define W32SELECT_H #include =20 -extern void syms_of_w32select (void); extern void globals_of_w32select (void); extern void term_w32select (void); =20 diff --git a/src/w32term.h b/src/w32term.h index 042d7ab..d15429a 100644 --- a/src/w32term.h +++ b/src/w32term.h @@ -845,10 +845,6 @@ typedef char guichar_t; extern Lisp_Object w32_popup_dialog (struct frame *, Lisp_Object, Lisp_O= bject); extern void w32_arrow_cursor (void); =20 -extern void syms_of_w32term (void); -extern void syms_of_w32menu (void); -extern void syms_of_w32fns (void); - extern void globals_of_w32menu (void); extern void globals_of_w32fns (void); extern void globals_of_w32notify (void); diff --git a/src/window.h b/src/window.h index 2ec28ab..f49e507 100644 --- a/src/window.h +++ b/src/window.h @@ -1101,10 +1101,7 @@ extern Lisp_Object sanitize_window_sizes (Lisp_Obj= ect, Lisp_Object); /* This looks like a setter, but it is a bit special. */ extern void wset_buffer (struct window *, Lisp_Object); extern bool window_outdated (struct window *); -extern void init_window_once (void); extern void init_window (void); -extern void syms_of_window (void); -extern void keys_of_window (void); =20 /* Move cursor to row/column position VPOS/HPOS, pixel coordinates Y/X. HPOS/VPOS are window-relative row and column numbers and X/Y diff --git a/src/xterm.h b/src/xterm.h index f2aff72..8bf378d 100644 --- a/src/xterm.h +++ b/src/xterm.h @@ -979,6 +979,7 @@ XrmDatabase x_load_resources (Display *, const char *= , const char *, =20 /* Defined in xterm.c */ =20 +extern void init_xterm (void); extern bool x_text_icon (struct frame *, const char *); extern void x_catch_errors (Display *); extern void x_check_errors (Display *, const char *) --------------060703000806050809080705--