aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2011-04-13 16:35:33 -0700
committerPaul Eggert2011-04-13 16:35:33 -0700
commit816269316fbb2c248873b4387db5624ff57f6303 (patch)
treef3a576519b89b14529a700e287101db707b39012 /src
parent239f9db96059f3f76e4b4a6f31f6eb56f642ea84 (diff)
downloademacs-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/ChangeLog10
-rw-r--r--src/frame.c39
-rw-r--r--src/frame.h8
-rw-r--r--src/lisp.h2
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 @@
12011-04-13 Paul Eggert <eggert@cs.ucla.edu> 12011-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
122static Lisp_Object Qdelete_frame_functions; 122static Lisp_Object Qdelete_frame_functions;
123 123
124#ifdef HAVE_WINDOW_SYSTEM
125static void x_report_frame_params (struct frame *, Lisp_Object *);
126#endif
127
124 128
125static void 129static void
126set_menu_bar_lines_1 (Lisp_Object window, int n) 130set_menu_bar_lines_1 (Lisp_Object window, int n)
@@ -549,7 +553,7 @@ make_initial_frame (void)
549} 553}
550 554
551 555
552struct frame * 556static struct frame *
553make_terminal_frame (struct terminal *terminal) 557make_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
2086static
2087#endif
2081Lisp_Object 2088Lisp_Object
2082get_frame_param (register struct frame *frame, Lisp_Object prop) 2089get_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. */
3841char *
3842x_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
839extern void set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object); 839extern void set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object);
840extern struct frame *make_initial_frame (void); 840extern struct frame *make_initial_frame (void);
841extern struct frame *make_terminal_frame (struct terminal *);
842extern struct frame *make_frame (int); 841extern struct frame *make_frame (int);
843#ifdef HAVE_WINDOW_SYSTEM 842#ifdef HAVE_WINDOW_SYSTEM
844extern struct frame *make_minibuffer_frame (void); 843extern struct frame *make_minibuffer_frame (void);
@@ -1095,11 +1094,12 @@ extern Lisp_Object x_new_font (struct frame *, Lisp_Object, int);
1095 1094
1096extern Lisp_Object Qface_set_after_frame_default; 1095extern Lisp_Object Qface_set_after_frame_default;
1097 1096
1097#ifdef WINDOWSNT
1098extern void x_fullscreen_adjust (struct frame *f, int *, int *, 1098extern void x_fullscreen_adjust (struct frame *f, int *, int *,
1099 int *, int *); 1099 int *, int *);
1100#endif
1100 1101
1101extern void x_set_frame_parameters (struct frame *, Lisp_Object); 1102extern void x_set_frame_parameters (struct frame *, Lisp_Object);
1102extern void x_report_frame_params (struct frame *, Lisp_Object *);
1103 1103
1104extern void x_set_fullscreen (struct frame *, Lisp_Object, Lisp_Object); 1104extern void x_set_fullscreen (struct frame *, Lisp_Object, Lisp_Object);
1105extern void x_set_line_spacing (struct frame *, Lisp_Object, Lisp_Object); 1105extern 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
1137extern char *x_get_resource_string (const char *, const char *);
1138#endif
1139
1140/* In xmenu.c */ 1136/* In xmenu.c */
1141extern void set_frame_menubar (FRAME_PTR, int, int); 1137extern 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;
3149extern void store_frame_param (struct frame *, Lisp_Object, Lisp_Object); 3149extern void store_frame_param (struct frame *, Lisp_Object, Lisp_Object);
3150extern void store_in_alist (Lisp_Object *, Lisp_Object, Lisp_Object); 3150extern void store_in_alist (Lisp_Object *, Lisp_Object, Lisp_Object);
3151extern Lisp_Object do_switch_frame (Lisp_Object, int, int, Lisp_Object); 3151extern Lisp_Object do_switch_frame (Lisp_Object, int, int, Lisp_Object);
3152#if HAVE_NS
3152extern Lisp_Object get_frame_param (struct frame *, Lisp_Object); 3153extern Lisp_Object get_frame_param (struct frame *, Lisp_Object);
3154#endif
3153extern Lisp_Object frame_buffer_predicate (Lisp_Object); 3155extern Lisp_Object frame_buffer_predicate (Lisp_Object);
3154EXFUN (Fselect_frame, 2); 3156EXFUN (Fselect_frame, 2);
3155EXFUN (Fselected_frame, 0); 3157EXFUN (Fselected_frame, 0);