diff options
| author | Paul Eggert | 2011-04-13 16:35:33 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-04-13 16:35:33 -0700 |
| commit | 816269316fbb2c248873b4387db5624ff57f6303 (patch) | |
| tree | f3a576519b89b14529a700e287101db707b39012 /src | |
| parent | 239f9db96059f3f76e4b4a6f31f6eb56f642ea84 (diff) | |
| download | emacs-816269316fbb2c248873b4387db5624ff57f6303.tar.gz emacs-816269316fbb2c248873b4387db5624ff57f6303.zip | |
* frame.c: Make symbols static if they're not exported.
(x_report_frame_params, make_terminal_frame): Now static.
(get_frame_param): Now static, unless HAVE_NS.
(x_fullscreen_adjust): Define if WINDOWSNT, not if HAVE_WINDOW_SYSTEM.
(x_get_resource_string): Remove; not used.
* frame.h (make_terminal_frame, x_report_frame_params):
(x_get_resource_string); Remove decls.
(x_fullscreen_adjust): Declare only if WINDOWSNT.
* lisp.h (get_frame_param): Declare only if HAVE_NS.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 10 | ||||
| -rw-r--r-- | src/frame.c | 39 | ||||
| -rw-r--r-- | src/frame.h | 8 | ||||
| -rw-r--r-- | src/lisp.h | 2 |
4 files changed, 26 insertions, 33 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 4c3796dbbf5..ea90a2f8057 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,15 @@ | |||
| 1 | 2011-04-13 Paul Eggert <eggert@cs.ucla.edu> | 1 | 2011-04-13 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 2 | ||
| 3 | * frame.c: Make symbols static if they're not exported. | ||
| 4 | (x_report_frame_params, make_terminal_frame): Now static. | ||
| 5 | (get_frame_param): Now static, unless HAVE_NS. | ||
| 6 | (x_fullscreen_adjust): Define if WINDOWSNT, not if HAVE_WINDOW_SYSTEM. | ||
| 7 | (x_get_resource_string): Remove; not used. | ||
| 8 | * frame.h (make_terminal_frame, x_report_frame_params): | ||
| 9 | (x_get_resource_string); Remove decls. | ||
| 10 | (x_fullscreen_adjust): Declare only if WINDOWSNT. | ||
| 11 | * lisp.h (get_frame_param): Declare only if HAVE_NS. | ||
| 12 | |||
| 3 | * font.c, fontset.c: Make symbols static if they're not exported. | 13 | * font.c, fontset.c: Make symbols static if they're not exported. |
| 4 | * dispextern.h (FACE_SUITABLE_FOR_ASCII_CHAR_P): New macro. | 14 | * dispextern.h (FACE_SUITABLE_FOR_ASCII_CHAR_P): New macro. |
| 5 | (FACE_SUITABLE_FOR_CHAR_P): Use it. | 15 | (FACE_SUITABLE_FOR_CHAR_P): Use it. |
diff --git a/src/frame.c b/src/frame.c index 5493600ce5b..79e0b40a319 100644 --- a/src/frame.c +++ b/src/frame.c | |||
| @@ -121,6 +121,10 @@ Lisp_Object Qface_set_after_frame_default; | |||
| 121 | 121 | ||
| 122 | static Lisp_Object Qdelete_frame_functions; | 122 | static Lisp_Object Qdelete_frame_functions; |
| 123 | 123 | ||
| 124 | #ifdef HAVE_WINDOW_SYSTEM | ||
| 125 | static void x_report_frame_params (struct frame *, Lisp_Object *); | ||
| 126 | #endif | ||
| 127 | |||
| 124 | 128 | ||
| 125 | static void | 129 | static void |
| 126 | set_menu_bar_lines_1 (Lisp_Object window, int n) | 130 | set_menu_bar_lines_1 (Lisp_Object window, int n) |
| @@ -549,7 +553,7 @@ make_initial_frame (void) | |||
| 549 | } | 553 | } |
| 550 | 554 | ||
| 551 | 555 | ||
| 552 | struct frame * | 556 | static struct frame * |
| 553 | make_terminal_frame (struct terminal *terminal) | 557 | make_terminal_frame (struct terminal *terminal) |
| 554 | { | 558 | { |
| 555 | register struct frame *f; | 559 | register struct frame *f; |
| @@ -2078,6 +2082,9 @@ See `redirect-frame-focus'. */) | |||
| 2078 | 2082 | ||
| 2079 | /* Return the value of frame parameter PROP in frame FRAME. */ | 2083 | /* Return the value of frame parameter PROP in frame FRAME. */ |
| 2080 | 2084 | ||
| 2085 | #if !HAVE_NS | ||
| 2086 | static | ||
| 2087 | #endif | ||
| 2081 | Lisp_Object | 2088 | Lisp_Object |
| 2082 | get_frame_param (register struct frame *frame, Lisp_Object prop) | 2089 | get_frame_param (register struct frame *frame, Lisp_Object prop) |
| 2083 | { | 2090 | { |
| @@ -2833,7 +2840,7 @@ static const struct frame_parm_table frame_parms[] = | |||
| 2833 | {"tool-bar-position", &Qtool_bar_position}, | 2840 | {"tool-bar-position", &Qtool_bar_position}, |
| 2834 | }; | 2841 | }; |
| 2835 | 2842 | ||
| 2836 | #ifdef HAVE_WINDOW_SYSTEM | 2843 | #ifdef WINDOWSNT |
| 2837 | 2844 | ||
| 2838 | /* Calculate fullscreen size. Return in *TOP_POS and *LEFT_POS the | 2845 | /* Calculate fullscreen size. Return in *TOP_POS and *LEFT_POS the |
| 2839 | wanted positions of the WM window (not Emacs window). | 2846 | wanted positions of the WM window (not Emacs window). |
| @@ -2877,6 +2884,9 @@ x_fullscreen_adjust (struct frame *f, int *width, int *height, int *top_pos, int | |||
| 2877 | *height = newheight; | 2884 | *height = newheight; |
| 2878 | } | 2885 | } |
| 2879 | 2886 | ||
| 2887 | #endif /* WINDOWSNT */ | ||
| 2888 | |||
| 2889 | #ifdef HAVE_WINDOW_SYSTEM | ||
| 2880 | 2890 | ||
| 2881 | /* Change the parameters of frame F as specified by ALIST. | 2891 | /* Change the parameters of frame F as specified by ALIST. |
| 2882 | If a parameter is not specially recognized, do nothing special; | 2892 | If a parameter is not specially recognized, do nothing special; |
| @@ -3835,31 +3845,6 @@ display_x_get_resource (Display_Info *dpyinfo, Lisp_Object attribute, Lisp_Objec | |||
| 3835 | attribute, class, component, subclass); | 3845 | attribute, class, component, subclass); |
| 3836 | } | 3846 | } |
| 3837 | 3847 | ||
| 3838 | #if defined HAVE_X_WINDOWS && !defined USE_X_TOOLKIT | ||
| 3839 | /* Used when C code wants a resource value. */ | ||
| 3840 | /* Called from oldXMenu/Create.c. */ | ||
| 3841 | char * | ||
| 3842 | x_get_resource_string (const char *attribute, const char *class) | ||
| 3843 | { | ||
| 3844 | char *name_key; | ||
| 3845 | char *class_key; | ||
| 3846 | struct frame *sf = SELECTED_FRAME (); | ||
| 3847 | |||
| 3848 | /* Allocate space for the components, the dots which separate them, | ||
| 3849 | and the final '\0'. */ | ||
| 3850 | name_key = (char *) alloca (SBYTES (Vinvocation_name) | ||
| 3851 | + strlen (attribute) + 2); | ||
| 3852 | class_key = (char *) alloca ((sizeof (EMACS_CLASS) - 1) | ||
| 3853 | + strlen (class) + 2); | ||
| 3854 | |||
| 3855 | sprintf (name_key, "%s.%s", SDATA (Vinvocation_name), attribute); | ||
| 3856 | sprintf (class_key, "%s.%s", EMACS_CLASS, class); | ||
| 3857 | |||
| 3858 | return x_get_string_resource (FRAME_X_DISPLAY_INFO (sf)->xrdb, | ||
| 3859 | name_key, class_key); | ||
| 3860 | } | ||
| 3861 | #endif | ||
| 3862 | |||
| 3863 | /* Return the value of parameter PARAM. | 3848 | /* Return the value of parameter PARAM. |
| 3864 | 3849 | ||
| 3865 | First search ALIST, then Vdefault_frame_alist, then the X defaults | 3850 | First search ALIST, then Vdefault_frame_alist, then the X defaults |
diff --git a/src/frame.h b/src/frame.h index 0f189414e08..1f176f6f900 100644 --- a/src/frame.h +++ b/src/frame.h | |||
| @@ -838,7 +838,6 @@ extern struct frame *last_nonminibuf_frame; | |||
| 838 | 838 | ||
| 839 | extern void set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object); | 839 | extern void set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object); |
| 840 | extern struct frame *make_initial_frame (void); | 840 | extern struct frame *make_initial_frame (void); |
| 841 | extern struct frame *make_terminal_frame (struct terminal *); | ||
| 842 | extern struct frame *make_frame (int); | 841 | extern struct frame *make_frame (int); |
| 843 | #ifdef HAVE_WINDOW_SYSTEM | 842 | #ifdef HAVE_WINDOW_SYSTEM |
| 844 | extern struct frame *make_minibuffer_frame (void); | 843 | extern struct frame *make_minibuffer_frame (void); |
| @@ -1095,11 +1094,12 @@ extern Lisp_Object x_new_font (struct frame *, Lisp_Object, int); | |||
| 1095 | 1094 | ||
| 1096 | extern Lisp_Object Qface_set_after_frame_default; | 1095 | extern Lisp_Object Qface_set_after_frame_default; |
| 1097 | 1096 | ||
| 1097 | #ifdef WINDOWSNT | ||
| 1098 | extern void x_fullscreen_adjust (struct frame *f, int *, int *, | 1098 | extern void x_fullscreen_adjust (struct frame *f, int *, int *, |
| 1099 | int *, int *); | 1099 | int *, int *); |
| 1100 | #endif | ||
| 1100 | 1101 | ||
| 1101 | extern void x_set_frame_parameters (struct frame *, Lisp_Object); | 1102 | extern void x_set_frame_parameters (struct frame *, Lisp_Object); |
| 1102 | extern void x_report_frame_params (struct frame *, Lisp_Object *); | ||
| 1103 | 1103 | ||
| 1104 | extern void x_set_fullscreen (struct frame *, Lisp_Object, Lisp_Object); | 1104 | extern void x_set_fullscreen (struct frame *, Lisp_Object, Lisp_Object); |
| 1105 | extern void x_set_line_spacing (struct frame *, Lisp_Object, Lisp_Object); | 1105 | extern void x_set_line_spacing (struct frame *, Lisp_Object, Lisp_Object); |
| @@ -1133,10 +1133,6 @@ extern Lisp_Object display_x_get_resource (Display_Info *, | |||
| 1133 | Lisp_Object component, | 1133 | Lisp_Object component, |
| 1134 | Lisp_Object subclass); | 1134 | Lisp_Object subclass); |
| 1135 | 1135 | ||
| 1136 | #if defined HAVE_X_WINDOWS && !defined USE_X_TOOLKIT | ||
| 1137 | extern char *x_get_resource_string (const char *, const char *); | ||
| 1138 | #endif | ||
| 1139 | |||
| 1140 | /* In xmenu.c */ | 1136 | /* In xmenu.c */ |
| 1141 | extern void set_frame_menubar (FRAME_PTR, int, int); | 1137 | extern void set_frame_menubar (FRAME_PTR, int, int); |
| 1142 | 1138 | ||
diff --git a/src/lisp.h b/src/lisp.h index 420d6024b7f..4f254002296 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -3149,7 +3149,9 @@ extern Lisp_Object Qvisible; | |||
| 3149 | extern void store_frame_param (struct frame *, Lisp_Object, Lisp_Object); | 3149 | extern void store_frame_param (struct frame *, Lisp_Object, Lisp_Object); |
| 3150 | extern void store_in_alist (Lisp_Object *, Lisp_Object, Lisp_Object); | 3150 | extern void store_in_alist (Lisp_Object *, Lisp_Object, Lisp_Object); |
| 3151 | extern Lisp_Object do_switch_frame (Lisp_Object, int, int, Lisp_Object); | 3151 | extern Lisp_Object do_switch_frame (Lisp_Object, int, int, Lisp_Object); |
| 3152 | #if HAVE_NS | ||
| 3152 | extern Lisp_Object get_frame_param (struct frame *, Lisp_Object); | 3153 | extern Lisp_Object get_frame_param (struct frame *, Lisp_Object); |
| 3154 | #endif | ||
| 3153 | extern Lisp_Object frame_buffer_predicate (Lisp_Object); | 3155 | extern Lisp_Object frame_buffer_predicate (Lisp_Object); |
| 3154 | EXFUN (Fselect_frame, 2); | 3156 | EXFUN (Fselect_frame, 2); |
| 3155 | EXFUN (Fselected_frame, 0); | 3157 | EXFUN (Fselected_frame, 0); |