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 / msdos.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-01-04  |  3.1 KB  |  142 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.  * MSDOS 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 BINARY_FILE_IO
  17. #define USE_CRNL                /* lines end in CR-NL instead of NL */
  18. #define USE_VIM_REMOVE
  19. #define USE_VIM_CHDIR
  20. #define USE_MOUSE                /* include mouse support */
  21. #define SYNC_DUP_CLOSE            /* sync() a file with dup() and close() */
  22. #ifdef DJGPP
  23. # include <fcntl.h>                /* defines _USE_LFN */
  24. # define USE_LONG_FNAME _USE_LFN    /* decide at run time */
  25. # define USE_FNAME_CASE
  26. #else
  27. # define SHORT_FNAME                /* always 8.3 filename */
  28. #endif
  29. #define HAVE_STDLIB_H
  30. #define HAVE_STRING_H
  31. #define HAVE_FCNTL_H
  32. #define HAVE_STRCSPN
  33. #define HAVE_MEMSET
  34. #define HAVE_QSORT
  35. #if defined(__DATE__) && defined(__TIME__)
  36. # define HAVE_DATE_TIME
  37. #endif
  38. #define BREAKCHECK_SKIP        1        /* call mch_breakcheck() each time, it's
  39.                                        quite fast */
  40.  
  41. #ifdef DJGPP
  42. # define SIZEOF_INT    4                /* 32 bit ints */
  43. #else
  44. # define SIZEOF_INT 2                /* 16 bit ints */
  45. #endif
  46.  
  47. #include <dos.h>
  48. #include <dir.h>
  49. #include <time.h>
  50.  
  51. #ifdef DJGPP
  52. # include <unistd.h>
  53. #endif
  54.  
  55. #ifndef DJGPP
  56. typedef long off_t;
  57. #endif
  58.  
  59. /*
  60.  * Names for the EXRC, HELP and temporary files.
  61.  * Some of these may have been defined in the makefile.
  62.  */
  63.  
  64. #ifndef USR_VIMRC_FILE
  65. # define USR_VIMRC_FILE    "$VIM\\_vimrc"
  66. #endif
  67.  
  68. #ifndef USR_EXRC_FILE
  69. # define USR_EXRC_FILE    "$VIM\\_exrc"
  70. #endif
  71.  
  72. #ifndef VIMRC_FILE
  73. # define VIMRC_FILE        "_vimrc"
  74. #endif
  75.  
  76. #ifndef EXRC_FILE
  77. # define EXRC_FILE        "_exrc"
  78. #endif
  79.  
  80. #ifndef VIM_HLP
  81. # define VIM_HLP        "$VIM\\vim_help.txt"
  82. #endif
  83.  
  84. #ifdef VIMINFO
  85. # ifndef VIMINFO_FILE
  86. #  define VIMINFO_FILE    "$VIM\\viminfo"
  87. # endif
  88. #endif /* VIMINFO */
  89.  
  90. #ifndef DEF_BDIR
  91. # define DEF_BDIR        ".,c:\\tmp,c:\\temp"    /* default for 'backupdir' */
  92. #endif
  93.  
  94. #ifndef DEF_DIR
  95. # define DEF_DIR        ".,c:\\tmp,c:\\temp"    /* default for 'directory' */
  96. #endif
  97.  
  98. /*
  99.  * Try several directories to put the temp files.
  100.  */
  101. #define TEMPDIRNAMES    "$TMP", "$TEMP", "c:\\TMP", "c:\\TEMP", ""
  102. #define TEMPNAME        "v?XXXXXX"
  103. #define TEMPNAMELEN        128
  104.  
  105. #ifndef MAXMEM
  106. # define MAXMEM            256                /* use up to 256Kbyte for buffer */
  107. #endif
  108. #ifndef MAXMEMTOT
  109. # define MAXMEMTOT        0                /* decide in set_init */
  110. #endif
  111.  
  112. #ifdef DJGPP
  113. # define BASENAMELEN  (_USE_LFN?250:8)    /* length of base of file name */
  114. #else
  115. # define BASENAMELEN        8            /* length of base of file name */
  116. #endif
  117.  
  118. /* codes for msdos mouse event */
  119. #define MOUSE_LEFT        0x01
  120. #define MOUSE_RIGHT        0x02
  121. #define MOUSE_MIDDLE    0x04
  122. #define MOUSE_RELEASE    0x07
  123.  
  124. #define MOUSE_SHIFT        0x08
  125. #define MOUSE_ALT        0x10
  126. #define MOUSE_CTRL        0x20
  127.  
  128. #define MOUSE_DRAG        (0x40 | MOUSE_RELEASE)
  129.  
  130. #define MOUSE_CLICK_MASK    0x07
  131.  
  132. #define NUM_MOUSE_CLICKS(code) \
  133.     ((((code) & 0xff) >> 6) + 1)
  134.  
  135. #define SET_NUM_MOUSE_CLICKS(code, num) \
  136.     (code) = ((code) & 0x3f) + (((num) - 1) << 6)
  137.  
  138. #ifdef DJGPP
  139. /* Work around a bug in Windows 95's rename() */
  140. #define rename(old, new)  djgpp_rename(old, new)
  141. #endif
  142.