home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / amiga / vim46src.lha / vim-4.6 / src / win32.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-07-24  |  2.8 KB  |  120 lines

  1. /* vi:set ts=4 sw=4:
  2.  *
  3.  * VIM - Vi IMproved        by Bram Moolenaar
  4.  *
  5.  * Do ":help uganda"  in Vim to read copying and usage conditions.
  6.  * Do ":help credits" in Vim to see a list of people who contributed.
  7.  */
  8.  
  9. /*
  10.  * Win32 (Windows NT and Windows 95) machine-dependent things.
  11.  */
  12.  
  13. #define CASE_INSENSITIVE_FILENAME    /* ignore case when comparing file names */
  14. #define SPACE_IN_FILENAME
  15. #define BACKSLASH_IN_FILENAME
  16. #define USE_FNAME_CASE            /* adjust case of file names */
  17. #define BINARY_FILE_IO
  18. #define USE_CRNL                /* lines end in CR-NL instead of NL */
  19. #define USE_VIM_REMOVE
  20. #define USE_VIM_CHDIR
  21. #define USE_MOUSE                /* include mouse support */
  22. #define SYNC_DUP_CLOSE            /* sync() a file with dup() and close() */
  23. #define HAVE_STRING_H
  24. #define HAVE_STRCSPN
  25. #define HAVE_MEMSET
  26. #define USE_TMPNAM                /* use tmpnam() instead of mktemp() */
  27. #define HAVE_LOCALE_H
  28. #define HAVE_FCNTL_H
  29. #define HAVE_QSORT
  30. #if defined(__DATE__) && defined(__TIME__)
  31. # define HAVE_DATE_TIME
  32. #endif
  33. #define BREAKCHECK_SKIP        1        /* call mch_breakcheck() each time, it's
  34.                                        quite fast */
  35.  
  36. #define SIZEOF_INT 4
  37.  
  38. /*
  39.  * Names for the EXRC, HELP and temporary files.
  40.  * Some of these may have been defined in the makefile.
  41.  */
  42.  
  43. #ifndef USR_VIMRC_FILE
  44. # define USR_VIMRC_FILE    "$VIM\\_vimrc"
  45. #endif
  46.  
  47. #ifndef USR_EXRC_FILE
  48. # define USR_EXRC_FILE    "$VIM\\_exrc"
  49. #endif
  50.  
  51. #ifndef VIMRC_FILE
  52. # define VIMRC_FILE        "_vimrc"
  53. #endif
  54.  
  55. #ifndef EXRC_FILE
  56. # define EXRC_FILE        "_exrc"
  57. #endif
  58.  
  59. #ifndef VIM_HLP
  60. # define VIM_HLP        "$VIM\\vim_help.txt"
  61. #endif
  62.  
  63. #ifdef VIMINFO
  64. # ifndef VIMINFO_FILE
  65. #  define VIMINFO_FILE    "$VIM\\viminfo"
  66. # endif
  67. #endif /* VIMINFO */
  68.  
  69. #ifndef DEF_BDIR
  70. # define DEF_BDIR        ".,c:\\tmp,c:\\temp"    /* default for 'backupdir' */
  71. #endif
  72.  
  73. #ifndef DEF_DIR
  74. # define DEF_DIR        ".,c:\\tmp,c:\\temp"    /* default for 'directory' */
  75. #endif
  76.  
  77. #include <stdlib.h>
  78.  
  79. /*
  80.  * Win32 has plenty of memory, use large buffers
  81.  */
  82. #define CMDBUFFSIZE    1024        /* size of the command processing buffer */
  83.  
  84. #define MAXPATHL    _MAX_PATH    /* Win32 has long paths and plenty of memory */
  85.  
  86. #define BASENAMELEN        (MAXPATHL-5)    /* length of base of filename */
  87.  
  88. #ifndef MAXMEM
  89. # define MAXMEM            512            /* use up to  512 Kbyte for buffer */
  90. #endif
  91.  
  92. #ifndef MAXMEMTOT
  93. # define MAXMEMTOT        2048        /* use up to 2048 Kbyte for Vim */
  94. #endif
  95.  
  96. /* codes for Win32 mouse event */
  97. #define MOUSE_LEFT        0x00
  98. #define MOUSE_MIDDLE    0x01
  99. #define MOUSE_RIGHT        0x02
  100. #define MOUSE_RELEASE    0x03
  101.  
  102. #define MOUSE_CLICK_MASK    0x03
  103.  
  104. #define MOUSE_SHIFT        0x04
  105. #define MOUSE_ALT        0x08
  106. #define MOUSE_CTRL        0x10
  107.  
  108. /* 0x20 is reserved */
  109.  
  110. #define MOUSE_DRAG        (0x40 | MOUSE_RELEASE)
  111.  
  112. #define NUM_MOUSE_CLICKS(code) ((((code) & 0xC0) >> 6) + 1)
  113.  
  114. #define SET_NUM_MOUSE_CLICKS(code, num) \
  115.     (code) = ((code) & 0x3f) | (((num) - 1) << 6)
  116.  
  117. /* Work around a bug in Windows 95's rename() */
  118. int win95rename(const char* pszOldFile, const char* pszNewFile);
  119. #define rename(old, new)  win95rename(old, new)
  120.