1 /* vi:set ts=8 sts=4 sw=4:
3 * VIM - Vi IMproved by Bram Moolenaar
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.
10 * Win16 (Windows 3.1x) machine-dependent things.
13 #include "os_dos.h" /* common MS-DOS and Windows stuff */
15 #define BINARY_FILE_IO
16 #define USE_EXE_NAME /* use argv[0] for $VIM */
17 #define SYNC_DUP_CLOSE /* sync() a file with dup() and close() */
18 #define USE_TERM_CONSOLE
23 #define HAVE_STRFTIME /* guessed */
25 #define USE_TMPNAM /* use tmpnam() instead of mktemp() */
29 #define HAVE_ST_MODE /* have stat.st_mode */
30 //#define USE_FNAME_CASE /* adjust case of file names */
31 #ifndef FEAT_CLIPBOARD
32 # define FEAT_CLIPBOARD /* include clipboard support */
34 #if defined(__DATE__) && defined(__TIME__)
35 # define HAVE_DATE_TIME
37 #define HAVE_AVAIL_MEM
39 #define SHORT_FNAME /* always 8.3 file name */
41 #define SMALL_MALLOC /* 16 bit storage allocation */
44 # define HAVE_PUTENV /* at least Bcc 5.2 has it */
48 # define NO_CONSOLE /* don't included console-only code */
51 /* toupper() is not really broken, but it's very slow. Probably because of
52 * using unicde characters on Windows NT */
53 #define BROKEN_TOUPPER
55 #define FNAME_ILLEGAL "\"*?><|" /* illegal characters in a file name */
72 # define COBJMACROS /* For OLE: Enable "friendlier" access to objects */
77 * plenty of memory, use large buffers
79 #define CMDBUFFSIZE 1024 /* size of the command processing buffer */
82 #define BASENAMELEN (MAXPATHL-5) /* length of base of file name */
85 # define DFLT_MAXMEM (256) /* use up to 256K for a buffer*/
88 #ifndef DFLT_MAXMEMTOT
89 # define DFLT_MAXMEMTOT (5*1024) /* use up to 5 Mbyte for Vim */
93 * Some simple debugging macros that look and behave a lot like their
99 # if defined(_MSC_VER) && (_MSC_VER >= 1000)
100 /* Use the new debugging tools in Visual C++ 4.x */
102 # define ASSERT(f) _ASSERT(f)
105 # define ASSERT(f) assert(f)
109 # define TRACE0(sz) Trace(_T("%s"), _T(sz))
110 # define TRACE1(sz, p1) Trace(_T(sz), p1)
111 # define TRACE2(sz, p1, p2) Trace(_T(sz), p1, p2)
112 # define TRACE3(sz, p1, p2, p3) Trace(_T(sz), p1, p2, p3)
114 /* In debug version, writes trace messages to debug stream */
116 Trace(char *pszFormat
, ...);
120 /* These macros should all compile away to nothing */
121 # define ASSERT(f) ((void)0)
122 # define TRACE 1 ? (void)0 : printf
124 # define TRACE1(sz, p1)
125 # define TRACE2(sz, p1, p2)
126 # define TRACE3(sz, p1, p2, p3)
131 #define ASSERT_POINTER(p, type) \
132 ASSERT(((p) != NULL) && IsValidAddress((p), sizeof(type), FALSE))
134 #define ASSERT_NULL_OR_POINTER(p, type) \
135 ASSERT(((p) == NULL) || IsValidAddress((p), sizeof(type), FALSE))
137 #define mch_setenv(name, val, x) setenv(name, val, x)