summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2011-04-13 16:35:33 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2011-04-13 16:35:33 -0700
commit816269316fbb2c248873b4387db5624ff57f6303 (patch)
treef3a576519b89b14529a700e287101db707b39012 /src
parent239f9db96059f3f76e4b4a6f31f6eb56f642ea84 (diff)
downloademacs-816269316fbb2c248873b4387db5624ff57f6303.tar.gz
* 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 @@
2011-04-13 Paul Eggert <eggert@cs.ucla.edu>
+ * 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.
+
* font.c, fontset.c: Make symbols static if they're not exported.
* dispextern.h (FACE_SUITABLE_FOR_ASCII_CHAR_P): New macro.
(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;
static Lisp_Object Qdelete_frame_functions;
+#ifdef HAVE_WINDOW_SYSTEM
+static void x_report_frame_params (struct frame *, Lisp_Object *);
+#endif
+
static void
set_menu_bar_lines_1 (Lisp_Object window, int n)
@@ -549,7 +553,7 @@ make_initial_frame (void)
}
-struct frame *
+static struct frame *
make_terminal_frame (struct terminal *terminal)
{
register struct frame *f;
@@ -2078,6 +2082,9 @@ See `redirect-frame-focus'. */)
/* Return the value of frame parameter PROP in frame FRAME. */
+#if !HAVE_NS
+static
+#endif
Lisp_Object
get_frame_param (register struct frame *frame, Lisp_Object prop)
{
@@ -2833,7 +2840,7 @@ static const struct frame_parm_table frame_parms[] =
{"tool-bar-position", &Qtool_bar_position},
};
-#ifdef HAVE_WINDOW_SYSTEM
+#ifdef WINDOWSNT
/* Calculate fullscreen size. Return in *TOP_POS and *LEFT_POS the
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
*height = newheight;
}
+#endif /* WINDOWSNT */
+
+#ifdef HAVE_WINDOW_SYSTEM
/* Change the parameters of frame F as specified by ALIST.
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
attribute, class, component, subclass);
}
-#if defined HAVE_X_WINDOWS && !defined USE_X_TOOLKIT
-/* Used when C code wants a resource value. */
-/* Called from oldXMenu/Create.c. */
-char *
-x_get_resource_string (const char *attribute, const char *class)
-{
- char *name_key;
- char *class_key;
- struct frame *sf = SELECTED_FRAME ();
-
- /* Allocate space for the components, the dots which separate them,
- and the final '\0'. */
- name_key = (char *) alloca (SBYTES (Vinvocation_name)
- + strlen (attribute) + 2);
- class_key = (char *) alloca ((sizeof (EMACS_CLASS) - 1)
- + strlen (class) + 2);
-
- sprintf (name_key, "%s.%s", SDATA (Vinvocation_name), attribute);
- sprintf (class_key, "%s.%s", EMACS_CLASS, class);
-
- return x_get_string_resource (FRAME_X_DISPLAY_INFO (sf)->xrdb,
- name_key, class_key);
-}
-#endif
-
/* Return the value of parameter PARAM.
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;
extern void set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object);
extern struct frame *make_initial_frame (void);
-extern struct frame *make_terminal_frame (struct terminal *);
extern struct frame *make_frame (int);
#ifdef HAVE_WINDOW_SYSTEM
extern struct frame *make_minibuffer_frame (void);
@@ -1095,11 +1094,12 @@ extern Lisp_Object x_new_font (struct frame *, Lisp_Object, int);
extern Lisp_Object Qface_set_after_frame_default;
+#ifdef WINDOWSNT
extern void x_fullscreen_adjust (struct frame *f, int *, int *,
int *, int *);
+#endif
extern void x_set_frame_parameters (struct frame *, Lisp_Object);
-extern void x_report_frame_params (struct frame *, Lisp_Object *);
extern void x_set_fullscreen (struct frame *, Lisp_Object, Lisp_Object);
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 *,
Lisp_Object component,
Lisp_Object subclass);
-#if defined HAVE_X_WINDOWS && !defined USE_X_TOOLKIT
-extern char *x_get_resource_string (const char *, const char *);
-#endif
-
/* In xmenu.c */
extern void set_frame_menubar (FRAME_PTR, int, int);
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;
extern void store_frame_param (struct frame *, Lisp_Object, Lisp_Object);
extern void store_in_alist (Lisp_Object *, Lisp_Object, Lisp_Object);
extern Lisp_Object do_switch_frame (Lisp_Object, int, int, Lisp_Object);
+#if HAVE_NS
extern Lisp_Object get_frame_param (struct frame *, Lisp_Object);
+#endif
extern Lisp_Object frame_buffer_predicate (Lisp_Object);
EXFUN (Fselect_frame, 2);
EXFUN (Fselected_frame, 0);