4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
11 Problem: Some more compiler warnings when using gcc -Wextra.
12 Solution: Add UNUSED and type casts. Autoconf check for wchar_t.
13 Files: src/auto/configure, src/config.h.in, src/configure.in,
14 src/gui_athena.c, src/gui_x11.c, src/gui.c, src/gui_beval.c,
15 src/gui_at_sb.c, src/gui_at_fs.c, src/gui_motif.c,
16 src/gui_xmdlg.c, src/gui_xmebw.c, src/if_python.c, src/window.c,
20 *** ../vim-7.2.183/src/auto/configure 2009-05-21 15:19:59.000000000 +0200
21 --- src/auto/configure 2009-05-21 16:05:01.000000000 +0200
26 LDFLAGS="$ac_save_LDFLAGS"
28 + { $as_echo "$as_me:$LINENO: checking size of wchar_t is 2 bytes" >&5
29 + $as_echo_n "checking size of wchar_t is 2 bytes... " >&6; }
30 + if test "${ac_cv_small_wchar_t+set}" = set; then
31 + $as_echo_n "(cached) " >&6
33 + if test "$cross_compiling" = yes; then
34 + { { $as_echo "$as_me:$LINENO: error: failed to compile test program" >&5
35 + $as_echo "$as_me: error: failed to compile test program" >&2;}
36 + { (exit 1); exit 1; }; }
38 + cat >conftest.$ac_ext <<_ACEOF
41 + cat confdefs.h >>conftest.$ac_ext
42 + cat >>conftest.$ac_ext <<_ACEOF
43 + /* end confdefs.h. */
45 + #include <X11/Xlib.h>
47 + # include <stdlib.h>
48 + # include <stddef.h>
52 + if (sizeof(wchar_t) <= 2)
57 + rm -f conftest$ac_exeext
58 + if { (ac_try="$ac_link"
60 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
61 + *) ac_try_echo=$ac_try;;
63 + eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
64 + $as_echo "$ac_try_echo") >&5
65 + (eval "$ac_link") 2>&5
67 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
68 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
69 + { (case "(($ac_try" in
70 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
71 + *) ac_try_echo=$ac_try;;
73 + eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
74 + $as_echo "$ac_try_echo") >&5
75 + (eval "$ac_try") 2>&5
77 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
78 + (exit $ac_status); }; }; then
79 + ac_cv_small_wchar_t="no"
81 + $as_echo "$as_me: program exited with status $ac_status" >&5
82 + $as_echo "$as_me: failed program was:" >&5
83 + sed 's/^/| /' conftest.$ac_ext >&5
86 + ac_cv_small_wchar_t="yes"
88 + rm -rf conftest.dSYM
89 + rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
95 + { $as_echo "$as_me:$LINENO: result: $ac_cv_small_wchar_t" >&5
96 + $as_echo "$ac_cv_small_wchar_t" >&6; }
97 + if test "x$ac_cv_small_wchar_t" = "xyes" ; then
98 + cat >>confdefs.h <<\_ACEOF
99 + #define SMALL_WCHAR_T 1
114 #include "confdefs.h"
117 *** ../vim-7.2.183/src/config.h.in 2009-05-14 22:19:19.000000000 +0200
118 --- src/config.h.in 2009-05-21 15:44:24.000000000 +0200
122 /* Defined to the size of an int */
125 + /* Define when wchar_t is only 2 bytes. */
126 + #undef SMALL_WCHAR_T
129 * If we cannot trust one of the following from the libraries, we use our
130 * own safe but probably slower vim_memmove().
131 *** ../vim-7.2.183/src/configure.in 2009-05-21 15:19:59.000000000 +0200
132 --- src/configure.in 2009-05-21 16:04:56.000000000 +0200
137 LDFLAGS="$ac_save_LDFLAGS"
139 + AC_MSG_CHECKING(size of wchar_t is 2 bytes)
140 + AC_CACHE_VAL(ac_cv_small_wchar_t,
142 + #include <X11/Xlib.h>
144 + # include <stdlib.h>
145 + # include <stddef.h>
149 + if (sizeof(wchar_t) <= 2)
153 + ac_cv_small_wchar_t="no",
154 + ac_cv_small_wchar_t="yes",
155 + AC_MSG_ERROR(failed to compile test program))])
156 + AC_MSG_RESULT($ac_cv_small_wchar_t)
157 + if test "x$ac_cv_small_wchar_t" = "xyes" ; then
158 + AC_DEFINE(SMALL_WCHAR_T)
166 AC_MSG_RESULT($ac_cv_sizeof_int)
167 AC_DEFINE_UNQUOTED(SIZEOF_INT, $ac_cv_sizeof_int)
170 dnl Check for memmove() before bcopy(), makes memmove() be used when both are
171 dnl present, fixes problem with incompatibility between Solaris 2.4 and 2.5.
174 *** ../vim-7.2.183/src/gui_athena.c 2008-06-24 23:00:51.000000000 +0200
175 --- src/gui_athena.c 2009-05-21 16:39:43.000000000 +0200
178 * Scrollbar callback (XtNjumpProc) for when the scrollbar is dragged with the
179 * left or middle mouse button.
183 gui_athena_scroll_cb_jump(w, client_data, call_data)
185 XtPointer client_data, call_data;
187 scrollbar_T *sb, *sb_info;
189 * Scrollbar callback (XtNjumpProc) for when the scrollbar is dragged with the
190 * left or middle mouse button.
193 gui_athena_scroll_cb_jump(w, client_data, call_data)
195 XtPointer client_data, call_data;
197 scrollbar_T *sb, *sb_info;
200 * Scrollbar callback (XtNscrollProc) for paging up or down with the left or
201 * right mouse buttons.
205 gui_athena_scroll_cb_scroll(w, client_data, call_data)
207 XtPointer client_data, call_data;
209 scrollbar_T *sb, *sb_info;
211 * Scrollbar callback (XtNscrollProc) for paging up or down with the left or
212 * right mouse buttons.
215 gui_athena_scroll_cb_scroll(w, client_data, call_data)
217 XtPointer client_data, call_data;
219 scrollbar_T *sb, *sb_info;
222 if (menu->icon_builtin || gui_find_bitmap(menu->name, buf, "xpm") == FAIL)
224 if (menu->iconidx >= 0 && menu->iconidx
225 ! < (sizeof(built_in_pixmaps) / sizeof(built_in_pixmaps[0])))
226 xpm = built_in_pixmaps[menu->iconidx];
230 if (menu->icon_builtin || gui_find_bitmap(menu->name, buf, "xpm") == FAIL)
232 if (menu->iconidx >= 0 && menu->iconidx
233 ! < (int)(sizeof(built_in_pixmaps) / sizeof(built_in_pixmaps[0])))
234 xpm = built_in_pixmaps[menu->iconidx];
239 XtGetValues(XtParent(widget), args, n);
241 retval = num_children;
242 ! for (i = 0; i < num_children; ++i)
244 Widget current = children[i];
245 vimmenu_T *menu = NULL;
247 XtGetValues(XtParent(widget), args, n);
249 retval = num_children;
250 ! for (i = 0; i < (int)num_children; ++i)
252 Widget current = children[i];
253 vimmenu_T *menu = NULL;
261 gui_mch_add_menu(menu, idx)
265 char_u *pullright_name;
266 Dimension height, space, border;
272 gui_mch_add_menu(menu, idx)
276 char_u *pullright_name;
277 Dimension height, space, border;
280 XtVaGetValues(parent->submenu_id, XtNchildren, &children,
281 XtNnumChildren, &num_children,
283 ! for (i = 0; i < num_children; ++i)
285 XtVaSetValues(children[i],
286 XtNrightMargin, puller_width,
288 XtVaGetValues(parent->submenu_id, XtNchildren, &children,
289 XtNnumChildren, &num_children,
291 ! for (i = 0; i < (int)num_children; ++i)
293 XtVaSetValues(children[i],
294 XtNrightMargin, puller_width,
297 XtVaGetValues(id, XtNchildren, &children,
298 XtNnumChildren, &num_children,
300 ! for (i = 0; i < num_children; ++i)
302 if (children[i] == ignore)
305 XtVaGetValues(id, XtNchildren, &children,
306 XtNnumChildren, &num_children,
308 ! for (i = 0; i < (int)num_children; ++i)
310 if (children[i] == ignore)
319 gui_mch_add_menu_item(menu, idx)
323 vimmenu_T *parent = menu->parent;
330 gui_mch_add_menu_item(menu, idx)
334 vimmenu_T *parent = menu->parent;
338 XtNchildren, &children,
339 XtNnumChildren, &numChildren,
341 ! for (i = 0; i < numChildren; i++)
346 XtNchildren, &children,
347 XtNnumChildren, &numChildren,
349 ! for (i = 0; i < (int)numChildren; i++)
360 gui_mch_toggle_tearoffs(enable)
363 /* no tearoff menus */
370 gui_mch_toggle_tearoffs(enable)
373 /* no tearoff menus */
378 get_left_margin = True;
380 ! for (i = 0; i < num_children; ++i)
382 if (children[i] == menu->id)
386 get_left_margin = True;
388 ! for (i = 0; i < (int)num_children; ++i)
390 if (children[i] == menu->id)
399 gui_athena_menu_timeout(client_data, id)
400 XtPointer client_data;
403 Widget w = (Widget)client_data;
410 gui_athena_menu_timeout(client_data, id)
411 XtPointer client_data;
412 ! XtIntervalId *id UNUSED;
414 Widget w = (Widget)client_data;
419 * This is called when XtPopup() is called.
423 gui_athena_popup_callback(w, client_data, call_data)
425 XtPointer client_data;
426 ! XtPointer call_data;
428 /* Assumption: XtIsSubclass(XtParent(w),simpleMenuWidgetClass) */
429 vimmenu_T *menu = (vimmenu_T *)client_data;
432 * This is called when XtPopup() is called.
435 gui_athena_popup_callback(w, client_data, call_data)
437 XtPointer client_data;
438 ! XtPointer call_data UNUSED;
440 /* Assumption: XtIsSubclass(XtParent(w),simpleMenuWidgetClass) */
441 vimmenu_T *menu = (vimmenu_T *)client_data;
449 gui_athena_popdown_submenus_action(w, event, args, nargs)
459 gui_athena_delayed_arm_action(w, event, args, nargs)
464 * (XtIsSubclass(popup,simpleMenuWidgetClass) == True) */
469 gui_mch_show_popupmenu(menu)
474 * Put up a file requester.
475 * Returns the selected name in allocated memory, or NULL for Cancel.
479 gui_mch_browse(saving, title, dflt, ext, initdir, filter)
480 ! int saving; /* select file to write */
481 ! char_u *title; /* not used (title for the window) */
482 ! char_u *dflt; /* not used (default name) */
483 ! char_u *ext; /* not used (extension added) */
484 char_u *initdir; /* initial directory, NULL for current dir */
485 ! char_u *filter; /* not used (file name filter) */
488 char_u dirbuf[MAXPATHL];
490 * Put up a file requester.
491 * Returns the selected name in allocated memory, or NULL for Cancel.
494 gui_mch_browse(saving, title, dflt, ext, initdir, filter)
495 ! int saving UNUSED; /* select file to write */
496 ! char_u *title; /* title for the window */
497 ! char_u *dflt; /* default name */
498 ! char_u *ext UNUSED; /* extension added */
499 char_u *initdir; /* initial directory, NULL for current dir */
500 ! char_u *filter UNUSED; /* file name filter */
503 char_u dirbuf[MAXPATHL];
506 * Callback function for the textfield. When CR is hit this works like
507 * hitting the "OK" button, ESC like "Cancel".
511 keyhit_callback(w, client_data, event, cont)
513 ! XtPointer client_data;
520 * Callback function for the textfield. When CR is hit this works like
521 * hitting the "OK" button, ESC like "Cancel".
524 keyhit_callback(w, client_data, event, cont)
526 ! XtPointer client_data UNUSED;
528 ! Boolean *cont UNUSED;
539 butproc(w, client_data, call_data)
541 XtPointer client_data;
542 ! XtPointer call_data;
544 dialogStatus = (int)(long)client_data + 1;
551 butproc(w, client_data, call_data)
553 XtPointer client_data;
554 ! XtPointer call_data UNUSED;
556 dialogStatus = (int)(long)client_data + 1;
561 * Function called when dialog window closed.
565 dialog_wm_handler(w, client_data, event, dum)
567 ! XtPointer client_data;
571 if (event->type == ClientMessage
572 ! && ((XClientMessageEvent *)event)->data.l[0] == dialogatom)
578 gui_mch_dialog(type, title, message, buttons, dfltbutton, textfield)
589 * Function called when dialog window closed.
592 dialog_wm_handler(w, client_data, event, dum)
594 ! XtPointer client_data UNUSED;
596 ! Boolean *dum UNUSED;
598 if (event->type == ClientMessage
599 ! && (Atom)((XClientMessageEvent *)event)->data.l[0] == dialogatom)
604 gui_mch_dialog(type, title, message, buttons, dfltbutton, textfield)
609 ! int dfltbutton UNUSED;
613 *** ../vim-7.2.183/src/gui_x11.c 2009-02-24 04:11:07.000000000 +0100
614 --- src/gui_x11.c 2009-05-21 16:47:02.000000000 +0200
617 * Call-back routines.
622 gui_x11_timer_cb(timed_out, interval_id)
624 ! XtIntervalId *interval_id;
626 *((int *)timed_out) = TRUE;
631 gui_x11_visibility_cb(w, dud, event, dum)
637 if (event->type != VisibilityNotify)
640 * Call-back routines.
644 gui_x11_timer_cb(timed_out, interval_id)
646 ! XtIntervalId *interval_id UNUSED;
648 *((int *)timed_out) = TRUE;
652 gui_x11_visibility_cb(w, dud, event, dum)
654 ! XtPointer dud UNUSED;
656 ! Boolean *dum UNUSED;
658 if (event->type != VisibilityNotify)
667 gui_x11_expose_cb(w, dud, event, dum)
673 XExposeEvent *gevent;
680 gui_x11_expose_cb(w, dud, event, dum)
682 ! XtPointer dud UNUSED;
684 ! Boolean *dum UNUSED;
686 XExposeEvent *gevent;
695 gui_x11_resize_window_cb(w, dud, event, dum)
701 static int lastWidth, lastHeight;
708 gui_x11_resize_window_cb(w, dud, event, dum)
710 ! XtPointer dud UNUSED;
712 ! Boolean *dum UNUSED;
714 static int lastWidth, lastHeight;
723 gui_x11_focus_change_cb(w, data, event, dum)
729 gui_focus_change(event->type == FocusIn);
734 gui_x11_enter_cb(w, data, event, dum)
740 gui_focus_change(TRUE);
745 gui_x11_leave_cb(w, data, event, dum)
751 gui_focus_change(FALSE);
758 gui_x11_focus_change_cb(w, data, event, dum)
760 ! XtPointer data UNUSED;
762 ! Boolean *dum UNUSED;
764 gui_focus_change(event->type == FocusIn);
768 gui_x11_enter_cb(w, data, event, dum)
770 ! XtPointer data UNUSED;
771 ! XEvent *event UNUSED;
772 ! Boolean *dum UNUSED;
774 gui_focus_change(TRUE);
778 gui_x11_leave_cb(w, data, event, dum)
780 ! XtPointer data UNUSED;
781 ! XEvent *event UNUSED;
782 ! Boolean *dum UNUSED;
784 gui_focus_change(FALSE);
793 gui_x11_key_hit_cb(w, dud, event, dum)
799 XKeyPressedEvent *ev_press;
806 gui_x11_key_hit_cb(w, dud, event, dum)
808 ! XtPointer dud UNUSED;
810 ! Boolean *dum UNUSED;
812 XKeyPressedEvent *ev_press;
821 gui_x11_mouse_cb(w, dud, event, dum)
827 static XtIntervalId timer = (XtIntervalId)0;
828 static int timed_out = TRUE;
834 gui_x11_mouse_cb(w, dud, event, dum)
836 ! XtPointer dud UNUSED;
838 ! Boolean *dum UNUSED;
840 static XtIntervalId timer = (XtIntervalId)0;
841 static int timed_out = TRUE;
846 /* Look for argv[arg] in cmdline_options[] table */
847 ! for (i = 0; i < XtNumber(cmdline_options); i++)
848 if (strcmp(argv[arg], cmdline_options[i].option) == 0)
851 ! if (i < XtNumber(cmdline_options))
853 /* Remember finding "-rv" or "-reverse" */
854 if (strcmp("-rv", argv[arg]) == 0
858 /* Look for argv[arg] in cmdline_options[] table */
859 ! for (i = 0; i < (int)XtNumber(cmdline_options); i++)
860 if (strcmp(argv[arg], cmdline_options[i].option) == 0)
863 ! if (i < (int)XtNumber(cmdline_options))
865 /* Remember finding "-rv" or "-reverse" */
866 if (strcmp("-rv", argv[arg]) == 0
870 static void local_xsmp_handle_requests __ARGS((XtPointer c, int *s, XtInputId *i));
874 local_xsmp_handle_requests(c, s, i)
879 if (xsmp_handle_requests() == FAIL)
880 XtRemoveInput(_xsmp_xtinputid);
883 static void local_xsmp_handle_requests __ARGS((XtPointer c, int *s, XtInputId *i));
886 local_xsmp_handle_requests(c, s, i)
887 ! XtPointer c UNUSED;
889 ! XtInputId *i UNUSED;
891 if (xsmp_handle_requests() == FAIL)
892 XtRemoveInput(_xsmp_xtinputid);
896 if (mask & HeightValue)
898 ! if (p_window > h - 1 || !option_was_set((char_u *)"window"))
904 if (mask & HeightValue)
906 ! if (p_window > (long)h - 1 || !option_was_set((char_u *)"window"))
921 /* Lesstif gives an error message here, and so does Solaris. The man page
931 /* Lesstif gives an error message here, and so does Solaris. The man page
939 gui_mch_set_shellsize(width, height, min_width, min_height,
940 base_width, base_height, direction)
950 height += xim_get_status_area_height(),
955 ! int direction UNUSED;
958 height += xim_get_status_area_height(),
961 * If "fontset" is TRUE, load the "font_name" as a fontset.
962 * Return FAIL if the font could not be loaded, OK otherwise.
966 gui_mch_init_font(font_name, do_fontset)
970 XFontStruct *font = NULL;
973 * If "fontset" is TRUE, load the "font_name" as a fontset.
974 * Return FAIL if the font could not be loaded, OK otherwise.
977 gui_mch_init_font(font_name, do_fontset)
979 ! int do_fontset UNUSED;
981 XFontStruct *font = NULL;
985 * Return the name of font "font" in allocated memory.
986 * Don't know how to get the actual name, thus use the provided name.
990 gui_mch_get_fontname(font, name)
996 * Return the name of font "font" in allocated memory.
997 * Don't know how to get the actual name, thus use the provided name.
1000 gui_mch_get_fontname(font, name)
1001 ! GuiFont font UNUSED;
1010 ! const static int val[8] = {1, 0, 0, 0, 1, 2, 2, 2 };
1012 XSetForeground(gui.dpy, gui.text_gc, prev_sp_color);
1013 for (i = FILL_X(col); i < FILL_X(col + cells); ++i)
1018 ! static const int val[8] = {1, 0, 0, 0, 1, 2, 2, 2 };
1020 XSetForeground(gui.dpy, gui.text_gc, prev_sp_color);
1021 for (i = FILL_X(col); i < FILL_X(col + cells); ++i)
1024 # ifdef FEAT_XFONTSET
1025 if (current_fontset != NULL)
1027 ! if (c >= 0x10000 && sizeof(wchar_t) <= 2)
1028 c = 0xbf; /* show chars > 0xffff as ? */
1029 ((wchar_t *)buf)[wlen] = c;
1033 # ifdef FEAT_XFONTSET
1034 if (current_fontset != NULL)
1036 ! # ifdef SMALL_WCHAR_T
1038 c = 0xbf; /* show chars > 0xffff as ? */
1040 ((wchar_t *)buf)[wlen] = c;
1045 /* Nothing to do in X */
1050 gui_x11_menu_cb(w, client_data, call_data)
1052 ! XtPointer client_data, call_data;
1054 gui_menu_cb((vimmenu_T *)client_data);
1057 /* Nothing to do in X */
1061 gui_x11_menu_cb(w, client_data, call_data)
1063 ! XtPointer client_data;
1064 ! XtPointer call_data UNUSED;
1066 gui_menu_cb((vimmenu_T *)client_data);
1070 * Function called when window closed. Works like ":qa".
1071 * Should put up a requester!
1075 gui_x11_wm_protocol_handler(w, client_data, event, dum)
1077 ! XtPointer client_data;
1082 * Only deal with Client messages.
1084 * Function called when window closed. Works like ":qa".
1085 * Should put up a requester!
1088 gui_x11_wm_protocol_handler(w, client_data, event, dum)
1090 ! XtPointer client_data UNUSED;
1092 ! Boolean *dum UNUSED;
1095 * Only deal with Client messages.
1098 * exit. That can be cancelled though, thus Vim shouldn't exit here.
1099 * Just sync our swap files.
1101 ! if (((XClientMessageEvent *)event)->data.l[0] ==
1102 wm_atoms[SAVE_YOURSELF_IDX])
1106 * exit. That can be cancelled though, thus Vim shouldn't exit here.
1107 * Just sync our swap files.
1109 ! if ((Atom)((XClientMessageEvent *)event)->data.l[0] ==
1110 wm_atoms[SAVE_YOURSELF_IDX])
1118 ! if (((XClientMessageEvent *)event)->data.l[0] !=
1119 wm_atoms[DELETE_WINDOW_IDX])
1126 ! if ((Atom)((XClientMessageEvent *)event)->data.l[0] !=
1127 wm_atoms[DELETE_WINDOW_IDX])
1133 * Function called when property changed. Check for incoming commands
1137 gui_x11_send_event_handler(w, client_data, event, dum)
1139 ! XtPointer client_data;
1143 XPropertyEvent *e = (XPropertyEvent *) event;
1147 * Function called when property changed. Check for incoming commands
1150 gui_x11_send_event_handler(w, client_data, event, dum)
1152 ! XtPointer client_data UNUSED;
1154 ! Boolean *dum UNUSED;
1156 XPropertyEvent *e = (XPropertyEvent *) event;
1165 gui_x11_blink_cb(timed_out, interval_id)
1166 ! XtPointer timed_out;
1167 ! XtIntervalId *interval_id;
1169 if (blink_state == BLINK_ON)
1176 gui_x11_blink_cb(timed_out, interval_id)
1177 ! XtPointer timed_out UNUSED;
1178 ! XtIntervalId *interval_id UNUSED;
1180 if (blink_state == BLINK_ON)
1182 *** ../vim-7.2.183/src/gui.c 2009-05-17 16:23:20.000000000 +0200
1183 --- src/gui.c 2009-05-21 16:37:39.000000000 +0200
1188 gui_init_which_components(oldval)
1192 static int prev_menu_is_active = -1;
1196 gui_init_which_components(oldval)
1197 ! char_u *oldval UNUSED;
1200 static int prev_menu_is_active = -1;
1224 gui_handle_drop(x, y, modifiers, fnames, count)
1233 gui_handle_drop(x, y, modifiers, fnames, count)
1239 *** ../vim-7.2.183/src/gui_beval.c 2009-05-17 16:23:20.000000000 +0200
1240 --- src/gui_beval.c 2009-05-21 15:03:02.000000000 +0200
1244 general_beval_cb(beval, state)
1252 general_beval_cb(beval, state)
1262 pointerEventEH(w, client_data, event, unused)
1264 XtPointer client_data;
1268 BalloonEval *beval = (BalloonEval *)client_data;
1269 pointerEvent(beval, event);
1273 pointerEventEH(w, client_data, event, unused)
1275 XtPointer client_data;
1277 ! Boolean *unused UNUSED;
1279 BalloonEval *beval = (BalloonEval *)client_data;
1280 pointerEvent(beval, event);
1284 timerRoutine(dx, id)
1288 BalloonEval *beval = (BalloonEval *)dx;
1292 timerRoutine(dx, id)
1294 ! XtIntervalId *id UNUSED;
1296 BalloonEval *beval = (BalloonEval *)dx;
1298 *** ../vim-7.2.183/src/gui_at_sb.c 2008-11-28 21:26:50.000000000 +0100
1299 --- src/gui_at_sb.c 2009-05-21 16:38:53.000000000 +0200
1302 /* extension */ NULL
1304 { /* simple fields */
1305 ! /* change_sensitive */ XtInheritChangeSensitive
1307 { /* scrollbar fields */
1313 /* extension */ NULL
1315 { /* simple fields */
1316 ! /* change_sensitive */ XtInheritChangeSensitive,
1318 ! /* extension */ NULL
1321 { /* scrollbar fields */
1329 if (bottom <= 0 || bottom <= top)
1331 ! if ((sw = sbw->scrollbar.shadow_width) < 0)
1333 margin = MARGIN (sbw);
1334 floor = sbw->scrollbar.length - margin + 2;
1337 if (bottom <= 0 || bottom <= top)
1339 ! sw = sbw->scrollbar.shadow_width;
1342 margin = MARGIN (sbw);
1343 floor = sbw->scrollbar.length - margin + 2;
1351 Initialize(request, new, args, num_args)
1352 ! Widget request; /* what the client asked for */
1353 Widget new; /* what we're going to give him */
1355 ! Cardinal *num_args;
1357 ScrollbarWidget sbw = (ScrollbarWidget) new;
1364 Initialize(request, new, args, num_args)
1365 ! Widget request UNUSED; /* what the client asked for */
1366 Widget new; /* what we're going to give him */
1367 ! ArgList args UNUSED;
1368 ! Cardinal *num_args UNUSED;
1370 ScrollbarWidget sbw = (ScrollbarWidget) new;
1374 (w, valueMask, attributes);
1379 SetValues(current, request, desired, args, num_args)
1380 ! Widget current, /* what I am */
1381 ! request, /* what he wants me to be */
1382 ! desired; /* what I will become */
1384 ! Cardinal *num_args;
1386 ScrollbarWidget sbw = (ScrollbarWidget) current;
1387 ScrollbarWidget dsbw = (ScrollbarWidget) desired;
1389 (w, valueMask, attributes);
1393 SetValues(current, request, desired, args, num_args)
1394 ! Widget current; /* what I am */
1395 ! Widget request UNUSED; /* what he wants me to be */
1396 ! Widget desired; /* what I will become */
1397 ! ArgList args UNUSED;
1398 ! Cardinal *num_args UNUSED;
1400 ScrollbarWidget sbw = (ScrollbarWidget) current;
1401 ScrollbarWidget dsbw = (ScrollbarWidget) desired;
1409 Redisplay(w, event, region)
1419 RepeatNotify(client_data, idp)
1420 XtPointer client_data;
1421 ! XtIntervalId *idp;
1423 ScrollbarWidget sbw = (ScrollbarWidget) client_data;
1430 RepeatNotify(client_data, idp)
1431 XtPointer client_data;
1432 ! XtIntervalId *idp UNUSED;
1434 ScrollbarWidget sbw = (ScrollbarWidget) client_data;
1438 return (num < small) ? small : ((num > big) ? big : num);
1443 ScrollOneLineUp(w, event, params, num_params)
1447 ! Cardinal *num_params;
1449 ScrollSome(w, event, -ONE_LINE_DATA);
1454 ScrollOneLineDown(w, event, params, num_params)
1458 ! Cardinal *num_params;
1460 ScrollSome(w, event, ONE_LINE_DATA);
1465 ScrollPageDown(w, event, params, num_params)
1469 ! Cardinal *num_params;
1471 ScrollSome(w, event, ONE_PAGE_DATA);
1476 ScrollPageUp(w, event, params, num_params)
1480 ! Cardinal *num_params;
1482 ScrollSome(w, event, -ONE_PAGE_DATA);
1485 return (num < small) ? small : ((num > big) ? big : num);
1489 ScrollOneLineUp(w, event, params, num_params)
1492 ! String *params UNUSED;
1493 ! Cardinal *num_params UNUSED;
1495 ScrollSome(w, event, -ONE_LINE_DATA);
1499 ScrollOneLineDown(w, event, params, num_params)
1502 ! String *params UNUSED;
1503 ! Cardinal *num_params UNUSED;
1505 ScrollSome(w, event, ONE_LINE_DATA);
1509 ScrollPageDown(w, event, params, num_params)
1512 ! String *params UNUSED;
1513 ! Cardinal *num_params UNUSED;
1515 ScrollSome(w, event, ONE_PAGE_DATA);
1519 ScrollPageUp(w, event, params, num_params)
1522 ! String *params UNUSED;
1523 ! Cardinal *num_params UNUSED;
1525 ScrollSome(w, event, -ONE_PAGE_DATA);
1529 XtCallCallbacks(w, XtNscrollProc, (XtPointer)call_data);
1534 NotifyScroll(w, event, params, num_params)
1538 ! Cardinal *num_params;
1540 ScrollbarWidget sbw = (ScrollbarWidget) w;
1543 XtCallCallbacks(w, XtNscrollProc, (XtPointer)call_data);
1547 NotifyScroll(w, event, params, num_params)
1550 ! String *params UNUSED;
1551 ! Cardinal *num_params UNUSED;
1553 ScrollbarWidget sbw = (ScrollbarWidget) w;
1557 delay, RepeatNotify, (XtPointer)w);
1562 EndScroll(w, event, params, num_params)
1564 ! XEvent *event; /* unused */
1565 ! String *params; /* unused */
1566 ! Cardinal *num_params; /* unused */
1568 ScrollbarWidget sbw = (ScrollbarWidget) w;
1571 delay, RepeatNotify, (XtPointer)w);
1575 EndScroll(w, event, params, num_params)
1577 ! XEvent *event UNUSED;
1578 ! String *params UNUSED;
1579 ! Cardinal *num_params UNUSED;
1581 ScrollbarWidget sbw = (ScrollbarWidget) w;
1585 return PICKLENGTH(sbw, x / width, y / height);
1590 MoveThumb(w, event, params, num_params)
1593 ! String *params; /* unused */
1594 ! Cardinal *num_params; /* unused */
1596 ScrollbarWidget sbw = (ScrollbarWidget)w;
1599 return PICKLENGTH(sbw, x / width, y / height);
1603 MoveThumb(w, event, params, num_params)
1606 ! String *params UNUSED;
1607 ! Cardinal *num_params UNUSED;
1609 ScrollbarWidget sbw = (ScrollbarWidget)w;
1618 NotifyThumb(w, event, params, num_params)
1621 ! String *params; /* unused */
1622 ! Cardinal *num_params; /* unused */
1624 ScrollbarWidget sbw = (ScrollbarWidget)w;
1625 /* Use a union to avoid a warning for the weird conversion from float to
1631 NotifyThumb(w, event, params, num_params)
1634 ! String *params UNUSED;
1635 ! Cardinal *num_params UNUSED;
1637 ScrollbarWidget sbw = (ScrollbarWidget)w;
1638 /* Use a union to avoid a warning for the weird conversion from float to
1641 XtCallCallbacks(w, XtNjumpProc, (XtPointer)&sbw->scrollbar.top);
1651 sbw->scrollbar.top_shadow_GC = XtGetGC(w, valuemask, &myXGCV);
1661 sbw->scrollbar.bot_shadow_GC = XtGetGC(w, valuemask, &myXGCV);
1666 _Xaw3dDrawShadows(gw, event, region, out)
1673 sbw->scrollbar.bot_shadow_GC = XtGetGC(w, valuemask, &myXGCV);
1677 _Xaw3dDrawShadows(gw, event, region, out)
1679 ! XEvent *event UNUSED;
1683 *** ../vim-7.2.183/src/gui_at_fs.c 2006-05-13 15:51:07.000000000 +0200
1684 --- src/gui_at_fs.c 2009-05-21 16:38:36.000000000 +0200
1687 text.format = FMT8BIT;
1689 #ifdef XtNinternational
1690 ! if (_XawTextFormat((TextWidget)selFileField) == XawFmtWide)
1692 XawTextReplace(selFileField, (XawTextPosition)0,
1693 (XawTextPosition)WcsLen((wchar_t *)&SFtextBuffer[0]), &text);
1695 text.format = FMT8BIT;
1697 #ifdef XtNinternational
1698 ! if ((unsigned long)_XawTextFormat((TextWidget)selFileField) == XawFmtWide)
1700 XawTextReplace(selFileField, (XawTextPosition)0,
1701 (XawTextPosition)WcsLen((wchar_t *)&SFtextBuffer[0]), &text);
1709 SFbuttonPressList(w, n, event)
1712 ! XButtonPressedEvent *event;
1714 SFbuttonPressed = 1;
1719 SFbuttonReleaseList(w, n, event)
1726 SFbuttonPressList(w, n, event)
1729 ! XButtonPressedEvent *event UNUSED;
1731 SFbuttonPressed = 1;
1735 SFbuttonReleaseList(w, n, event)
1744 SFdirModTimer(cl, id)
1755 SFdirModTimer(cl, id)
1756 ! XtPointer cl UNUSED;
1757 ! XtIntervalId *id UNUSED;
1764 static void SFscrollTimer __ARGS((XtPointer p, XtIntervalId *id));
1768 SFscrollTimer(p, id)
1776 static void SFscrollTimer __ARGS((XtPointer p, XtIntervalId *id));
1779 SFscrollTimer(p, id)
1781 ! XtIntervalId *id UNUSED;
1792 SFenterList(w, n, event)
1795 XEnterWindowEvent *event;
1802 SFenterList(w, n, event)
1805 XEnterWindowEvent *event;
1814 SFleaveList(w, n, event)
1819 if (SFcurrentInvert[n] != -1)
1826 SFleaveList(w, n, event)
1829 ! XEvent *event UNUSED;
1831 if (SFcurrentInvert[n] != -1)
1840 SFmotionList(w, n, event)
1843 XMotionEvent *event;
1850 SFmotionList(w, n, event)
1853 XMotionEvent *event;
1862 SFvFloatSliderMovedCallback(w, n, fnew)
1867 SFvSliderMovedCallback(w, (int)(long)n, nw);
1872 SFvSliderMovedCallback(w, n, nw)
1878 SFvSliderMovedCallback(w, (int)(long)n, nw);
1882 SFvSliderMovedCallback(w, n, nw)
1894 SFvAreaSelectedCallback(w, n, pnew)
1904 SFvAreaSelectedCallback(w, n, pnew)
1911 SFvSliderMovedCallback(w, (int)(long)n, nw);
1916 SFhSliderMovedCallback(w, n, nw)
1922 SFvSliderMovedCallback(w, (int)(long)n, nw);
1926 SFhSliderMovedCallback(w, n, nw)
1933 SFdrawList((int)(long)n, SF_DO_NOT_SCROLL);
1938 SFhAreaSelectedCallback(w, n, pnew)
1944 SFdrawList((int)(long)n, SF_DO_NOT_SCROLL);
1948 SFhAreaSelectedCallback(w, n, pnew)
1960 SFpathSliderMovedCallback(w, client_data, nw)
1962 ! XtPointer client_data;
1971 SFpathSliderMovedCallback(w, client_data, nw)
1973 ! XtPointer client_data UNUSED;
1979 XawTextSetInsertionPoint(selFileField, pos);
1984 SFpathAreaSelectedCallback(w, client_data, pnew)
1986 ! XtPointer client_data;
1989 int nw = (int)(long)pnew;
1991 XawTextSetInsertionPoint(selFileField, pos);
1995 SFpathAreaSelectedCallback(w, client_data, pnew)
1997 ! XtPointer client_data UNUSED;
2000 int nw = (int)(long)pnew;
2004 static void SFexposeList __ARGS((Widget w, XtPointer n, XEvent *event, Boolean *cont));
2008 SFexposeList(w, n, event, cont)
2014 if ((event->type == NoExpose) || event->xexpose.count)
2018 static void SFexposeList __ARGS((Widget w, XtPointer n, XEvent *event, Boolean *cont));
2021 SFexposeList(w, n, event, cont)
2025 ! Boolean *cont UNUSED;
2027 if ((event->type == NoExpose) || event->xexpose.count)
2032 static void SFmodVerifyCallback __ARGS((Widget w, XtPointer client_data, XEvent *event, Boolean *cont));
2036 SFmodVerifyCallback(w, client_data, event, cont)
2038 ! XtPointer client_data;
2046 static void SFmodVerifyCallback __ARGS((Widget w, XtPointer client_data, XEvent *event, Boolean *cont));
2049 SFmodVerifyCallback(w, client_data, event, cont)
2051 ! XtPointer client_data UNUSED;
2053 ! Boolean *cont UNUSED;
2060 static void SFokCallback __ARGS((Widget w, XtPointer cl, XtPointer cd));
2064 SFokCallback(w, cl, cd)
2068 SFstatus = SEL_FILE_OK;
2072 static void SFokCallback __ARGS((Widget w, XtPointer cl, XtPointer cd));
2075 SFokCallback(w, cl, cd)
2077 ! XtPointer cl UNUSED;
2078 ! XtPointer cd UNUSED;
2080 SFstatus = SEL_FILE_OK;
2085 static void SFcancelCallback __ARGS((Widget w, XtPointer cl, XtPointer cd));
2089 SFcancelCallback(w, cl, cd)
2093 SFstatus = SEL_FILE_CANCEL;
2097 static void SFcancelCallback __ARGS((Widget w, XtPointer cl, XtPointer cd));
2100 SFcancelCallback(w, cl, cd)
2102 ! XtPointer cl UNUSED;
2103 ! XtPointer cd UNUSED;
2105 SFstatus = SEL_FILE_CANCEL;
2110 static void SFdismissAction __ARGS((Widget w, XEvent *event, String *params, Cardinal *num_params));
2114 SFdismissAction(w, event, params, num_params)
2118 ! Cardinal *num_params;
2120 ! if (event->type == ClientMessage &&
2121 ! event->xclient.data.l[0] != SFwmDeleteWindow)
2124 SFstatus = SEL_FILE_CANCEL;
2127 static void SFdismissAction __ARGS((Widget w, XEvent *event, String *params, Cardinal *num_params));
2130 SFdismissAction(w, event, params, num_params)
2133 ! String *params UNUSED;
2134 ! Cardinal *num_params UNUSED;
2136 ! if (event->type == ClientMessage
2137 ! && (Atom)event->xclient.data.l[0] != SFwmDeleteWindow)
2140 SFstatus = SEL_FILE_CANCEL;
2145 #if defined(FEAT_XFONTSET) && defined(XtNinternational)
2146 ! if (_XawTextFormat((TextWidget)selFileField) == XawFmtWide)
2148 wchar_t *wcbuf=(wchar_t *)SFtextBuffer;
2153 #if defined(FEAT_XFONTSET) && defined(XtNinternational)
2154 ! if ((unsigned long)_XawTextFormat((TextWidget)selFileField) == XawFmtWide)
2156 wchar_t *wcbuf=(wchar_t *)SFtextBuffer;
2160 #if defined(FEAT_XFONTSET) && defined(XtNinternational)
2163 ! if (_XawTextFormat((TextWidget)selFileField) == XawFmtWide)
2168 #if defined(FEAT_XFONTSET) && defined(XtNinternational)
2171 ! if ((unsigned long)_XawTextFormat((TextWidget)selFileField) == XawFmtWide)
2175 *** ../vim-7.2.183/src/gui_motif.c 2008-06-20 11:39:30.000000000 +0200
2176 --- src/gui_motif.c 2009-05-21 17:15:05.000000000 +0200
2179 * Call-back routines.
2184 scroll_cb(w, client_data, call_data)
2186 XtPointer client_data, call_data;
2190 * Call-back routines.
2194 scroll_cb(w, client_data, call_data)
2196 XtPointer client_data, call_data;
2203 #ifdef FEAT_GUI_TABLINE
2206 tabline_cb(w, client_data, call_data)
2208 ! XtPointer client_data, call_data;
2210 XmNotebookCallbackStruct *nptr;
2215 #ifdef FEAT_GUI_TABLINE
2217 tabline_cb(w, client_data, call_data)
2219 ! XtPointer client_data UNUSED;
2220 ! XtPointer call_data;
2222 XmNotebookCallbackStruct *nptr;
2226 send_tabline_event(nptr->page_number);
2231 tabline_button_cb(w, client_data, call_data)
2233 ! XtPointer client_data, call_data;
2238 send_tabline_event(nptr->page_number);
2242 tabline_button_cb(w, client_data, call_data)
2244 ! XtPointer client_data UNUSED;
2245 ! XtPointer call_data UNUSED;
2252 * Tabline single mouse click timeout handler
2256 motif_tabline_timer_cb (timed_out, interval_id)
2257 XtPointer timed_out;
2258 ! XtIntervalId *interval_id;
2260 *((int *)timed_out) = TRUE;
2264 * Tabline single mouse click timeout handler
2267 motif_tabline_timer_cb (timed_out, interval_id)
2268 XtPointer timed_out;
2269 ! XtIntervalId *interval_id UNUSED;
2271 *((int *)timed_out) = TRUE;
2280 tabline_menu_cb(w, closure, e, continue_dispatch)
2282 ! XtPointer closure;
2284 ! Boolean *continue_dispatch;
2287 XButtonPressedEvent *event;
2293 tabline_menu_cb(w, closure, e, continue_dispatch)
2295 ! XtPointer closure UNUSED;
2297 ! Boolean *continue_dispatch UNUSED;
2300 XButtonPressedEvent *event;
2303 XtManageChild(tabLine_menu);
2308 tabline_balloon_cb(beval, state)
2315 XtManageChild(tabLine_menu);
2319 tabline_balloon_cb(beval, state)
2332 gui_mch_set_text_area_pos(x, y, w, h)
2339 /* Give keyboard focus to the textArea instead of the toolbar. */
2345 gui_mch_set_text_area_pos(x, y, w, h)
2352 /* Give keyboard focus to the textArea instead of the toolbar. */
2355 if (menu->icon_builtin || gui_find_bitmap(menu->name, buf, "xpm") == FAIL)
2357 if (menu->iconidx >= 0 && menu->iconidx
2358 ! < (sizeof(built_in_pixmaps) / sizeof(built_in_pixmaps[0])))
2359 xpm = built_in_pixmaps[menu->iconidx];
2363 if (menu->icon_builtin || gui_find_bitmap(menu->name, buf, "xpm") == FAIL)
2365 if (menu->iconidx >= 0 && menu->iconidx
2366 ! < (int)(sizeof(built_in_pixmaps) / sizeof(built_in_pixmaps[0])))
2367 xpm = built_in_pixmaps[menu->iconidx];
2377 gui_mch_show_popupmenu(menu)
2381 XmMenuPosition(menu->submenu_id, gui_x11_get_last_mouse_event());
2387 gui_mch_show_popupmenu(menu)
2388 ! vimmenu_T *menu UNUSED;
2391 XmMenuPosition(menu->submenu_id, gui_x11_get_last_mouse_event());
2395 * Callback routine for dialog mnemonic processing.
2399 ! mnemonic_event(Widget w, XtPointer call_data, XKeyEvent *event)
2401 do_mnemonic(w, event->keycode);
2405 * Callback routine for dialog mnemonic processing.
2408 ! mnemonic_event(Widget w, XtPointer call_data UNUSED, XKeyEvent *event)
2410 do_mnemonic(w, event->keycode);
2414 * Put up a file requester.
2415 * Returns the selected name in allocated memory, or NULL for Cancel.
2419 gui_mch_browse(saving, title, dflt, ext, initdir, filter)
2420 ! int saving; /* select file to write */
2421 char_u *title; /* title for the window */
2422 char_u *dflt; /* default name */
2423 ! char_u *ext; /* not used (extension added) */
2424 char_u *initdir; /* initial directory, NULL for current dir */
2425 char_u *filter; /* file name filter */
2428 * Put up a file requester.
2429 * Returns the selected name in allocated memory, or NULL for Cancel.
2432 gui_mch_browse(saving, title, dflt, ext, initdir, filter)
2433 ! int saving UNUSED; /* select file to write */
2434 char_u *title; /* title for the window */
2435 char_u *dflt; /* default name */
2436 ! char_u *ext UNUSED; /* not used (extension added) */
2437 char_u *initdir; /* initial directory, NULL for current dir */
2438 char_u *filter; /* file name filter */
2443 * Process callback from Dialog cancel actions.
2447 DialogCancelCB(w, client_data, call_data)
2448 ! Widget w; /* widget id */
2449 ! XtPointer client_data; /* data from application */
2450 ! XtPointer call_data; /* data from widget class */
2452 if (browse_fname != NULL)
2456 * Process callback from Dialog cancel actions.
2459 DialogCancelCB(w, client_data, call_data)
2460 ! Widget w UNUSED; /* widget id */
2461 ! XtPointer client_data UNUSED; /* data from application */
2462 ! XtPointer call_data UNUSED; /* data from widget class */
2464 if (browse_fname != NULL)
2469 * Process callback from Dialog actions.
2473 DialogAcceptCB(w, client_data, call_data)
2474 ! Widget w; /* widget id */
2475 ! XtPointer client_data; /* data from application */
2476 ! XtPointer call_data; /* data from widget class */
2478 XmFileSelectionBoxCallbackStruct *fcb;
2482 * Process callback from Dialog actions.
2485 DialogAcceptCB(w, client_data, call_data)
2486 ! Widget w UNUSED; /* widget id */
2487 ! XtPointer client_data UNUSED; /* data from application */
2488 ! XtPointer call_data; /* data from widget class */
2490 XmFileSelectionBoxCallbackStruct *fcb;
2494 * Callback function for the textfield. When CR is hit this works like
2495 * hitting the "OK" button, ESC like "Cancel".
2499 keyhit_callback(w, client_data, event, cont)
2501 ! XtPointer client_data;
2508 * Callback function for the textfield. When CR is hit this works like
2509 * hitting the "OK" button, ESC like "Cancel".
2512 keyhit_callback(w, client_data, event, cont)
2514 ! XtPointer client_data UNUSED;
2516 ! Boolean *cont UNUSED;
2522 XmTextFieldClearSelection(w, XtLastTimestampProcessed(gui.dpy));
2527 butproc(w, client_data, call_data)
2529 XtPointer client_data;
2530 ! XtPointer call_data;
2532 dialogStatus = (int)(long)client_data + 1;
2535 XmTextFieldClearSelection(w, XtLastTimestampProcessed(gui.dpy));
2539 butproc(w, client_data, call_data)
2541 XtPointer client_data;
2542 ! XtPointer call_data UNUSED;
2544 dialogStatus = (int)(long)client_data + 1;
2553 gui_mch_dialog(type, title, message, button_names, dfltbutton, textfield)
2557 char_u *button_names;
2563 gui_mch_dialog(type, title, message, button_names, dfltbutton, textfield)
2567 char_u *button_names;
2570 XmNchildren, &children,
2571 XmNnumChildren, &numChildren, NULL);
2572 borders += tst + tmh;
2573 ! for (i = 0; i < numChildren; i++)
2576 XtVaGetValues(children[i], XmNheight, &whgt, NULL);
2578 XmNchildren, &children,
2579 XmNnumChildren, &numChildren, NULL);
2580 borders += tst + tmh;
2581 ! for (i = 0; i < (int)numChildren; i++)
2584 XtVaGetValues(children[i], XmNheight, &whgt, NULL);
2587 * I have to use footer help for backwards compatability. Hopefully both will
2588 * get implemented and the user will have a choice.
2592 toolbarbutton_enter_cb(w, client_data, event, cont)
2594 XtPointer client_data;
2598 vimmenu_T *menu = (vimmenu_T *) client_data;
2601 * I have to use footer help for backwards compatability. Hopefully both will
2602 * get implemented and the user will have a choice.
2605 toolbarbutton_enter_cb(w, client_data, event, cont)
2607 XtPointer client_data;
2608 ! XEvent *event UNUSED;
2609 ! Boolean *cont UNUSED;
2611 vimmenu_T *menu = (vimmenu_T *) client_data;
2620 toolbarbutton_leave_cb(w, client_data, event, cont)
2622 ! XtPointer client_data;
2626 gui_mch_set_footer((char_u *) "");
2633 toolbarbutton_leave_cb(w, client_data, event, cont)
2635 ! XtPointer client_data UNUSED;
2636 ! XEvent *event UNUSED;
2637 ! Boolean *cont UNUSED;
2639 gui_mch_set_footer((char_u *) "");
2644 * Set the fontlist for Widget "id" to use gui.menu_fontset or gui.menu_font.
2648 gui_motif_menu_fontlist(id)
2652 #ifdef FONTSET_ALWAYS
2655 * Set the fontlist for Widget "id" to use gui.menu_fontset or gui.menu_font.
2658 gui_motif_menu_fontlist(id)
2662 #ifdef FONTSET_ALWAYS
2666 } SharedFindReplace;
2668 ! static SharedFindReplace find_widgets = { NULL };
2669 ! static SharedFindReplace repl_widgets = { NULL };
2671 static void find_replace_destroy_callback __ARGS((Widget w, XtPointer client_data, XtPointer call_data));
2672 static void find_replace_dismiss_callback __ARGS((Widget w, XtPointer client_data, XtPointer call_data));
2675 } SharedFindReplace;
2677 ! static SharedFindReplace find_widgets = {NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL};
2678 ! static SharedFindReplace repl_widgets = {NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL};
2680 static void find_replace_destroy_callback __ARGS((Widget w, XtPointer client_data, XtPointer call_data));
2681 static void find_replace_dismiss_callback __ARGS((Widget w, XtPointer client_data, XtPointer call_data));
2684 static void find_replace_keypress __ARGS((Widget w, SharedFindReplace * frdp, XKeyEvent * event));
2685 static void find_replace_dialog_create __ARGS((char_u *entry_text, int do_replace));
2689 find_replace_destroy_callback(w, client_data, call_data)
2691 XtPointer client_data;
2692 ! XtPointer call_data;
2694 SharedFindReplace *cd = (SharedFindReplace *)client_data;
2697 static void find_replace_keypress __ARGS((Widget w, SharedFindReplace * frdp, XKeyEvent * event));
2698 static void find_replace_dialog_create __ARGS((char_u *entry_text, int do_replace));
2701 find_replace_destroy_callback(w, client_data, call_data)
2703 XtPointer client_data;
2704 ! XtPointer call_data UNUSED;
2706 SharedFindReplace *cd = (SharedFindReplace *)client_data;
2710 cd->dialog = (Widget)0;
2715 find_replace_dismiss_callback(w, client_data, call_data)
2717 XtPointer client_data;
2718 ! XtPointer call_data;
2720 SharedFindReplace *cd = (SharedFindReplace *)client_data;
2723 cd->dialog = (Widget)0;
2727 find_replace_dismiss_callback(w, client_data, call_data)
2729 XtPointer client_data;
2730 ! XtPointer call_data UNUSED;
2732 SharedFindReplace *cd = (SharedFindReplace *)client_data;
2736 XtUnmanageChild(cd->dialog);
2741 entry_activate_callback(w, client_data, call_data)
2743 XtPointer client_data;
2744 ! XtPointer call_data;
2746 XmProcessTraversal((Widget)client_data, XmTRAVERSE_CURRENT);
2751 find_replace_callback(w, client_data, call_data)
2753 XtPointer client_data;
2754 ! XtPointer call_data;
2756 long_u flags = (long_u)client_data;
2757 char *find_text, *repl_text;
2759 XtUnmanageChild(cd->dialog);
2763 entry_activate_callback(w, client_data, call_data)
2765 XtPointer client_data;
2766 ! XtPointer call_data UNUSED;
2768 XmProcessTraversal((Widget)client_data, XmTRAVERSE_CURRENT);
2772 find_replace_callback(w, client_data, call_data)
2774 XtPointer client_data;
2775 ! XtPointer call_data UNUSED;
2777 long_u flags = (long_u)client_data;
2778 char *find_text, *repl_text;
2786 find_replace_keypress(w, frdp, event)
2788 SharedFindReplace *frdp;
2796 find_replace_keypress(w, frdp, event)
2798 SharedFindReplace *frdp;
2801 *** ../vim-7.2.183/src/gui_xmdlg.c 2008-11-28 21:26:50.000000000 +0100
2802 --- src/gui_xmdlg.c 2009-05-21 17:01:52.000000000 +0200
2806 items[i] = XmStringCreateLocalized(list[ENCODING][i]);
2810 /* recycle old button */
2811 XtVaSetValues(children[i],
2814 items[i] = XmStringCreateLocalized(list[ENCODING][i]);
2816 ! if (i < (int)n_items)
2818 /* recycle old button */
2819 XtVaSetValues(children[i],
2823 /* Destroy all the outstanding menu items.
2825 ! for (i = count[ENCODING]; i < n_items; ++i)
2827 XtUnmanageChild(children[i]);
2828 XtDestroyWidget(children[i]);
2831 /* Destroy all the outstanding menu items.
2833 ! for (i = count[ENCODING]; i < (int)n_items; ++i)
2835 XtUnmanageChild(children[i]);
2836 XtDestroyWidget(children[i]);
2844 ! stoggle_callback(Widget w,
2845 SharedFontSelData *data,
2846 XmToggleButtonCallbackStruct *call_data)
2853 ! stoggle_callback(Widget w UNUSED,
2854 SharedFontSelData *data,
2855 XmToggleButtonCallbackStruct *call_data)
2864 encoding_callback(Widget w,
2865 SharedFontSelData *data,
2869 XmListCallbackStruct fake_data;
2875 encoding_callback(Widget w,
2876 SharedFontSelData *data,
2877 ! XtPointer dummy UNUSED)
2880 XmListCallbackStruct fake_data;
2883 do_choice(w, data, call_data, SIZE);
2888 ! cancel_callback(Widget w,
2889 SharedFontSelData *data,
2890 ! XmListCallbackStruct *call_data)
2892 if (data->sel[ENCODING])
2895 do_choice(w, data, call_data, SIZE);
2899 ! cancel_callback(Widget w UNUSED,
2900 SharedFontSelData *data,
2901 ! XmListCallbackStruct *call_data UNUSED)
2903 if (data->sel[ENCODING])
2912 ! ok_callback(Widget w,
2913 SharedFontSelData *data,
2914 ! XmPushButtonCallbackStruct *call_data)
2923 ! ok_callback(Widget w UNUSED,
2924 SharedFontSelData *data,
2925 ! XmPushButtonCallbackStruct *call_data UNUSED)
2929 *** ../vim-7.2.183/src/gui_xmebw.c 2008-11-28 21:26:50.000000000 +0100
2930 --- src/gui_xmebw.c 2009-05-21 17:06:17.000000000 +0200
2938 alloc_color(Display *display,
2951 alloc_color(Display *display,
2955 ! void *closure UNUSED)
2961 XtHeight(eb), eb->primitive.highlight_thickness);
2966 ! draw_pixmap(XmEnhancedButtonWidget eb, XEvent *event, Region region)
2969 GC gc = eb->label.normal_GC;
2971 XtHeight(eb), eb->primitive.highlight_thickness);
2975 ! draw_pixmap(XmEnhancedButtonWidget eb,
2976 ! XEvent *event UNUSED,
2977 ! Region region UNUSED)
2980 GC gc = eb->label.normal_GC;
2983 height = eb->core.height - 2 * y;
2986 ! if (depth == eb->core.depth)
2987 XCopyArea(XtDisplay(eb), pix, XtWindow(eb), gc, 0, 0,
2988 width, height, x, y);
2989 else if (depth == 1)
2991 height = eb->core.height - 2 * y;
2994 ! if (depth == (int)eb->core.depth)
2995 XCopyArea(XtDisplay(eb), pix, XtWindow(eb), gc, 0, 0,
2996 width, height, x, y);
2997 else if (depth == 1)
3000 eb->label.normal_GC = tmp_gc;
3005 ! Enter(Widget wid, XEvent *event, String *params, Cardinal *num_params)
3007 XmEnhancedButtonWidget eb = (XmEnhancedButtonWidget) wid;
3008 XmPushButtonCallbackStruct call_value;
3010 eb->label.normal_GC = tmp_gc;
3016 ! String *params UNUSED,
3017 ! Cardinal *num_params UNUSED)
3019 XmEnhancedButtonWidget eb = (XmEnhancedButtonWidget) wid;
3020 XmPushButtonCallbackStruct call_value;
3028 ! Leave(Widget wid, XEvent *event, String *params, Cardinal *num_params)
3030 XmEnhancedButtonWidget eb = (XmEnhancedButtonWidget)wid;
3031 XmPushButtonCallbackStruct call_value;
3039 ! String *params UNUSED,
3040 ! Cardinal *num_params UNUSED)
3042 XmEnhancedButtonWidget eb = (XmEnhancedButtonWidget)wid;
3043 XmPushButtonCallbackStruct call_value;
3051 ! Initialize(Widget rq, Widget ebw, ArgList args, Cardinal *n)
3053 XmEnhancedButtonWidget request = (XmEnhancedButtonWidget)rq;
3054 XmEnhancedButtonWidget eb = (XmEnhancedButtonWidget)ebw;
3060 ! Initialize(Widget rq, Widget ebw, ArgList args UNUSED, Cardinal *n UNUSED)
3062 XmEnhancedButtonWidget request = (XmEnhancedButtonWidget)rq;
3063 XmEnhancedButtonWidget eb = (XmEnhancedButtonWidget)ebw;
3066 free_pixmaps((XmEnhancedButtonWidget)w);
3071 ! SetValues(Widget current, Widget request, Widget new, ArgList args, Cardinal *n)
3073 XmEnhancedButtonWidget cur = (XmEnhancedButtonWidget) current;
3074 XmEnhancedButtonWidget eb = (XmEnhancedButtonWidget) new;
3076 free_pixmaps((XmEnhancedButtonWidget)w);
3080 ! SetValues(Widget current,
3081 ! Widget request UNUSED,
3083 ! ArgList args UNUSED,
3084 ! Cardinal *n UNUSED)
3086 XmEnhancedButtonWidget cur = (XmEnhancedButtonWidget) current;
3087 XmEnhancedButtonWidget eb = (XmEnhancedButtonWidget) new;
3090 if ((win_x < 0) || (win_y < 0))
3093 ! if ((win_x > r_width) || (win_y > r_height))
3098 if ((win_x < 0) || (win_y < 0))
3101 ! if ((win_x > (int)r_width) || (win_y > (int)r_height))
3105 *** ../vim-7.2.183/src/if_python.c 2009-01-13 18:10:21.000000000 +0100
3106 --- src/if_python.c 2009-05-21 17:27:50.000000000 +0200
3110 /* Vim module - Implementation
3114 ! VimCommand(PyObject *self, PyObject *args)
3120 /* Vim module - Implementation
3123 ! VimCommand(PyObject *self UNUSED, PyObject *args)
3134 ! VimEval(PyObject *self, PyObject *args)
3143 ! VimEval(PyObject *self UNUSED, PyObject *args)
3149 /* Buffer list object - Implementation
3154 ! BufListLength(PyObject *self)
3156 buf_T *b = firstbuf;
3159 /* Buffer list object - Implementation
3163 ! BufListLength(PyObject *self UNUSED)
3165 buf_T *b = firstbuf;
3174 ! BufListItem(PyObject *self, PyInt n)
3183 ! BufListItem(PyObject *self UNUSED, PyInt n)
3190 /* Window list object - Implementation
3194 ! WinListLength(PyObject *self)
3196 win_T *w = firstwin;
3200 /* Window list object - Implementation
3203 ! WinListLength(PyObject *self UNUSED)
3205 win_T *w = firstwin;
3214 ! WinListItem(PyObject *self, PyInt n)
3223 ! WinListItem(PyObject *self UNUSED, PyInt n)
3230 /* Current items object - Implementation
3234 ! CurrentGetattr(PyObject *self, char *name)
3236 if (strcmp(name, "buffer") == 0)
3237 return (PyObject *)BufferNew(curbuf);
3240 /* Current items object - Implementation
3243 ! CurrentGetattr(PyObject *self UNUSED, char *name)
3245 if (strcmp(name, "buffer") == 0)
3246 return (PyObject *)BufferNew(curbuf);
3254 ! CurrentSetattr(PyObject *self, char *name, PyObject *value)
3256 if (strcmp(name, "line") == 0)
3263 ! CurrentSetattr(PyObject *self UNUSED, char *name, PyObject *value)
3265 if (strcmp(name, "line") == 0)
3267 *** ../vim-7.2.183/src/window.c 2009-02-22 02:36:36.000000000 +0100
3268 --- src/window.c 2009-05-21 15:14:54.000000000 +0200
3271 * WSP_NEWLOC may be specified in flags to prevent the location list from
3276 win_init(newp, oldp, flags)
3284 * WSP_NEWLOC may be specified in flags to prevent the location list from
3288 win_init(newp, oldp, flags)
3297 * Must be called when there is just one window, filling the whole screen
3298 * (excluding the command line).
3302 make_windows(count, vertical)
3304 ! int vertical; /* split windows vertically if TRUE */
3309 * Must be called when there is just one window, filling the whole screen
3310 * (excluding the command line).
3313 make_windows(count, vertical)
3315 ! int vertical UNUSED; /* split windows vertically if TRUE */
3321 * Remove a window and its frame from the tree of frames.
3322 * Returns a pointer to the window that got the freed up space.
3326 winframe_remove(win, dirp, tp)
3328 ! int *dirp; /* set to 'v' or 'h' for direction if 'ea' */
3329 tabpage_T *tp; /* tab page "win" is in, NULL for current */
3331 frame_T *frp, *frp2, *frp3;
3333 * Remove a window and its frame from the tree of frames.
3334 * Returns a pointer to the window that got the freed up space.
3337 winframe_remove(win, dirp, tp)
3339 ! int *dirp UNUSED; /* set to 'v' or 'h' for direction if 'ea' */
3340 tabpage_T *tp; /* tab page "win" is in, NULL for current */
3342 frame_T *frp, *frp2, *frp3;
3346 * Careful: When OK is returned need to get a new tab page very very soon!
3350 leave_tabpage(new_curbuf)
3351 ! buf_T *new_curbuf; /* what is going to be the new curbuf,
3354 tabpage_T *tp = curtab;
3357 * Careful: When OK is returned need to get a new tab page very very soon!
3360 leave_tabpage(new_curbuf)
3361 ! buf_T *new_curbuf UNUSED; /* what is going to be the new curbuf,
3364 tabpage_T *tp = curtab;
3367 * Start using tab page "tp".
3368 * Only to be used after leave_tabpage() or freeing the current tab page.
3372 enter_tabpage(tp, old_curbuf)
3374 ! buf_T *old_curbuf;
3376 int old_off = tp->tp_firstwin->w_winrow;
3377 win_T *next_prevwin = tp->tp_prevwin;
3379 * Start using tab page "tp".
3380 * Only to be used after leave_tabpage() or freeing the current tab page.
3383 enter_tabpage(tp, old_curbuf)
3385 ! buf_T *old_curbuf UNUSED;
3387 int old_off = tp->tp_firstwin->w_winrow;
3388 win_T *next_prevwin = tp->tp_prevwin;
3392 * allocate a window structure and link it in the window list
3403 * allocate a window structure and link it in the window list
3407 ! win_T *after UNUSED;
3411 *** ../vim-7.2.183/src/workshop.c 2008-11-28 11:47:14.000000000 +0100
3412 --- src/workshop.c 2009-05-21 17:12:55.000000000 +0200
3416 * Load a given file into the WorkShop buffer.
3421 char *filename, /* the file to load */
3422 int line, /* an optional line number (or 0) */
3423 ! char *frameid) /* used for multi-frame support */
3425 #ifdef WSDEBUG_TRACE
3426 if (WSDLEVEL(WS_TRACE_VERBOSE | WS_TRACE))
3429 * Load a given file into the WorkShop buffer.
3433 char *filename, /* the file to load */
3434 int line, /* an optional line number (or 0) */
3435 ! char *frameid UNUSED) /* used for multi-frame support */
3437 #ifdef WSDEBUG_TRACE
3438 if (WSDLEVEL(WS_TRACE_VERBOSE | WS_TRACE))
3441 load_window(filename, lineno);
3446 workshop_front_file(
3449 #ifdef WSDEBUG_TRACE
3450 if (WSDLEVEL(WS_TRACE_VERBOSE | WS_TRACE))
3452 load_window(filename, lineno);
3456 workshop_front_file(
3457 ! char *filename UNUSED)
3459 #ifdef WSDEBUG_TRACE
3460 if (WSDLEVEL(WS_TRACE_VERBOSE | WS_TRACE))
3463 * breakpoints have moved when a program has been recompiled and
3464 * reloaded into dbx.
3468 ! workshop_moved_marks(char *filename)
3470 #ifdef WSDEBUG_TRACE
3471 if (WSDLEVEL(WS_TRACE_VERBOSE | WS_TRACE))
3473 * breakpoints have moved when a program has been recompiled and
3474 * reloaded into dbx.
3477 ! workshop_moved_marks(char *filename UNUSED)
3479 #ifdef WSDEBUG_TRACE
3480 if (WSDLEVEL(WS_TRACE_VERBOSE | WS_TRACE))
3488 workshop_footer_message(
3490 ! int severity) /* severity is currently unused */
3492 #ifdef WSDEBUG_TRACE
3493 if (WSDLEVEL(WS_TRACE_VERBOSE | WS_TRACE))
3499 workshop_footer_message(
3501 ! int severity UNUSED) /* severity is currently unused */
3503 #ifdef WSDEBUG_TRACE
3504 if (WSDLEVEL(WS_TRACE_VERBOSE | WS_TRACE))
3507 * command. The globals curMenuName and curMenuPriority contain the name and
3508 * priority of the parent menu tree.
3515 ! char *accelerator,
3516 char *acceleratorText,
3523 * command. The globals curMenuName and curMenuPriority contain the name and
3524 * priority of the parent menu tree.
3530 ! char *accelerator UNUSED,
3531 char *acceleratorText,
3532 ! char *name UNUSED,
3533 ! char *filepos UNUSED,
3539 workshopInitDone = True;
3544 workshop_toolbar_button(
3553 workshopInitDone = True;
3557 workshop_toolbar_button(
3560 ! char *senseVerb UNUSED,
3561 ! char *filepos UNUSED,
3567 if (strcmp(option, "syntax") == 0)
3568 vim_snprintf(cbuf, sizeof(cbuf), "syntax %s", value);
3569 else if (strcmp(option, "savefiles") == 0)
3570 ! ; /* XXX - Not yet implemented */
3575 if (strcmp(option, "syntax") == 0)
3576 vim_snprintf(cbuf, sizeof(cbuf), "syntax %s", value);
3577 else if (strcmp(option, "savefiles") == 0)
3579 ! /* XXX - Not yet implemented */
3587 * A button in the toolbar has been pushed.
3591 workshop_get_positions(
3592 ! void *clientData, /* unused */
3593 char **filename, /* output data */
3594 int *curLine, /* output data */
3595 int *curCol, /* output data */
3598 * A button in the toolbar has been pushed.
3601 workshop_get_positions(
3602 ! void *clientData UNUSED,
3603 char **filename, /* output data */
3604 int *curLine, /* output data */
3605 int *curCol, /* output data */
3613 ! workshop_save_sensitivity(char *filename)
3622 ! workshop_save_sensitivity(char *filename UNUSED)
3626 *** ../vim-7.2.183/src/version.c 2009-05-21 15:19:59.000000000 +0200
3627 --- src/version.c 2009-05-21 23:19:40.000000000 +0200
3631 { /* Add new patch number below this line */
3637 CART DRIVER: Bring out your dead!
3638 LARGE MAN: Here's one!
3639 CART DRIVER: Ninepence.
3641 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
3643 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
3644 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
3645 \\\ download, build and distribute -- http://www.A-A-P.org ///
3646 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///