annotate src/os_msdos.h @ 1688:17526daaf79d v7.2b.021

updated for version 7.2b-021
author vimboss
date Thu, 24 Jul 2008 20:09:16 +0000
parents 82b5078be2dd
children e6d8b44065bc
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 /* vi:set ts=8 sts=4 sw=4:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 *
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 * VIM - Vi IMproved by Bram Moolenaar
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 *
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5 * Do ":help uganda" in Vim to read copying and usage conditions.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 * Do ":help credits" in Vim to see a list of people who contributed.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 /*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 * MSDOS Machine-dependent things.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 #include "os_dos.h" /* common MS-DOS and Win32 stuff */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 #define BINARY_FILE_IO
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 #define USE_EXE_NAME /* use argv[0] for $VIM */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 #define SYNC_DUP_CLOSE /* sync() a file with dup() and close() */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 #define USE_TERM_CONSOLE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 #ifdef DJGPP
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 # include <fcntl.h> /* defines _USE_LFN */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 # define USE_LONG_FNAME _USE_LFN /* decide at run time */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 # define USE_FNAME_CASE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 # define HAVE_PUTENV
799
6beb2c667935 updated for version 7.0b
vimboss
parents: 378
diff changeset
24 # define HAVE_STDARG_H
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 #else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 # define SHORT_FNAME /* always 8.3 file name */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 #define HAVE_STDLIB_H
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 #define HAVE_STRING_H
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 #define HAVE_FCNTL_H
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 #define HAVE_STRCSPN
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 #define HAVE_STRICMP
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 #define HAVE_STRFTIME /* guessed */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 #define HAVE_STRNICMP
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 #define HAVE_MEMSET
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 #define HAVE_QSORT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 #define HAVE_ST_MODE /* have stat.st_mode */
1621
82b5078be2dd updated for version 7.2a
vimboss
parents: 799
diff changeset
38 #define HAVE_MATH_H
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 #if defined(__DATE__) && defined(__TIME__)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 # define HAVE_DATE_TIME
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 #define BREAKCHECK_SKIP 1 /* call mch_breakcheck() each time, it's fast */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 #define HAVE_AVAIL_MEM
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 /*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 * Borland C++ 3.1 doesn't have _RTLENTRYF
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 #ifdef __BORLANDC__
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 # if __BORLANDC__ < 0x450
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 # define _RTLENTRYF
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 # endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 #define FNAME_ILLEGAL "\"*?><|" /* illegal characters in a file name */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 #include <dos.h>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 #include <dir.h>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 #include <time.h>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 #ifdef DJGPP
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 # include <unistd.h>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 # define HAVE_LOCALE_H
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 # define setlocale(c, p) djgpp_setlocale()
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 #ifndef DJGPP
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 typedef long off_t;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 /*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 * Try several directories to put the temp files.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 #define TEMPDIRNAMES "$TMP", "$TEMP", "c:\\TMP", "c:\\TEMP", ""
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 #define TEMPNAMELEN 128
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 #ifndef DFLT_MAXMEM
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 # define DFLT_MAXMEM 256 /* use up to 256Kbyte for buffer */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 #ifndef DFLT_MAXMEMTOT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 # define DFLT_MAXMEMTOT 0 /* decide in set_init */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 #ifdef DJGPP
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 # define BASENAMELEN (_USE_LFN?250:8) /* length of base of file name */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 #else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 # define BASENAMELEN 8 /* length of base of file name */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 /* codes for msdos mouse event */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 #define MSDOS_MOUSE_LEFT 0x01
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 #define MSDOS_MOUSE_RIGHT 0x02
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 #define MSDOS_MOUSE_MIDDLE 0x04
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94 #ifdef DJGPP
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95 int mch_rename(const char *OldFile, const char *NewFile);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96 #else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97 # define mch_rename(src, dst) rename(src, dst)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100 #ifdef DJGPP
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101 # define vim_mkdir(x, y) mkdir((char *)(x), y)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102 #else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103 # define vim_mkdir(x, y) mkdir((char *)(x))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105 #define mch_rmdir(x) rmdir((char *)(x))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107 #define mch_setenv(name, val, x) setenv(name, val, x)