2 Subject: Patch 6.2.107 (extra)
4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
11 Problem: The NetBeans interface cannot be used on Win32.
12 Solution: Add support for the NetBeans for Win32. Add support for reading
13 XPM files on Win32. Also fixes that a sign icon with a space in
14 the file name did not work through the NetBeans interface.
16 Also: avoid repeating error messages when the connection is lost.
17 Files: Makefile, runtime/doc/netbeans.txt, src/Make_bc5.mak,
18 src/Make_cyg.mak, src/Make_ming.mak, src/Make_mvc.mak,
19 src/bigvim.bat, src/feature.h, src/gui_beval.c, src/gui_beval.h,
20 src/gui_w32.c, src/gui_w48.c, src/menu.c, src/nbdebug.c,
21 src/nbdebug.h, src/netbeans.c, src/os_mswin.c, src/os_win32.h,
22 src/proto/gui_beval.pro, src/proto/gui_w32.pro,
23 src/proto/netbeans.pro, src/proto.h, src/version.c, src/vim.h,
24 src/xpm_w32.c, src/xpm_w32.h
27 *** ../vim-6.2.106/Makefile Sun Jun 1 12:07:20 2003
28 --- Makefile Sun Oct 12 12:19:02 2003
37 src/xxd/Make_bc3.mak \
38 src/xxd/Make_bc5.mak \
39 src/xxd/Make_cyg.mak \
50 *** ../vim-6.2.106/runtime/doc/netbeans.txt Sun Jun 1 16:04:00 2003
51 --- runtime/doc/netbeans.txt Fri Sep 12 21:37:19 2003
54 ! *netbeans.txt* For Vim version 6.2. Last change: 2003 Jun 01
57 VIM REFERENCE MANUAL by Gordon Prieur
59 ! *netbeans.txt* For Vim version 6.2. Last change: 2003 Sep 12
62 VIM REFERENCE MANUAL by Gordon Prieur
66 ==============================================================================
67 3. Configuring Vim for NetBeans *netbeans-configure*
69 + For more help installing vim, please read |usr_90.txt| in the Vim User Manual.
74 When running configure without arguments the NetBeans interface should be
75 included. That is, if the configure check to find out if your system supports
76 the required features succeeds.
79 If Motif support is required the user must supply XPM libraries. See
80 |workshop-xpm| for details on obtaining the latest version of XPM.
82 ! For more help installing vim, please read |usr_90.txt| in the Vim User Manual.
84 ==============================================================================
85 4. Downloading NetBeans *netbeans-download*
87 If Motif support is required the user must supply XPM libraries. See
88 |workshop-xpm| for details on obtaining the latest version of XPM.
93 ! The Win32 support is now in beta stage.
95 ! To use XPM signs on Win32 (e.g. when using with Netbeans) you can compile
96 ! XPM by yourself or use precompiled libraries from http://iamphet.nm.ru/xpm
97 ! (for MS Visual C++) or http://gnuwin32.sourceforge.net (for MinGW).
99 ==============================================================================
100 4. Downloading NetBeans *netbeans-download*
105 setDot off Make the buffer the current buffer and set the cursor at the
106 ! specified position.
107 In version 2.1 "lnum/col" can be used instead of "off".
113 setDot off Make the buffer the current buffer and set the cursor at the
114 ! specified position. If there are folds they are opened to
115 ! make the cursor line visible.
116 In version 2.1 "lnum/col" can be used instead of "off".
119 *** ../vim-6.2.106/src/Make_bc5.mak Tue May 13 20:21:37 2003
120 --- src/Make_bc5.mak Fri Sep 12 21:42:02 2003
124 # (BIG for WIN32, SMALL for DOS16)
125 # WINVER 0x400 or 0x500: minimum Win32 version to support (0x400)
126 # CSCOPE no or yes: include support for Cscope interface (yes)
127 + # NETBEANS no or yes: include support for Netbeans interface (yes if GUI
129 + # XPM define to path to XPM dir to get support for loading XPM images.
131 ### BOR: root of the BC installation
139 + ### NETBEANS: yes to enable NetBeans interface support, no to disable it
140 + !if ("$(NETBEANS)"=="") && ("$(GUI)"=="yes")
144 ### PERL: uncomment this line if you want perl support in vim
150 ("$(ICONV)"!="yes") && \
151 ("$(IME)"!="yes") && \
152 ! ("$(MBYTE)"!="yes")
158 ("$(ICONV)"!="yes") && \
159 ("$(IME)"!="yes") && \
160 ! ("$(MBYTE)"!="yes") && \
168 DEFINES = $(DEFINES) -DFEAT_CSCOPE
171 + !if ("$(NETBEANS)"=="yes")
172 + DEFINES = $(DEFINES) -DFEAT_NETBEANS_INTG
173 + !if ("$(DEBUG)"=="yes")
174 + DEFINES = $(DEFINES) -DNBDEBUG
175 + NBDEBUG_DEP = nbdebug.h nbdebug.c
180 + DEFINES = $(DEFINES) -DFEAT_XPM_W32
181 + INCLUDE = $(XPM)\include;$(INCLUDE)
184 !if ("$(GUI)"=="yes")
185 DEFINES = $(DEFINES) -DFEAT_GUI_W32 -DFEAT_CLIPBOARD
186 !if ("$(DEBUG)"=="yes")
189 LINK = $(BOR)\BIN\ILink32
191 CC = $(BOR)\BIN\Bcc32
192 ! LFLAGS = -OS -r -Tpe -c -m -L$(LIB) $(DEBUG_FLAG) $(LINK2)
193 LFLAGSDLL = -Tpd -c -m -L$(LIB) $(DEBUG_FLAG) $(LINK2)
194 CFLAGS = -w-aus -w-par -w-pch -I$(INCLUDE) -d -x- -RT- -k- -Oi $(HEADERS) -f-
197 LINK = $(BOR)\BIN\ILink32
199 CC = $(BOR)\BIN\Bcc32
200 ! LFLAGS = -OS -Tpe -c -m -L$(LIB) $(DEBUG_FLAG) $(LINK2)
201 LFLAGSDLL = -Tpd -c -m -L$(LIB) $(DEBUG_FLAG) $(LINK2)
202 CFLAGS = -w-aus -w-par -w-pch -I$(INCLUDE) -d -x- -RT- -k- -Oi $(HEADERS) -f-
206 $(OBJDIR)\normal.obj \
208 $(OBJDIR)\option.obj \
209 - $(OBJDIR)\pathdef.obj \
210 $(OBJDIR)\quickfix.obj \
211 $(OBJDIR)\regexp.obj \
212 $(OBJDIR)\screen.obj \
218 $(OBJDIR)\version.obj \
219 ! $(OBJDIR)\window.obj
221 !if ("$(OLE)"=="yes")
226 $(OBJDIR)\version.obj \
227 ! $(OBJDIR)\window.obj \
228 ! $(OBJDIR)\pathdef.obj
230 !if ("$(OLE)"=="yes")
239 $(OBJDIR)\if_cscope.obj
242 !if ("$(VIMDLL)"=="yes")
243 vimdllobj = $(vimobj)
244 !if ("$(DEBUG)"=="yes")
249 ! !if ("$(CSCOPE)"=="yes")
251 $(OBJDIR)\if_cscope.obj
254 + !if ("$(NETBEANS)"=="yes")
255 + vimobj = $(vimobj) \
256 + $(OBJDIR)\netbeans.obj $(OBJDIR)\gui_beval.obj
260 + vimobj = $(vimobj) \
261 + $(OBJDIR)\xpm_w32.obj
264 !if ("$(VIMDLL)"=="yes")
265 vimdllobj = $(vimobj)
266 !if ("$(DEBUG)"=="yes")
270 !if ("$(CSCOPE)"=="yes")
273 + !if ("$(NETBEANS)"=="yes")
274 + MSG = $(MSG) NETBEANS
281 ! if "$(DYNAMIC_PERL)" == "yes"
292 $(MAKE) /f Make_bc5.mak BOR="$(BOR)" clean
298 $(TCL_LIB_FLAG)tcl.lib+
303 !if ("$(USEDLL)"=="yes")
310 $(TCL_LIB_FLAG)tcl.lib+
315 !if ("$(USEDLL)"=="yes")
321 $(OBJDIR)\if_tcl.obj: if_tcl.c tcl.lib
322 $(CC) $(CCARG) $(CC1) $(CC2)$@ -pc if_tcl.c
324 + $(OBJDIR)\xpm_w32.obj: xpm_w32.c xpm.lib
325 + $(CC) $(CCARG) $(CC1) $(CC2)$@ -pc xpm_w32.c
327 + $(OBJDIR)\netbeans.obj: netbeans.c $(NBDEBUG_DEP)
328 + $(CC) $(CCARG) $(CC1) $(CC2)$@ netbeans.c
330 $(OBJDIR)\vim.res: vim.rc version.h tools.bmp tearoff.bmp \
331 vim.ico vim_error.ico vim_alert.ico vim_info.ico vim_quest.ico
332 $(BRC) -fo$(OBJDIR)\vim.res -i $(BOR)\include -w32 -r vim.rc @&&|
337 ruby.lib: $(RUBY)\lib\$(RUBY_INSTALL_NAME).lib
338 coff2omf $(RUBY)\lib\$(RUBY_INSTALL_NAME).lib $@
340 + # For some reason, the coff2omf method doesn't work on libXpm.lib, so
341 + # we have to manually generate an import library straight from the DLL.
342 + xpm.lib: $(XPM)\lib\libXpm.lib
343 + implib -a $@ $(XPM)\bin\libXpm.dll
346 !if ("$(DYNAMIC_TCL)" == "yes")
347 *** ../vim-6.2.106/src/Make_cyg.mak Sun Jul 27 13:40:24 2003
348 --- src/Make_cyg.mak Fri Sep 12 21:52:50 2003
351 # This compiles Vim as a Windows application. If you want Vim to run as a
352 # Cygwin application use the Makefile (just like on Unix).
354 ! # Last updated by Dan Sharp. Last Change: 2003 Jun 22
356 # GUI no or yes: set to yes if you want the GUI version (yes)
357 # PERL define to path to Perl dir to get Perl support (not defined)
359 # This compiles Vim as a Windows application. If you want Vim to run as a
360 # Cygwin application use the Makefile (just like on Unix).
362 ! # Last updated by Dan Sharp. Last Change: 2003 Sep 12
364 # GUI no or yes: set to yes if you want the GUI version (yes)
365 # PERL define to path to Perl dir to get Perl support (not defined)
369 # WINVER Lowest Win32 version to support. (0x400)
370 # CSCOPE no or yes: to include cscope interface support (yes)
371 # OPTIMIZE SPACE, SPEED, or MAXSPEED: set optimization level (MAXSPEED)
372 + # NETBEANS no or yes: to include netbeans interface support (yes when GUI
374 + # XPM define to path to XPM dir to get XPM image support (not defined)
375 #>>>>> choose options:
398 ##############################
399 + ifeq (yes, $(NETBEANS))
400 + DEFINES += -DFEAT_NETBEANS_INTG
401 + EXTRA_OBJS += $(OUTDIR)/netbeans.o $(OUTDIR)/gui_beval.o
402 + EXTRA_LIBS += -lws2_32
404 + ifeq (yes, $(DEBUG))
405 + DEFINES += -DNBDEBUG
406 + NBDEBUG_DEP = nbdebug.h nbdebug.c
411 + ##############################
413 + DEFINES += -DFEAT_XPM_W32
414 + INCLUDES += -I$(XPM)/include
415 + EXTRA_OBJS += $(OUTDIR)/xpm_w32.o
416 + EXTRA_LIBS += -L$(XPM)/lib -lXpm
419 + ##############################
421 DEFINES += -DFEAT_OLE
422 EXTRA_OBJS += $(OUTDIR)/if_ole.o
427 $(OUTDIR)/if_ruby.o: if_ruby.c $(INCL)
428 $(CC) -c $(CFLAGS) -U_WIN32 if_ruby.c -o $(OUTDIR)/if_ruby.o
430 + $(OUTDIR)/netbeans.o: netbeans.c $(INCL) $(NBDEBUG_DEP)
431 + $(CC) -c $(CFLAGS) netbeans.c -o $(OUTDIR)/netbeans.o
433 $(OUTDIR)/vimrc.o: vim.rc version.h gui_w32_rc.h
434 $(RC) $(RCFLAGS) vim.rc -o $(OUTDIR)/vimrc.o
435 *** ../vim-6.2.106/src/Make_ming.mak Tue May 27 21:15:20 2003
436 --- src/Make_ming.mak Fri Sep 12 22:03:17 2003
440 # Set the default $(WINVER) to make it work with pre-Win2k
442 ! #set to yes to enable Cscope support
445 # If the user doesn't want gettext, undefine it.
446 ifeq (no, $(GETTEXT))
449 # Set the default $(WINVER) to make it work with pre-Win2k
451 ! # Set to yes to enable Cscope support
453 + # Set to yes to enable Netbeans support
457 # If the user doesn't want gettext, undefine it.
458 ifeq (no, $(GETTEXT))
462 DEFINES += -DFEAT_CSCOPE
465 + ifeq ($(NETBEANS),yes)
466 + DEFINES += -DFEAT_NETBEANS_INTG
467 + ifeq ($(DEBUG), yes)
468 + DEFINES += -DNBDEBUG
469 + NBDEBUG_INCL = nbdebug.h
470 + NBDEBUG_SRC = nbdebug.c
475 + CFLAGS += -DFEAT_XPM_W32 -I $(XPM)/include
479 CFLAGS += -g -fstack-check
485 OBJ += $(OUTDIR)/if_cscope.o
487 + ifeq ($(NETBEANS),yes)
488 + OBJ += $(OUTDIR)/netbeans.o $(OUTDIR)/gui_beval.o
492 + OBJ += $(OUTDIR)/xpm_w32.o
493 + # You'll need libXpm.a from http://gnuwin32.sf.net
494 + LIB += -L $(XPM)/lib -lXpm
502 if_perl.c: if_perl.xs typemap
503 perl $(PERLLIB)/ExtUtils/xsubpp -prototypes -typemap \
504 $(PERLLIB)/ExtUtils/typemap if_perl.xs > $@
506 + $(OUTDIR)/netbeans.o: netbeans.c $(INCL) $(NBDEBUG_INCL) $(NBDEBUG_SRC)
507 + $(CC) -c $(CFLAGS) netbeans.c -o $(OUTDIR)/netbeans.o
510 ifneq (sh.exe, $(SHELL))
511 *** ../vim-6.2.106/src/Make_mvc.mak Sun Aug 10 22:37:55 2003
512 --- src/Make_mvc.mak Fri Sep 12 22:07:37 2003
515 # nmake -f Make_mvc.mak
516 # This will build the console version of vim with no additional interfaces.
517 # To add interfaces, define any of the following:
518 ! # GUI interface: GUI=yes
519 # OLE interface: OLE=yes (usually with GUI=yes)
520 # Multibyte support: MBYTE=yes
521 # IME support: IME=yes (requires GUI=yes)
523 # nmake -f Make_mvc.mak
524 # This will build the console version of vim with no additional interfaces.
525 # To add interfaces, define any of the following:
526 ! # GUI interface: GUI=yes (default is no)
527 # OLE interface: OLE=yes (usually with GUI=yes)
528 # Multibyte support: MBYTE=yes
529 # IME support: IME=yes (requires GUI=yes)
532 # TCL_VER=[Tcl version, e.g. 80, 83] (default is 83)
533 # TCL_VER_LONG=[Tcl version, eg 8.3] (default is 8.3)
534 # You must set TCL_VER_LONG when you set TCL_VER.
535 - # Cscope support: CSCOPE=yes
536 # Debug version: DEBUG=yes
537 # Mapfile: MAP=[no, yes or lines] (default is yes)
538 # no: Don't write a mapfile.
539 # yes: Write a normal mapfile.
540 # lines: Write a mapfile with line numbers (only for VC6 and later)
541 # SNiFF+ interface: SNIFF=yes
542 ! # Cscope interface: CSCOPE=yes
543 # Iconv library support (always dynamically loaded):
544 # ICONV=[yes or no] (default is yes)
545 # Intl library support (always dynamically loaded):
547 # TCL_VER=[Tcl version, e.g. 80, 83] (default is 83)
548 # TCL_VER_LONG=[Tcl version, eg 8.3] (default is 8.3)
549 # You must set TCL_VER_LONG when you set TCL_VER.
550 # Debug version: DEBUG=yes
551 # Mapfile: MAP=[no, yes or lines] (default is yes)
552 # no: Don't write a mapfile.
553 # yes: Write a normal mapfile.
554 # lines: Write a mapfile with line numbers (only for VC6 and later)
555 # SNiFF+ interface: SNIFF=yes
556 ! # Cscope support: CSCOPE=yes
557 # Iconv library support (always dynamically loaded):
558 # ICONV=[yes or no] (default is yes)
559 # Intl library support (always dynamically loaded):
563 # Version Support: WINVER=[0x400, 0x500] (default is 0x400)
564 # Processor Version: CPUNR=[i386, i486, i586, i686] (default is i386)
565 # Optimization: OPTIMIZE=[SPACE, SPEED, MAXSPEED] (default is MAXSPEED)
566 + # Netbeans Support: NETBEANS=[yes or no] (default is yes if GUI is yes)
567 + # XPM Image Support: XPM=[path to XPM directory]
569 # You can combine any of these interfaces
581 !if "$(CSCOPE)" == "yes"
582 # CSCOPE - Include support for Cscope
583 CSCOPE_INCL = if_cscope.h
587 CSCOPE_DEFS = -DFEAT_CSCOPE
594 + !if "$(NETBEANS)" == "yes"
595 + # NETBEANS - Include support for Netbeans integration
596 + NETBEANS_PRO = proto/netbeans.pro
597 + NETBEANS_OBJ = $(OBJDIR)/netbeans.obj $(OBJDIR)/gui_beval.obj
598 + NETBEANS_DEFS = -DFEAT_NETBEANS_INTG
599 + !if "$(DEBUG)" == "yes"
600 + NBDEBUG_DEFS = -DNBDEBUG
601 + NBDEBUG_INCL = nbdebug.h
602 + NBDEBUG_SRC = nbdebug.c
604 + NETBEANS_LIB = Ws2_32.lib
608 + # XPM - Include support for XPM signs
609 + # you can get xpm.lib from http://iamphet.nm.ru/xpm or create it yourself
610 + XPM_OBJ = $(OBJDIR)/xpm_w32.obj
611 + XPM_DEFS = -DFEAT_XPM_W32
612 + XPM_LIB = $(XPM)\lib\libXpm.lib
613 + XPM_INC = -I $(XPM)\include
616 !if defined(USE_MSVCRT)
618 !elseif defined(MULTITHREADED)
621 #VIMRUNTIMEDIR = somewhere
623 CFLAGS = -c /W3 /nologo $(CVARS) -I. -Iproto -DHAVE_PATHDEF -DWIN32 \
624 ! $(SNIFF_DEFS) $(CSCOPE_DEFS) $(DEFINES) \
625 ! -DWINVER=$(WINVER) -D_WIN32_WINNT=$(WINVER)
627 #>>>>> end of choices
628 ###########################################################################
630 #VIMRUNTIMEDIR = somewhere
632 CFLAGS = -c /W3 /nologo $(CVARS) -I. -Iproto -DHAVE_PATHDEF -DWIN32 \
633 ! $(SNIFF_DEFS) $(CSCOPE_DEFS) $(NETBEANS_DEFS) \
634 ! $(NBDEBUG_DEFS) $(XPM_DEFS) \
635 ! $(DEFINES) -DWINVER=$(WINVER) -D_WIN32_WINNT=$(WINVER)
637 #>>>>> end of choices
638 ###########################################################################
643 INCL = vim.h os_win32.h ascii.h feature.h globals.h keymap.h macros.h \
644 ! proto.h option.h structs.h term.h $(SNIFF_INCL) $(CSCOPE_INCL)
647 $(OUTDIR)\buffer.obj \
651 INCL = vim.h os_win32.h ascii.h feature.h globals.h keymap.h macros.h \
652 ! proto.h option.h structs.h term.h $(SNIFF_INCL) $(CSCOPE_INCL) \
656 $(OUTDIR)\buffer.obj \
660 LINKARGS1 = $(linkdebug) $(conflags) /nodefaultlib:libc
661 LINKARGS2 = $(CON_LIB) $(GUI_LIB) $(LIBC) $(OLE_LIB) user32.lib $(SNIFF_LIB) \
662 ! $(PERL_LIB) $(PYTHON_LIB) $(RUBY_LIB) $(TCL_LIB) $(LINK_PDB)
664 all: $(VIM) vimrun.exe install.exe uninstal.exe xxd/xxd.exe GvimExt/gvimext.dll
666 ! $(VIM): $(OUTDIR) $(OBJ) $(GUI_OBJ) $(OLE_OBJ) $(OLE_IDL) $(PERL_OBJ) $(PYTHON_OBJ) $(RUBY_OBJ) $(TCL_OBJ) $(SNIFF_OBJ) $(CSCOPE_OBJ) version.c version.h
667 $(CC) $(CFLAGS) version.c /Fo$(OUTDIR)/version.obj $(PDB)
668 $(link) $(LINKARGS1) -out:$*.exe $(OBJ) $(GUI_OBJ) $(OLE_OBJ) \
669 ! $(PERL_OBJ) $(PYTHON_OBJ) $(RUBY_OBJ) $(TCL_OBJ) $(SNIFF_OBJ) $(CSCOPE_OBJ) \
670 $(OUTDIR)\version.obj $(LINKARGS2)
675 LINKARGS1 = $(linkdebug) $(conflags) /nodefaultlib:libc
676 LINKARGS2 = $(CON_LIB) $(GUI_LIB) $(LIBC) $(OLE_LIB) user32.lib $(SNIFF_LIB) \
677 ! $(PERL_LIB) $(PYTHON_LIB) $(RUBY_LIB) $(TCL_LIB) \
678 ! $(NETBEANS_LIB) $(XPM_LIB) $(LINK_PDB)
680 all: $(VIM) vimrun.exe install.exe uninstal.exe xxd/xxd.exe GvimExt/gvimext.dll
682 ! $(VIM): $(OUTDIR) $(OBJ) $(GUI_OBJ) $(OLE_OBJ) $(OLE_IDL) $(PERL_OBJ) $(PYTHON_OBJ) $(RUBY_OBJ) $(TCL_OBJ) $(SNIFF_OBJ) $(CSCOPE_OBJ) $(NETBEANS_OBJ) $(XPM_OBJ) version.c version.h
683 $(CC) $(CFLAGS) version.c /Fo$(OUTDIR)/version.obj $(PDB)
684 $(link) $(LINKARGS1) -out:$*.exe $(OBJ) $(GUI_OBJ) $(OLE_OBJ) \
685 ! $(PERL_OBJ) $(PYTHON_OBJ) $(RUBY_OBJ) $(TCL_OBJ) $(SNIFF_OBJ) \
686 ! $(CSCOPE_OBJ) $(NETBEANS_OBJ) $(XPM_OBJ) \
687 $(OUTDIR)\version.obj $(LINKARGS2)
694 $(OUTDIR)/gui_w32.obj: $(OUTDIR) gui_w32.c gui_w48.c $(INCL) $(GUI_INCL)
696 + $(OUTDIR)/if_cscope.obj: $(OUTDIR) if_cscope.c $(INCL)
698 if_perl.c : if_perl.xs typemap
699 $(PERL_EXE) $(XSUBPP) -prototypes -typemap $(XSUBPP_TYPEMAP) -typemap typemap if_perl.xs > if_perl.c
705 $(OUTDIR)/mbyte.obj: $(OUTDIR) mbyte.c $(INCL)
707 + $(OUTDIR)/netbeans.obj: $(OUTDIR) netbeans.c $(NBDEBUG_SRC) $(INCL)
709 $(OUTDIR)/normal.obj: $(OUTDIR) normal.c $(INCL)
711 $(OUTDIR)/option.obj: $(OUTDIR) option.c $(INCL)
716 $(OUTDIR)/window.obj: $(OUTDIR) window.c $(INCL)
718 + $(OUTDIR)/xpm_w32.obj: $(OUTDIR) xpm_w32.c
719 + $(CC) $(CFLAGS) $(XPM_INC) xpm_w32.c /Fo$(OUTDIR)/xpm_w32.obj $(PDB)
721 $(OUTDIR)/vim.res: $(OUTDIR) vim.rc version.h tools.bmp tearoff.bmp vim.ico vim_error.ico vim_alert.ico vim_info.ico vim_quest.ico
722 $(RC) /l 0x409 /Fo$(OUTDIR)/vim.res $(RCFLAGS) vim.rc
731 # vim: set noet sw=8 ts=8 sts=0 wm=0 tw=0:
739 # vim: set noet sw=8 ts=8 sts=0 wm=0 tw=0:
740 *** ../vim-6.2.106/src/bigvim.bat Mon Apr 28 21:30:10 2003
741 --- src/bigvim.bat Fri Sep 12 22:08:59 2003
744 :: command to build big Vim with OLE, Perl, Python and Tcl
745 ! nmake -f make_mvc.mak GUI=yes OLE=yes PERL=E:\perl DYNAMIC_PERL=yes PERL_VER=56 PYTHON=e:\python21 DYNAMIC_PYTHON=yes PYTHON_VER=21 TCL=e:\tcl DYNAMIC_TCL=yes %1 IME=yes CSCOPE=yes
748 :: command to build big Vim with OLE, Perl, Python and Tcl
749 ! nmake -f make_mvc.mak GUI=yes OLE=yes PERL=E:\perl DYNAMIC_PERL=yes PERL_VER=56 PYTHON=e:\python21 DYNAMIC_PYTHON=yes PYTHON_VER=21 TCL=e:\tcl DYNAMIC_TCL=yes %1 IME=yes CSCOPE=yes XPM=e:\xpm
751 *** ../vim-6.2.106/src/feature.h Mon Jun 30 22:18:22 2003
752 --- src/feature.h Fri Sep 12 22:14:26 2003
758 ! * The Netbeans features currently only work with Motif and GTK.
759 * It also requires +listcmds and +eval.
761 ! #if ((!defined(FEAT_GUI_MOTIF) && !defined(FEAT_GUI_GTK)) \
762 || !defined(FEAT_LISTCMDS) || !defined(FEAT_EVAL)) \
763 && defined(FEAT_NETBEANS_INTG)
764 # undef FEAT_NETBEANS_INTG
769 ! * The Netbeans features currently only work with Motif and GTK and Win32.
770 * It also requires +listcmds and +eval.
772 ! #if ((!defined(FEAT_GUI_MOTIF) && !defined(FEAT_GUI_GTK) && !defined(FEAT_GUI_W32)) \
773 || !defined(FEAT_LISTCMDS) || !defined(FEAT_EVAL)) \
774 && defined(FEAT_NETBEANS_INTG)
775 # undef FEAT_NETBEANS_INTG
778 * Currently only for Athena and Motif.
780 #if (defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA) \
781 ! || defined(FEAT_GUI_GTK)) \
782 ! && ( (defined(FEAT_TOOLBAR) && !defined(FEAT_GUI_GTK)) \
783 || defined(FEAT_SUN_WORKSHOP) \
784 || defined(FEAT_NETBEANS_INTG))
786 ! # if !defined(FEAT_XFONTSET) && !defined(FEAT_GUI_GTK)
787 # define FEAT_XFONTSET
791 * Currently only for Athena and Motif.
793 #if (defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA) \
794 ! || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_W32)) \
795 ! && ( (defined(FEAT_TOOLBAR) \
796 ! && !defined(FEAT_GUI_GTK) && !defined(FEAT_GUI_W32)) \
797 || defined(FEAT_SUN_WORKSHOP) \
798 || defined(FEAT_NETBEANS_INTG))
800 ! # if !defined(FEAT_XFONTSET) && !defined(FEAT_GUI_GTK) \
801 ! && !defined(FEAT_GUI_W32)
802 # define FEAT_XFONTSET
805 *** ../vim-6.2.106/src/gui_beval.c Sat May 31 22:30:51 2003
806 --- src/gui_beval.c Fri Sep 12 22:17:52 2003
811 #if defined(FEAT_BEVAL) || defined(PROTO)
813 + /* on Win32 only gui_mch_get_beval_info is required */
814 + #if !defined(FEAT_GUI_W32) || defined(PROTO)
817 # include <gdk/gdkkeysyms.h>
818 # include <gtk/gtk.h>
822 return current_beval;
825 + #endif /* !FEAT_GUI_W32 */
827 #if defined(FEAT_SUN_WORKSHOP) || defined(FEAT_NETBEANS_INTG) || defined(PROTO)
832 && wp->w_buffer == curwin->w_buffer
833 && (lnum == spos->lnum
836 && (lnum == epos->lnum
838 : lnum < epos->lnum))
840 /* Visual mode and pointing to the line with the
843 && wp->w_buffer == curwin->w_buffer
844 && (lnum == spos->lnum
845 ! ? col >= (int)spos->col
847 && (lnum == epos->lnum
848 ! ? col <= (int)epos->col
849 : lnum < epos->lnum))
851 /* Visual mode and pointing to the line with the
858 + # if !defined(FEAT_GUI_W32) || defined(PROTO)
861 * Show a balloon with "mesg".
866 undrawBalloon(beval);
870 #if defined(FEAT_BEVAL_TIP) || defined(PROTO)
872 * Hide the given balloon.
875 undrawBalloon(beval);
877 ! # endif /* FEAT_GUI_W32 */
878 ! #endif /* FEAT_SUN_WORKSHOP || FEAT_NETBEANS_INTG || PROTO */
880 + #if !defined(FEAT_GUI_W32) || defined(PROTO)
881 #if defined(FEAT_BEVAL_TIP) || defined(PROTO)
883 * Hide the given balloon.
889 #endif /* !FEAT_GUI_GTK */
890 + #endif /* !FEAT_GUI_W32 */
892 #endif /* FEAT_BEVAL */
893 *** ../vim-6.2.106/src/gui_beval.h Sat Apr 19 16:06:43 2003
894 --- src/gui_beval.h Mon Sep 29 09:56:44 2003
898 # include <gtk/gtkwidget.h>
900 ! # include <X11/Intrinsic.h>
906 # include <gtk/gtkwidget.h>
908 ! # if defined(FEAT_GUI_X11)
909 ! # include <X11/Intrinsic.h>
918 unsigned int state; /* Button/Modifier key state */
920 + # if !defined(FEAT_GUI_W32)
921 Widget target; /* widget we are monitoring */
928 int state; /* Button/Modifier key state */
930 int ts; /* tabstop setting for this buffer */
933 void *clientData; /* For callback */
934 ! #ifndef FEAT_GUI_GTK
935 Dimension screen_width; /* screen width in pixels */
936 Dimension screen_height; /* screen height in pixels */
941 int state; /* Button/Modifier key state */
947 + BeState showState; /* tells us whats currently going on */
950 int ts; /* tabstop setting for this buffer */
953 void *clientData; /* For callback */
954 ! #if !defined(FEAT_GUI_GTK) && !defined(FEAT_GUI_W32)
955 Dimension screen_width; /* screen width in pixels */
956 Dimension screen_height; /* screen height in pixels */
958 *** ../vim-6.2.106/src/gui_w32.c Fri Jul 25 22:43:59 2003
959 --- src/gui_w32.c Mon Sep 29 11:29:15 2003
966 + #ifdef FEAT_XPM_W32
967 + # include "xpm_w32.h"
979 + # define ID_BEVAL_TOOLTIP 200
980 + # define BEVAL_TEXT_LEN MAXPATHL
982 + static void make_tooltip __ARGS((BalloonEval *beval, char *text, POINT pt));
983 + static void delete_tooltip __ARGS((BalloonEval *beval));
984 + static VOID CALLBACK BevalTimerProc __ARGS((HWND hwnd, UINT uMsg, UINT idEvent, DWORD dwTime));
985 + void TrackUserActivity __ARGS((UINT uMsg));
987 + static BalloonEval *cur_beval = NULL;
988 + static UINT BevalTimerId = 0;
989 + static DWORD LastActivity = 0;
992 /* Local variables: */
997 # define USE_SYSMENU_FONT
1001 #define VIM_NAME "vim"
1002 #define VIM_CLASS "Vim"
1007 static TMonitorFromWindow pMonitorFromWindow = NULL;
1008 static TGetMonitorInfo pGetMonitorInfo = NULL;
1009 static HANDLE user32_lib = NULL;
1012 * Return TRUE when running under Windows NT 3.x or Win32s, both of which have
1013 * less fancy GUI APIs.
1015 static TMonitorFromWindow pMonitorFromWindow = NULL;
1016 static TGetMonitorInfo pGetMonitorInfo = NULL;
1017 static HANDLE user32_lib = NULL;
1018 ! #ifdef FEAT_NETBEANS_INTG
1019 ! int WSInitialized = FALSE; /* WinSock is initialized */
1022 * Return TRUE when running under Windows NT 3.x or Win32s, both of which have
1023 * less fancy GUI APIs.
1030 + #ifdef FEAT_NETBEANS_INTG
1032 + _OnWindowPosChanged(
1034 + const LPWINDOWPOS lpwpos)
1036 + static int x = 0, y = 0, cx = 0, cy = 0;
1038 + if (WSInitialized && (lpwpos->x != x || lpwpos->y != y
1039 + || lpwpos->cx != cx || lpwpos->cy != cy))
1045 + netbeans_frame_moved(x, y);
1047 + /* Allow to send WM_SIZE and WM_MOVE */
1048 + FORWARD_WM_WINDOWPOSCHANGED(hwnd, lpwpos, DefWindowProc);
1058 HANDLE_MSG(hwnd, WM_VSCROLL, _OnScroll);
1059 // HANDLE_MSG(hwnd, WM_WINDOWPOSCHANGING, _OnWindowPosChanging);
1060 HANDLE_MSG(hwnd, WM_ACTIVATEAPP, _OnActivateApp);
1061 + #ifdef FEAT_NETBEANS_INTG
1062 + HANDLE_MSG(hwnd, WM_WINDOWPOSCHANGED, _OnWindowPosChanged);
1065 case WM_QUERYENDSESSION: /* System wants to go down. */
1066 gui_shell_closed(); /* Will exit when no changed buffers. */
1073 + #ifdef FEAT_NETBEANS_INTG
1075 + /* stolen from gui_x11.x */
1078 + for (arg = 1; arg < *argc; arg++)
1079 + if (strncmp("-nb", argv[arg], 3) == 0)
1082 + netbeansArg = argv[arg];
1083 + mch_memmove(&argv[arg], &argv[arg + 1],
1084 + (--*argc - arg) * sizeof(char *));
1085 + break; /* enough? */
1088 + if (usingNetbeans)
1093 + /* Init WinSock */
1094 + wsaerr = WSAStartup(MAKEWORD(2, 2), &wsaData);
1096 + WSInitialized = TRUE;
1101 /* get the OS version info */
1102 os_version.dwOSVersionInfoSize = sizeof(os_version);
1103 GetVersionEx(&os_version); /* this call works on Win32s, Win95 and WinNT */
1107 s_findrep_struct.wFindWhatLen = MSWIN_FR_BUFSIZE;
1108 s_findrep_struct.wReplaceWithLen = MSWIN_FR_BUFSIZE;
1110 + #ifdef FEAT_NETBEANS_INTG
1111 + if (usingNetbeans)
1112 + netbeans_w32_connect();
1122 #if defined(FEAT_SIGN_ICONS) || defined(PROTO)
1124 + # ifdef FEAT_XPM_W32
1125 + # define IMAGE_XPM 100
1128 typedef struct _signicon_t
1132 + #ifdef FEAT_XPM_W32
1133 + HANDLE hShape; /* Mask bitmap handle */
1142 DrawIconEx(s_hdc, x, y, (HICON)sign->hImage, w, h, 0, NULL, DI_NORMAL);
1144 + #ifdef FEAT_XPM_W32
1150 + hdcMem = CreateCompatibleDC(s_hdc);
1151 + hbmpOld = (HBITMAP)SelectObject(hdcMem, sign->hShape);
1153 + BitBlt(s_hdc, x, y, w, h, hdcMem, 0, 0, SRCAND);
1155 + SelectObject(hdcMem, sign->hImage);
1157 + BitBlt(s_hdc, x, y, w, h, hdcMem, 0, 0, SRCPAINT);
1158 + SelectObject(hdcMem, hbmpOld);
1170 DestroyIcon((HICON)sign->hImage);
1172 + #ifdef FEAT_XPM_W32
1174 + DeleteObject((HBITMAP)sign->hImage);
1175 + DeleteObject((HBITMAP)sign->hShape);
1184 sign.hImage = (HANDLE)LoadImage(NULL, signfile, sign.uType,
1185 gui.char_width * 2, gui.char_height,
1186 LR_LOADFROMFILE | LR_CREATEDIBSECTION);
1187 + #ifdef FEAT_XPM_W32
1188 + if (!STRICMP(ext, ".xpm"))
1190 + sign.uType = IMAGE_XPM;
1191 + LoadXpmImage(signfile, (HBITMAP *)&sign.hImage, (HBITMAP *)&sign.hShape);
1204 + #if defined(FEAT_BEVAL) || defined(PROTO)
1206 + /* BALLOON-EVAL IMPLEMENTATION FOR WINDOWS.
1207 + * Added by Sergey Khorev
1209 + * The only reused thing is gui_beval.h and gui_mch_get_beval_info()
1210 + * from gui_beval.c (note it uses x and y of the BalloonEval struct
1211 + * to get current mouse position).
1213 + * Trying to use as more Windows services as possible, and as less
1214 + * IE version as possible :)).
1216 + * 1) Don't create ToolTip in gui_mch_create_beval_area, only initialize
1217 + * BalloonEval struct.
1218 + * 2) Enable/Disable simply create/kill BalloonEval Timer
1219 + * 3) When there was enough inactivity, timer procedure posts
1220 + * async request to debugger
1221 + * 4) gui_mch_post_balloon (invoked from netbeans.c) creates tooltip control
1222 + * and performs some actions to show it ASAP
1223 + * 5) WM_NOTOFY:TTN_POP destroys created tooltip
1227 + make_tooltip(beval, text, pt)
1228 + BalloonEval *beval;
1234 + beval->balloon = CreateWindowEx(WS_EX_TOPMOST, TOOLTIPS_CLASS,
1235 + NULL, WS_POPUP | TTS_NOPREFIX | TTS_ALWAYSTIP,
1236 + CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
1237 + beval->target, NULL, s_hinst, NULL);
1239 + SetWindowPos(beval->balloon, HWND_TOPMOST, 0, 0, 0, 0,
1240 + SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
1242 + ti.cbSize = sizeof(TOOLINFO);
1243 + ti.uFlags = TTF_SUBCLASS;
1244 + ti.hwnd = beval->target;
1245 + ti.hinst = 0; /* Don't use string resources */
1246 + ti.uId = ID_BEVAL_TOOLTIP;
1247 + ti.lpszText = text;
1249 + /* Limit ballooneval bounding rect to CursorPos neighbourhood */
1250 + ti.rect.left = pt.x - 3;
1251 + ti.rect.top = pt.y - 3;
1252 + ti.rect.right = pt.x + 3;
1253 + ti.rect.bottom = pt.y + 3;
1255 + SendMessage(beval->balloon, TTM_ADDTOOL, 0, (LPARAM)&ti);
1256 + /* Make tooltip appear sooner */
1257 + SendMessage(beval->balloon, TTM_SETDELAYTIME, TTDT_INITIAL, 10);
1259 + * HACK: force tooltip to appear, because it'll not appear until
1260 + * first mouse move. D*mn M$
1262 + mouse_event(MOUSEEVENTF_MOVE, 1, 1, 0, 0);
1263 + mouse_event(MOUSEEVENTF_MOVE, -1, -1, 0, 0);
1267 + delete_tooltip(beval)
1268 + BalloonEval *beval;
1270 + DestroyWindow(beval->balloon);
1273 + static VOID CALLBACK
1274 + BevalTimerProc(hwnd, uMsg, idEvent, dwTime)
1283 + if (cur_beval == NULL || cur_beval->showState == ShS_SHOWING || !p_beval)
1286 + GetCursorPos(&pt);
1287 + if (WindowFromPoint(pt) != s_textArea)
1290 + ScreenToClient(s_textArea, &pt);
1291 + GetClientRect(s_textArea, &rect);
1292 + if (!PtInRect(&rect, pt))
1295 + if (LastActivity > 0
1296 + && (dwTime - LastActivity) >= (DWORD)p_bdlay
1297 + && (cur_beval->showState != ShS_PENDING
1298 + || abs(cur_beval->x - pt.x) > 3
1299 + || abs(cur_beval->y - pt.y) > 3))
1301 + /* Pointer resting in one place long enough, it's time to show
1303 + cur_beval->showState = ShS_PENDING;
1304 + cur_beval->x = pt.x;
1305 + cur_beval->y = pt.y;
1307 + TRACE0("BevalTimerProc: sending request");
1309 + if (cur_beval->msgCB != NULL)
1310 + (*cur_beval->msgCB)(cur_beval, 0);
1315 + gui_mch_disable_beval_area(beval)
1316 + BalloonEval *beval;
1318 + TRACE0("gui_mch_disable_beval_area {{{");
1319 + KillTimer(s_textArea, BevalTimerId);
1320 + TRACE0("gui_mch_disable_beval_area }}}");
1324 + gui_mch_enable_beval_area(beval)
1325 + BalloonEval *beval;
1327 + TRACE0("gui_mch_enable_beval_area |||");
1328 + if (beval == NULL)
1330 + TRACE0("gui_mch_enable_beval_area {{{");
1331 + BevalTimerId = SetTimer(s_textArea, 0, p_bdlay / 2, (TIMERPROC)BevalTimerProc);
1332 + TRACE0("gui_mch_enable_beval_area }}}");
1336 + gui_mch_post_balloon(beval, mesg)
1337 + BalloonEval *beval;
1341 + TRACE0("gui_mch_post_balloon {{{");
1342 + if (beval->showState == ShS_SHOWING)
1344 + GetCursorPos(&pt);
1345 + ScreenToClient(s_textArea, &pt);
1347 + if (abs(beval->x - pt.x) < 3 && abs(beval->y - pt.y) < 3)
1348 + /* cursor is still here */
1350 + gui_mch_disable_beval_area(cur_beval);
1351 + beval->showState = ShS_SHOWING;
1352 + make_tooltip(beval, mesg, pt);
1354 + TRACE0("gui_mch_post_balloon }}}");
1358 + gui_mch_create_beval_area(target, mesg, mesgCB, clientData)
1359 + void *target; /* ignored, always use s_textArea */
1361 + void (*mesgCB)__ARGS((BalloonEval *, int));
1364 + /* partially stolen from gui_beval.c */
1365 + BalloonEval *beval;
1367 + if (mesg != NULL && mesgCB != NULL)
1369 + EMSG(_("E232: Cannot create BalloonEval with both message and callback"));
1373 + beval = (BalloonEval *)alloc(sizeof(BalloonEval));
1374 + if (beval != NULL)
1376 + beval->target = s_textArea;
1377 + beval->balloon = NULL;
1379 + beval->showState = ShS_NEUTRAL;
1382 + beval->msg = mesg;
1383 + beval->msgCB = mesgCB;
1384 + beval->clientData = clientData;
1386 + InitCommonControls();
1388 + cur_beval = beval;
1391 + gui_mch_enable_beval_area(beval);
1398 + Handle_WM_Notify(hwnd, pnmh)
1402 + if (pnmh->idFrom != ID_BEVAL_TOOLTIP) /* it is not our tooltip */
1405 + if (cur_beval != NULL)
1407 + if (pnmh->code == TTN_SHOW)
1409 + TRACE0("TTN_SHOW {{{");
1410 + TRACE0("TTN_SHOW }}}");
1412 + else if (pnmh->code == TTN_POP) /* Before tooltip disappear */
1414 + TRACE0("TTN_POP {{{");
1415 + delete_tooltip(cur_beval);
1416 + gui_mch_enable_beval_area(cur_beval);
1417 + TRACE0("TTN_POP }}}");
1419 + cur_beval->showState = ShS_NEUTRAL;
1424 + void TrackUserActivity (uMsg)
1427 + if ((uMsg >= WM_MOUSEFIRST && uMsg <= WM_MOUSELAST) ||
1428 + (uMsg >= WM_KEYFIRST && uMsg <= WM_KEYLAST))
1430 + LastActivity = GetTickCount();
1435 + gui_mch_destroy_beval_area(beval)
1436 + BalloonEval *beval;
1440 + #endif /* FEAT_BEVAL */
1442 + #if defined(FEAT_NETBEANS_INTG) || defined(PROTO)
1444 + * We have multiple signs to draw at the same location. Draw the
1445 + * multi-sign indicator (down-arrow) instead. This is the Win32 version.
1448 + netbeans_draw_multisign_indicator(int row)
1457 + for (i = 0; i < gui.char_height - 3; i++)
1458 + SetPixel(s_hdc, x+2, y++, gui.currFgColor);
1460 + SetPixel(s_hdc, x+0, y, gui.currFgColor);
1461 + SetPixel(s_hdc, x+2, y, gui.currFgColor);
1462 + SetPixel(s_hdc, x+4, y++, gui.currFgColor);
1463 + SetPixel(s_hdc, x+1, y, gui.currFgColor);
1464 + SetPixel(s_hdc, x+2, y, gui.currFgColor);
1465 + SetPixel(s_hdc, x+3, y++, gui.currFgColor);
1466 + SetPixel(s_hdc, x+2, y, gui.currFgColor);
1471 *** ../vim-6.2.106/src/gui_w48.c Sat Sep 27 19:40:03 2003
1472 --- src/gui_w48.c Fri Oct 3 15:13:55 2003
1476 # include <shellapi.h>
1478 ! #ifdef FEAT_TOOLBAR
1479 # include <commctrl.h>
1484 # include <shellapi.h>
1486 ! #if defined(FEAT_TOOLBAR) || defined(FEAT_BEVAL)
1487 # include <commctrl.h>
1495 ! typedef void * HINSTANCE;
1496 ! typedef void * HMENU;
1497 ! typedef void * HWND;
1502 #ifndef GET_X_LPARAM
1507 ! typedef void *HINSTANCE;
1508 ! typedef void *HMENU;
1509 ! typedef void *HWND;
1512 + typedef int LPNMHDR;
1516 #ifndef GET_X_LPARAM
1523 + #ifdef FEAT_NETBEANS_INTG
1524 + {VK_PAUSE, 'F', 'B'}, /* Pause == F21 (see gui_gtk_x11.c) */
1528 {VK_F24, 'F', 'E'}, /* winuser.h defines up to F24 */
1532 static int s_timed_out = FALSE;
1533 static int dead_key = 0; /* 0 - no dead key, 1 - dead key pressed */
1536 + /* balloon-eval WM_NOTIFY_HANDLER */
1537 + void Handle_WM_Notify __ARGS((HWND hwnd, LPNMHDR pnmh));
1538 + void TrackUserActivity __ARGS((UINT uMsg));
1551 + TrackUserActivity(uMsg);
1556 HANDLE_MSG(hwnd, WM_LBUTTONDBLCLK,_OnMouseButtonDown);
1560 HANDLE_MSG(hwnd, WM_XBUTTONUP, _OnMouseMoveOrRelease);
1564 + case WM_NOTIFY: Handle_WM_Notify(hwnd, (LPNMHDR)lParam);
1569 return DefWindowProc(hwnd, uMsg, wParam, lParam);
1577 + #ifdef FEAT_NETBEANS_INTG
1578 + if (msg.message == WM_NETBEANS)
1580 + messageFromNetbeansW32();
1586 if (sniff_request_waiting && want_sniff_request)
1588 *** ../vim-6.2.106/src/menu.c Fri Sep 12 20:13:48 2003
1589 --- src/menu.c Fri Sep 12 21:30:03 2003
1592 menu->silent[i] = menuarg->silent[0];
1595 ! #if defined(FEAT_TOOLBAR) && (defined(FEAT_BEVAL) || defined(FEAT_GUI_GTK))
1596 /* Need to update the menu tip. */
1597 if (modes & MENU_TIP_MODE)
1598 gui_mch_menu_set_tip(menu);
1600 menu->silent[i] = menuarg->silent[0];
1603 ! #if defined(FEAT_TOOLBAR) && !defined(FEAT_GUI_W32) \
1604 ! && (defined(FEAT_BEVAL) || defined(FEAT_GUI_GTK))
1605 /* Need to update the menu tip. */
1606 if (modes & MENU_TIP_MODE)
1607 gui_mch_menu_set_tip(menu);
1610 if (modes & MENU_TIP_MODE)
1612 free_menu_string(menu, MENU_INDEX_TIP);
1613 ! #if defined(FEAT_TOOLBAR) && (defined(FEAT_BEVAL) || defined(FEAT_GUI_GTK))
1614 /* Need to update the menu tip. */
1616 gui_mch_menu_set_tip(menu);
1618 if (modes & MENU_TIP_MODE)
1620 free_menu_string(menu, MENU_INDEX_TIP);
1621 ! #if defined(FEAT_TOOLBAR) && !defined(FEAT_GUI_W32) \
1622 ! && (defined(FEAT_BEVAL) || defined(FEAT_GUI_GTK))
1623 /* Need to update the menu tip. */
1625 gui_mch_menu_set_tip(menu);
1626 *** ../vim-6.2.106/src/nbdebug.c Thu Feb 13 16:41:13 2003
1627 --- src/nbdebug.c Tue Sep 16 11:42:48 2003
1630 void nbtrace(char *, ...);
1632 static int lookup(char *);
1633 static int errorHandler(Display *, XErrorEvent *);
1637 * nbdebug_wait - This function can be used to delay or stop execution of vim.
1639 void nbtrace(char *, ...);
1641 static int lookup(char *);
1642 + #ifndef FEAT_GUI_W32
1643 static int errorHandler(Display *, XErrorEvent *);
1647 * nbdebug_wait - This function can be used to delay or stop execution of vim.
1650 char *cp; /* nb_dlevel pointer */
1652 if (log_var && (file = getenv(log_var)) != NULL) {
1655 ! sprintf(buf, "date > %s", file);
1657 ! nb_debug = fopen(file, "a");
1658 if (level_var && (cp = getenv(level_var)) != NULL) {
1659 nb_dlevel = strtoul(cp, NULL, 0);
1662 char *cp; /* nb_dlevel pointer */
1664 if (log_var && (file = getenv(log_var)) != NULL) {
1667 ! nb_debug = fopen(file, "w");
1669 ! fprintf(nb_debug, "%s", asctime(localtime(&now)));
1670 if (level_var && (cp = getenv(level_var)) != NULL) {
1671 nb_dlevel = strtoul(cp, NULL, 0);
1677 expand_env((char_u *) file, (char_u *) buf, BUFSIZ);
1678 ! return (access(buf, F_OK) == 0);
1688 expand_env((char_u *) file, (char_u *) buf, BUFSIZ);
1690 ! #ifndef FEAT_GUI_W32
1691 ! (access(buf, F_OK) == 0);
1693 ! (access(buf, 0) == 0);
1698 + #ifndef FEAT_GUI_W32
1710 #endif /* NBDEBUG */
1718 #endif /* NBDEBUG */
1719 *** ../vim-6.2.106/src/nbdebug.h Thu Feb 13 16:41:13 2003
1720 --- src/nbdebug.h Fri Sep 12 21:30:03 2003
1724 void nbdbg(char *, ...);
1725 void nbtrace(char *, ...);
1727 + void nbdebug_wait __ARGS((u_int wait_flags, char *wait_var, u_int wait_secs));
1728 + void nbdebug_log_init __ARGS((char *log_var, char *level_var));
1730 extern FILE *nb_debug;
1731 extern u_int nb_dlevel; /* nb_debug verbosity level */
1732 *** ../vim-6.2.106/src/netbeans.c Sun Aug 10 22:43:27 2003
1733 --- src/netbeans.c Mon Sep 15 14:27:09 2003
1738 * VIM - Vi IMproved by Bram Moolenaar
1739 * Netbeans integration by David Weatherford
1740 + * Adopted for Win32 by Sergey Khorev
1742 * Do ":help uganda" in Vim to read copying and usage conditions.
1743 * Do ":help credits" in Vim to see a list of people who contributed.
1746 #if defined(FEAT_NETBEANS_INTG) || defined(PROTO)
1748 /* Note: when making changes here also adjust configure.in. */
1749 ! #include <stdarg.h>
1750 ! #include <fcntl.h>
1751 ! #include <netdb.h>
1752 ! #include <netinet/in.h>
1753 ! #include <sys/socket.h>
1754 ! #ifdef HAVE_LIBGEN_H
1755 ! # include <libgen.h>
1758 #include "version.h"
1760 #if defined(FEAT_NETBEANS_INTG) || defined(PROTO)
1762 /* Note: when making changes here also adjust configure.in. */
1763 ! # include <stdarg.h>
1764 ! # include <fcntl.h>
1767 ! # include <tchar.h> /* for _T definition for TRACEn macros */
1770 ! # include <winsock2.h>
1771 ! /* WinSock API is separated from C API
1772 ! * So we can't use read, write, errno...
1774 ! # define sock_errno WSAGetLastError()
1775 ! # define ECONNREFUSED WSAECONNREFUSED
1776 ! # define sock_write(sd, buf, len) send(sd, buf, len, 0)
1777 ! # define sock_read(sd, buf, len) recv(sd, buf, len, 0)
1778 ! # define sock_close(sd) closesocket(sd)
1779 ! # define sleep(t) Sleep(t*1000) /* WinAPI Sleep() accepts milliseconds */
1781 ! # include <netdb.h>
1782 ! # include <netinet/in.h>
1783 ! # include <sys/socket.h>
1784 ! # ifdef HAVE_LIBGEN_H
1785 ! # include <libgen.h>
1787 ! # define sock_errno errno
1788 ! # define sock_write(sd, buf, len) write(sd, buf, len)
1789 ! # define sock_read(sd, buf, len) read(sd, buf, len)
1790 ! # define sock_close(sd) close(sd)
1793 #include "version.h"
1798 static gint inputHandler; /* Cookie for input */
1800 + #ifdef FEAT_GUI_W32
1801 + static int inputHandler = -1; /* simply ret.value of WSAAsyncSelect() */
1802 + extern HWND s_hwnd; /* Gvim's Window handle */
1804 static int cmdno; /* current command number for reply */
1805 static int haveConnection = FALSE; /* socket is connected and
1806 initialization is done */
1811 #endif /* FEAT_GUI_GTK */
1813 + #if defined(FEAT_GUI_W32) || defined(PROTO)
1815 + netbeans_w32_connect(void)
1817 + netbeans_connect();
1821 + * Tell Windows we are interested in receiving message when there
1822 + * is input on the editor connection socket
1824 + inputHandler = WSAAsyncSelect(sd, s_hwnd, WM_NETBEANS, FD_READ);
1829 + netbeans_disconnect(void)
1831 + if (inputHandler == 0)
1833 + WSAAsyncSelect(sd, s_hwnd, 0, 0);
1834 + inputHandler = -1;
1837 + haveConnection = FALSE;
1839 + /* It seems that Motif and GTK versions also need this: */
1840 + gui_mch_destroy_beval_area(balloonEval);
1841 + balloonEval = NULL;
1843 + #endif /* FEAT_GUI_W32 */
1846 netbeans_connect(void)
1849 struct sockaddr_in server;
1850 struct hostent * host;
1851 + # ifdef FEAT_GUI_W32
1857 struct sockaddr_un server;
1861 /* Connect to server */
1862 if (connect(sd, (struct sockaddr *)&server, sizeof(server)))
1864 ! nbdebug(("netbeans_connect: Connect failed with errno %d\n", errno));
1865 ! if (errno == ECONNREFUSED)
1869 if ((sd = socket(AF_INET, SOCK_STREAM, 0)) == -1)
1872 /* Connect to server */
1873 if (connect(sd, (struct sockaddr *)&server, sizeof(server)))
1875 ! nbdebug(("netbeans_connect: Connect failed with errno %d\n", sock_errno));
1876 ! if (sock_errno == ECONNREFUSED)
1880 if ((sd = socket(AF_INET, SOCK_STREAM, 0)) == -1)
1885 int success = FALSE;
1887 ! && ((errno == ECONNREFUSED) || (errno == EINTR)))
1889 nbdebug(("retrying...\n"));
1893 int success = FALSE;
1895 ! && ((sock_errno == ECONNREFUSED) || (sock_errno == EINTR)))
1897 nbdebug(("retrying...\n"));
1901 * Read and process a command from netbeans.
1904 ! #ifdef FEAT_GUI_MOTIF
1906 messageFromNetbeans(XtPointer clientData, int *unused1, XtInputId *unused2)
1908 ! #ifdef FEAT_GUI_GTK
1910 messageFromNetbeans(gpointer clientData, gint unused1,
1911 GdkInputCondition unused2)
1914 static char_u *buf = NULL;
1916 * Read and process a command from netbeans.
1919 ! #if defined(FEAT_GUI_W32) || defined(PROTO)
1920 ! /* Use this one when generating prototypes, the others are static. */
1922 ! messageFromNetbeansW32()
1924 ! # ifdef FEAT_GUI_MOTIF
1926 messageFromNetbeans(XtPointer clientData, int *unused1, XtInputId *unused2)
1928 ! # ifdef FEAT_GUI_GTK
1930 messageFromNetbeans(gpointer clientData, gint unused1,
1931 GdkInputCondition unused2)
1935 static char_u *buf = NULL;
1938 /* Keep on reading for as long as there is something to read. */
1941 ! len = read(sd, buf, MAXMSGSIZE);
1943 break; /* error or nothing more to read */
1945 /* Store the read message in the queue. */
1949 if (len < MAXMSGSIZE)
1950 break; /* did read everything that's available */
1953 /* Keep on reading for as long as there is something to read. */
1956 ! len = sock_read(sd, buf, MAXMSGSIZE);
1958 break; /* error or nothing more to read */
1960 /* Store the read message in the queue. */
1963 if (len < MAXMSGSIZE)
1964 break; /* did read everything that's available */
1969 /* We assume the server knows that we can safely exit! */
1972 /* Disconnect before exiting, Motif hangs in a Select error
1973 * message otherwise. */
1974 netbeans_disconnect();
1977 /* We assume the server knows that we can safely exit! */
1980 /* Disconnect before exiting, Motif hangs in a Select error
1981 * message otherwise. */
1982 netbeans_disconnect();
1986 /* The IDE is breaking the connection. */
1989 netbeans_disconnect();
1994 /* The IDE is breaking the connection. */
1997 netbeans_disconnect();
2005 - #if 0 /* never used */
2006 - unsigned int netbeansOwns:1;
2007 - unsigned int fireCaret:1;
2009 unsigned int fireChanges:1;
2010 unsigned int initDone:1;
2011 unsigned int modified:1;
2012 - #if 0 /* never used */
2013 - char *internalname;
2016 char_u *partial_line;
2018 ! ushort signmaplen;
2019 ! ushort signmapused;
2022 typedef struct nbbuf_struct nbbuf_T;
2027 unsigned int fireChanges:1;
2028 unsigned int initDone:1;
2029 unsigned int modified:1;
2031 char_u *partial_line;
2033 ! short_u signmaplen;
2034 ! short_u signmapused;
2037 typedef struct nbbuf_struct nbbuf_T;
2040 nbdebug(("EVT: %s", buf));
2041 /* nb_send(buf, "netbeans_end"); avoid "write failed" messages */
2043 ! write(sd, buf, STRLEN(buf)); /* ignore errors */
2046 /* Give NetBeans a chance to write some clean-up cmds to the socket before
2048 nbdebug(("EVT: %s", buf));
2049 /* nb_send(buf, "netbeans_end"); avoid "write failed" messages */
2051 ! sock_write(sd, buf, STRLEN(buf)); /* ignore errors */
2054 /* Give NetBeans a chance to write some clean-up cmds to the socket before
2058 nb_send(char *buf, char *fun)
2061 ! EMSG2("E630: %s(): write while not connected", fun);
2062 ! else if (write(sd, buf, STRLEN(buf)) != STRLEN(buf))
2063 ! EMSG2("E631: %s(): write failed", fun);
2069 nb_send(char *buf, char *fun)
2071 + /* Avoid giving pages full of error messages when the other side has
2072 + * exited, only mention the first error until the connection works again. */
2073 + static int did_error = FALSE;
2078 ! EMSG2("E630: %s(): write while not connected", fun);
2081 ! else if (sock_write(sd, buf, STRLEN(buf)) != (int)STRLEN(buf))
2084 ! EMSG2("E631: %s(): write failed", fun);
2088 ! did_error = FALSE;
2107 else if (args != NULL)
2109 + /* We need to detect EOL style
2110 + * because addAnno passes char-offset
2112 + int ff_detected = EOL_UNKNOWN;
2113 + int buf_was_empty = (buf->bufp->b_ml.ml_flags & ML_EMPTY);
2115 oldFire = netbeansFireChanges;
2116 netbeansFireChanges = 0;
2121 nbdebug((" PARTIAL[%d]: %s\n", lnum, args));
2125 + * Not sure how to deal with '\n' on Mac
2126 + * it will fail already in nl = ... above
2128 + if (buf_was_empty && /* There is need to detect EOLs */
2129 + /* AND: string is empty */
2131 + /* OR hasn't '\r' at the end */
2132 + || *(nl - 1) != '\r'))
2133 + ff_detected = EOL_UNIX;
2136 nbdebug((" INSERT[%d]: %s\n", lnum, args));
2137 ml_append((linenr_T)(lnum++ - 1), args,
2138 STRLEN(args) + 1, FALSE);
2142 appended_lines_mark(pos->lnum - 1, lnum - pos->lnum);
2144 + /* We can change initial ff without consequences
2145 + * Isn't it a kind of hacking?
2147 + if (buf_was_empty)
2149 + if (ff_detected == EOL_UNKNOWN)
2150 + ff_detected = EOL_DOS;
2151 + set_fileformat(ff_detected, OPT_LOCAL);
2152 + buf->bufp->b_start_ffc = *buf->bufp->b_p_ff;
2162 curwin->w_cursor = *pos;
2164 + #ifdef FEAT_FOLDING
2169 nbdebug((" BAD POSITION in setDot: %s\n", s));
2182 args = skipwhite(args + 1);
2183 tooltip = (char_u *)nb_unquote(args, &args);
2184 args = skipwhite(args + 1);
2185 ! glyphFile = (char_u *)nb_unquote(args, &args);
2186 args = skipwhite(args + 1);
2187 if (STRNCMP(args, "none", 4) == 0)
2190 args = skipwhite(args + 1);
2191 tooltip = (char_u *)nb_unquote(args, &args);
2192 args = skipwhite(args + 1);
2194 ! p = (char_u *)nb_unquote(args, &args);
2195 ! glyphFile = vim_strsave_escaped(p, escape_chars);
2198 args = skipwhite(args + 1);
2199 if (STRNCMP(args, "none", 4) == 0)
2206 ! char buf[MAXPATHLEN * 2 + 25];
2209 /* Don't do anything when 'ballooneval' is off, messages scrolled the
2214 ! char buf[MAXPATHL * 2 + 25];
2217 /* Don't do anything when 'ballooneval' is off, messages scrolled the
2221 /* Send debugger request. Only when the text is of reasonable
2223 ! if (text != NULL && text[0] != NUL && STRLEN(text) < MAXPATHLEN)
2229 /* Send debugger request. Only when the text is of reasonable
2231 ! if (text != NULL && text[0] != NUL && STRLEN(text) < MAXPATHL)
2237 nbdebug(("EVT: %s", cmd));
2238 nb_send(cmd, "netbeans_startup_done");
2240 ! # if defined(FEAT_BEVAL) && defined(FEAT_GUI_MOTIF)
2245 nbdebug(("EVT: %s", cmd));
2246 nb_send(cmd, "netbeans_startup_done");
2249 ! # ifdef FEAT_GUI_MOTIF
2256 gui_mch_disable_beval_area(balloonEval);
2261 ! #if defined(FEAT_GUI_MOTIF) || defined(PROTO)
2263 * Tell netbeans that the window was moved or resized.
2267 gui_mch_disable_beval_area(balloonEval);
2270 + # if defined(FEAT_GUI_W32) && defined(FEAT_BEVAL)
2271 + balloonEval = gui_mch_create_beval_area(NULL, NULL,
2272 + &netbeans_beval_cb, NULL);
2274 + gui_mch_disable_beval_area(balloonEval);
2280 ! #if defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_W32) || defined(PROTO)
2282 * Tell netbeans that the window was moved or resized.
2287 netbeans_file_opened(char *filename)
2289 ! char buffer[2*MAXPATHLEN];
2291 if (!haveConnection)
2294 sprintf(buffer, "0:fileOpened=%d \"%s\" %s %s\n",
2296 ! nb_quote((char_u *)filename),
2297 "F", /* open in NetBeans */
2298 "F"); /* modified */
2300 nbdebug(("EVT: %s", buffer));
2302 nb_send(buffer, "netbeans_file_opened");
2305 netbeans_file_opened(char *filename)
2307 ! char buffer[2*MAXPATHL];
2310 if (!haveConnection)
2313 + q = nb_quote((char_u *)filename);
2316 sprintf(buffer, "0:fileOpened=%d \"%s\" %s %s\n",
2319 "F", /* open in NetBeans */
2320 "F"); /* modified */
2323 nbdebug(("EVT: %s", buffer));
2325 nb_send(buffer, "netbeans_file_opened");
2329 int bufno = nb_getbufno(bufp);
2330 nbbuf_T *nbbuf = nb_get_buf(bufno);
2331 ! char buffer[2*MAXPATHLEN];
2333 if (!haveConnection)
2337 int bufno = nb_getbufno(bufp);
2338 nbbuf_T *nbbuf = nb_get_buf(bufno);
2339 ! char buffer[2*MAXPATHL];
2341 if (!haveConnection)
2345 newtxt[newlen] = '\0';
2346 p = nb_quote(newtxt);
2348 sprintf((char *)buf, "%d:insert=%d %ld \"%s\"\n", bufno, cmdno, off, p);
2351 - nbdebug(("EVT: %s", buf));
2352 - nb_send((char *)buf, "netbeans_inserted");
2357 newtxt[newlen] = '\0';
2358 p = nb_quote(newtxt);
2361 sprintf((char *)buf, "%d:insert=%d %ld \"%s\"\n", bufno, cmdno, off, p);
2362 + nbdebug(("EVT: %s", buf));
2363 + nb_send((char *)buf, "netbeans_inserted");
2373 netbeans_keycommand(int key)
2375 ! char buf[2*MAXPATHLEN];
2380 if (!haveConnection)
2384 netbeans_keycommand(int key)
2386 ! char buf[2*MAXPATHL];
2392 if (!haveConnection)
2398 nbdebug(("got keycommand for non-NetBeans buffer, opening...\n"));
2399 sprintf(buf, "0:fileOpened=%d \"%s\" %s %s\n", 0,
2400 ! curbuf->b_ffname == NULL ? (char_u *)""
2401 ! : nb_quote(curbuf->b_ffname),
2402 "T", /* open in NetBeans */
2403 "F"); /* modified */
2404 nbdebug(("EVT: %s", buf));
2405 nb_send(buf, "netbeans_keycommand");
2410 nbdebug(("got keycommand for non-NetBeans buffer, opening...\n"));
2411 + q = curbuf->b_ffname == NULL ? (char_u *)""
2412 + : nb_quote(curbuf->b_ffname);
2415 sprintf(buf, "0:fileOpened=%d \"%s\" %s %s\n", 0,
2417 "T", /* open in NetBeans */
2418 "F"); /* modified */
2419 + if (curbuf->b_ffname != NULL)
2421 nbdebug(("EVT: %s", buf));
2422 nb_send(buf, "netbeans_keycommand");
2427 sprintf(buf, "%d:newDotAndMark=%d %ld %ld\n", bufno, cmdno, off, off);
2428 nbdebug(("EVT: %s", buf));
2429 nb_send(buf, "netbeans_keycommand");
2431 + /* To work on Win32 you must apply patch to ExtEditor module
2432 + * from ExtEdCaret.java.diff - make EVT_newDotAndMark handler
2433 + * more synchronous
2436 /* now send keyCommand event */
2437 sprintf(buf, "%d:keyCommand=%d \"%s\"\n", bufno, cmdno, keyName);
2438 *** ../vim-6.2.106/src/os_mswin.c Mon Aug 4 22:04:43 2003
2439 --- src/os_mswin.c Fri Sep 12 21:30:03 2003
2446 + extern int WSInitialized;
2448 /* Don't generate prototypes here, because some systems do have these
2457 + # ifdef FEAT_NETBEANS_INTG
2458 + if (WSInitialized)
2460 + WSInitialized = FALSE;
2464 #ifdef DYNAMIC_GETTEXT
2466 *** ../vim-6.2.106/src/os_win32.h Wed May 7 22:53:05 2003
2467 --- src/os_win32.h Fri Sep 12 21:30:03 2003
2471 # define TRACE1(sz, p1) Trace(_T(sz), p1)
2472 # define TRACE2(sz, p1, p2) Trace(_T(sz), p1, p2)
2473 # define TRACE3(sz, p1, p2, p3) Trace(_T(sz), p1, p2, p3)
2474 + # define TRACE4(sz, p1, p2, p3, p4) Trace(_T(sz), p1, p2, p3, p4)
2476 /* In debug version, writes trace messages to debug stream */
2481 # define TRACE1(sz, p1)
2482 # define TRACE2(sz, p1, p2)
2483 # define TRACE3(sz, p1, p2, p3)
2484 + # define TRACE4(sz, p1, p2, p3, p4)
2486 #endif /* !_DEBUG */
2488 *** ../vim-6.2.106/src/proto/gui_w32.pro Sun Jun 1 12:26:27 2003
2489 --- src/proto/gui_w32.pro Sat Sep 13 21:28:07 2003
2493 void gui_mch_drawsign __ARGS((int row, int col, int typenr));
2494 void *gui_mch_register_sign __ARGS((char_u *signfile));
2495 void gui_mch_destroy_sign __ARGS((void *sign));
2496 + void gui_mch_disable_beval_area __ARGS((BalloonEval *beval));
2497 + void gui_mch_enable_beval_area __ARGS((BalloonEval *beval));
2498 + void gui_mch_post_balloon __ARGS((BalloonEval *beval, char_u *mesg));
2499 + BalloonEval *gui_mch_create_beval_area __ARGS((void *target, char_u *mesg, void (*mesgCB)(BalloonEval *, int), void *clientData));
2500 + void Handle_WM_Notify __ARGS((HWND hwnd, LPNMHDR pnmh));
2501 + void gui_mch_destroy_beval_area __ARGS((BalloonEval *beval));
2502 + void netbeans_draw_multisign_indicator __ARGS((int row));
2503 /* vim: set ft=c : */
2504 *** ../vim-6.2.106/src/proto/netbeans.pro Sun Jul 27 14:16:53 2003
2505 --- src/proto/netbeans.pro Sat Sep 13 21:27:52 2003
2510 void netbeans_Xt_connect __ARGS((void *context));
2511 void netbeans_gtk_connect __ARGS((void));
2512 + void netbeans_w32_connect __ARGS((void));
2513 + void messageFromNetbeansW32 __ARGS((void));
2514 void netbeans_end __ARGS((void));
2515 void netbeans_startup_done __ARGS((void));
2516 void netbeans_frame_moved __ARGS((int new_x, int new_y));
2520 void netbeans_saved __ARGS((buf_T *bufp));
2521 void netbeans_deleted_all_lines __ARGS((buf_T *bufp));
2522 int netbeans_is_guarded __ARGS((linenr_T top, linenr_T bot));
2523 + void netbeans_draw_multisign_indicator __ARGS((int row));
2524 void netbeans_draw_multisign_indicator __ARGS((int row));
2525 void netbeans_gutter_click __ARGS((linenr_T lnum));
2526 /* vim: set ft=c : */
2527 *** ../vim-6.2.106/src/proto.h Sat May 24 17:27:36 2003
2528 --- src/proto.h Tue Sep 30 20:57:53 2003
2532 # ifdef FEAT_GUI_W16
2533 # include "gui_w16.pro"
2535 + /* Ugly solution for "BalloonEval" not being defined while it's used in
2536 + * the prototypes. */
2537 + # ifndef FEAT_BEVAL
2538 + # define BalloonEval int
2540 # ifdef FEAT_GUI_W32
2541 # include "gui_w32.pro"
2543 *** ../vim-6.2.106/src/vim.h Thu Sep 11 21:25:44 2003
2544 --- src/vim.h Wed Sep 17 22:15:42 2003
2547 defined(FEAT_TCL) || \
2548 defined(DYNAMIC_GETTEXT) || \
2549 defined(DYNAMIC_ICONV) || \
2550 ! defined(DYNAMIC_IME)
2555 defined(FEAT_TCL) || \
2556 defined(DYNAMIC_GETTEXT) || \
2557 defined(DYNAMIC_ICONV) || \
2558 ! defined(DYNAMIC_IME) || \
2566 # ifdef FEAT_GUI_W32
2568 # define WM_OLE (WM_APP+0)
2570 + # ifdef FEAT_NETBEANS_INTG
2571 + /* message for Netbeans socket event */
2572 + # define WM_NETBEANS (WM_APP+1)
2576 *** ../vim-6.2.106/src/xpm_w32.c Sun Sep 14 16:09:21 2003
2577 --- src/xpm_w32.c Fri Sep 12 21:49:22 2003
2584 + * This function is placed in separate file because Xpm headers conflict with
2587 + * Written by Sergey Khorev.
2588 + * http://iamphet.nm.ru/vim/index.html
2591 + #ifndef WIN32_LEAN_AND_MEAN
2592 + # define WIN32_LEAN_AND_MEAN
2594 + #include <windows.h>
2596 + /* reduced def from Vim.h */
2598 + # if defined(__STDC__) || defined(__GNUC__) || defined(WIN3264)
2599 + # define __ARGS(x) x
2601 + # define __ARGS(x) ()
2605 + #include "xpm_w32.h"
2607 + /* Engage Windows support in libXpm */
2613 + * Tries to load Xpm image from file 'filename'.
2614 + * If fails return -1.
2615 + * success - 0 and image and mask BITMAPS
2618 + LoadXpmImage(filename, hImage, hShape)
2623 + XImage *img; /* loaded image */
2624 + XImage *shp; /* shapeimage */
2625 + XpmAttributes attr;
2627 + HDC hdc = CreateCompatibleDC(NULL);
2629 + attr.valuemask = 0;
2630 + res = XpmReadFileToImage(&hdc, filename, &img, &shp, &attr);
2636 + *hImage = img->bitmap;
2637 + *hShape = shp->bitmap;
2641 *** ../vim-6.2.106/src/xpm_w32.h Sun Sep 14 16:09:21 2003
2642 --- src/xpm_w32.h Fri Sep 12 21:49:01 2003
2647 + * Header file for xpm_w32.c
2650 + #ifndef XPM_W32__H
2651 + int LoadXpmImage __ARGS((char *filename, HBITMAP *hImage, HBITMAP *hShape));
2653 *** ../vim-6.2.106/src/version.c Sat Sep 27 20:18:38 2003
2654 --- src/version.c Sun Oct 12 16:27:29 2003
2661 + # ifdef FEAT_XPM_W32
2672 { /* Add new patch number below this line */
2678 If Microsoft would build a car...
2679 ... Occasionally, executing a maneuver such as a left turn
2680 would cause your car to shut down and refuse to restart, in
2681 which case you would have to reinstall the engine.
2683 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
2684 /// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\
2685 \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
2686 \\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html ///