summaryrefslogtreecommitdiffstats
path: root/source/ap/vim/patches/7.3.262
diff options
context:
space:
mode:
Diffstat (limited to 'source/ap/vim/patches/7.3.262')
-rw-r--r--source/ap/vim/patches/7.3.2621356
1 files changed, 1356 insertions, 0 deletions
diff --git a/source/ap/vim/patches/7.3.262 b/source/ap/vim/patches/7.3.262
new file mode 100644
index 000000000..b3bd5cd81
--- /dev/null
+++ b/source/ap/vim/patches/7.3.262
@@ -0,0 +1,1356 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.3.262
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.3.262
+Problem: Photon code style doesn't match Vim style.
+Solution: Clean up some of it. (Elias Diem)
+Files: src/gui_photon.c
+
+
+*** ../vim-7.3.261/src/gui_photon.c 2011-01-17 20:08:03.000000000 +0100
+--- src/gui_photon.c 2011-07-27 14:07:02.000000000 +0200
+***************
+*** 32,40 ****
+ #endif
+
+ #define ARRAY_LENGTH(a) (sizeof(a) / sizeof(a[0]))
+! #define RGB(r,g,b) PgRGB(r,g,b)
+
+! #define EVENT_BUFFER_SIZE sizeof( PhEvent_t ) + 1000
+
+ /* Some defines for gui_mch_mousehide() */
+ #define MOUSE_HIDE TRUE
+--- 32,40 ----
+ #endif
+
+ #define ARRAY_LENGTH(a) (sizeof(a) / sizeof(a[0]))
+! #define RGB(r, g, b) PgRGB(r, g, b)
+
+! #define EVENT_BUFFER_SIZE sizeof(PhEvent_t) + 1000
+
+ /* Some defines for gui_mch_mousehide() */
+ #define MOUSE_HIDE TRUE
+***************
+*** 206,258 ****
+ static PtCallbackF_t gui_ph_handle_menu_unrealized;
+
+ #ifdef USE_PANEL_GROUP
+! static void gui_ph_get_panelgroup_margins( short*, short*, short*, short* );
+ #endif
+
+ #ifdef FEAT_TOOLBAR
+! static PhImage_t *gui_ph_toolbar_find_icon( vimmenu_T *menu );
+ #endif
+
+! static void gui_ph_draw_start( void );
+! static void gui_ph_draw_end( void );
+
+ /* Set the text for the balloon */
+! static PtWidget_t * gui_ph_show_tooltip( PtWidget_t *window,
+ PtWidget_t *widget,
+ int position,
+ char *text,
+ char *font,
+ PgColor_t fill_color,
+! PgColor_t text_color );
+
+ /****************************************************************************/
+
+! static PtWidget_t * gui_ph_show_tooltip( PtWidget_t *window,
+ PtWidget_t *widget,
+ int position,
+ char *text,
+ char *font,
+ PgColor_t fill_color,
+! PgColor_t text_color )
+ {
+ PtArg_t arg;
+ vimmenu_T *menu;
+ char_u *tooltip;
+
+! PtSetArg( &arg, Pt_ARG_POINTER, &menu, 0 );
+! PtGetResources( widget, 1, &arg );
+
+ /* Override the text and position */
+
+ tooltip = text;
+! if( menu != NULL )
+ {
+ int index = MENU_INDEX_TIP;
+! if( menu->strings[ index ] != NULL )
+ tooltip = menu->strings[ index ];
+ }
+
+! return( PtInflateBalloon(
+ window,
+ widget,
+ /* Don't put the balloon at the bottom,
+--- 206,258 ----
+ static PtCallbackF_t gui_ph_handle_menu_unrealized;
+
+ #ifdef USE_PANEL_GROUP
+! static void gui_ph_get_panelgroup_margins(short*, short*, short*, short*);
+ #endif
+
+ #ifdef FEAT_TOOLBAR
+! static PhImage_t *gui_ph_toolbar_find_icon(vimmenu_T *menu);
+ #endif
+
+! static void gui_ph_draw_start(void);
+! static void gui_ph_draw_end(void);
+
+ /* Set the text for the balloon */
+! static PtWidget_t * gui_ph_show_tooltip(PtWidget_t *window,
+ PtWidget_t *widget,
+ int position,
+ char *text,
+ char *font,
+ PgColor_t fill_color,
+! PgColor_t text_color);
+
+ /****************************************************************************/
+
+! static PtWidget_t * gui_ph_show_tooltip(PtWidget_t *window,
+ PtWidget_t *widget,
+ int position,
+ char *text,
+ char *font,
+ PgColor_t fill_color,
+! PgColor_t text_color)
+ {
+ PtArg_t arg;
+ vimmenu_T *menu;
+ char_u *tooltip;
+
+! PtSetArg(&arg, Pt_ARG_POINTER, &menu, 0);
+! PtGetResources(widget, 1, &arg);
+
+ /* Override the text and position */
+
+ tooltip = text;
+! if (menu != NULL)
+ {
+ int index = MENU_INDEX_TIP;
+! if (menu->strings[ index ] != NULL)
+ tooltip = menu->strings[ index ];
+ }
+
+! return PtInflateBalloon(
+ window,
+ widget,
+ /* Don't put the balloon at the bottom,
+***************
+*** 261,285 ****
+ tooltip,
+ font,
+ fill_color,
+! text_color ) );
+ }
+
+ static void
+! gui_ph_resize_container( void )
+ {
+ PhArea_t area;
+
+! PtWidgetArea( gui.vimWindow, &area );
+! PtWidgetPos ( gui.vimContainer, &area.pos );
+
+! PtSetResource( gui.vimContainer, Pt_ARG_AREA, &area, 0 );
+ }
+
+ static int
+ gui_ph_handle_menu_resize(
+ PtWidget_t *widget,
+ void *other,
+! PtCallbackInfo_t *info )
+ {
+ PtContainerCallback_t *sizes = info->cbdata;
+ PtWidget_t *container;
+--- 261,285 ----
+ tooltip,
+ font,
+ fill_color,
+! text_color);
+ }
+
+ static void
+! gui_ph_resize_container(void)
+ {
+ PhArea_t area;
+
+! PtWidgetArea(gui.vimWindow, &area);
+! PtWidgetPos (gui.vimContainer, &area.pos);
+
+! PtSetResource(gui.vimContainer, Pt_ARG_AREA, &area, 0);
+ }
+
+ static int
+ gui_ph_handle_menu_resize(
+ PtWidget_t *widget,
+ void *other,
+! PtCallbackInfo_t *info)
+ {
+ PtContainerCallback_t *sizes = info->cbdata;
+ PtWidget_t *container;
+***************
+*** 291,297 ****
+ /* Because vim treats the toolbar and menubar separately,
+ * and here they're lumped together into a PtToolbarGroup,
+ * we only need either menu_height or toolbar_height set at once */
+! if( gui.menu_is_active )
+ {
+ gui.menu_height = height;
+ gui.toolbar_height = 0;
+--- 291,297 ----
+ /* Because vim treats the toolbar and menubar separately,
+ * and here they're lumped together into a PtToolbarGroup,
+ * we only need either menu_height or toolbar_height set at once */
+! if (gui.menu_is_active)
+ {
+ gui.menu_height = height;
+ gui.toolbar_height = 0;
+***************
+*** 310,325 ****
+ container = gui.vimContainer;
+ #endif
+
+! PtSetResource( container, Pt_ARG_POS, &below_menu, 0 );
+
+ gui_ph_resize_container();
+
+ #ifdef USE_PANEL_GROUP
+ gui_ph_get_panelgroup_margins(
+ &pg_margin_top, &pg_margin_bottom,
+! &pg_margin_left, &pg_margin_right );
+ #endif
+! return( Pt_CONTINUE );
+ }
+
+ /*
+--- 310,325 ----
+ container = gui.vimContainer;
+ #endif
+
+! PtSetResource(container, Pt_ARG_POS, &below_menu, 0);
+
+ gui_ph_resize_container();
+
+ #ifdef USE_PANEL_GROUP
+ gui_ph_get_panelgroup_margins(
+ &pg_margin_top, &pg_margin_bottom,
+! &pg_margin_left, &pg_margin_right);
+ #endif
+! return Pt_CONTINUE;
+ }
+
+ /*
+***************
+*** 330,352 ****
+ gui_ph_handle_timer_cursor(
+ PtWidget_t *widget,
+ void *data,
+! PtCallbackInfo_t *info )
+ {
+! if( blink_state == BLINK_ON )
+ {
+ gui_undraw_cursor();
+ blink_state = BLINK_OFF;
+! PtSetResource( gui_ph_timer_cursor, Pt_ARG_TIMER_INITIAL,
+! blink_offtime, 0 );
+ }
+ else
+ {
+ gui_update_cursor(TRUE, FALSE);
+ blink_state = BLINK_ON;
+! PtSetResource( gui_ph_timer_cursor, Pt_ARG_TIMER_INITIAL,
+! blink_ontime, 0 );
+ }
+! return( Pt_CONTINUE );
+ }
+
+ static int
+--- 330,352 ----
+ gui_ph_handle_timer_cursor(
+ PtWidget_t *widget,
+ void *data,
+! PtCallbackInfo_t *info)
+ {
+! if (blink_state == BLINK_ON)
+ {
+ gui_undraw_cursor();
+ blink_state = BLINK_OFF;
+! PtSetResource(gui_ph_timer_cursor, Pt_ARG_TIMER_INITIAL,
+! blink_offtime, 0);
+ }
+ else
+ {
+ gui_update_cursor(TRUE, FALSE);
+ blink_state = BLINK_ON;
+! PtSetResource(gui_ph_timer_cursor, Pt_ARG_TIMER_INITIAL,
+! blink_ontime, 0);
+ }
+! return Pt_CONTINUE;
+ }
+
+ static int
+***************
+*** 354,360 ****
+ {
+ is_timeout = TRUE;
+
+! return( Pt_CONTINUE );
+ }
+
+ static int
+--- 354,360 ----
+ {
+ is_timeout = TRUE;
+
+! return Pt_CONTINUE;
+ }
+
+ static int
+***************
+*** 402,408 ****
+ break;
+ }
+
+! return( Pt_CONTINUE );
+ }
+
+ static int
+--- 402,408 ----
+ break;
+ }
+
+! return Pt_CONTINUE;
+ }
+
+ static int
+***************
+*** 426,438 ****
+
+ case Pt_SCROLL_SET:
+ /* FIXME: return straight away here? */
+! return( Pt_CONTINUE );
+ break;
+ }
+
+ gui_drag_scrollbar(sb, value, dragging);
+ }
+! return( Pt_CONTINUE );
+ }
+
+ static int
+--- 426,438 ----
+
+ case Pt_SCROLL_SET:
+ /* FIXME: return straight away here? */
+! return Pt_CONTINUE;
+ break;
+ }
+
+ gui_drag_scrollbar(sb, value, dragging);
+ }
+! return Pt_CONTINUE;
+ }
+
+ static int
+***************
+*** 453,459 ****
+ /* We're a good lil photon program, aren't we? yes we are, yeess wee arrr */
+ if( key->key_flags & Pk_KF_Compose )
+ {
+! return( Pt_CONTINUE );
+ }
+
+ if( (key->key_flags & Pk_KF_Cap_Valid) &&
+--- 453,459 ----
+ /* We're a good lil photon program, aren't we? yes we are, yeess wee arrr */
+ if( key->key_flags & Pk_KF_Compose )
+ {
+! return Pt_CONTINUE;
+ }
+
+ if( (key->key_flags & Pk_KF_Cap_Valid) &&
+***************
+*** 473,479 ****
+ gui_is_menu_shortcut( key->key_cap ) ) ) )
+ {
+ /* Fallthrough and let photon look for the hotkey */
+! return( Pt_CONTINUE );
+ }
+ #endif
+
+--- 473,479 ----
+ gui_is_menu_shortcut( key->key_cap ) ) ) )
+ {
+ /* Fallthrough and let photon look for the hotkey */
+! return Pt_CONTINUE;
+ }
+ #endif
+
+***************
+*** 544,550 ****
+ add_to_input_buf( string, len );
+ }
+
+! return( Pt_CONSUME );
+ }
+ len = 0;
+ #endif
+--- 544,550 ----
+ add_to_input_buf( string, len );
+ }
+
+! return Pt_CONSUME;
+ }
+ len = 0;
+ #endif
+***************
+*** 579,585 ****
+ }
+ else
+ {
+! return( Pt_CONTINUE );
+ }
+ }
+ else
+--- 579,585 ----
+ }
+ else
+ {
+! return Pt_CONTINUE;
+ }
+ }
+ else
+***************
+*** 622,632 ****
+ if( len > 0 )
+ {
+ add_to_input_buf( string, len );
+! return( Pt_CONSUME );
+ }
+ }
+
+! return( Pt_CONTINUE );
+ }
+
+ static int
+--- 622,632 ----
+ if( len > 0 )
+ {
+ add_to_input_buf( string, len );
+! return Pt_CONSUME;
+ }
+ }
+
+! return Pt_CONTINUE;
+ }
+
+ static int
+***************
+*** 652,658 ****
+ if( info->event->type == Ph_EV_PTR_MOTION_NOBUTTON )
+ {
+ gui_mouse_moved( mouse_x, mouse_y );
+! return( Pt_CONTINUE );
+ }
+
+ if( pointer->key_mods & Pk_KM_Shift )
+--- 652,658 ----
+ if( info->event->type == Ph_EV_PTR_MOTION_NOBUTTON )
+ {
+ gui_mouse_moved( mouse_x, mouse_y );
+! return Pt_CONTINUE;
+ }
+
+ if( pointer->key_mods & Pk_KM_Shift )
+***************
+*** 702,708 ****
+ gui_send_mouse_event( button , mouse_x, mouse_y, repeated_click, modifiers );
+ }
+
+! return( Pt_CONTINUE );
+ }
+
+ /* Handle a focus change of the PtRaw widget */
+--- 702,708 ----
+ gui_send_mouse_event( button , mouse_x, mouse_y, repeated_click, modifiers );
+ }
+
+! return Pt_CONTINUE;
+ }
+
+ /* Handle a focus change of the PtRaw widget */
+***************
+*** 721,727 ****
+ PtAddEventHandler( gui.vimTextArea, Ph_EV_PTR_MOTION_NOBUTTON,
+ gui_ph_handle_mouse, NULL );
+ }
+! return( Pt_CONTINUE );
+ }
+
+ static void
+--- 721,727 ----
+ PtAddEventHandler( gui.vimTextArea, Ph_EV_PTR_MOTION_NOBUTTON,
+ gui_ph_handle_mouse, NULL );
+ }
+! return Pt_CONTINUE;
+ }
+
+ static void
+***************
+*** 793,799 ****
+ PtRealizeWidget( menu->submenu_id );
+ }
+
+! return( Pt_CONTINUE );
+ }
+
+ /* This is used for pulldown/popup menus and also toolbar buttons */
+--- 793,799 ----
+ PtRealizeWidget( menu->submenu_id );
+ }
+
+! return Pt_CONTINUE;
+ }
+
+ /* This is used for pulldown/popup menus and also toolbar buttons */
+***************
+*** 805,811 ****
+ vimmenu_T *menu = (vimmenu_T *) data;
+ gui_menu_cb( menu );
+ }
+! return( Pt_CONTINUE );
+ }
+
+ /* Stop focus from disappearing into the menubar... */
+--- 805,811 ----
+ vimmenu_T *menu = (vimmenu_T *) data;
+ gui_menu_cb( menu );
+ }
+! return Pt_CONTINUE;
+ }
+
+ /* Stop focus from disappearing into the menubar... */
+***************
+*** 816,822 ****
+ PtCallbackInfo_t *info )
+ {
+ PtGiveFocus( gui.vimTextArea, NULL );
+! return( Pt_CONTINUE );
+ }
+
+ static int
+--- 816,822 ----
+ PtCallbackInfo_t *info )
+ {
+ PtGiveFocus( gui.vimTextArea, NULL );
+! return Pt_CONTINUE;
+ }
+
+ static int
+***************
+*** 826,832 ****
+ PtCallbackInfo_t *info )
+ {
+ gui_set_shellsize( FALSE, TRUE, RESIZE_BOTH );
+! return( Pt_CONTINUE );
+ }
+
+ /****************************************************************************/
+--- 826,832 ----
+ PtCallbackInfo_t *info )
+ {
+ gui_set_shellsize( FALSE, TRUE, RESIZE_BOTH );
+! return Pt_CONTINUE;
+ }
+
+ /****************************************************************************/
+***************
+*** 878,884 ****
+ ( STRCMP( items->dname, name ) != 0 ) )
+ items = items->next;
+ }
+! return( items );
+ }
+
+ static void
+--- 878,884 ----
+ ( STRCMP( items->dname, name ) != 0 ) )
+ items = items->next;
+ }
+! return items;
+ }
+
+ static void
+***************
+*** 927,933 ****
+ gui_menu_cb( menu );
+ }
+ }
+! return( Pt_CONTINUE );
+ }
+
+ static void
+--- 927,933 ----
+ gui_menu_cb( menu );
+ }
+ }
+! return Pt_CONTINUE;
+ }
+
+ static void
+***************
+*** 974,983 ****
+ mark++;
+
+ if( *mark == ')' )
+! return( TRUE);
+ }
+ }
+! return( FALSE );
+ }
+
+ static void
+--- 974,983 ----
+ mark++;
+
+ if( *mark == ')' )
+! return TRUE;
+ }
+ }
+! return FALSE;
+ }
+
+ static void
+***************
+*** 1057,1063 ****
+ gui_ph_pg_remove_buffer( menu->dname );
+ }
+
+! return( Pt_CONTINUE );
+ }
+ #endif
+
+--- 1057,1063 ----
+ gui_ph_pg_remove_buffer( menu->dname );
+ }
+
+! return Pt_CONTINUE;
+ }
+ #endif
+
+***************
+*** 1071,1077 ****
+ PtContainerHold( gui.vimContainer );
+ }
+
+! return( Pt_CONTINUE );
+ }
+
+ /****************************************************************************/
+--- 1071,1077 ----
+ PtContainerHold( gui.vimContainer );
+ }
+
+! return Pt_CONTINUE;
+ }
+
+ /****************************************************************************/
+***************
+*** 1126,1132 ****
+
+ gui.event_buffer = (PhEvent_t *) alloc( EVENT_BUFFER_SIZE );
+ if( gui.event_buffer == NULL )
+! return( FAIL );
+
+ /* Get a translation so we can convert from ISO Latin-1 to UTF */
+ charset_translate = PxTranslateSet( NULL, "latin1" );
+--- 1126,1132 ----
+
+ gui.event_buffer = (PhEvent_t *) alloc( EVENT_BUFFER_SIZE );
+ if( gui.event_buffer == NULL )
+! return FAIL;
+
+ /* Get a translation so we can convert from ISO Latin-1 to UTF */
+ charset_translate = PxTranslateSet( NULL, "latin1" );
+***************
+*** 1141,1147 ****
+ PtSetArg( &args[ n++ ], Pt_ARG_DIM, &window_size, 0 );
+ gui.vimWindow = PtCreateWidget( PtWindow, NULL, n, args );
+ if( gui.vimWindow == NULL )
+! return( FAIL );
+
+ PtAddCallback( gui.vimWindow, Pt_CB_WINDOW, gui_ph_handle_window_cb, NULL );
+ PtAddCallback( gui.vimWindow, Pt_CB_WINDOW_OPENING,
+--- 1141,1147 ----
+ PtSetArg( &args[ n++ ], Pt_ARG_DIM, &window_size, 0 );
+ gui.vimWindow = PtCreateWidget( PtWindow, NULL, n, args );
+ if( gui.vimWindow == NULL )
+! return FAIL;
+
+ PtAddCallback( gui.vimWindow, Pt_CB_WINDOW, gui_ph_handle_window_cb, NULL );
+ PtAddCallback( gui.vimWindow, Pt_CB_WINDOW_OPENING,
+***************
+*** 1158,1164 ****
+
+ gui.vimPanelGroup = PtCreateWidget( PtPanelGroup, gui.vimWindow, n, args );
+ if( gui.vimPanelGroup == NULL )
+! return( FAIL );
+
+ PtAddCallback( gui.vimPanelGroup, Pt_CB_PG_PANEL_SWITCHING,
+ gui_ph_handle_pg_change, NULL );
+--- 1158,1164 ----
+
+ gui.vimPanelGroup = PtCreateWidget( PtPanelGroup, gui.vimWindow, n, args );
+ if( gui.vimPanelGroup == NULL )
+! return FAIL;
+
+ PtAddCallback( gui.vimPanelGroup, Pt_CB_PG_PANEL_SWITCHING,
+ gui_ph_handle_pg_change, NULL );
+***************
+*** 1172,1178 ****
+
+ gui.vimContainer = PtCreateWidget( PtPane, gui.vimWindow, n, args );
+ if( gui.vimContainer == NULL )
+! return( FAIL );
+
+ PtAddCallback( gui.vimContainer, Pt_CB_RESIZE, gui_ph_pane_resize, NULL );
+ #endif
+--- 1172,1178 ----
+
+ gui.vimContainer = PtCreateWidget( PtPane, gui.vimWindow, n, args );
+ if( gui.vimContainer == NULL )
+! return FAIL;
+
+ PtAddCallback( gui.vimContainer, Pt_CB_RESIZE, gui_ph_pane_resize, NULL );
+ #endif
+***************
+*** 1195,1201 ****
+
+ gui.vimTextArea = PtCreateWidget( PtRaw, Pt_DFLT_PARENT, n, args );
+ if( gui.vimTextArea == NULL)
+! return( FAIL );
+
+ /* TODO: use PtAddEventHandlers instead? */
+ /* Not using Ph_EV_BUT_REPEAT because vim wouldn't use it anyway */
+--- 1195,1201 ----
+
+ gui.vimTextArea = PtCreateWidget( PtRaw, Pt_DFLT_PARENT, n, args );
+ if( gui.vimTextArea == NULL)
+! return FAIL;
+
+ /* TODO: use PtAddEventHandlers instead? */
+ /* Not using Ph_EV_BUT_REPEAT because vim wouldn't use it anyway */
+***************
+*** 1220,1230 ****
+ */
+ gui_ph_timer_cursor = PtCreateWidget( PtTimer, gui.vimWindow, 0, NULL );
+ if( gui_ph_timer_cursor == NULL )
+! return( FAIL );
+
+ gui_ph_timer_timeout = PtCreateWidget( PtTimer, gui.vimWindow, 0, NULL );
+ if( gui_ph_timer_timeout == NULL )
+! return( FAIL );
+
+ PtAddCallback( gui_ph_timer_cursor, Pt_CB_TIMER_ACTIVATE,
+ gui_ph_handle_timer_cursor, NULL);
+--- 1220,1230 ----
+ */
+ gui_ph_timer_cursor = PtCreateWidget( PtTimer, gui.vimWindow, 0, NULL );
+ if( gui_ph_timer_cursor == NULL )
+! return FAIL;
+
+ gui_ph_timer_timeout = PtCreateWidget( PtTimer, gui.vimWindow, 0, NULL );
+ if( gui_ph_timer_timeout == NULL )
+! return FAIL;
+
+ PtAddCallback( gui_ph_timer_cursor, Pt_CB_TIMER_ACTIVATE,
+ gui_ph_handle_timer_cursor, NULL);
+***************
+*** 1239,1245 ****
+ gui.vimToolBarGroup = PtCreateWidget( PtToolbarGroup, gui.vimWindow,
+ n, args );
+ if( gui.vimToolBarGroup == NULL )
+! return( FAIL );
+
+ PtAddCallback( gui.vimToolBarGroup, Pt_CB_RESIZE,
+ gui_ph_handle_menu_resize, NULL );
+--- 1239,1245 ----
+ gui.vimToolBarGroup = PtCreateWidget( PtToolbarGroup, gui.vimWindow,
+ n, args );
+ if( gui.vimToolBarGroup == NULL )
+! return FAIL;
+
+ PtAddCallback( gui.vimToolBarGroup, Pt_CB_RESIZE,
+ gui_ph_handle_menu_resize, NULL );
+***************
+*** 1254,1260 ****
+ }
+ gui.vimMenuBar = PtCreateWidget( PtMenuBar, gui.vimToolBarGroup, n, args );
+ if( gui.vimMenuBar == NULL )
+! return( FAIL );
+
+ # ifdef FEAT_TOOLBAR
+ n = 0;
+--- 1254,1260 ----
+ }
+ gui.vimMenuBar = PtCreateWidget( PtMenuBar, gui.vimToolBarGroup, n, args );
+ if( gui.vimMenuBar == NULL )
+! return FAIL;
+
+ # ifdef FEAT_TOOLBAR
+ n = 0;
+***************
+*** 1273,1279 ****
+
+ gui.vimToolBar = PtCreateWidget( PtToolbar, gui.vimToolBarGroup, n, args );
+ if( gui.vimToolBar == NULL )
+! return( FAIL );
+
+ /*
+ * Size for the toolbar is fetched in gui_mch_show_toolbar, after
+--- 1273,1279 ----
+
+ gui.vimToolBar = PtCreateWidget( PtToolbar, gui.vimToolBarGroup, n, args );
+ if( gui.vimToolBar == NULL )
+! return FAIL;
+
+ /*
+ * Size for the toolbar is fetched in gui_mch_show_toolbar, after
+***************
+*** 1284,1296 ****
+
+ #endif
+
+! return( OK );
+ }
+
+ int
+ gui_mch_init_check(void)
+ {
+! return( (is_photon_available == TRUE) ? OK : FAIL );
+ }
+
+ int
+--- 1284,1296 ----
+
+ #endif
+
+! return OK;
+ }
+
+ int
+ gui_mch_init_check(void)
+ {
+! return (is_photon_available == TRUE) ? OK : FAIL;
+ }
+
+ int
+***************
+*** 1310,1316 ****
+ if (gui_win_x != -1 && gui_win_y != -1)
+ gui_mch_set_winpos(gui_win_x, gui_win_y);
+
+! return( (PtRealizeWidget( gui.vimWindow ) == 0) ? OK : FAIL );
+ }
+
+ void
+--- 1310,1316 ----
+ if (gui_win_x != -1 && gui_win_y != -1)
+ gui_mch_set_winpos(gui_win_x, gui_win_y);
+
+! return (PtRealizeWidget( gui.vimWindow ) == 0) ? OK : FAIL;
+ }
+
+ void
+***************
+*** 1336,1342 ****
+ exit_gui_mch_update( void *data )
+ {
+ *(int *)data = FALSE;
+! return( Pt_END );
+ }
+
+ void
+--- 1336,1342 ----
+ exit_gui_mch_update( void *data )
+ {
+ *(int *)data = FALSE;
+! return Pt_END;
+ }
+
+ void
+***************
+*** 1365,1374 ****
+ if( input_available() )
+ {
+ PtSetResource( gui_ph_timer_timeout, Pt_ARG_TIMER_INITIAL, 0, 0 );
+! return( OK );
+ }
+ else if( is_timeout == TRUE )
+! return( FAIL );
+ }
+ }
+
+--- 1365,1374 ----
+ if( input_available() )
+ {
+ PtSetResource( gui_ph_timer_timeout, Pt_ARG_TIMER_INITIAL, 0, 0 );
+! return OK;
+ }
+ else if( is_timeout == TRUE )
+! return FAIL;
+ }
+ }
+
+***************
+*** 1446,1454 ****
+ vim_free( default_path );
+
+ if( file.ret == Pt_FSDIALOG_BTN1 )
+! return( vim_strsave( file.path ) );
+ }
+! return( NULL );
+ }
+ #endif
+
+--- 1446,1454 ----
+ vim_free( default_path );
+
+ if( file.ret == Pt_FSDIALOG_BTN1 )
+! return vim_strsave(file.path);
+ }
+! return NULL;
+ }
+ #endif
+
+***************
+*** 1470,1476 ****
+
+ PtModalUnblock( modal_ctrl, (void *) button );
+
+! return( Pt_TRUE );
+ }
+
+ static int
+--- 1470,1476 ----
+
+ PtModalUnblock( modal_ctrl, (void *) button );
+
+! return Pt_TRUE;
+ }
+
+ static int
+***************
+*** 1478,1484 ****
+ {
+ if( info->reason_subtype == Pt_EDIT_ACTIVATE )
+ gui_ph_dialog_close( 1, data );
+! return( Pt_CONTINUE );
+ }
+
+ static int
+--- 1478,1484 ----
+ {
+ if( info->reason_subtype == Pt_EDIT_ACTIVATE )
+ gui_ph_dialog_close( 1, data );
+! return Pt_CONTINUE;
+ }
+
+ static int
+***************
+*** 1490,1498 ****
+ if( ( key->key_flags & Pk_KF_Cap_Valid ) && ( key->key_cap == Pk_Escape ) )
+ {
+ gui_ph_dialog_close( 0, data );
+! return( Pt_CONSUME );
+ }
+! return( Pt_PROCESS );
+ }
+
+ int
+--- 1490,1498 ----
+ if( ( key->key_flags & Pk_KF_Cap_Valid ) && ( key->key_cap == Pk_Escape ) )
+ {
+ gui_ph_dialog_close( 0, data );
+! return Pt_CONSUME;
+ }
+! return Pt_PROCESS;
+ }
+
+ int
+***************
+*** 1519,1525 ****
+ button_count = len = i = 0;
+
+ if( buttons == NULL || *buttons == NUL )
+! return( -1 );
+
+ /* There is one less separator than buttons, so bump up the button count */
+ button_count = 1;
+--- 1519,1525 ----
+ button_count = len = i = 0;
+
+ if( buttons == NULL || *buttons == NUL )
+! return -1;
+
+ /* There is one less separator than buttons, so bump up the button count */
+ button_count = 1;
+***************
+*** 1637,1643 ****
+ vim_free( button_array );
+ vim_free( buttons_copy );
+
+! return( dialog_result );
+ }
+ #endif
+ /****************************************************************************/
+--- 1637,1643 ----
+ vim_free( button_array );
+ vim_free( buttons_copy );
+
+! return dialog_result;
+ }
+ #endif
+ /****************************************************************************/
+***************
+*** 1653,1659 ****
+ *x = pos->x;
+ *y = pos->y;
+
+! return( OK );
+ }
+
+ void
+--- 1653,1659 ----
+ *x = pos->x;
+ *y = pos->y;
+
+! return OK;
+ }
+
+ void
+***************
+*** 1975,1985 ****
+ hex_digit(int c)
+ {
+ if (VIM_ISDIGIT(c))
+! return( c - '0' );
+ c = TOLOWER_ASC(c);
+ if (c >= 'a' && c <= 'f')
+! return( c - 'a' + 10 );
+! return( -1000 );
+ }
+
+
+--- 1975,1985 ----
+ hex_digit(int c)
+ {
+ if (VIM_ISDIGIT(c))
+! return c - '0';
+ c = TOLOWER_ASC(c);
+ if (c >= 'a' && c <= 'f')
+! return c - 'a' + 10;
+! return -1000;
+ }
+
+
+***************
+*** 2065,2077 ****
+ b = hex_digit( name[5] ) * 16 + hex_digit( name[6] );
+ if( r < 0 || g < 0 || b < 0 )
+ return INVALCOLOR;
+! return( RGB( r, g, b ) );
+ }
+
+ for( i = 0; i < ARRAY_LENGTH( table ); i++ )
+ {
+ if( STRICMP( name, table[i].name ) == 0 )
+! return( table[i].colour );
+ }
+
+ /*
+--- 2065,2077 ----
+ b = hex_digit( name[5] ) * 16 + hex_digit( name[6] );
+ if( r < 0 || g < 0 || b < 0 )
+ return INVALCOLOR;
+! return RGB(r, g, b);
+ }
+
+ for( i = 0; i < ARRAY_LENGTH( table ); i++ )
+ {
+ if( STRICMP( name, table[i].name ) == 0 )
+! return table[i].colour;
+ }
+
+ /*
+***************
+*** 2115,2121 ****
+ if (STRICMP(color, name) == 0)
+ {
+ fclose(fd);
+! return( (guicolor_T) RGB(r,g,b) );
+ }
+ }
+
+--- 2115,2121 ----
+ if (STRICMP(color, name) == 0)
+ {
+ fclose(fd);
+! return (guicolor_T)RGB(r, g, b);
+ }
+ }
+
+***************
+*** 2451,2458 ****
+ for (i = 0; special_keys[i].key_sym != 0; i++)
+ if (name[0] == special_keys[i].vim_code0 &&
+ name[1] == special_keys[i].vim_code1)
+! return( OK );
+! return( FAIL );
+ }
+
+ /****************************************************************************/
+--- 2451,2458 ----
+ for (i = 0; special_keys[i].key_sym != 0; i++)
+ if (name[0] == special_keys[i].vim_code0 &&
+ name[1] == special_keys[i].vim_code1)
+! return OK;
+! return FAIL;
+ }
+
+ /****************************************************************************/
+***************
+*** 2512,2518 ****
+
+ temp_phi = &external_icon;
+ }
+! return( temp_phi );
+ }
+
+ /*
+--- 2512,2518 ----
+
+ temp_phi = &external_icon;
+ }
+! return temp_phi;
+ }
+
+ /*
+***************
+*** 2541,2556 ****
+ icon = gui_ph_toolbar_load_icon( full_pathname );
+
+ if( icon != NULL )
+! return( icon );
+ }
+
+ if( menu->iconidx >= 0 &&
+ ( menu->iconidx < ARRAY_LENGTH( gui_ph_toolbar_images ) ) )
+ {
+! return( gui_ph_toolbar_images[ menu->iconidx ] );
+ }
+
+! return( NULL );
+ }
+ #endif
+
+--- 2541,2556 ----
+ icon = gui_ph_toolbar_load_icon( full_pathname );
+
+ if( icon != NULL )
+! return icon;
+ }
+
+ if( menu->iconidx >= 0 &&
+ ( menu->iconidx < ARRAY_LENGTH( gui_ph_toolbar_images ) ) )
+ {
+! return gui_ph_toolbar_images[menu->iconidx];
+ }
+
+! return NULL;
+ }
+ #endif
+
+***************
+*** 2895,2905 ****
+ * at least has the bits we're checking for */
+ if( font_size == info.size &&
+ style == (info.style & style) )
+! return( (GuiFont) font_tag );
+ }
+ vim_free( font_tag );
+ }
+! return( NULL );
+ }
+
+ /*
+--- 2895,2905 ----
+ * at least has the bits we're checking for */
+ if( font_size == info.size &&
+ style == (info.style & style) )
+! return (GuiFont)font_tag;
+ }
+ vim_free( font_tag );
+ }
+! return NULL;
+ }
+
+ /*
+***************
+*** 2957,2965 ****
+ }
+ }
+ }
+! return( TRUE );
+ }
+! return( FALSE );
+ }
+
+ int
+--- 2957,2965 ----
+ }
+ }
+ }
+! return TRUE;
+ }
+! return FALSE;
+ }
+
+ int
+***************
+*** 2985,2991 ****
+ "pcterm12", -1, PHFONT_FIXED, NULL );
+
+ if( font_tag == NULL )
+! return( FAIL );
+
+ gui_mch_free_font( gui.norm_font );
+ gui.norm_font = font_tag;
+--- 2985,2991 ----
+ "pcterm12", -1, PHFONT_FIXED, NULL );
+
+ if( font_tag == NULL )
+! return FAIL;
+
+ gui_mch_free_font( gui.norm_font );
+ gui.norm_font = font_tag;
+***************
+*** 2997,3009 ****
+ {
+ if( gui_ph_parse_font_name( vim_font_name, &font_name, &font_flags,
+ &font_size ) == FALSE )
+! return( FAIL );
+
+ font_tag = gui_ph_get_font( font_name, font_flags, font_size, 0 );
+ if( font_tag == NULL )
+ {
+ vim_free( font_name );
+! return( FAIL );
+ }
+
+ gui_mch_free_font( gui.norm_font );
+--- 2997,3009 ----
+ {
+ if( gui_ph_parse_font_name( vim_font_name, &font_name, &font_flags,
+ &font_size ) == FALSE )
+! return FAIL;
+
+ font_tag = gui_ph_get_font( font_name, font_flags, font_size, 0 );
+ if( font_tag == NULL )
+ {
+ vim_free( font_name );
+! return FAIL;
+ }
+
+ gui_mch_free_font( gui.norm_font );
+***************
+*** 3026,3032 ****
+ gui.char_ascent = - extent.ul.y;
+
+ vim_free( font_name );
+! return( OK );
+ }
+
+ /*
+--- 3026,3032 ----
+ gui.char_ascent = - extent.ul.y;
+
+ vim_free( font_name );
+! return OK;
+ }
+
+ /*
+***************
+*** 3042,3048 ****
+ gui.char_height = - info.ascender + info.descender + p_linespace;
+ gui.char_ascent = - info.ascender + p_linespace / 2;
+
+! return( OK );
+ }
+
+ GuiFont
+--- 3042,3048 ----
+ gui.char_height = - info.ascender + info.descender + p_linespace;
+ gui.char_ascent = - info.ascender + p_linespace / 2;
+
+! return OK;
+ }
+
+ GuiFont
+***************
+*** 3060,3072 ****
+ vim_free( font_name );
+
+ if( font_tag != NULL )
+! return( (GuiFont) font_tag );
+ }
+
+ if( report_error )
+ EMSG2(e_font, vim_font_name );
+
+! return( FAIL );
+ }
+
+ #if defined(FEAT_EVAL) || defined(PROTO)
+--- 3060,3072 ----
+ vim_free( font_name );
+
+ if( font_tag != NULL )
+! return (GuiFont)font_tag;
+ }
+
+ if( report_error )
+ EMSG2(e_font, vim_font_name );
+
+! return FAIL;
+ }
+
+ #if defined(FEAT_EVAL) || defined(PROTO)
+*** ../vim-7.3.261/src/version.c 2011-07-27 13:59:12.000000000 +0200
+--- src/version.c 2011-07-27 14:08:08.000000000 +0200
+***************
+*** 711,712 ****
+--- 711,714 ----
+ { /* Add new patch number below this line */
++ /**/
++ 262,
+ /**/
+
+--
+You know you use Vim too much when you have this alias in your
+~/.bashrc file: alias :e=/bin/vim (Eljay Love-Jensen)
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///