Commit eec47d6b authored by Dan Nicolaescu's avatar Dan Nicolaescu

Use const, move declarations to header files.

* src/buffer.c (Fset_buffer_multibyte): Remove local extern declaration.

* src/character.c (strwidth, parse_str_to_multibyte): Add const.

* src/character.h (strwidth, parse_str_to_multibyte): Likewise.

* src/charset.c (add_to_log): Remove declaration.

* src/composite.c (syms_of_composite): Remove local extern declarations.

* src/data.c (Finteractive_form): Use const.

* src/dired.c (scmp): Add const.
(directory_files_internal): Remove local extern declaration.

* src/dispextern.h (add_to_log): Remove declaration.
(x_get_arg, x_frame_get_arg, x_frame_get_and_record_arg)
(x_frame_get_and_record_arg, x_default_parameter): Add const.

* src/dispnew.c: Remove duplicate #include <unistd.h>.
(update_window, update_frame_1, init_display): Remove local extern
declarations.

* src/editfns.c (region_limit, syms_of_editfns): Remove local extern
declarations.

* src/emacs.c (main): Remove local extern declaration.

* src/font.c (Qnormal, QCtype, QCfamily, QCweight, QCslant, QCwidth)
(QCheight, QCsize, QCname): Remove declarations.

* src/frame.c (x_get_resource_string, x_get_string_resource)
(x_get_arg, x_frame_get_arg, x_frame_get_and_record_arg)
(x_default_parameter): Use const.

* src/image.c (QCwidth, QCheight, QCforeground, QCbackground, QCfile)
(QCdata, QCtype, Qcenter): Remove declarations.

* src/keyboard.h (do_mouse_tracking): Add declaration.

* src/minibuf.c (Qmouse_face): Remove declaration.

* src/msdos.c (IT_note_mouse_highlight): Remove local extern declaration.

* src/xdisp.c (do_mouse_tracking): Remove declaration.
(add_to_log): Use const.

* src/xfaces.c (Qmouse_face): Remove declaration.
(face_color_gray_p, tty_defined_color, defined_color)
(face_color_gray_p, face_color_supported_p). Add const.

* src/xfns.c: Include xlwmenu.h when USE_LUCID.
(x_defined_color, xic_set_xfontset): Use const.
(Fx_hide_tip): Remove local extern declaration.

* src/xselect.c (selection_data_to_lisp_data)
(x_property_data_to_lisp):
* src/xrdb.c (x_get_string_resource, file_p)
(x_get_customization_string, magic_file_p, search_magic_path)
(get_system_app, get_user_app, x_load_resources, x_get_resource)
(x_get_string_resource): Use const.

* src/xterm.c (xlwmenu_window_p, xlwmenu_redisplay): Remove declarations.
(x_text_icon, x_check_errors, x_connection_closed): Use const.

* src/xterm.h (x_get_customization_string, x_load_resources)
(x_get_resource, x_text_icon, x_text_icon, x_check_errors)
(x_check_errors, x_property_data_to_lisp, defined_color)
(xic_set_xfontset, x_defined_color): Use const.
parent 89dc303e
...@@ -2512,7 +2512,6 @@ current buffer is cleared. */) ...@@ -2512,7 +2512,6 @@ current buffer is cleared. */)
if (!EQ (old_undo, Qt)) if (!EQ (old_undo, Qt))
{ {
/* Represent all the above changes by a special undo entry. */ /* Represent all the above changes by a special undo entry. */
extern Lisp_Object Qapply;
current_buffer->undo_list = Fcons (list3 (Qapply, current_buffer->undo_list = Fcons (list3 (Qapply,
intern ("set-buffer-multibyte"), intern ("set-buffer-multibyte"),
NILP (flag) ? Qt : Qnil), NILP (flag) ? Qt : Qnil),
......
...@@ -430,7 +430,7 @@ c_string_width (const unsigned char *str, int len, int precision, int *nchars, i ...@@ -430,7 +430,7 @@ c_string_width (const unsigned char *str, int len, int precision, int *nchars, i
occupies on the screen. */ occupies on the screen. */
int int
strwidth (unsigned char *str, int len) strwidth (const unsigned char *str, int len)
{ {
return c_string_width (str, len, -1, NULL, NULL); return c_string_width (str, len, -1, NULL, NULL);
} }
...@@ -710,9 +710,9 @@ str_as_multibyte (unsigned char *str, int len, int nbytes, int *nchars) ...@@ -710,9 +710,9 @@ str_as_multibyte (unsigned char *str, int len, int nbytes, int *nchars)
`str_to_multibyte'. */ `str_to_multibyte'. */
int int
parse_str_to_multibyte (unsigned char *str, int len) parse_str_to_multibyte (const unsigned char *str, int len)
{ {
unsigned char *endp = str + len; const unsigned char *endp = str + len;
int bytes; int bytes;
for (bytes = 0; str < endp; str++) for (bytes = 0; str < endp; str++)
......
...@@ -605,13 +605,13 @@ extern int translate_char (Lisp_Object, int c); ...@@ -605,13 +605,13 @@ extern int translate_char (Lisp_Object, int c);
extern int char_printable_p (int c); extern int char_printable_p (int c);
extern void parse_str_as_multibyte (const unsigned char *, int, int *, extern void parse_str_as_multibyte (const unsigned char *, int, int *,
int *); int *);
extern int parse_str_to_multibyte (unsigned char *, int); extern int parse_str_to_multibyte (const unsigned char *, int);
extern int str_as_multibyte (unsigned char *, int, int, int *); extern int str_as_multibyte (unsigned char *, int, int, int *);
extern int str_to_multibyte (unsigned char *, int, int); extern int str_to_multibyte (unsigned char *, int, int);
extern int str_as_unibyte (unsigned char *, int); extern int str_as_unibyte (unsigned char *, int);
extern EMACS_INT str_to_unibyte (const unsigned char *, unsigned char *, extern EMACS_INT str_to_unibyte (const unsigned char *, unsigned char *,
EMACS_INT, int); EMACS_INT, int);
extern int strwidth (unsigned char *, int); extern int strwidth (const unsigned char *, int);
extern int c_string_width (const unsigned char *, int, int, int *, int *); extern int c_string_width (const unsigned char *, int, int, int *, int *);
extern int lisp_string_width (Lisp_Object, int, int *, int *); extern int lisp_string_width (Lisp_Object, int, int *, int *);
......
...@@ -491,8 +491,6 @@ extern Lisp_Object Qfile_name_handler_alist; ...@@ -491,8 +491,6 @@ extern Lisp_Object Qfile_name_handler_alist;
Note that this function uses `openp' to open MAPFILE but ignores Note that this function uses `openp' to open MAPFILE but ignores
`file-name-handler-alist' to avoid running any Lisp code. */ `file-name-handler-alist' to avoid running any Lisp code. */
extern void add_to_log (char *, Lisp_Object, Lisp_Object);
static void static void
load_charset_map_from_file (struct charset *charset, Lisp_Object mapfile, int control_flag) load_charset_map_from_file (struct charset *charset, Lisp_Object mapfile, int control_flag)
{ {
......
...@@ -1939,7 +1939,6 @@ syms_of_composite (void) ...@@ -1939,7 +1939,6 @@ syms_of_composite (void)
/* Make a hash table for static composition. */ /* Make a hash table for static composition. */
{ {
Lisp_Object args[6]; Lisp_Object args[6];
extern Lisp_Object QCsize;
args[0] = QCtest; args[0] = QCtest;
args[1] = Qequal; args[1] = Qequal;
...@@ -1959,8 +1958,6 @@ syms_of_composite (void) ...@@ -1959,8 +1958,6 @@ syms_of_composite (void)
/* Make a hash table for glyph-string. */ /* Make a hash table for glyph-string. */
{ {
Lisp_Object args[6]; Lisp_Object args[6];
extern Lisp_Object QCsize;
args[0] = QCtest; args[0] = QCtest;
args[1] = Qequal; args[1] = Qequal;
args[2] = QCweakness; args[2] = QCweakness;
......
...@@ -750,7 +750,7 @@ Value, if non-nil, is a list \(interactive SPEC). */) ...@@ -750,7 +750,7 @@ Value, if non-nil, is a list \(interactive SPEC). */)
if (SUBRP (fun)) if (SUBRP (fun))
{ {
char *spec = XSUBR (fun)->intspec; const char *spec = XSUBR (fun)->intspec;
if (spec) if (spec)
return list2 (Qinteractive, return list2 (Qinteractive,
(*spec != '(') ? build_string (spec) : (*spec != '(') ? build_string (spec) :
......
...@@ -115,7 +115,7 @@ Lisp_Object Qfile_name_all_completions; ...@@ -115,7 +115,7 @@ Lisp_Object Qfile_name_all_completions;
Lisp_Object Qfile_attributes; Lisp_Object Qfile_attributes;
Lisp_Object Qfile_attributes_lessp; Lisp_Object Qfile_attributes_lessp;
static int scmp (unsigned char *, unsigned char *, int); static int scmp (const unsigned char *, const unsigned char *, int);
#ifdef WINDOWSNT #ifdef WINDOWSNT
Lisp_Object Lisp_Object
...@@ -206,7 +206,6 @@ directory_files_internal (Lisp_Object directory, Lisp_Object full, Lisp_Object m ...@@ -206,7 +206,6 @@ directory_files_internal (Lisp_Object directory, Lisp_Object full, Lisp_Object m
#ifdef WINDOWSNT #ifdef WINDOWSNT
if (attrs) if (attrs)
{ {
extern Lisp_Object Qlocal;
extern int is_slow_fs (const char *); extern int is_slow_fs (const char *);
/* Do this only once to avoid doing it (in w32.c:stat) for each /* Do this only once to avoid doing it (in w32.c:stat) for each
...@@ -813,7 +812,7 @@ file_name_completion (Lisp_Object file, Lisp_Object dirname, int all_flag, int v ...@@ -813,7 +812,7 @@ file_name_completion (Lisp_Object file, Lisp_Object dirname, int all_flag, int v
else number of chars that match at the beginning. */ else number of chars that match at the beginning. */
static int static int
scmp (register unsigned char *s1, register unsigned char *s2, int len) scmp (const unsigned char *s1, const unsigned char *s2, int len)
{ {
register int l = len; register int l = len;
......
...@@ -2951,7 +2951,6 @@ extern Lisp_Object Qtool_bar; ...@@ -2951,7 +2951,6 @@ extern Lisp_Object Qtool_bar;
extern Lisp_Object Vshow_trailing_whitespace; extern Lisp_Object Vshow_trailing_whitespace;
extern int mode_line_in_non_selected_windows; extern int mode_line_in_non_selected_windows;
extern int redisplaying_p; extern int redisplaying_p;
extern void add_to_log (char *, Lisp_Object, Lisp_Object);
extern int help_echo_showing_p; extern int help_echo_showing_p;
extern int current_mode_line_height, current_header_line_height; extern int current_mode_line_height, current_header_line_height;
extern Lisp_Object help_echo_string, help_echo_window; extern Lisp_Object help_echo_string, help_echo_window;
...@@ -3322,18 +3321,18 @@ enum resource_types ...@@ -3322,18 +3321,18 @@ enum resource_types
}; };
extern Lisp_Object x_get_arg (Display_Info *, Lisp_Object, extern Lisp_Object x_get_arg (Display_Info *, Lisp_Object,
Lisp_Object, char *, char *class, Lisp_Object, const char *, const char *class,
enum resource_types); enum resource_types);
extern Lisp_Object x_frame_get_arg (struct frame *, Lisp_Object, extern Lisp_Object x_frame_get_arg (struct frame *, Lisp_Object,
Lisp_Object, char *, char *, Lisp_Object, const char *, const char *,
enum resource_types); enum resource_types);
extern Lisp_Object x_frame_get_and_record_arg ( extern Lisp_Object x_frame_get_and_record_arg (struct frame *, Lisp_Object,
struct frame *, Lisp_Object, Lisp_Object,
Lisp_Object, char *, char *, const char *, const char *,
enum resource_types); enum resource_types);
extern Lisp_Object x_default_parameter (struct frame *, Lisp_Object, extern Lisp_Object x_default_parameter (struct frame *, Lisp_Object,
Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object,
char *, char *, const char *, const char *,
enum resource_types); enum resource_types);
#endif /* HAVE_WINDOW_SYSTEM */ #endif /* HAVE_WINDOW_SYSTEM */
......
...@@ -66,12 +66,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ ...@@ -66,12 +66,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include "systime.h" #include "systime.h"
#include <errno.h> #include <errno.h>
/* To get the prototype for `sleep'. */
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
/* Get number of chars of output now in the buffer of a stdio stream. /* Get number of chars of output now in the buffer of a stdio stream.
This ought to be built in in stdio, but it isn't. Some s- files This ought to be built in in stdio, but it isn't. Some s- files
override this because their stdio internals differ. */ override this because their stdio internals differ. */
...@@ -3664,8 +3658,6 @@ update_window (struct window *w, int force_p) ...@@ -3664,8 +3658,6 @@ update_window (struct window *w, int force_p)
#if !PERIODIC_PREEMPTION_CHECKING #if !PERIODIC_PREEMPTION_CHECKING
int preempt_count = baud_rate / 2400 + 1; int preempt_count = baud_rate / 2400 + 1;
#endif #endif
extern int input_pending;
extern Lisp_Object do_mouse_tracking;
struct redisplay_interface *rif = FRAME_RIF (XFRAME (WINDOW_FRAME (w))); struct redisplay_interface *rif = FRAME_RIF (XFRAME (WINDOW_FRAME (w)));
#if GLYPH_DEBUG #if GLYPH_DEBUG
/* Check that W's frame doesn't have glyph matrices. */ /* Check that W's frame doesn't have glyph matrices. */
...@@ -4710,7 +4702,6 @@ update_frame_1 (struct frame *f, int force_p, int inhibit_id_p) ...@@ -4710,7 +4702,6 @@ update_frame_1 (struct frame *f, int force_p, int inhibit_id_p)
int i; int i;
int pause; int pause;
int preempt_count = baud_rate / 2400 + 1; int preempt_count = baud_rate / 2400 + 1;
extern int input_pending;
xassert (current_matrix && desired_matrix); xassert (current_matrix && desired_matrix);
...@@ -6235,10 +6226,6 @@ init_display (void) ...@@ -6235,10 +6226,6 @@ init_display (void)
{ {
char *terminal_type; char *terminal_type;
#ifdef HAVE_X_WINDOWS
extern int display_arg;
#endif
/* Construct the space glyph. */ /* Construct the space glyph. */
space_glyph.type = CHAR_GLYPH; space_glyph.type = CHAR_GLYPH;
SET_CHAR_GLYPH (space_glyph, ' ', DEFAULT_FACE_ID, 0); SET_CHAR_GLYPH (space_glyph, ' ', DEFAULT_FACE_ID, 0);
......
...@@ -320,7 +320,6 @@ The return value is POSITION. */) ...@@ -320,7 +320,6 @@ The return value is POSITION. */)
static Lisp_Object static Lisp_Object
region_limit (int beginningp) region_limit (int beginningp)
{ {
extern Lisp_Object Vmark_even_if_inactive; /* Defined in callint.c. */
Lisp_Object m; Lisp_Object m;
if (!NILP (Vtransient_mark_mode) if (!NILP (Vtransient_mark_mode)
...@@ -4554,7 +4553,6 @@ of the buffer being accessed. */); ...@@ -4554,7 +4553,6 @@ of the buffer being accessed. */);
{ {
Lisp_Object obuf; Lisp_Object obuf;
extern Lisp_Object Vprin1_to_string_buffer;
obuf = Fcurrent_buffer (); obuf = Fcurrent_buffer ();
/* Do this here, because init_buffer_once is too early--it won't work. */ /* Do this here, because init_buffer_once is too early--it won't work. */
Fset_buffer (Vprin1_to_string_buffer); Fset_buffer (Vprin1_to_string_buffer);
......
...@@ -757,7 +757,6 @@ main (int argc, char **argv) ...@@ -757,7 +757,6 @@ main (int argc, char **argv)
char *ch_to_dir; char *ch_to_dir;
#if GC_MARK_STACK #if GC_MARK_STACK
extern Lisp_Object *stack_base;
stack_base = &dummy; stack_base = &dummy;
#endif #endif
......
...@@ -127,12 +127,6 @@ static const struct table_entry width_table[] = ...@@ -127,12 +127,6 @@ static const struct table_entry width_table[] =
{ 200, { "ultra-expanded", "ultraexpanded", "wide" }} { 200, { "ultra-expanded", "ultraexpanded", "wide" }}
}; };
extern Lisp_Object Qnormal;
/* Symbols representing keys of normal font properties. */
extern Lisp_Object QCtype, QCfamily, QCweight, QCslant, QCwidth;
extern Lisp_Object QCheight, QCsize, QCname;
Lisp_Object QCfoundry, QCadstyle, QCregistry; Lisp_Object QCfoundry, QCadstyle, QCregistry;
/* Symbols representing keys of font extra info. */ /* Symbols representing keys of font extra info. */
Lisp_Object QCspacing, QCdpi, QCscalable, QCotf, QClang, QCscript, QCavgwidth; Lisp_Object QCspacing, QCdpi, QCscalable, QCotf, QClang, QCscript, QCavgwidth;
......
...@@ -3721,7 +3721,7 @@ validate_x_resource_name (void) ...@@ -3721,7 +3721,7 @@ validate_x_resource_name (void)
} }
extern char *x_get_string_resource (XrmDatabase, char *, char *); extern char *x_get_string_resource (XrmDatabase, const char *, const char *);
extern Display_Info *check_x_display_info (Lisp_Object); extern Display_Info *check_x_display_info (Lisp_Object);
...@@ -3823,7 +3823,7 @@ display_x_get_resource (Display_Info *dpyinfo, Lisp_Object attribute, Lisp_Objec ...@@ -3823,7 +3823,7 @@ display_x_get_resource (Display_Info *dpyinfo, Lisp_Object attribute, Lisp_Objec
/* Used when C code wants a resource value. */ /* Used when C code wants a resource value. */
/* Called from oldXMenu/Create.c. */ /* Called from oldXMenu/Create.c. */
char * char *
x_get_resource_string (char *attribute, char *class) x_get_resource_string (const char *attribute, const char *class)
{ {
char *name_key; char *name_key;
char *class_key; char *class_key;
...@@ -3856,7 +3856,8 @@ x_get_resource_string (char *attribute, char *class) ...@@ -3856,7 +3856,8 @@ x_get_resource_string (char *attribute, char *class)
and don't let it get stored in any Lisp-visible variables! */ and don't let it get stored in any Lisp-visible variables! */
Lisp_Object Lisp_Object
x_get_arg (Display_Info *dpyinfo, Lisp_Object alist, Lisp_Object param, char *attribute, char *class, enum resource_types type) x_get_arg (Display_Info *dpyinfo, Lisp_Object alist, Lisp_Object param,
const char *attribute, const char *class, enum resource_types type)
{ {
register Lisp_Object tem; register Lisp_Object tem;
...@@ -3954,7 +3955,9 @@ x_get_arg (Display_Info *dpyinfo, Lisp_Object alist, Lisp_Object param, char *at ...@@ -3954,7 +3955,9 @@ x_get_arg (Display_Info *dpyinfo, Lisp_Object alist, Lisp_Object param, char *at
} }
Lisp_Object Lisp_Object
x_frame_get_arg (struct frame *f, Lisp_Object alist, Lisp_Object param, char *attribute, char *class, enum resource_types type) x_frame_get_arg (struct frame *f, Lisp_Object alist, Lisp_Object param,
const char *attribute, const char *class,
enum resource_types type)
{ {
return x_get_arg (FRAME_X_DISPLAY_INFO (f), return x_get_arg (FRAME_X_DISPLAY_INFO (f),
alist, param, attribute, class, type); alist, param, attribute, class, type);
...@@ -3963,7 +3966,10 @@ x_frame_get_arg (struct frame *f, Lisp_Object alist, Lisp_Object param, char *at ...@@ -3963,7 +3966,10 @@ x_frame_get_arg (struct frame *f, Lisp_Object alist, Lisp_Object param, char *at
/* Like x_frame_get_arg, but also record the value in f->param_alist. */ /* Like x_frame_get_arg, but also record the value in f->param_alist. */
Lisp_Object Lisp_Object
x_frame_get_and_record_arg (struct frame *f, Lisp_Object alist, Lisp_Object param, char *attribute, char *class, enum resource_types type) x_frame_get_and_record_arg (struct frame *f, Lisp_Object alist,
Lisp_Object param,
const char *attribute, const char *class,
enum resource_types type)
{ {
Lisp_Object value; Lisp_Object value;
...@@ -3983,7 +3989,9 @@ x_frame_get_and_record_arg (struct frame *f, Lisp_Object alist, Lisp_Object para ...@@ -3983,7 +3989,9 @@ x_frame_get_and_record_arg (struct frame *f, Lisp_Object alist, Lisp_Object para
If that is not found either, use the value DEFLT. */ If that is not found either, use the value DEFLT. */
Lisp_Object Lisp_Object
x_default_parameter (struct frame *f, Lisp_Object alist, Lisp_Object prop, Lisp_Object deflt, char *xprop, char *xclass, enum resource_types type) x_default_parameter (struct frame *f, Lisp_Object alist, Lisp_Object prop,
Lisp_Object deflt, const char *xprop, const char *xclass,
enum resource_types type)
{ {
Lisp_Object tem; Lisp_Object tem;
......
...@@ -578,9 +578,6 @@ Lisp_Object Qxbm; ...@@ -578,9 +578,6 @@ Lisp_Object Qxbm;
/* Keywords. */ /* Keywords. */
extern Lisp_Object QCwidth, QCheight, QCforeground, QCbackground, QCfile;
extern Lisp_Object QCdata, QCtype;
extern Lisp_Object Qcenter;
Lisp_Object QCascent, QCmargin, QCrelief, Qcount, Qextension_data; Lisp_Object QCascent, QCmargin, QCrelief, Qcount, Qextension_data;
Lisp_Object QCconversion, QCcolor_symbols, QCheuristic_mask; Lisp_Object QCconversion, QCcolor_symbols, QCheuristic_mask;
Lisp_Object QCindex, QCmatrix, QCcolor_adjustment, QCmask; Lisp_Object QCindex, QCmatrix, QCcolor_adjustment, QCmask;
......
...@@ -406,6 +406,8 @@ extern widget_value *digest_single_submenu (int, int, int); ...@@ -406,6 +406,8 @@ extern widget_value *digest_single_submenu (int, int, int);
#define POSN_INBUFFER_P(posn) (NILP (POSN_STRING (posn))) #define POSN_INBUFFER_P(posn) (NILP (POSN_STRING (posn)))
#define POSN_BUFFER_POSN(posn) (Fnth (make_number (5), (posn))) #define POSN_BUFFER_POSN(posn) (Fnth (make_number (5), (posn)))
extern Lisp_Object do_mouse_tracking;
/* Some of the event heads. */ /* Some of the event heads. */
extern Lisp_Object Qswitch_frame; extern Lisp_Object Qswitch_frame;
......
...@@ -145,8 +145,6 @@ Lisp_Object Qread_expression_history; ...@@ -145,8 +145,6 @@ Lisp_Object Qread_expression_history;
extern Lisp_Object Voverriding_local_map; extern Lisp_Object Voverriding_local_map;
extern Lisp_Object Qmouse_face;
extern Lisp_Object Qfield; extern Lisp_Object Qfield;
/* Put minibuf on currently selected frame's minibuffer. /* Put minibuf on currently selected frame's minibuffer.
......
...@@ -1330,7 +1330,6 @@ IT_note_mouse_highlight (struct frame *f, int x, int y) ...@@ -1330,7 +1330,6 @@ IT_note_mouse_highlight (struct frame *f, int x, int y)
/* Check for mouse-face and help-echo. */ /* Check for mouse-face and help-echo. */
{ {
extern Lisp_Object Qmouse_face;
Lisp_Object mouse_face, overlay, position, *overlay_vec; Lisp_Object mouse_face, overlay, position, *overlay_vec;
int noverlays, obegv, ozv; int noverlays, obegv, ozv;
struct buffer *obuf; struct buffer *obuf;
......
...@@ -276,8 +276,6 @@ extern void set_frame_menubar (struct frame *f, int, int); ...@@ -276,8 +276,6 @@ extern void set_frame_menubar (struct frame *f, int, int);
extern int interrupt_input; extern int interrupt_input;
extern int command_loop_level; extern int command_loop_level;
extern Lisp_Object do_mouse_tracking;
extern int minibuffer_auto_raise; extern int minibuffer_auto_raise;
extern Lisp_Object Vminibuffer_list; extern Lisp_Object Vminibuffer_list;
...@@ -7966,7 +7964,7 @@ in_display_vector_p (struct it *it) ...@@ -7966,7 +7964,7 @@ in_display_vector_p (struct it *it)
to *Messages*. */ to *Messages*. */
void void
add_to_log (char *format, Lisp_Object arg1, Lisp_Object arg2) add_to_log (const char *format, Lisp_Object arg1, Lisp_Object arg2)
{ {
Lisp_Object args[3]; Lisp_Object args[3];
Lisp_Object msg, fmt; Lisp_Object msg, fmt;
......
...@@ -411,7 +411,6 @@ Lisp_Object Qforeground_color, Qbackground_color; ...@@ -411,7 +411,6 @@ Lisp_Object Qforeground_color, Qbackground_color;
/* The symbols `face' and `mouse-face' used as text properties. */ /* The symbols `face' and `mouse-face' used as text properties. */
Lisp_Object Qface; Lisp_Object Qface;
extern Lisp_Object Qmouse_face;
/* Property for basic faces which other faces cannot inherit. */ /* Property for basic faces which other faces cannot inherit. */
...@@ -520,7 +519,7 @@ static int load_pixmap (struct frame *, Lisp_Object, unsigned *, unsigned *); ...@@ -520,7 +519,7 @@ static int load_pixmap (struct frame *, Lisp_Object, unsigned *, unsigned *);
static struct frame *frame_or_selected_frame (Lisp_Object, int); static struct frame *frame_or_selected_frame (Lisp_Object, int);
static void load_face_colors (struct frame *, struct face *, Lisp_Object *); static void load_face_colors (struct frame *, struct face *, Lisp_Object *);
static void free_face_colors (struct frame *, struct face *); static void free_face_colors (struct frame *, struct face *);
static int face_color_gray_p (struct frame *, char *); static int face_color_gray_p (struct frame *, const char *);
static struct face *realize_face (struct face_cache *, Lisp_Object *, static struct face *realize_face (struct face_cache *, Lisp_Object *,
int); int);
static struct face *realize_non_ascii_face (struct frame *, Lisp_Object, static struct face *realize_non_ascii_face (struct frame *, Lisp_Object,
...@@ -1171,7 +1170,8 @@ tty_lookup_color (struct frame *f, Lisp_Object color, XColor *tty_color, XColor ...@@ -1171,7 +1170,8 @@ tty_lookup_color (struct frame *f, Lisp_Object color, XColor *tty_color, XColor
/* A version of defined_color for non-X frames. */ /* A version of defined_color for non-X frames. */
int int
tty_defined_color (struct frame *f, char *color_name, XColor *color_def, int alloc) tty_defined_color (struct frame *f, const char *color_name,
XColor *color_def, int alloc)
{ {
int status = 1; int status = 1;
...@@ -1206,7 +1206,7 @@ tty_defined_color (struct frame *f, char *color_name, XColor *color_def, int all ...@@ -1206,7 +1206,7 @@ tty_defined_color (struct frame *f, char *color_name, XColor *color_def, int all
This does the right thing for any type of frame. */ This does the right thing for any type of frame. */
int int
defined_color (struct frame *f, char *color_name, XColor *color_def, int alloc) defined_color (struct frame *f, const char *color_name, XColor *color_def, int alloc)
{ {
if (!FRAME_WINDOW_P (f)) if (!FRAME_WINDOW_P (f))
return tty_defined_color (f, color_name, color_def, alloc); return tty_defined_color (f, color_name, color_def, alloc);
...@@ -1266,7 +1266,7 @@ tty_color_name (struct frame *f, int idx) ...@@ -1266,7 +1266,7 @@ tty_color_name (struct frame *f, int idx)
The criterion implemented here is not a terribly sophisticated one. */ The criterion implemented here is not a terribly sophisticated one. */
static int static int
face_color_gray_p (struct frame *f, char *color_name) face_color_gray_p (struct frame *f, const char *color_name)
{ {
XColor color; XColor color;
int gray_p; int gray_p;
...@@ -1293,7 +1293,7 @@ face_color_gray_p (struct frame *f, char *color_name) ...@@ -1293,7 +1293,7 @@ face_color_gray_p (struct frame *f, char *color_name)
color. */ color. */
static int static int
face_color_supported_p (struct frame *f, char *color_name, int background_p) face_color_supported_p (struct frame *f, const char *color_name, int background_p)
{ {
Lisp_Object frame; Lisp_Object frame;
XColor not_used; XColor not_used;
......
...@@ -101,6 +101,10 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ ...@@ -101,6 +101,10 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <Xm/FileSB.h> #include <Xm/FileSB.h>
#endif #endif
#ifdef USE_LUCID
#include "../lwlib/xlwmenu.h"
#endif
#if !defined(NO_EDITRES) #if !defined(NO_EDITRES)
#define HACK_EDITRES #define HACK_EDITRES
extern void _XEditResCheckMessages (); extern void _XEditResCheckMessages ();
...@@ -650,7 +654,8 @@ gamma_correct (struct frame *f, XColor *color) ...@@ -650,7 +654,8 @@ gamma_correct (struct frame *f, XColor *color)
no color could be allocated. */ no color could be allocated. */
int int
x_defined_color (struct frame *f, char *color_name, XColor *color, int alloc_p) x_defined_color (struct frame *f, const char *color_name,
XColor *color, int alloc_p)
{ {
int success_p; int success_p;
Display *dpy = FRAME_X_DISPLAY (f); Display *dpy = FRAME_X_DISPLAY (f);
...@@ -2353,7 +2358,7 @@ xic_set_statusarea (struct frame *f) ...@@ -2353,7 +2358,7 @@ xic_set_statusarea (struct frame *f)
BASE_FONTNAME. Called when a new Emacs fontset is chosen. */ BASE_FONTNAME. Called when a new Emacs fontset is chosen. */
void void
xic_set_xfontset (struct frame *f, char *base_fontname) xic_set_xfontset (struct frame *f, const char *base_fontname)
{ {
XVaNestedList attr; XVaNestedList attr;
XFontSet xfs; XFontSet xfs;
...@@ -5205,7 +5210,6 @@ Value is t if tooltip was open, nil otherwise. */) ...@@ -5205,7 +5210,6 @@ Value is t if tooltip was open, nil otherwise. */)
{ {
struct frame *f = SELECTED_FRAME (); struct frame *f = SELECTED_FRAME ();
Widget w = f->output_data.x->menubar_widget; Widget w = f->output_data.x->menubar_widget;
extern void xlwmenu_redisplay (Widget);
if (!DoesSaveUnders (FRAME_X_DISPLAY_INFO (f)->screen) if (!DoesSaveUnders (FRAME_X_DISPLAY_INFO (f)->screen)
&& w != NULL) && w != NULL)
......
...@@ -82,8 +82,9 @@ extern char *get_system_name (void); ...@@ -82,8 +82,9 @@ extern char *get_system_name (void);
#define free xfree #define free xfree
#endif