diff options
| author | Dan Nicolaescu | 2010-08-09 02:35:21 -0700 |
|---|---|---|
| committer | Dan Nicolaescu | 2010-08-09 02:35:21 -0700 |
| commit | 8ea90aa3525a93194e98b7e1b2ea77e96ca3dde6 (patch) | |
| tree | d2719f3f91a5aeac252e14e777ceea6aea06527d /src/gtkutil.c | |
| parent | 443c2c0301d7d69efa875510d7a4530573b5e76c (diff) | |
| download | emacs-8ea90aa3525a93194e98b7e1b2ea77e96ca3dde6.tar.gz emacs-8ea90aa3525a93194e98b7e1b2ea77e96ca3dde6.zip | |
Use const char* instead of char*.
Reduce the number of warnings with -Wwrite-strings.
* src/xrdb.c (get_environ_db, get_system_name):
* src/unexelf.c (find_section):
* src/term.c (string_cost, string_cost_one_line, per_line_cost)
(get_named_tty, init_tty):
* src/sysdep.c (sys_subshell):
* src/sound.c (sound_perror, sound_warning, vox_open, vox_init)
(alsa_sound_perror, alsa_open, alsa_configure, alsa_init):
* src/search.c (Freplace_match):
* src/process.c (Fmake_network_process, send_process, init_process):
* src/lread.c (Fload, init_lread):
* src/keymap.c (Fdescribe_buffer_bindings, describe_map_tree):
* src/keyboard.c (parse_tool_bar_item, struct event_head):
* src/gtkutil.h (xg_get_font_name):
* src/gtkutil.c (get_dialog_title, create_dialog, xg_get_font_name)
(make_widget_for_menu_item, make_menu_item, create_menus)
(xg_make_tool_item):
* src/font.c (parse_matrix, font_parse_name):
* src/floatfns.c (rounding_driver, float_error_fn_name):
* src/filelock.c (get_boot_time_1, lock_file_1):
* src/fileio.c (barf_or_query_if_file_exists, check_writable):
* src/editfns.c (get_system_name, get_operating_system_release)
(Fencode_time, Fset_time_zone_rule):
* src/dispextern.h (string_cost, per_line_cost, get_named_tty, init_tty):
* src/buffer.c (defvar_per_buffer): Use const.
Diffstat (limited to 'src/gtkutil.c')
| -rw-r--r-- | src/gtkutil.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/gtkutil.c b/src/gtkutil.c index bef52afd9e8..b1591b79f9c 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c | |||
| @@ -1183,10 +1183,10 @@ xg_set_frame_icon (FRAME_PTR f, Pixmap icon_pixmap, Pixmap icon_mask) | |||
| 1183 | /* Return the dialog title to use for a dialog of type KEY. | 1183 | /* Return the dialog title to use for a dialog of type KEY. |
| 1184 | This is the encoding used by lwlib. We use the same for GTK. */ | 1184 | This is the encoding used by lwlib. We use the same for GTK. */ |
| 1185 | 1185 | ||
| 1186 | static char * | 1186 | static const char * |
| 1187 | get_dialog_title (char key) | 1187 | get_dialog_title (char key) |
| 1188 | { | 1188 | { |
| 1189 | char *title = ""; | 1189 | const char *title = ""; |
| 1190 | 1190 | ||
| 1191 | switch (key) { | 1191 | switch (key) { |
| 1192 | case 'E': case 'e': | 1192 | case 'E': case 'e': |
| @@ -1243,7 +1243,7 @@ create_dialog (widget_value *wv, | |||
| 1243 | GCallback select_cb, | 1243 | GCallback select_cb, |
| 1244 | GCallback deactivate_cb) | 1244 | GCallback deactivate_cb) |
| 1245 | { | 1245 | { |
| 1246 | char *title = get_dialog_title (wv->name[0]); | 1246 | const char *title = get_dialog_title (wv->name[0]); |
| 1247 | int total_buttons = wv->name[1] - '0'; | 1247 | int total_buttons = wv->name[1] - '0'; |
| 1248 | int right_buttons = wv->name[4] - '0'; | 1248 | int right_buttons = wv->name[4] - '0'; |
| 1249 | int left_buttons; | 1249 | int left_buttons; |
| @@ -1761,7 +1761,7 @@ xg_get_file_name (FRAME_PTR f, | |||
| 1761 | DEFAULT_NAME, if non-zero, is the default font name. */ | 1761 | DEFAULT_NAME, if non-zero, is the default font name. */ |
| 1762 | 1762 | ||
| 1763 | char * | 1763 | char * |
| 1764 | xg_get_font_name (FRAME_PTR f, char *default_name) | 1764 | xg_get_font_name (FRAME_PTR f, const char *default_name) |
| 1765 | { | 1765 | { |
| 1766 | GtkWidget *w; | 1766 | GtkWidget *w; |
| 1767 | char *fontname = NULL; | 1767 | char *fontname = NULL; |
| @@ -1971,7 +1971,7 @@ menu_destroy_callback (GtkWidget *w, gpointer client_data) | |||
| 1971 | Returns the GtkHBox. */ | 1971 | Returns the GtkHBox. */ |
| 1972 | 1972 | ||
| 1973 | static GtkWidget * | 1973 | static GtkWidget * |
| 1974 | make_widget_for_menu_item (char *utf8_label, char *utf8_key) | 1974 | make_widget_for_menu_item (const char *utf8_label, const char *utf8_key) |
| 1975 | { | 1975 | { |
| 1976 | GtkWidget *wlbl; | 1976 | GtkWidget *wlbl; |
| 1977 | GtkWidget *wkey; | 1977 | GtkWidget *wkey; |
| @@ -2009,8 +2009,8 @@ make_widget_for_menu_item (char *utf8_label, char *utf8_key) | |||
| 2009 | but the MacOS X version doesn't either, so I guess that is OK. */ | 2009 | but the MacOS X version doesn't either, so I guess that is OK. */ |
| 2010 | 2010 | ||
| 2011 | static GtkWidget * | 2011 | static GtkWidget * |
| 2012 | make_menu_item (char *utf8_label, | 2012 | make_menu_item (const char *utf8_label, |
| 2013 | char *utf8_key, | 2013 | const char *utf8_key, |
| 2014 | widget_value *item, | 2014 | widget_value *item, |
| 2015 | GSList **group) | 2015 | GSList **group) |
| 2016 | { | 2016 | { |
| @@ -2238,7 +2238,7 @@ create_menus (widget_value *data, | |||
| 2238 | int add_tearoff_p, | 2238 | int add_tearoff_p, |
| 2239 | GtkWidget *topmenu, | 2239 | GtkWidget *topmenu, |
| 2240 | xg_menu_cb_data *cl_data, | 2240 | xg_menu_cb_data *cl_data, |
| 2241 | char *name) | 2241 | const char *name) |
| 2242 | { | 2242 | { |
| 2243 | widget_value *item; | 2243 | widget_value *item; |
| 2244 | GtkWidget *wmenu = topmenu; | 2244 | GtkWidget *wmenu = topmenu; |
| @@ -3977,7 +3977,7 @@ static GtkToolItem * | |||
| 3977 | xg_make_tool_item (FRAME_PTR f, | 3977 | xg_make_tool_item (FRAME_PTR f, |
| 3978 | GtkWidget *wimage, | 3978 | GtkWidget *wimage, |
| 3979 | GtkWidget **wbutton, | 3979 | GtkWidget **wbutton, |
| 3980 | char *label, | 3980 | const char *label, |
| 3981 | int i) | 3981 | int i) |
| 3982 | { | 3982 | { |
| 3983 | GtkToolItem *ti = gtk_tool_item_new (); | 3983 | GtkToolItem *ti = gtk_tool_item_new (); |