aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDan Nicolaescu2010-08-08 14:03:45 -0700
committerDan Nicolaescu2010-08-08 14:03:45 -0700
commit675e2c697bc8a0ff827fcb33297f63f4cc7ecad3 (patch)
tree5b0adfdb3d4cce40512b0fad0de9088d21dfb694 /src
parent25717ca11cae32e191e3dc9318562190d682f425 (diff)
downloademacs-675e2c697bc8a0ff827fcb33297f63f4cc7ecad3.tar.gz
emacs-675e2c697bc8a0ff827fcb33297f63f4cc7ecad3.zip
Use const char* instead of char*.
* src/xterm.c (x_create_toolkit_scroll_bar): * src/xfont.c (xfont_list_pattern): * src/xfns.c (x_default_scroll_bar_color_parameter) (xic_create_fontsetname, x_default_font_parameter) (x_screen_planes): * src/xdisp.c (c_string_pos, number_of_chars, reseat_to_string) (store_mode_line_string, decode_mode_spec, display_string): * src/menu.c (digest_single_submenu): * src/keymap.h (initial_define_key, initial_define_lispy_key): * src/keymap.c (initial_define_key, initial_define_lispy_key): * src/image.c (image_error, image_keyword): * src/gtkutil.h (xg_create_widget, xg_create_scroll_bar): * src/gtkutil.c (xg_create_widget, xg_create_scroll_bar): * src/ftfont.c (struct fc_charset_table, ftfont_spec_pattern) (ftfont_list, ftfont_match): * src/frame.c (frame_parm_table): * src/font.h (font_intern_prop, font_parse_xlfd, font_parse_fcname) (font_unparse_fcname, font_unparse_fcname, font_open_by_name) (font_add_log, font_deferred_log): * src/font.c (font_intern_prop, font_parse_xlfd, font_parse_fcname) (font_unparse_fcname, font_unparse_fcname, font_open_by_name) (font_add_log, font_deferred_log): * src/emacs.c (argmatch): * src/dispextern.h (struct it): * src/coding.c (ENCODE_DESIGNATION): * src/charset.c (define_charset_internal): Use const.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog28
-rw-r--r--src/charset.c2
-rw-r--r--src/coding.c4
-rw-r--r--src/dispextern.h2
-rw-r--r--src/emacs.c2
-rw-r--r--src/font.c16
-rw-r--r--src/font.h14
-rw-r--r--src/frame.c2
-rw-r--r--src/ftfont.c16
-rw-r--r--src/gtkutil.c4
-rw-r--r--src/gtkutil.h6
-rw-r--r--src/image.c6
-rw-r--r--src/keymap.c4
-rw-r--r--src/keymap.h4
-rw-r--r--src/menu.c2
-rw-r--r--src/xdisp.c30
-rw-r--r--src/xfns.c12
-rw-r--r--src/xfont.c2
-rw-r--r--src/xterm.c11
19 files changed, 91 insertions, 76 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 882a4ed093e..7931a9bbfa6 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,33 @@
12010-08-08 Dan Nicolaescu <dann@ics.uci.edu> 12010-08-08 Dan Nicolaescu <dann@ics.uci.edu>
2 2
3 Use const char* instead of char*.
4 * xterm.c (x_create_toolkit_scroll_bar):
5 * xfont.c (xfont_list_pattern):
6 * xfns.c (x_default_scroll_bar_color_parameter)
7 (xic_create_fontsetname, x_default_font_parameter)
8 (x_screen_planes):
9 * xdisp.c (c_string_pos, number_of_chars, reseat_to_string)
10 (store_mode_line_string, decode_mode_spec, display_string):
11 * menu.c (digest_single_submenu):
12 * keymap.h (initial_define_key, initial_define_lispy_key):
13 * keymap.c (initial_define_key, initial_define_lispy_key):
14 * image.c (image_error, image_keyword):
15 * gtkutil.h (xg_create_widget, xg_create_scroll_bar):
16 * gtkutil.c (xg_create_widget, xg_create_scroll_bar):
17 * ftfont.c (struct fc_charset_table, ftfont_spec_pattern)
18 (ftfont_list, ftfont_match):
19 * frame.c (frame_parm_table):
20 * font.h (font_intern_prop, font_parse_xlfd, font_parse_fcname)
21 (font_unparse_fcname, font_unparse_fcname, font_open_by_name)
22 (font_add_log, font_deferred_log):
23 * font.c (font_intern_prop, font_parse_xlfd, font_parse_fcname)
24 (font_unparse_fcname, font_unparse_fcname, font_open_by_name)
25 (font_add_log, font_deferred_log):
26 * emacs.c (argmatch):
27 * dispextern.h (struct it):
28 * coding.c (ENCODE_DESIGNATION):
29 * charset.c (define_charset_internal): Use const.
30
3 * s/freebsd.h (DECLARE_GETPWUID_WITH_UID_T): Remove, unused. 31 * s/freebsd.h (DECLARE_GETPWUID_WITH_UID_T): Remove, unused.
4 32
5 * xrdb.c: Remove include guard. Remove 33 * xrdb.c: Remove include guard. Remove
diff --git a/src/charset.c b/src/charset.c
index 7aef84cb0aa..9811e63118e 100644
--- a/src/charset.c
+++ b/src/charset.c
@@ -1265,7 +1265,7 @@ usage: (define-charset-internal ...) */)
1265static int 1265static int
1266define_charset_internal (Lisp_Object name, 1266define_charset_internal (Lisp_Object name,
1267 int dimension, 1267 int dimension,
1268 unsigned char *code_space, 1268 const unsigned char *code_space,
1269 unsigned min_code, unsigned max_code, 1269 unsigned min_code, unsigned max_code,
1270 int iso_final, int iso_revision, int emacs_mule_id, 1270 int iso_final, int iso_revision, int emacs_mule_id,
1271 int ascii_compatible, int supplementary, 1271 int ascii_compatible, int supplementary,
diff --git a/src/coding.c b/src/coding.c
index 32d1c64afbe..a5632bad963 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -4097,8 +4097,8 @@ decode_coding_iso_2022 (struct coding_system *coding)
4097#define ENCODE_DESIGNATION(charset, reg, coding) \ 4097#define ENCODE_DESIGNATION(charset, reg, coding) \
4098 do { \ 4098 do { \
4099 unsigned char final_char = CHARSET_ISO_FINAL (charset); \ 4099 unsigned char final_char = CHARSET_ISO_FINAL (charset); \
4100 char *intermediate_char_94 = "()*+"; \ 4100 const char *intermediate_char_94 = "()*+"; \
4101 char *intermediate_char_96 = ",-./"; \ 4101 const char *intermediate_char_96 = ",-./"; \
4102 int revision = -1; \ 4102 int revision = -1; \
4103 int c; \ 4103 int c; \
4104 \ 4104 \
diff --git a/src/dispextern.h b/src/dispextern.h
index 5461e9ff496..44ea4349250 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -2050,7 +2050,7 @@ struct it
2050 /* C string to iterate over. Non-null means get characters from 2050 /* C string to iterate over. Non-null means get characters from
2051 this string, otherwise characters are read from current_buffer 2051 this string, otherwise characters are read from current_buffer
2052 or it->string. */ 2052 or it->string. */
2053 unsigned char *s; 2053 const unsigned char *s;
2054 2054
2055 /* Number of characters in the string (s, or it->string) we iterate 2055 /* Number of characters in the string (s, or it->string) we iterate
2056 over. */ 2056 over. */
diff --git a/src/emacs.c b/src/emacs.c
index 1cdf6032ddd..4dc670e6032 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -629,7 +629,7 @@ void __main (void)
629 enough information to do it right. */ 629 enough information to do it right. */
630 630
631static int 631static int
632argmatch (char **argv, int argc, char *sstr, char *lstr, int minlen, char **valptr, int *skipptr) 632argmatch (char **argv, int argc, const char *sstr, const char *lstr, int minlen, char **valptr, int *skipptr)
633{ 633{
634 char *p = NULL; 634 char *p = NULL;
635 int arglen; 635 int arglen;
diff --git a/src/font.c b/src/font.c
index 4b59d89b884..f902ff4c588 100644
--- a/src/font.c
+++ b/src/font.c
@@ -232,7 +232,7 @@ static int num_font_drivers;
232 STR. */ 232 STR. */
233 233
234Lisp_Object 234Lisp_Object
235font_intern_prop (char *str, int len, int force_symbol) 235font_intern_prop (const char *str, int len, int force_symbol)
236{ 236{
237 int i; 237 int i;
238 Lisp_Object tem; 238 Lisp_Object tem;
@@ -981,7 +981,7 @@ font_expand_wildcards (Lisp_Object *field, int n)
981 a fully specified XLFD. */ 981 a fully specified XLFD. */
982 982
983int 983int
984font_parse_xlfd (char *name, Lisp_Object font) 984font_parse_xlfd (const char *name, Lisp_Object font)
985{ 985{
986 int len = strlen (name); 986 int len = strlen (name);
987 int i, j, n; 987 int i, j, n;
@@ -1306,7 +1306,7 @@ font_unparse_xlfd (Lisp_Object font, int pixel_size, char *name, int nbytes)
1306 This function tries to guess which format it is. */ 1306 This function tries to guess which format it is. */
1307 1307
1308int 1308int
1309font_parse_fcname (char *name, Lisp_Object font) 1309font_parse_fcname (const char *name, Lisp_Object font)
1310{ 1310{
1311 char *p, *q; 1311 char *p, *q;
1312 char *size_beg = NULL, *size_end = NULL; 1312 char *size_beg = NULL, *size_end = NULL;
@@ -1563,7 +1563,7 @@ font_parse_fcname (char *name, Lisp_Object font)
1563 FONT_SIZE_INDEX of FONT is 0, use PIXEL_SIZE instead. */ 1563 FONT_SIZE_INDEX of FONT is 0, use PIXEL_SIZE instead. */
1564 1564
1565int 1565int
1566font_unparse_fcname (Lisp_Object font, int pixel_size, char *name, int nbytes) 1566font_unparse_fcname (Lisp_Object font, int pixel_size, const char *name, int nbytes)
1567{ 1567{
1568 Lisp_Object family, foundry; 1568 Lisp_Object family, foundry;
1569 Lisp_Object tail, val; 1569 Lisp_Object tail, val;
@@ -1571,7 +1571,7 @@ font_unparse_fcname (Lisp_Object font, int pixel_size, char *name, int nbytes)
1571 int i, len = 1; 1571 int i, len = 1;
1572 char *p; 1572 char *p;
1573 Lisp_Object styles[3]; 1573 Lisp_Object styles[3];
1574 char *style_names[3] = { "weight", "slant", "width" }; 1574 const char *style_names[3] = { "weight", "slant", "width" };
1575 char work[256]; 1575 char work[256];
1576 1576
1577 family = AREF (font, FONT_FAMILY_INDEX); 1577 family = AREF (font, FONT_FAMILY_INDEX);
@@ -3506,7 +3506,7 @@ font_open_by_spec (FRAME_PTR f, Lisp_Object spec)
3506 found, return Qnil. */ 3506 found, return Qnil. */
3507 3507
3508Lisp_Object 3508Lisp_Object
3509font_open_by_name (FRAME_PTR f, char *name) 3509font_open_by_name (FRAME_PTR f, const char *name)
3510{ 3510{
3511 Lisp_Object args[2]; 3511 Lisp_Object args[2];
3512 Lisp_Object spec, ret; 3512 Lisp_Object spec, ret;
@@ -5060,7 +5060,7 @@ static Lisp_Object Vfont_log_deferred;
5060 opening), ARG is the argument for the action, and RESULT is the 5060 opening), ARG is the argument for the action, and RESULT is the
5061 result of the action. */ 5061 result of the action. */
5062void 5062void
5063font_add_log (char *action, Lisp_Object arg, Lisp_Object result) 5063font_add_log (const char *action, Lisp_Object arg, Lisp_Object result)
5064{ 5064{
5065 Lisp_Object tail, val; 5065 Lisp_Object tail, val;
5066 int i; 5066 int i;
@@ -5146,7 +5146,7 @@ font_add_log (char *action, Lisp_Object arg, Lisp_Object result)
5146 as font_add_log. */ 5146 as font_add_log. */
5147 5147
5148void 5148void
5149font_deferred_log (char *action, Lisp_Object arg, Lisp_Object result) 5149font_deferred_log (const char *action, Lisp_Object arg, Lisp_Object result)
5150{ 5150{
5151 if (EQ (Vfont_log, Qt)) 5151 if (EQ (Vfont_log, Qt))
5152 return; 5152 return;
diff --git a/src/font.h b/src/font.h
index dc8bcde3389..d37f0c86a23 100644
--- a/src/font.h
+++ b/src/font.h
@@ -783,10 +783,10 @@ extern void font_prepare_for_face (FRAME_PTR f, struct face *face);
783extern void font_done_for_face (FRAME_PTR f, struct face *face); 783extern void font_done_for_face (FRAME_PTR f, struct face *face);
784 784
785extern Lisp_Object font_open_by_spec (FRAME_PTR f, Lisp_Object spec); 785extern Lisp_Object font_open_by_spec (FRAME_PTR f, Lisp_Object spec);
786extern Lisp_Object font_open_by_name (FRAME_PTR f, char *name); 786extern Lisp_Object font_open_by_name (FRAME_PTR f, const char *name);
787extern void font_close_object (FRAME_PTR f, Lisp_Object font_object); 787extern void font_close_object (FRAME_PTR f, Lisp_Object font_object);
788 788
789extern Lisp_Object font_intern_prop (char *str, int len, int force_symbol); 789extern Lisp_Object font_intern_prop (const char *str, int len, int force_symbol);
790extern void font_update_sort_order (int *order); 790extern void font_update_sort_order (int *order);
791 791
792extern void font_parse_family_registry (Lisp_Object family, 792extern void font_parse_family_registry (Lisp_Object family,
@@ -795,12 +795,12 @@ extern void font_parse_family_registry (Lisp_Object family,
795extern Lisp_Object font_spec_from_family_registry (Lisp_Object family, 795extern Lisp_Object font_spec_from_family_registry (Lisp_Object family,
796 Lisp_Object registry); 796 Lisp_Object registry);
797 797
798extern int font_parse_xlfd (char *name, Lisp_Object font); 798extern int font_parse_xlfd (const char *name, Lisp_Object font);
799extern int font_unparse_xlfd (Lisp_Object font, int pixel_size, 799extern int font_unparse_xlfd (Lisp_Object font, int pixel_size,
800 char *name, int bytes); 800 char *name, int bytes);
801extern int font_parse_fcname (char *name, Lisp_Object font); 801extern int font_parse_fcname (const char *name, Lisp_Object font);
802extern int font_unparse_fcname (Lisp_Object font, int pixel_size, 802extern int font_unparse_fcname (Lisp_Object font, int pixel_size,
803 char *name, int bytes); 803 const char *name, int bytes);
804extern int font_unparse_gtkname (Lisp_Object, struct frame *, char *, int); 804extern int font_unparse_gtkname (Lisp_Object, struct frame *, char *, int);
805extern void register_font_driver (struct font_driver *driver, FRAME_PTR f); 805extern void register_font_driver (struct font_driver *driver, FRAME_PTR f);
806extern void free_font_driver_list (FRAME_PTR f); 806extern void free_font_driver_list (FRAME_PTR f);
@@ -856,8 +856,8 @@ extern void syms_of_nsfont (void);
856extern Lisp_Object QCfoundry, QCadstyle, QCregistry; 856extern Lisp_Object QCfoundry, QCadstyle, QCregistry;
857 857
858extern Lisp_Object Vfont_log; 858extern Lisp_Object Vfont_log;
859extern void font_add_log (char *, Lisp_Object, Lisp_Object); 859extern void font_add_log (const char *, Lisp_Object, Lisp_Object);
860extern void font_deferred_log (char *, Lisp_Object, Lisp_Object); 860extern void font_deferred_log (const char *, Lisp_Object, Lisp_Object);
861 861
862#define FONT_ADD_LOG(ACTION, ARG, RESULT) \ 862#define FONT_ADD_LOG(ACTION, ARG, RESULT) \
863 do { \ 863 do { \
diff --git a/src/frame.c b/src/frame.c
index a36f71f8b1f..93a6e898c9b 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -2770,7 +2770,7 @@ the rightmost or bottommost possible position (that stays within the screen). *
2770 that is an index in this table. */ 2770 that is an index in this table. */
2771 2771
2772struct frame_parm_table { 2772struct frame_parm_table {
2773 char *name; 2773 const char *name;
2774 Lisp_Object *variable; 2774 Lisp_Object *variable;
2775}; 2775};
2776 2776
diff --git a/src/ftfont.c b/src/ftfont.c
index 27165e67428..b99e50ca3ff 100644
--- a/src/ftfont.c
+++ b/src/ftfont.c
@@ -96,11 +96,11 @@ Lisp_Object ftfont_font_format (FcPattern *, Lisp_Object);
96static struct 96static struct
97{ 97{
98 /* registry name */ 98 /* registry name */
99 char *name; 99 const char *name;
100 /* characters to distinguish the charset from the others */ 100 /* characters to distinguish the charset from the others */
101 int uniquifier[6]; 101 int uniquifier[6];
102 /* additional constraint by language */ 102 /* additional constraint by language */
103 char *lang; 103 const char *lang;
104 /* set on demand */ 104 /* set on demand */
105 FcCharSet *fc_charset; 105 FcCharSet *fc_charset;
106} fc_charset_table[] = 106} fc_charset_table[] =
@@ -691,12 +691,8 @@ ftfont_get_open_type_spec (Lisp_Object otf_spec)
691 return spec; 691 return spec;
692} 692}
693 693
694static FcPattern *ftfont_spec_pattern (Lisp_Object, char *,
695 struct OpenTypeSpec **,
696 char **langname);
697
698static FcPattern * 694static FcPattern *
699ftfont_spec_pattern (Lisp_Object spec, char *otlayout, struct OpenTypeSpec **otspec, char **langname) 695ftfont_spec_pattern (Lisp_Object spec, char *otlayout, struct OpenTypeSpec **otspec, const char **langname)
700{ 696{
701 Lisp_Object tmp, extra; 697 Lisp_Object tmp, extra;
702 FcPattern *pattern = NULL; 698 FcPattern *pattern = NULL;
@@ -866,7 +862,7 @@ ftfont_list (Lisp_Object frame, Lisp_Object spec)
866 char otlayout[15]; /* For "otlayout:XXXX" */ 862 char otlayout[15]; /* For "otlayout:XXXX" */
867 struct OpenTypeSpec *otspec = NULL; 863 struct OpenTypeSpec *otspec = NULL;
868 int spacing = -1; 864 int spacing = -1;
869 char *langname = NULL; 865 const char *langname = NULL;
870 866
871 if (! fc_initialized) 867 if (! fc_initialized)
872 { 868 {
@@ -1057,7 +1053,7 @@ ftfont_match (Lisp_Object frame, Lisp_Object spec)
1057 FcResult result; 1053 FcResult result;
1058 char otlayout[15]; /* For "otlayout:XXXX" */ 1054 char otlayout[15]; /* For "otlayout:XXXX" */
1059 struct OpenTypeSpec *otspec = NULL; 1055 struct OpenTypeSpec *otspec = NULL;
1060 char *langname = NULL; 1056 const char *langname = NULL;
1061 1057
1062 if (! fc_initialized) 1058 if (! fc_initialized)
1063 { 1059 {
@@ -2630,7 +2626,7 @@ ftfont_filter_properties (Lisp_Object font, Lisp_Object alist)
2630 2626
2631 if (strcmp (ftfont_booleans[i], keystr) == 0) 2627 if (strcmp (ftfont_booleans[i], keystr) == 0)
2632 { 2628 {
2633 char *str = SYMBOLP (val) ? SDATA (SYMBOL_NAME (val)) : NULL; 2629 const char *str = SYMBOLP (val) ? SDATA (SYMBOL_NAME (val)) : NULL;
2634 if (INTEGERP (val)) str = XINT (val) != 0 ? "true" : "false"; 2630 if (INTEGERP (val)) str = XINT (val) != 0 ? "true" : "false";
2635 if (str == NULL) str = "true"; 2631 if (str == NULL) str = "true";
2636 2632
diff --git a/src/gtkutil.c b/src/gtkutil.c
index 840a4633cdd..bef52afd9e8 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -2370,7 +2370,7 @@ create_menus (widget_value *data,
2370 Returns the widget created. */ 2370 Returns the widget created. */
2371 2371
2372GtkWidget * 2372GtkWidget *
2373xg_create_widget (char *type, char *name, FRAME_PTR f, widget_value *val, 2373xg_create_widget (const char *type, const char *name, FRAME_PTR f, widget_value *val,
2374 GCallback select_cb, GCallback deactivate_cb, 2374 GCallback select_cb, GCallback deactivate_cb,
2375 GCallback highlight_cb) 2375 GCallback highlight_cb)
2376{ 2376{
@@ -3233,7 +3233,7 @@ xg_create_scroll_bar (FRAME_PTR f,
3233 struct scroll_bar *bar, 3233 struct scroll_bar *bar,
3234 GCallback scroll_callback, 3234 GCallback scroll_callback,
3235 GCallback end_callback, 3235 GCallback end_callback,
3236 char *scroll_bar_name) 3236 const char *scroll_bar_name)
3237{ 3237{
3238 GtkWidget *wscroll; 3238 GtkWidget *wscroll;
3239 GtkWidget *webox; 3239 GtkWidget *webox;
diff --git a/src/gtkutil.h b/src/gtkutil.h
index 9748b07cca0..b09c82aeb0e 100644
--- a/src/gtkutil.h
+++ b/src/gtkutil.h
@@ -135,8 +135,8 @@ extern char *xg_get_file_name (FRAME_PTR f,
135 135
136extern char *xg_get_font_name (FRAME_PTR f, char *); 136extern char *xg_get_font_name (FRAME_PTR f, char *);
137 137
138extern GtkWidget *xg_create_widget (char *type, 138extern GtkWidget *xg_create_widget (const char *type,
139 char *name, 139 const char *name,
140 FRAME_PTR f, 140 FRAME_PTR f,
141 widget_value *val, 141 widget_value *val,
142 GCallback select_cb, 142 GCallback select_cb,
@@ -163,7 +163,7 @@ extern void xg_create_scroll_bar (FRAME_PTR f,
163 struct scroll_bar *bar, 163 struct scroll_bar *bar,
164 GCallback scroll_callback, 164 GCallback scroll_callback,
165 GCallback end_callback, 165 GCallback end_callback,
166 char *scroll_bar_name); 166 const char *scroll_bar_name);
167extern void xg_remove_scroll_bar (FRAME_PTR f, int scrollbar_id); 167extern void xg_remove_scroll_bar (FRAME_PTR f, int scrollbar_id);
168 168
169extern void xg_update_scrollbar_pos (FRAME_PTR f, 169extern void xg_update_scrollbar_pos (FRAME_PTR f,
diff --git a/src/image.c b/src/image.c
index 0ae8bf10399..34d89d2e195 100644
--- a/src/image.c
+++ b/src/image.c
@@ -598,7 +598,7 @@ Lisp_Object Vimage_cache_eviction_delay;
598 598
599static Lisp_Object define_image_type (struct image_type *type, int loaded); 599static Lisp_Object define_image_type (struct image_type *type, int loaded);
600static struct image_type *lookup_image_type (Lisp_Object symbol); 600static struct image_type *lookup_image_type (Lisp_Object symbol);
601static void image_error (char *format, Lisp_Object, Lisp_Object); 601static void image_error (const char *format, Lisp_Object, Lisp_Object);
602static void x_laplace (struct frame *, struct image *); 602static void x_laplace (struct frame *, struct image *);
603static void x_emboss (struct frame *, struct image *); 603static void x_emboss (struct frame *, struct image *);
604static int x_build_heuristic_mask (struct frame *, struct image *, 604static int x_build_heuristic_mask (struct frame *, struct image *,
@@ -699,7 +699,7 @@ valid_image_p (Lisp_Object object)
699 therefore simply displays a message. */ 699 therefore simply displays a message. */
700 700
701static void 701static void
702image_error (char *format, Lisp_Object arg1, Lisp_Object arg2) 702image_error (const char *format, Lisp_Object arg1, Lisp_Object arg2)
703{ 703{
704 add_to_log (format, arg1, arg2); 704 add_to_log (format, arg1, arg2);
705} 705}
@@ -731,7 +731,7 @@ enum image_value_type
731struct image_keyword 731struct image_keyword
732{ 732{
733 /* Name of keyword. */ 733 /* Name of keyword. */
734 char *name; 734 const char *name;
735 735
736 /* The type of value allowed. */ 736 /* The type of value allowed. */
737 enum image_value_type type; 737 enum image_value_type type;
diff --git a/src/keymap.c b/src/keymap.c
index 175c39ce357..166ec4fa224 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -174,13 +174,13 @@ in case you use it as a menu with `x-popup-menu'. */)
174 initial_define_key (control_x_map, Ctl('X'), "exchange-point-and-mark"); */ 174 initial_define_key (control_x_map, Ctl('X'), "exchange-point-and-mark"); */
175 175
176void 176void
177initial_define_key (Lisp_Object keymap, int key, char *defname) 177initial_define_key (Lisp_Object keymap, int key, const char *defname)
178{ 178{
179 store_in_keymap (keymap, make_number (key), intern_c_string (defname)); 179 store_in_keymap (keymap, make_number (key), intern_c_string (defname));
180} 180}
181 181
182void 182void
183initial_define_lispy_key (Lisp_Object keymap, char *keyname, char *defname) 183initial_define_lispy_key (Lisp_Object keymap, const char *keyname, const char *defname)
184{ 184{
185 store_in_keymap (keymap, intern_c_string (keyname), intern_c_string (defname)); 185 store_in_keymap (keymap, intern_c_string (keyname), intern_c_string (defname));
186} 186}
diff --git a/src/keymap.h b/src/keymap.h
index 39471c9715e..b47d4e8aa5b 100644
--- a/src/keymap.h
+++ b/src/keymap.h
@@ -45,8 +45,8 @@ EXFUN (Fset_keymap_parent, 2);
45extern void describe_map_tree (Lisp_Object, int, Lisp_Object, Lisp_Object, 45extern void describe_map_tree (Lisp_Object, int, Lisp_Object, Lisp_Object,
46 char *, int, int, int, int); 46 char *, int, int, int, int);
47extern int current_minor_maps (Lisp_Object **, Lisp_Object **); 47extern int current_minor_maps (Lisp_Object **, Lisp_Object **);
48extern void initial_define_key (Lisp_Object, int, char *); 48extern void initial_define_key (Lisp_Object, int, const char *);
49extern void initial_define_lispy_key (Lisp_Object, char *, char *); 49extern void initial_define_lispy_key (Lisp_Object, const char *, const char *);
50extern void syms_of_keymap (void); 50extern void syms_of_keymap (void);
51extern void keys_of_keymap (void); 51extern void keys_of_keymap (void);
52 52
diff --git a/src/menu.c b/src/menu.c
index 460d9a5f493..ab20a47fba6 100644
--- a/src/menu.c
+++ b/src/menu.c
@@ -662,7 +662,7 @@ digest_single_submenu (int start, int end, int top_level_items)
662 { 662 {
663 /* Create a new pane. */ 663 /* Create a new pane. */
664 Lisp_Object pane_name, prefix; 664 Lisp_Object pane_name, prefix;
665 char *pane_string; 665 const char *pane_string;
666 666
667 panes_seen++; 667 panes_seen++;
668 668
diff --git a/src/xdisp.c b/src/xdisp.c
index 9ee1f874bb6..80df99fee48 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -430,7 +430,7 @@ Lisp_Object QCmap, QCpointer;
430Lisp_Object Qrect, Qcircle, Qpoly; 430Lisp_Object Qrect, Qcircle, Qpoly;
431 431
432/* Tool bar styles */ 432/* Tool bar styles */
433Lisp_Object Qtext, Qboth, Qboth_horiz, Qtext_image_horiz; 433Lisp_Object Qboth, Qboth_horiz, Qtext_image_horiz;
434 434
435/* Non-zero means print newline to stdout before next mini-buffer 435/* Non-zero means print newline to stdout before next mini-buffer
436 message. */ 436 message. */
@@ -992,12 +992,12 @@ static int display_line (struct it *);
992static int display_mode_lines (struct window *); 992static int display_mode_lines (struct window *);
993static int display_mode_line (struct window *, enum face_id, Lisp_Object); 993static int display_mode_line (struct window *, enum face_id, Lisp_Object);
994static int display_mode_element (struct it *, int, int, int, Lisp_Object, Lisp_Object, int); 994static int display_mode_element (struct it *, int, int, int, Lisp_Object, Lisp_Object, int);
995static int store_mode_line_string (char *, Lisp_Object, int, int, int, Lisp_Object); 995static int store_mode_line_string (const char *, Lisp_Object, int, int, int, Lisp_Object);
996static char *decode_mode_spec (struct window *, int, int, int, 996static const char *decode_mode_spec (struct window *, int, int, int,
997 Lisp_Object *); 997 Lisp_Object *);
998static void display_menu_bar (struct window *); 998static void display_menu_bar (struct window *);
999static int display_count_lines (int, int, int, int, int *); 999static int display_count_lines (int, int, int, int, int *);
1000static int display_string (unsigned char *, Lisp_Object, Lisp_Object, 1000static int display_string (const unsigned char *, Lisp_Object, Lisp_Object,
1001 EMACS_INT, EMACS_INT, struct it *, int, int, int, int); 1001 EMACS_INT, EMACS_INT, struct it *, int, int, int, int);
1002static void compute_line_metrics (struct it *); 1002static void compute_line_metrics (struct it *);
1003static void run_redisplay_end_trigger_hook (struct it *); 1003static void run_redisplay_end_trigger_hook (struct it *);
@@ -1020,7 +1020,7 @@ static int next_element_from_stretch (struct it *);
1020static void load_overlay_strings (struct it *, int); 1020static void load_overlay_strings (struct it *, int);
1021static int init_from_display_pos (struct it *, struct window *, 1021static int init_from_display_pos (struct it *, struct window *,
1022 struct display_pos *); 1022 struct display_pos *);
1023static void reseat_to_string (struct it *, unsigned char *, 1023static void reseat_to_string (struct it *, const unsigned char *,
1024 Lisp_Object, int, int, int, int); 1024 Lisp_Object, int, int, int, int);
1025static enum move_it_result 1025static enum move_it_result
1026 move_it_in_display_line_to (struct it *, EMACS_INT, int, 1026 move_it_in_display_line_to (struct it *, EMACS_INT, int,
@@ -1035,8 +1035,8 @@ static int forward_to_next_line_start (struct it *, int *);
1035static struct text_pos string_pos_nchars_ahead (struct text_pos, 1035static struct text_pos string_pos_nchars_ahead (struct text_pos,
1036 Lisp_Object, int); 1036 Lisp_Object, int);
1037static struct text_pos string_pos (int, Lisp_Object); 1037static struct text_pos string_pos (int, Lisp_Object);
1038static struct text_pos c_string_pos (int, unsigned char *, int); 1038static struct text_pos c_string_pos (int, const unsigned char *, int);
1039static int number_of_chars (unsigned char *, int); 1039static int number_of_chars (const unsigned char *, int);
1040static void compute_stop_pos (struct it *); 1040static void compute_stop_pos (struct it *);
1041static void compute_string_pos (struct text_pos *, struct text_pos, 1041static void compute_string_pos (struct text_pos *, struct text_pos,
1042 Lisp_Object); 1042 Lisp_Object);
@@ -1548,7 +1548,7 @@ string_pos (int charpos, Lisp_Object string)
1548 means recognize multibyte characters. */ 1548 means recognize multibyte characters. */
1549 1549
1550static struct text_pos 1550static struct text_pos
1551c_string_pos (int charpos, unsigned char *s, int multibyte_p) 1551c_string_pos (int charpos, const unsigned char *s, int multibyte_p)
1552{ 1552{
1553 struct text_pos pos; 1553 struct text_pos pos;
1554 1554
@@ -1580,7 +1580,7 @@ c_string_pos (int charpos, unsigned char *s, int multibyte_p)
1580 non-zero means recognize multibyte characters. */ 1580 non-zero means recognize multibyte characters. */
1581 1581
1582static int 1582static int
1583number_of_chars (unsigned char *s, int multibyte_p) 1583number_of_chars (const unsigned char *s, int multibyte_p)
1584{ 1584{
1585 int nchars; 1585 int nchars;
1586 1586
@@ -5581,7 +5581,7 @@ reseat_1 (struct it *it, struct text_pos pos, int set_stop_p)
5581 calling this function. */ 5581 calling this function. */
5582 5582
5583static void 5583static void
5584reseat_to_string (struct it *it, unsigned char *s, Lisp_Object string, 5584reseat_to_string (struct it *it, const unsigned char *s, Lisp_Object string,
5585 int charpos, int precision, int field_width, int multibyte) 5585 int charpos, int precision, int field_width, int multibyte)
5586{ 5586{
5587 /* No region in strings. */ 5587 /* No region in strings. */
@@ -18538,7 +18538,7 @@ display_mode_element (struct it *it, int depth, int field_width, int precision,
18538 { 18538 {
18539 int multibyte; 18539 int multibyte;
18540 int bytepos, charpos; 18540 int bytepos, charpos;
18541 unsigned char *spec; 18541 const unsigned char *spec;
18542 Lisp_Object string; 18542 Lisp_Object string;
18543 18543
18544 bytepos = percent_position; 18544 bytepos = percent_position;
@@ -18808,7 +18808,7 @@ display_mode_element (struct it *it, int depth, int field_width, int precision,
18808 */ 18808 */
18809 18809
18810static int 18810static int
18811store_mode_line_string (char *string, Lisp_Object lisp_string, int copy_string, 18811store_mode_line_string (const char *string, Lisp_Object lisp_string, int copy_string,
18812 int field_width, int precision, Lisp_Object props) 18812 int field_width, int precision, Lisp_Object props)
18813{ 18813{
18814 int len; 18814 int len;
@@ -19224,7 +19224,7 @@ decode_mode_spec_coding (Lisp_Object coding_system, register char *buf, int eol_
19224 19224
19225static char lots_of_dashes[] = "--------------------------------------------------------------------------------------------------------------------------------------------"; 19225static char lots_of_dashes[] = "--------------------------------------------------------------------------------------------------------------------------------------------";
19226 19226
19227static char * 19227static const char *
19228decode_mode_spec (struct window *w, register int c, int field_width, 19228decode_mode_spec (struct window *w, register int c, int field_width,
19229 int precision, Lisp_Object *string) 19229 int precision, Lisp_Object *string)
19230{ 19230{
@@ -19784,7 +19784,7 @@ display_count_lines (int start, int start_byte, int limit_byte, int count,
19784 Value is the number of columns displayed. */ 19784 Value is the number of columns displayed. */
19785 19785
19786static int 19786static int
19787display_string (unsigned char *string, Lisp_Object lisp_string, Lisp_Object face_string, 19787display_string (const unsigned char *string, Lisp_Object lisp_string, Lisp_Object face_string,
19788 EMACS_INT face_string_pos, EMACS_INT start, struct it *it, 19788 EMACS_INT face_string_pos, EMACS_INT start, struct it *it,
19789 int field_width, int precision, int max_x, int multibyte) 19789 int field_width, int precision, int max_x, int multibyte)
19790{ 19790{
diff --git a/src/xfns.c b/src/xfns.c
index ecf7e150b0c..249aa6998c3 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -501,7 +501,7 @@ void x_set_scroll_bar_background (struct frame *, Lisp_Object,
501static Lisp_Object x_default_scroll_bar_color_parameter (struct frame *, 501static Lisp_Object x_default_scroll_bar_color_parameter (struct frame *,
502 Lisp_Object, 502 Lisp_Object,
503 Lisp_Object, 503 Lisp_Object,
504 char *, char *, 504 const char *, const char *,
505 int); 505 int);
506 506
507 507
@@ -1767,7 +1767,7 @@ x_set_scroll_bar_default_width (struct frame *f)
1767static Lisp_Object 1767static Lisp_Object
1768x_default_scroll_bar_color_parameter (struct frame *f, 1768x_default_scroll_bar_color_parameter (struct frame *f,
1769 Lisp_Object alist, Lisp_Object prop, 1769 Lisp_Object alist, Lisp_Object prop,
1770 char *xprop, char *xclass, 1770 const char *xprop, const char *xclass,
1771 int foreground_p) 1771 int foreground_p)
1772{ 1772{
1773 struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); 1773 struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
@@ -2138,7 +2138,7 @@ xic_create_xfontset (struct frame *f)
2138 } 2138 }
2139 if (! xfs) 2139 if (! xfs)
2140 { 2140 {
2141 char *last_resort = "-*-*-*-r-normal--*-*-*-*-*-*"; 2141 const char *last_resort = "-*-*-*-r-normal--*-*-*-*-*-*";
2142 2142
2143 missing_list = NULL; 2143 missing_list = NULL;
2144 xfs = XCreateFontSet (FRAME_X_DISPLAY (f), last_resort, 2144 xfs = XCreateFontSet (FRAME_X_DISPLAY (f), last_resort,
@@ -3011,7 +3011,7 @@ x_default_font_parameter (struct frame *f, Lisp_Object parms)
3011 3011
3012 if (! FONTP (font) && ! STRINGP (font)) 3012 if (! FONTP (font) && ! STRINGP (font))
3013 { 3013 {
3014 char *names[] 3014 const char *names[]
3015 = { 3015 = {
3016#ifdef HAVE_XFT 3016#ifdef HAVE_XFT
3017 /* This will find the normal Xft font. */ 3017 /* This will find the normal Xft font. */
@@ -3740,7 +3740,7 @@ If omitted or nil, that stands for the selected frame's display. */)
3740 (Lisp_Object terminal) 3740 (Lisp_Object terminal)
3741{ 3741{
3742 struct x_display_info *dpyinfo = check_x_display_info (terminal); 3742 struct x_display_info *dpyinfo = check_x_display_info (terminal);
3743 char *vendor = ServerVendor (dpyinfo->display); 3743 const char *vendor = ServerVendor (dpyinfo->display);
3744 3744
3745 if (! vendor) vendor = ""; 3745 if (! vendor) vendor = "";
3746 return build_string (vendor); 3746 return build_string (vendor);
@@ -3934,7 +3934,7 @@ x_screen_planes (register struct frame *f)
3934 3934
3935static struct visual_class 3935static struct visual_class
3936{ 3936{
3937 char *name; 3937 const char *name;
3938 int class; 3938 int class;
3939} 3939}
3940visual_classes[] = 3940visual_classes[] =
diff --git a/src/xfont.c b/src/xfont.c
index 5d9e126943e..368587de6d8 100644
--- a/src/xfont.c
+++ b/src/xfont.c
@@ -334,7 +334,7 @@ xfont_supported_scripts (Display *display, char *fontname, Lisp_Object props,
334} 334}
335 335
336static Lisp_Object 336static Lisp_Object
337xfont_list_pattern (Display *display, char *pattern, 337xfont_list_pattern (Display *display, const char *pattern,
338 Lisp_Object registry, Lisp_Object script) 338 Lisp_Object registry, Lisp_Object script)
339{ 339{
340 Lisp_Object list = Qnil; 340 Lisp_Object list = Qnil;
diff --git a/src/xterm.c b/src/xterm.c
index 1be279d0206..e6bf82ab5a5 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -22,11 +22,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
22/* Xt features made by Fred Pierresteguy. */ 22/* Xt features made by Fred Pierresteguy. */
23 23
24#include <config.h> 24#include <config.h>
25
26/* On 4.3 these lose if they come after xterm.h. */
27/* Putting these at the beginning seems to be standard for other .c files. */
28#include <signal.h> 25#include <signal.h>
29
30#include <stdio.h> 26#include <stdio.h>
31#include <setjmp.h> 27#include <setjmp.h>
32 28
@@ -107,11 +103,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
107#include "../lwlib/xlwmenu.h" 103#include "../lwlib/xlwmenu.h"
108#endif 104#endif
109 105
110#if defined (USE_X_TOOLKIT) || defined (USE_GTK)
111
112extern void free_frame_menubar (struct frame *);
113#endif
114
115#ifdef USE_X_TOOLKIT 106#ifdef USE_X_TOOLKIT
116#if !defined(NO_EDITRES) 107#if !defined(NO_EDITRES)
117#define HACK_EDITRES 108#define HACK_EDITRES
@@ -4380,7 +4371,7 @@ xaw_scroll_callback (Widget widget, XtPointer client_data, XtPointer call_data)
4380static void 4371static void
4381x_create_toolkit_scroll_bar (struct frame *f, struct scroll_bar *bar) 4372x_create_toolkit_scroll_bar (struct frame *f, struct scroll_bar *bar)
4382{ 4373{
4383 char *scroll_bar_name = SCROLL_BAR_NAME; 4374 const char *scroll_bar_name = SCROLL_BAR_NAME;
4384 4375
4385 BLOCK_INPUT; 4376 BLOCK_INPUT;
4386 xg_create_scroll_bar (f, bar, G_CALLBACK (xg_scroll_callback), 4377 xg_create_scroll_bar (f, bar, G_CALLBACK (xg_scroll_callback),