| To: vim_dev@googlegroups.com |
| Subject: Patch 7.3.719 |
| 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.719 |
| Problem: Cannot run new version of cproto, it fails on missing include |
| files. |
| Solution: Add lots of #ifndef PROTO |
| Files: src/os_amiga.c, src/os_amiga.h, src/gui_w16.c, src/gui_w48.c, |
| src/gui_w32.c, src/vimio.h, src/os_msdos.c, src/os_msdos.h, |
| src/os_win16.h, src/os_win16.c, src/os_win32.h, src/os_win32.c, |
| src/os_mswin.c, src/gui_photon.c, src/os_unix.h, src/os_beos.c, |
| src/os_beos.h |
| |
| |
| |
| |
| |
| *** 22,27 **** |
| --- 22,30 ---- |
| #undef TRUE /* will be redefined by exec/types.h */ |
| #undef FALSE |
| |
| + /* cproto fails on missing include files, skip them */ |
| + #ifndef PROTO |
| + |
| #ifndef LATTICE |
| # include <exec/types.h> |
| # include <exec/exec.h> |
| |
| *** 55,60 **** |
| --- 58,65 ---- |
| # include <libraries/arp_pragmas.h> |
| #endif |
| |
| + #endif /* PROTO */ |
| + |
| /* |
| * At this point TRUE and FALSE are defined as 1L and 0L, but we want 1 and 0. |
| */ |
| |
| *** 283,289 **** |
| #endif |
| } |
| |
| ! #include <workbench/startup.h> |
| |
| /* |
| * Check_win checks whether we have an interactive window. |
| --- 288,296 ---- |
| #endif |
| } |
| |
| ! #ifndef PROTO |
| ! # include <workbench/startup.h> |
| ! #endif |
| |
| /* |
| * Check_win checks whether we have an interactive window. |
| |
| *** 1002,1008 **** |
| * Heavely modified by mool. |
| */ |
| |
| ! #include <devices/conunit.h> |
| |
| /* |
| * try to get the real window size |
| --- 1009,1017 ---- |
| * Heavely modified by mool. |
| */ |
| |
| ! #ifndef PROTO |
| ! # include <devices/conunit.h> |
| ! #endif |
| |
| /* |
| * try to get the real window size |
| |
| *** 1129,1137 **** |
| * say 'oml lib:amiga.lib -r sendpacket.o' |
| */ |
| |
| /* #include <proto/exec.h> */ |
| /* #include <proto/dos.h> */ |
| ! #include <exec/memory.h> |
| |
| /* |
| * Function - dos_packet written by Phil Lindsay, Carolyn Scheppner, and Andy |
| --- 1138,1148 ---- |
| * say 'oml lib:amiga.lib -r sendpacket.o' |
| */ |
| |
| + #ifndef PROTO |
| /* #include <proto/exec.h> */ |
| /* #include <proto/dos.h> */ |
| ! # include <exec/memory.h> |
| ! #endif |
| |
| /* |
| * Function - dos_packet written by Phil Lindsay, Carolyn Scheppner, and Andy |
| |
| |
| |
| *** 56,61 **** |
| --- 56,64 ---- |
| # define TEMPNAMELEN 12 |
| #endif |
| |
| + /* cproto fails on missing include files */ |
| + #ifndef PROTO |
| + |
| #include <exec/types.h> |
| #include <libraries/dos.h> |
| #include <libraries/dosextens.h> |
| |
| *** 67,72 **** |
| --- 70,77 ---- |
| # include <proto/intuition.h> |
| #endif |
| |
| + #endif /* PROTO */ |
| + |
| #define FNAME_ILLEGAL ";*?`#%" /* illegal characters in a file name */ |
| |
| /* |
| |
| *** 85,90 **** |
| --- 90,96 ---- |
| # include <unistd.h> |
| #endif |
| |
| + #ifndef PROTO |
| /* |
| * arpbase.h must be included before functions.h |
| */ |
| |
| *** 92,97 **** |
| --- 98,105 ---- |
| # include <libraries/arpbase.h> |
| #endif |
| |
| + #endif /* PROTO */ |
| + |
| /* |
| * This won't be needed if you have a version of Lattice 4.01 without broken |
| * break signal handling. |
| |
| |
| |
| *** 1521,1527 **** |
| |
| |
| #if defined(FEAT_TOOLBAR) || defined(PROTO) |
| ! #include "gui_w3~1.h" |
| /* |
| * Create the toolbar, initially unpopulated. |
| * (just like the menu, there are no defaults, it's all |
| --- 1521,1532 ---- |
| |
| |
| #if defined(FEAT_TOOLBAR) || defined(PROTO) |
| ! |
| ! /* cproto fails on missing include files */ |
| ! #ifndef PROTO |
| ! # include "gui_w3~1.h" |
| ! #endif |
| ! |
| /* |
| * Create the toolbar, initially unpopulated. |
| * (just like the menu, there are no defaults, it's all |
| |
| |
| |
| *** 25,30 **** |
| --- 25,34 ---- |
| #ifdef DEBUG |
| # include <tchar.h> |
| #endif |
| + |
| + /* cproto fails on missing include files */ |
| + #ifndef PROTO |
| + |
| #ifndef __MINGW32__ |
| # include <shellapi.h> |
| #endif |
| |
| *** 44,49 **** |
| --- 48,55 ---- |
| # include "glbl_ime.h" |
| #endif |
| |
| + #endif /* PROTO */ |
| + |
| #ifdef FEAT_MENU |
| # define MENUHINTS /* show menu hints in command line */ |
| #endif |
| |
| |
| |
| *** 198,208 **** |
| static UINT_PTR BevalTimerId = 0; |
| static DWORD LastActivity = 0; |
| |
| /* |
| * excerpts from headers since this may not be presented |
| * in the extremely old compilers |
| */ |
| ! #include <pshpack1.h> |
| |
| typedef struct _DllVersionInfo |
| { |
| --- 198,214 ---- |
| static UINT_PTR BevalTimerId = 0; |
| static DWORD LastActivity = 0; |
| |
| + |
| + /* cproto fails on missing include files */ |
| + #ifndef PROTO |
| + |
| /* |
| * excerpts from headers since this may not be presented |
| * in the extremely old compilers |
| */ |
| ! # include <pshpack1.h> |
| ! |
| ! #endif |
| |
| typedef struct _DllVersionInfo |
| { |
| |
| *** 213,219 **** |
| DWORD dwPlatformID; |
| } DLLVERSIONINFO; |
| |
| ! #include <poppack.h> |
| |
| typedef struct tagTOOLINFOA_NEW |
| { |
| --- 219,227 ---- |
| DWORD dwPlatformID; |
| } DLLVERSIONINFO; |
| |
| ! #ifndef PROTO |
| ! # include <poppack.h> |
| ! #endif |
| |
| typedef struct tagTOOLINFOA_NEW |
| { |
| |
| |
| |
| *** 13,16 **** |
| # define _CRT_NONSTDC_NO_DEPRECATE |
| #endif |
| |
| ! #include <io.h> |
| --- 13,19 ---- |
| # define _CRT_NONSTDC_NO_DEPRECATE |
| #endif |
| |
| ! /* cproto fails on missing include files */ |
| ! #ifndef PROTO |
| ! # include <io.h> |
| ! #endif |
| |
| |
| |
| *** 23,29 **** |
| |
| #include "vim.h" |
| |
| ! #include <conio.h> |
| |
| /* |
| * MS-DOS only code, not used for Win16. |
| --- 23,32 ---- |
| |
| #include "vim.h" |
| |
| ! /* cproto fails on missing include files */ |
| ! #ifndef PROTO |
| ! # include <conio.h> |
| ! #endif |
| |
| /* |
| * MS-DOS only code, not used for Win16. |
| |
| *** 31,47 **** |
| #ifndef WIN16 |
| |
| |
| ! #include <bios.h> |
| ! #ifdef DJGPP |
| ! # include <dpmi.h> |
| ! # include <signal.h> |
| ! # include <sys/movedata.h> |
| ! # include <crt0.h> |
| ! # ifdef FEAT_CLIPBOARD |
| ! # include <sys/segments.h> |
| # endif |
| - #else |
| - # include <alloc.h> |
| #endif |
| |
| #if defined(DJGPP) || defined(PROTO) |
| --- 34,52 ---- |
| #ifndef WIN16 |
| |
| |
| ! #ifndef PROTO |
| ! # include <bios.h> |
| ! # ifdef DJGPP |
| ! # include <dpmi.h> |
| ! # include <signal.h> |
| ! # include <sys/movedata.h> |
| ! # include <crt0.h> |
| ! # ifdef FEAT_CLIPBOARD |
| ! # include <sys/segments.h> |
| ! # endif |
| ! # else |
| ! # include <alloc.h> |
| # endif |
| #endif |
| |
| #if defined(DJGPP) || defined(PROTO) |
| |
| *** 2130,2137 **** |
| |
| #undef setlocale |
| |
| ! #include <go32.h> |
| ! #include <inlines/ctype.ha> |
| #include <locale.h> |
| |
| #define UPCASE (__dj_ISALNUM | __dj_ISALPHA | __dj_ISGRAPH | __dj_ISPRINT | __dj_ISUPPER) |
| --- 2135,2144 ---- |
| |
| #undef setlocale |
| |
| ! #ifndef PROTO |
| ! # include <go32.h> |
| ! # include <inlines/ctype.ha> |
| ! #endif |
| #include <locale.h> |
| |
| #define UPCASE (__dj_ISALNUM | __dj_ISALPHA | __dj_ISGRAPH | __dj_ISPRINT | __dj_ISUPPER) |
| |
| |
| |
| *** 53,61 **** |
| |
| #define FNAME_ILLEGAL "\"*?><|" /* illegal characters in a file name */ |
| |
| ! #include <dos.h> |
| ! #include <dir.h> |
| ! #include <time.h> |
| |
| #ifdef DJGPP |
| # include <unistd.h> |
| --- 53,64 ---- |
| |
| #define FNAME_ILLEGAL "\"*?><|" /* illegal characters in a file name */ |
| |
| ! /* cproto fails on missing include files */ |
| ! #ifndef PROTO |
| ! # include <dos.h> |
| ! # include <dir.h> |
| ! # include <time.h> |
| ! #endif |
| |
| #ifdef DJGPP |
| # include <unistd.h> |
| |
| |
| |
| *** 63,78 **** |
| |
| #include <stdlib.h> |
| #include <time.h> |
| - #include <dos.h> |
| - #include <dir.h> |
| |
| ! #ifndef STRICT |
| ! # define STRICT |
| ! #endif |
| ! #ifndef COBJMACROS |
| ! # define COBJMACROS /* For OLE: Enable "friendlier" access to objects */ |
| ! #endif |
| ! #include <windows.h> |
| |
| /* |
| * plenty of memory, use large buffers |
| --- 63,83 ---- |
| |
| #include <stdlib.h> |
| #include <time.h> |
| |
| ! /* cproto fails on missing include files */ |
| ! #ifndef PROTO |
| ! # include <dos.h> |
| ! # include <dir.h> |
| ! |
| ! # ifndef STRICT |
| ! # define STRICT |
| ! # endif |
| ! # ifndef COBJMACROS |
| ! # define COBJMACROS /* For OLE: Enable "friendlier" access to objects */ |
| ! # endif |
| ! # include <windows.h> |
| ! |
| ! #endif /* PROTO */ |
| |
| /* |
| * plenty of memory, use large buffers |
| |
| |
| |
| *** 22,37 **** |
| |
| #include "vim.h" |
| |
| ! #include <dos.h> |
| #include <string.h> |
| #include <sys/types.h> |
| #include <signal.h> |
| #include <limits.h> |
| - #include <process.h> |
| |
| ! #undef chdir |
| ! #include <direct.h> |
| ! #include <shellapi.h> /* required for FindExecutable() */ |
| |
| |
| /* Record all output and all keyboard & mouse input */ |
| --- 22,44 ---- |
| |
| #include "vim.h" |
| |
| ! /* cproto fails on missing include files */ |
| ! #ifndef PROTO |
| ! # include <dos.h> |
| ! #endif |
| ! |
| #include <string.h> |
| #include <sys/types.h> |
| #include <signal.h> |
| #include <limits.h> |
| |
| ! #ifndef PROTO |
| ! # include <process.h> |
| ! |
| ! # undef chdir |
| ! # include <direct.h> |
| ! # include <shellapi.h> /* required for FindExecutable() */ |
| ! #endif |
| |
| |
| /* Record all output and all keyboard & mouse input */ |
| |
| |
| |
| *** 12,18 **** |
| |
| #include "os_dos.h" /* common MS-DOS and Win32 stuff */ |
| #ifndef __CYGWIN__ |
| ! #include <direct.h> /* for _mkdir() */ |
| #endif |
| |
| /* Stop the VC2005 compiler from nagging. */ |
| --- 12,21 ---- |
| |
| #include "os_dos.h" /* common MS-DOS and Win32 stuff */ |
| #ifndef __CYGWIN__ |
| ! /* cproto fails on missing include files */ |
| ! # ifndef PROTO |
| ! # include <direct.h> /* for _mkdir() */ |
| ! # endif |
| #endif |
| |
| /* Stop the VC2005 compiler from nagging. */ |
| |
| *** 101,107 **** |
| #ifndef COBJMACROS |
| # define COBJMACROS /* For OLE: Enable "friendlier" access to objects */ |
| #endif |
| ! #include <windows.h> |
| |
| /* |
| * Win32 has plenty of memory, use large buffers |
| --- 104,112 ---- |
| #ifndef COBJMACROS |
| # define COBJMACROS /* For OLE: Enable "friendlier" access to objects */ |
| #endif |
| ! #ifndef PROTO |
| ! # include <windows.h> |
| ! #endif |
| |
| /* |
| * Win32 has plenty of memory, use large buffers |
| |
| *** 194,199 **** |
| --- 199,206 ---- |
| # define vim_mkdir(x, y) mch_mkdir(x) |
| #endif |
| |
| + #ifndef PROTO |
| + |
| /* Enable common dialogs input unicode from IME if posible. */ |
| #ifdef FEAT_MBYTE |
| /* The variables are defined in os_win32.c. */ |
| |
| *** 207,209 **** |
| --- 214,218 ---- |
| # define pIsDialogMessage IsDialogMessage |
| # define pPeekMessage PeekMessage |
| #endif |
| + |
| + #endif /* PROTO */ |
| |
| |
| |
| *** 29,35 **** |
| #include <sys/types.h> |
| #include <signal.h> |
| #include <limits.h> |
| ! #include <process.h> |
| |
| #undef chdir |
| #ifdef __GNUC__ |
| --- 29,39 ---- |
| #include <sys/types.h> |
| #include <signal.h> |
| #include <limits.h> |
| ! |
| ! /* cproto fails on missing include files */ |
| ! #ifndef PROTO |
| ! # include <process.h> |
| ! #endif |
| |
| #undef chdir |
| #ifdef __GNUC__ |
| |
| *** 40,47 **** |
| # include <direct.h> |
| #endif |
| |
| ! #if defined(FEAT_TITLE) && !defined(FEAT_GUI_W32) |
| ! # include <shellapi.h> |
| #endif |
| |
| #ifdef __MINGW32__ |
| --- 44,53 ---- |
| # include <direct.h> |
| #endif |
| |
| ! #ifndef PROTO |
| ! # if defined(FEAT_TITLE) && !defined(FEAT_GUI_W32) |
| ! # include <shellapi.h> |
| ! # endif |
| #endif |
| |
| #ifdef __MINGW32__ |
| |
| *** 125,130 **** |
| --- 131,137 ---- |
| typedef int WORD; |
| typedef int WCHAR; |
| typedef void VOID; |
| + typedef int BY_HANDLE_FILE_INFORMATION; |
| #endif |
| |
| #ifndef FEAT_GUI_W32 |
| |
| *** 152,157 **** |
| --- 159,166 ---- |
| # define wcsicmp(a, b) wcscmpi((a), (b)) |
| #endif |
| |
| + #ifndef PROTO |
| + |
| /* Enable common dialogs input unicode from IME if posible. */ |
| #ifdef FEAT_MBYTE |
| LRESULT (WINAPI *pDispatchMessage)(LPMSG) = DispatchMessage; |
| |
| *** 160,165 **** |
| --- 169,176 ---- |
| BOOL (WINAPI *pPeekMessage)(LPMSG, HWND, UINT, UINT, UINT) = PeekMessage; |
| #endif |
| |
| + #endif /* PROTO */ |
| + |
| #ifndef FEAT_GUI_W32 |
| /* Win32 Console handles for input and output */ |
| static HANDLE g_hConIn = INVALID_HANDLE_VALUE; |
| |
| *** 453,459 **** |
| DWORD g_PlatformId; |
| |
| #ifdef HAVE_ACL |
| ! # include <aclapi.h> |
| /* |
| * These are needed to dynamically load the ADVAPI DLL, which is not |
| * implemented under Windows 95 (and causes VIM to crash) |
| --- 464,473 ---- |
| DWORD g_PlatformId; |
| |
| #ifdef HAVE_ACL |
| ! # ifndef PROTO |
| ! # include <aclapi.h> |
| ! # endif |
| ! |
| /* |
| * These are needed to dynamically load the ADVAPI DLL, which is not |
| * implemented under Windows 95 (and causes VIM to crash) |
| |
| *** 1658,1665 **** |
| #endif /* FEAT_GUI_W32 */ |
| } |
| |
| ! #ifndef __MINGW32__ |
| ! # include <shellapi.h> /* required for FindExecutable() */ |
| #endif |
| |
| /* |
| --- 1672,1681 ---- |
| #endif /* FEAT_GUI_W32 */ |
| } |
| |
| ! #ifndef PROTO |
| ! # ifndef __MINGW32__ |
| ! # include <shellapi.h> /* required for FindExecutable() */ |
| ! # endif |
| #endif |
| |
| /* |
| |
| |
| |
| *** 26,38 **** |
| |
| #ifdef WIN16 |
| # define SHORT_FNAME /* always 8.3 file name */ |
| ! # include <dos.h> |
| # include <string.h> |
| #endif |
| #include <sys/types.h> |
| #include <signal.h> |
| #include <limits.h> |
| ! #include <process.h> |
| |
| #undef chdir |
| #ifdef __GNUC__ |
| --- 26,43 ---- |
| |
| #ifdef WIN16 |
| # define SHORT_FNAME /* always 8.3 file name */ |
| ! /* cproto fails on missing include files */ |
| ! # ifndef PROTO |
| ! # include <dos.h> |
| ! # endif |
| # include <string.h> |
| #endif |
| #include <sys/types.h> |
| #include <signal.h> |
| #include <limits.h> |
| ! #ifndef PROTO |
| ! # include <process.h> |
| ! #endif |
| |
| #undef chdir |
| #ifdef __GNUC__ |
| |
| *** 43,62 **** |
| # include <direct.h> |
| #endif |
| |
| ! #if defined(FEAT_TITLE) && !defined(FEAT_GUI_W32) |
| ! # include <shellapi.h> |
| ! #endif |
| ! |
| ! #if defined(FEAT_PRINTER) && !defined(FEAT_POSTSCRIPT) |
| ! # include <dlgs.h> |
| ! # ifdef WIN3264 |
| ! # include <winspool.h> |
| ! # else |
| ! # include <print.h> |
| # endif |
| ! # include <commdlg.h> |
| #endif |
| |
| #ifdef __MINGW32__ |
| # ifndef FROM_LEFT_1ST_BUTTON_PRESSED |
| # define FROM_LEFT_1ST_BUTTON_PRESSED 0x0001 |
| --- 48,70 ---- |
| # include <direct.h> |
| #endif |
| |
| ! #ifndef PROTO |
| ! # if defined(FEAT_TITLE) && !defined(FEAT_GUI_W32) |
| ! # include <shellapi.h> |
| # endif |
| ! |
| ! # if defined(FEAT_PRINTER) && !defined(FEAT_POSTSCRIPT) |
| ! # include <dlgs.h> |
| ! # ifdef WIN3264 |
| ! # include <winspool.h> |
| ! # else |
| ! # include <print.h> |
| ! # endif |
| ! # include <commdlg.h> |
| #endif |
| |
| + #endif /* PROTO */ |
| + |
| #ifdef __MINGW32__ |
| # ifndef FROM_LEFT_1ST_BUTTON_PRESSED |
| # define FROM_LEFT_1ST_BUTTON_PRESSED 0x0001 |
| |
| *** 2410,2416 **** |
| |
| |
| #if defined(FEAT_SHORTCUT) || defined(PROTO) |
| ! # include <shlobj.h> |
| |
| /* |
| * When "fname" is the name of a shortcut (*.lnk) resolve the file it points |
| --- 2418,2426 ---- |
| |
| |
| #if defined(FEAT_SHORTCUT) || defined(PROTO) |
| ! # ifndef PROTO |
| ! # include <shlobj.h> |
| ! # endif |
| |
| /* |
| * When "fname" is the name of a shortcut (*.lnk) resolve the file it points |
| |
| |
| |
| *** 13,20 **** |
| |
| #include "vim.h" |
| |
| ! #ifdef FEAT_TOOLBAR |
| ! # include <photon/PxImage.h> |
| #endif |
| |
| #if !defined(__QNX__) |
| --- 13,23 ---- |
| |
| #include "vim.h" |
| |
| ! /* cproto fails on missing include files */ |
| ! #ifndef PROTO |
| ! # ifdef FEAT_TOOLBAR |
| ! # include <photon/PxImage.h> |
| ! # endif |
| #endif |
| |
| #if !defined(__QNX__) |
| |
| |
| |
| *** 198,203 **** |
| --- 198,206 ---- |
| # define HAVE_TOTAL_MEM |
| #endif |
| |
| + |
| + #ifndef PROTO |
| + |
| #ifdef VMS |
| # include <unixio.h> |
| # include <unixlib.h> |
| |
| *** 226,232 **** |
| --- 229,239 ---- |
| # ifdef FEAT_GUI_GTK |
| # include "gui_gtk_vms.h" |
| # endif |
| + #endif |
| |
| + #endif /* PROTO */ |
| + |
| + #ifdef VMS |
| typedef struct dsc$descriptor DESC; |
| #endif |
| |
| |
| |
| |
| *** 13,19 **** |
| |
| #include <float.h> |
| #include <termios.h> |
| ! #include <kernel/OS.h> |
| #include "vim.h" |
| |
| #if USE_THREAD_FOR_INPUT_WITH_TIMEOUT |
| --- 13,22 ---- |
| |
| #include <float.h> |
| #include <termios.h> |
| ! #ifndef PROTO |
| ! # include <kernel/OS.h> |
| ! #endif |
| ! |
| #include "vim.h" |
| |
| #if USE_THREAD_FOR_INPUT_WITH_TIMEOUT |
| |
| |
| |
| *** 22,25 **** |
| |
| /* select emulation */ |
| |
| ! #include <net/socket.h> /* for typedefs and #defines only */ |
| --- 22,27 ---- |
| |
| /* select emulation */ |
| |
| ! #ifndef PROTO |
| ! # include <net/socket.h> /* for typedefs and #defines only */ |
| ! #endif |
| |
| |
| |
| *** 727,728 **** |
| --- 727,730 ---- |
| { /* Add new patch number below this line */ |
| + /**/ |
| + 719, |
| /**/ |
| |
| -- |
| George: "I just got a new set of golf clubs for my wife!" |
| John: "Great trade!" |
| |
| /// 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 /// |