diff options
| author | Jan D | 2010-07-05 11:17:12 +0200 |
|---|---|---|
| committer | Jan D | 2010-07-05 11:17:12 +0200 |
| commit | e4c8d29a32adbde811a109d5e19caa75fd9d042b (patch) | |
| tree | ffaa67180bd87eae947408a76cddecaaa1c227b0 /src/xsettings.c | |
| parent | 898b4c5c2cb4b4ae2fa2cd1631db63a9acff787a (diff) | |
| download | emacs-e4c8d29a32adbde811a109d5e19caa75fd9d042b.tar.gz emacs-e4c8d29a32adbde811a109d5e19caa75fd9d042b.zip | |
Fix some bad prototypes and formatting after conversion from K&R declaration.
* lwlib/lwlib-Xaw.c: Include <ctype.h> for isdigit.
(fill_xft_data, set_text): Remove unused variable screen.
(draw_text): Cast bp to FcChar8*.
(find_xft_data): Return 0 if inst or xft_data is not set.
(wm_delete_window): Correct prototype. Initialize widget to 0
and return if widget is still 0 after loop.
* lwlib/xlwmenu.c (XlwMenuSetValues, XlwMenuInitialize): Correct prototype.
(display_menu_item): Remove unused variable gi.
(make_windows_if_needed): Remove unused variable screen.
(XlwMenuRedisplay): Remove unused variable i.
* src/gtkutil.c (xg_get_pixbuf_from_pix_and_mask)
(xg_get_image_for_pixmap, create_dialog)
(xg_get_file_with_selection, xg_get_file_name, update_cl_data)
(menuitem_highlight_callback, make_menu_item)
(xg_create_one_menuitem, create_menus, xg_update_menu_item)
(xg_create_scroll_bar, xg_update_scrollbar_pos)
(xg_set_toolkit_scroll_bar_thumb, xg_tool_bar_button_cb)
(xg_tool_bar_proxy_help_callback, xg_tool_bar_detach_callback)
(xg_tool_bar_attach_callback, xg_tool_bar_help_callback)
(xg_tool_bar_item_expose_callback): Reformat prototype.
(xg_update_menubar): GList *group => GSList *group.
(xg_modify_menubar_widgets): Initialize witem to 0, check witem != 0
before use.
(update_frame_tool_bar): 4:th param to xg_get_image_for_pixmap changed
to GTK_IMAGE (wimage).
* src/xsettings.c (something_changedCB, parse_settings)
(apply_xft_settings): Reformat prototype.
(something_changedCB, init_gconf): Remove unused variable i.
(read_settings): Remove unused variable long_len.
* src/xsmfns.c (SSDATA): New macro.
(smc_save_yourself_CB, x_session_initialize): Use SSDATA for strings
passed to strlen/strcpy/strcat.
(create_client_leader_window): Surround with #ifndef USE_GTK. Cast
7:th arg to XChangeProperty to (unsigned char *)
Diffstat (limited to 'src/xsettings.c')
| -rw-r--r-- | src/xsettings.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/xsettings.c b/src/xsettings.c index e8aba9ef2d8..a8c89f5fb3d 100644 --- a/src/xsettings.c +++ b/src/xsettings.c | |||
| @@ -100,7 +100,10 @@ struct xsettings | |||
| 100 | that is SYSTEM_MONO_FONT. */ | 100 | that is SYSTEM_MONO_FONT. */ |
| 101 | 101 | ||
| 102 | static void | 102 | static void |
| 103 | something_changedCB (GConfClient *client, guint cnxn_id, GConfEntry *entry, gpointer user_data) | 103 | something_changedCB (GConfClient *client, |
| 104 | guint cnxn_id, | ||
| 105 | GConfEntry *entry, | ||
| 106 | gpointer user_data) | ||
| 104 | { | 107 | { |
| 105 | GConfValue *v = gconf_entry_get_value (entry); | 108 | GConfValue *v = gconf_entry_get_value (entry); |
| 106 | 109 | ||
| @@ -108,7 +111,6 @@ something_changedCB (GConfClient *client, guint cnxn_id, GConfEntry *entry, gpoi | |||
| 108 | if (v->type == GCONF_VALUE_STRING) | 111 | if (v->type == GCONF_VALUE_STRING) |
| 109 | { | 112 | { |
| 110 | const char *value = gconf_value_get_string (v); | 113 | const char *value = gconf_value_get_string (v); |
| 111 | int i; | ||
| 112 | if (current_mono_font != NULL && strcmp (value, current_mono_font) == 0) | 114 | if (current_mono_font != NULL && strcmp (value, current_mono_font) == 0) |
| 113 | return; /* No change. */ | 115 | return; /* No change. */ |
| 114 | 116 | ||
| @@ -222,7 +224,9 @@ get_prop_window (struct x_display_info *dpyinfo) | |||
| 222 | */ | 224 | */ |
| 223 | 225 | ||
| 224 | static int | 226 | static int |
| 225 | parse_settings (unsigned char *prop, long unsigned int bytes, struct xsettings *settings) | 227 | parse_settings (unsigned char *prop, |
| 228 | long unsigned int bytes, | ||
| 229 | struct xsettings *settings) | ||
| 226 | { | 230 | { |
| 227 | Lisp_Object byteorder = Fbyteorder (); | 231 | Lisp_Object byteorder = Fbyteorder (); |
| 228 | int my_bo = XFASTINT (byteorder) == 'B' ? MSBFirst : LSBFirst; | 232 | int my_bo = XFASTINT (byteorder) == 'B' ? MSBFirst : LSBFirst; |
| @@ -394,7 +398,6 @@ parse_settings (unsigned char *prop, long unsigned int bytes, struct xsettings * | |||
| 394 | static int | 398 | static int |
| 395 | read_settings (struct x_display_info *dpyinfo, struct xsettings *settings) | 399 | read_settings (struct x_display_info *dpyinfo, struct xsettings *settings) |
| 396 | { | 400 | { |
| 397 | long long_len; | ||
| 398 | Atom act_type; | 401 | Atom act_type; |
| 399 | int act_form; | 402 | int act_form; |
| 400 | unsigned long nitems, bytes_after; | 403 | unsigned long nitems, bytes_after; |
| @@ -423,7 +426,9 @@ read_settings (struct x_display_info *dpyinfo, struct xsettings *settings) | |||
| 423 | 426 | ||
| 424 | 427 | ||
| 425 | static void | 428 | static void |
| 426 | apply_xft_settings (struct x_display_info *dpyinfo, int send_event_p, struct xsettings *settings) | 429 | apply_xft_settings (struct x_display_info *dpyinfo, |
| 430 | int send_event_p, | ||
| 431 | struct xsettings *settings) | ||
| 427 | { | 432 | { |
| 428 | #ifdef HAVE_XFT | 433 | #ifdef HAVE_XFT |
| 429 | FcPattern *pat; | 434 | FcPattern *pat; |
| @@ -620,7 +625,6 @@ static void | |||
| 620 | init_gconf (void) | 625 | init_gconf (void) |
| 621 | { | 626 | { |
| 622 | #if defined (HAVE_GCONF) && defined (HAVE_XFT) | 627 | #if defined (HAVE_GCONF) && defined (HAVE_XFT) |
| 623 | int i; | ||
| 624 | char *s; | 628 | char *s; |
| 625 | 629 | ||
| 626 | g_type_init (); | 630 | g_type_init (); |