summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2015-12-31 19:07:19 +0100
committerBram Moolenaar <Bram@vim.org>2015-12-31 19:07:19 +0100
commite7fedb6ebe72d9a475aa65109b77d5ed4667067a (patch)
tree19327fc9d1ca538d9c5c81c7284adf492e790e6d /src
parente3303cb0817e826e3c25d5dc4ac10b569d0841e1 (diff)
patch 7.4.1008v7.4.1008
Problem: The OS/2 code pollutes the source while nobody uses it these days. Solution: Drop the support for OS/2.
Diffstat (limited to 'src')
-rw-r--r--src/INSTALL41
-rw-r--r--src/Make_os2.mak163
-rw-r--r--src/digraph.c6
-rw-r--r--src/eval.c3
-rw-r--r--src/ex_cmds.c4
-rw-r--r--src/ex_docmd.c4
-rw-r--r--src/ex_getln.c2
-rw-r--r--src/feature.h4
-rw-r--r--src/fileio.c12
-rw-r--r--src/getchar.c12
-rw-r--r--src/globals.h4
-rw-r--r--src/macros.h2
-rw-r--r--src/memline.c9
-rw-r--r--src/misc1.c21
-rw-r--r--src/misc2.c2
-rw-r--r--src/netbeans.c2
-rw-r--r--src/option.c99
-rw-r--r--src/option.h2
-rw-r--r--src/os_os2_cfg.h254
-rw-r--r--src/os_unix.c78
-rw-r--r--src/os_unix.h98
-rw-r--r--src/proto/os_unix.pro1
-rw-r--r--src/term.c5
-rw-r--r--src/testdir/Make_os2.mak67
-rw-r--r--src/testdir/os2.vim3
-rw-r--r--src/ui.c8
-rw-r--r--src/version.c2
-rw-r--r--src/vim.h4
-rw-r--r--src/window.c2
29 files changed, 123 insertions, 791 deletions
diff --git a/src/INSTALL b/src/INSTALL
index 54297d198e..521d058be4 100644
--- a/src/INSTALL
+++ b/src/INSTALL
@@ -176,46 +176,7 @@ And to not search for locally installed headers and libraries at all, use:
3. OS/2
=======
-Summary:
-ren Makefile Makefile.unix
-ren makefile.os2 Makefile
-make
-
-This port of Vim to OS/2 is based on the emx environment together
-with GNU C. The main design goal of emx is to simplify porting Unix
-software to OS/2 and DOS. Because of this, almost all the Unix defines
-etc. already existing in the Vim source code could be reused. Only where
-OS/2 specifics came into play were additional changes necessary. Those
-places can be found by searching for "OS2" and "__EMX__" (I've tried to
-keep emx-specific things separate from generic OS/2 stuff).
-
-Note: This OS/2 port works well for me and an additional OS/2 user on
- the Vim development team (Karsten Sievert); however, since I
- haven't had any other feedback from other people, that either
- means no (OS/2-specific) bugs exist, or no one has yet created
- a situation in which any bugs are apparent.
- Report any problems or other comments to paul@wau.mis.ah.nl
- (email valid up to at least September 1996, after that try
- paul@wurtel.hobby.nl, paul@murphy.nl, or paulS@toecompst.nl).
- Textmode/notextmode and binary mode both seem to work well.
-
-Prerequisites:
-- To compile, you need the emx environment (at least rev. 0.9b), GCC,
- some make utility (GNU make works fine). These are generally
- available as (ask Archie about them):
- emxrt.zip emx runtime package
- emxdev.zip emx development system (without compiler)
- GNU programs compiled for emx, patches and patched sources:
- gnudev1.zip GNU development tools compiled for emx (part 1)
- gnudev2.zip GNU development tools compiled for emx (part 2)
- gnumake.zip GNU make
-- Don't set a TERM environment variable; Vim defaults to os2ansi
- which is available as a builtin termcap entry. Using other values
- may give problems! (OS/2 ANSI emulation is quite limited.) If you
- need to set TERM for other programs, you may consider putting
- set term=os2ansi in the vimrc file.
-
-Check ../runtime/doc/os_os2.txt for additional info on running Vim.
+OS/2 support was removed in patch 7.4.1008
4. Atari MiNT
diff --git a/src/Make_os2.mak b/src/Make_os2.mak
deleted file mode 100644
index cd62d1c6d5..0000000000
--- a/src/Make_os2.mak
+++ /dev/null
@@ -1,163 +0,0 @@
-#
-# Makefile for VIM on OS/2 using EMX vim:ts=8:sw=8:tw=78
-#
-# Created by: Paul Slootman
-#
-
-### This Makefile has been successfully tested on these systems.
-### Check the (*) column for remarks, listed below.
-### Later code changes may cause small problems, otherwise Vim is supposed to
-### compile and run without problems.
-### Just to show that this is just like the Unix version!
-
-#system: configurations: version (*) tested by:
-#------------- ------------------------ ------- - ----------
-#OS/2 Warp HPFS gcc-2.7.2+emx-0.9b -GUI 4.5 Paul Slootman
-#OS/2 FAT gcc-2.6.3+emx -GUI 4.5 Karsten Sievert
-
-#>>>>> choose options:
-
-### See feature.h for a list of optionals.
-### Any other defines can be included here.
-
-DEFINES = -DUSE_SYSTEM=1
-
-#>>>>> name of the compiler and linker, name of lib directory
-CC = gcc
-
-#>>>>> end of choices
-
-### Name of target(s)
-TARGET = vim.exe
-
-### Names of the tools that are also made
-TOOLS = xxd/xxd.exe tee/tee.exe
-
-###########################################################################
-
-INCL = vim.h globals.h option.h keymap.h macros.h ascii.h term.h os_unix.h structs.h os_os2_cfg.h
-CFLAGS = -O2 -fno-strength-reduce -DOS2 -Wall -Iproto $(DEFINES)
-
-OBJ = \
- blowfish.o \
- buffer.o \
- charset.o \
- crypt.o \
- crypt_zip.o \
- diff.o \
- digraph.o \
- edit.o \
- eval.o \
- ex_cmds.o \
- ex_cmds2.o \
- ex_docmd.o \
- ex_eval.o \
- ex_getln.o \
- fileio.o \
- fold.o \
- getchar.o \
- hardcopy.o \
- hashtab.o \
- main.o \
- mark.o \
- memfile.o \
- memline.o \
- menu.o \
- message.o \
- misc1.o \
- misc2.o \
- move.o \
- mbyte.o \
- normal.o \
- ops.o \
- option.o \
- popupmnu.o \
- quickfix.o \
- regexp.o \
- screen.o \
- search.o \
- sha256.o \
- spell.o \
- syntax.o \
- tag.o \
- term.o \
- ui.o \
- undo.o \
- window.o \
- os_unix.o
-
-LIBS = -ltermcap
-
-# Default target is making the executable
-all: $(TARGET) $(TOOLS)
-
-# Link the target for normal use
-LFLAGS = -Zcrtdll -s -o $(TARGET) $(LIBS)
-
-$(TARGET): $(OBJ) version.c version.h
- $(CC) $(CFLAGS) version.c $(OBJ) $(LFLAGS)
-
-xxd/xxd.exe: xxd/xxd.c
- cd xxd & $(MAKE) -f Make_os2.mak
-
-tee/tee.exe: tee/tee.c
- cd tee & $(MAKE) -f Makefile
-
-test:
- cd testdir & $(MAKE) -f Make_os2.mak
-
-clean:
- -del *.o
- -del *.exe
- -del *.~ *~ *.bak
- cd xxd & $(MAKE) -f Make_os2.mak clean
- cd tee & $(MAKE) -f Makefile clean
-
-###########################################################################
-
-os_unix.o: os_unix.c $(INCL)
-blowfish.o: blowfish.c $(INCL)
-buffer.o: buffer.c $(INCL)
-charset.o: charset.c $(INCL)
-crypt.o: crypt.c $(INCL)
-crypt_zip.o: crypt_zip.c $(INCL)
-diff.o: diff.c $(INCL)
-digraph.o: digraph.c $(INCL)
-edit.o: edit.c $(INCL)
-eval.o: eval.c $(INCL)
-ex_cmds.o: ex_cmds.c $(INCL)
-ex_cmds2.o: ex_cmds2.c $(INCL)
-ex_docmd.o: ex_docmd.c $(INCL) ex_cmds.h
-ex_eval.o: ex_eval.c $(INCL) ex_cmds.h
-ex_getln.o: ex_getln.c $(INCL)
-fileio.o: fileio.c $(INCL)
-fold.o: fold.c $(INCL)
-getchar.o: getchar.c $(INCL)
-hardcopy.o: hardcopy.c $(INCL)
-hashtab.o: hashtab.c $(INCL)
-main.o: main.c $(INCL)
-mark.o: mark.c $(INCL)
-memfile.o: memfile.c $(INCL)
-memline.o: memline.c $(INCL)
-menu.o: menu.c $(INCL)
-message.o: message.c $(INCL)
-misc1.o: misc1.c $(INCL)
-misc2.o: misc2.c $(INCL)
-move.o: move.c $(INCL)
-mbyte.o: mbyte.c $(INCL)
-normal.o: normal.c $(INCL)
-ops.o: ops.c $(INCL)
-option.o: option.c $(INCL)
-popupmnu.o: popupmnu.c $(INCL)
-quickfix.o: quickfix.c $(INCL)
-regexp.o: regexp.c $(INCL)
-screen.o: screen.c $(INCL)
-search.o: search.c $(INCL)
-sha256.o: sha256.c $(INCL)
-spell.o: spell.c $(INCL)
-syntax.o: syntax.c $(INCL)
-tag.o: tag.c $(INCL)
-term.o: term.c $(INCL)
-ui.o: ui.c $(INCL)
-undo.o: undo.c $(INCL)
-window.o: window.c $(INCL)
diff --git a/src/digraph.c b/src/digraph.c
index 9f7d0cc4e2..ba24e3f0fc 100644
--- a/src/digraph.c
+++ b/src/digraph.c
@@ -39,7 +39,7 @@ static garray_T user_digraphs = {0, 0, (int)sizeof(digr_T), 10, NULL};
* compilers cannot handle them (Amiga SAS/C is the most picky one).
*/
static digr_T digraphdefault[] =
-#if defined(MSDOS) || defined(OS2)
+#if defined(MSDOS)
/*
* MSDOS digraphs.
*/
@@ -105,7 +105,7 @@ static digr_T digraphdefault[] =
{NUL, NUL, NUL}
};
-#else /* !MSDOS && !OS2 */
+#else /* !MSDOS */
# ifdef __MINT__
/*
@@ -2007,7 +2007,7 @@ static digr_T digraphdefault[] =
# endif /* EBCDIC */
# endif /* !HPUX_DIGRAPHS */
# endif /* !__MINT__ */
-#endif /* !MSDOS && !OS2 */
+#endif /* !MSDOS */
/*
* handle digraphs after typing a character
diff --git a/src/eval.c b/src/eval.c
index eca8224ebf..8b972dfe78 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -12791,9 +12791,6 @@ f_has(argvars, rettv)
#if defined(MACOS_X_UNIX)
"macunix",
#endif
-#ifdef OS2
- "os2",
-#endif
#ifdef __QNX__
"qnx",
#endif
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index 73a55641ad..f3cb4b4069 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -1570,7 +1570,7 @@ make_filter_cmd(cmd, itmp, otmp)
char_u *buf;
long_u len;
-#if (defined(UNIX) && !defined(ARCHIE)) || defined(OS2)
+#if defined(UNIX) && !defined(ARCHIE)
int is_fish_shell;
char_u *shell_name = get_isolated_shell_name();
@@ -1590,7 +1590,7 @@ make_filter_cmd(cmd, itmp, otmp)
if (buf == NULL)
return NULL;
-#if (defined(UNIX) && !defined(ARCHIE)) || defined(OS2)
+#if defined(UNIX) && !defined(ARCHIE)
/*
* Put braces around the command (for concatenated commands) when
* redirecting input and/or output.
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index 31b51e99d6..0e8e7bda10 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -3794,7 +3794,7 @@ set_one_cmd_context(xp, buff)
/* Check for environment variable */
if (*xp->xp_pattern == '$'
-#if defined(MSDOS) || defined(MSWIN) || defined(OS2)
+#if defined(MSDOS) || defined(MSWIN)
|| *xp->xp_pattern == '%'
#endif
)
@@ -5073,7 +5073,7 @@ expand_filename(eap, cmdlinep, errormsgp)
* For Unix and OS/2, when wildcards are expanded, this is
* done by ExpandOne() below.
*/
-#if defined(UNIX) || defined(OS2)
+#if defined(UNIX)
if (!has_wildcards)
#endif
backslash_halve(eap->arg);
diff --git a/src/ex_getln.c b/src/ex_getln.c
index b6aeacf1a9..391946623e 100644
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -4955,7 +4955,7 @@ expand_shellcmd(filepat, num_file, file, flagsarg)
if (*s == ' ')
++s; /* Skip space used for absolute path name. */
-#if defined(MSDOS) || defined(MSWIN) || defined(OS2)
+#if defined(MSDOS) || defined(MSWIN)
e = vim_strchr(s, ';');
#else
e = vim_strchr(s, ':');
diff --git a/src/feature.h b/src/feature.h
index c499d9d50a..c2bf2605d8 100644
--- a/src/feature.h
+++ b/src/feature.h
@@ -60,7 +60,7 @@
*/
#if !defined(FEAT_TINY) && !defined(FEAT_SMALL) && !defined(FEAT_NORMAL) \
&& !defined(FEAT_BIG) && !defined(FEAT_HUGE)
-# if defined(MSWIN) || defined(DJGPP) || defined(OS2) || defined(VMS) || defined(MACOS) || defined(AMIGA)
+# if defined(MSWIN) || defined(DJGPP) || defined(VMS) || defined(MACOS) || defined(AMIGA)
# define FEAT_BIG
# else
# ifdef MSDOS
@@ -1046,7 +1046,7 @@
* +mouse Any mouse support (any of the above enabled).
*/
/* OS/2 and Amiga console have no mouse support */
-#if !defined(AMIGA) && !defined(OS2)
+#if !defined(AMIGA)
# ifdef FEAT_NORMAL
# define FEAT_MOUSE_XTERM
# endif
diff --git a/src/fileio.c b/src/fileio.c
index 9224777711..362d82ee05 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -445,7 +445,7 @@ readfile(fname, sfname, from, lines_to_skip, lines_to_read, eap, flags)
return FAIL;
}
#endif
-#if defined(MSDOS) || defined(MSWIN) || defined(OS2)
+#if defined(MSDOS) || defined(MSWIN)
/*
* MS-Windows allows opening a device, but we will probably get stuck
* trying to read it.
@@ -526,7 +526,7 @@ readfile(fname, sfname, from, lines_to_skip, lines_to_read, eap, flags)
file_readonly = FALSE;
if (read_stdin)
{
-#if defined(MSDOS) || defined(MSWIN) || defined(OS2)
+#if defined(MSDOS) || defined(MSWIN)
/* Force binary I/O on stdin to avoid CR-LF -> LF conversion. */
setmode(0, O_BINARY);
#endif
@@ -3553,7 +3553,7 @@ buf_write(buf, fname, sfname, start, end, eap, append, forceit,
}
if (c == NODE_WRITABLE)
{
-# if defined(MSDOS) || defined(MSWIN) || defined(OS2)
+# if defined(MSDOS) || defined(MSWIN)
/* MS-Windows allows opening a device, but we will probably get stuck
* trying to write to it. */
if (!p_odev)
@@ -6055,7 +6055,7 @@ shorten_fname(full_path, dir_name)
if (fnamencmp(dir_name, full_path, len) == 0)
{
p = full_path + len;
-#if defined(MSDOS) || defined(MSWIN) || defined(OS2)
+#if defined(MSDOS) || defined(MSWIN)
/*
* MSDOS: when a file is in the root directory, dir_name will end in a
* slash, since C: by itself does not define a specific dir. In this
@@ -6072,7 +6072,7 @@ shorten_fname(full_path, dir_name)
#endif
}
}
-#if defined(MSDOS) || defined(MSWIN) || defined(OS2)
+#if defined(MSDOS) || defined(MSWIN)
/*
* When using a file in the current drive, remove the drive name:
* "A:\dir\file" -> "\dir\file". This helps when moving a session file on
@@ -6330,7 +6330,7 @@ buf_modname(shortname, fname, ext, prepend_dot)
else if ((int)STRLEN(e) + extlen > 4)
s = e + 4 - extlen;
}
-#if defined(OS2) || defined(USE_LONG_FNAME) || defined(WIN3264)
+#if defined(USE_LONG_FNAME) || defined(WIN3264)
/*
* If there is no file name, and the extension starts with '.', put a
* '_' before the dot, because just ".ext" may be invalid if it's on a
diff --git a/src/getchar.c b/src/getchar.c
index f4ec991b09..70829e18ef 100644
--- a/src/getchar.c
+++ b/src/getchar.c
@@ -962,8 +962,8 @@ init_typebuf()
}
/*
- * insert a string in position 'offset' in the typeahead buffer (for "@r"
- * and ":normal" command, vgetorpeek() and check_termcode())
+ * Insert a string in position 'offset' in the typeahead buffer (for "@r"
+ * and ":normal" command, vgetorpeek() and check_termcode()).
*
* If noremap is REMAP_YES, new string can be mapped again.
* If noremap is REMAP_NONE, new string cannot be mapped again.
@@ -5295,7 +5295,7 @@ check_map(keys, mode, exact, ign_mod, abbr, mp_ptr, local_ptr)
}
#endif
-#if defined(MSDOS) || defined(MSWIN) || defined(OS2) || defined(MACOS)
+#if defined(MSDOS) || defined(MSWIN) || defined(MACOS)
#define VIS_SEL (VISUAL+SELECTMODE) /* abbreviation */
@@ -5308,7 +5308,7 @@ static struct initmap
int mode;
} initmappings[] =
{
-#if defined(MSDOS) || defined(MSWIN) || defined(OS2)
+#if defined(MSDOS) || defined(MSWIN)
/* Use the Windows (CUA) keybindings. */
# ifdef FEAT_GUI
/* paste, copy and cut */
@@ -5379,7 +5379,7 @@ static struct initmap
void
init_mappings()
{
-#if defined(MSDOS) || defined(MSWIN) || defined(OS2) || defined(MACOS)
+#if defined(MSDOS) || defined(MSWIN) ||defined(MACOS)
int i;
for (i = 0; i < sizeof(initmappings) / sizeof(struct initmap); ++i)
@@ -5387,7 +5387,7 @@ init_mappings()
#endif
}
-#if defined(MSDOS) || defined(MSWIN) || defined(OS2) \
+#if defined(MSDOS) || defined(MSWIN) \
|| defined(FEAT_CMDWIN) || defined(MACOS) || defined(PROTO)
/*
* Add a mapping "map" for mode "mode".
diff --git a/src/globals.h b/src/globals.h
index f0879dc670..d921a4e246 100644
--- a/src/globals.h
+++ b/src/globals.h
@@ -19,7 +19,7 @@
*/
EXTERN long Rows /* nr of rows in the screen */
#ifdef DO_INIT
-# if defined(MSDOS) || defined(WIN3264) || defined(OS2)
+# if defined(MSDOS) || defined(WIN3264)
= 25L
# else
= 24L
@@ -1534,7 +1534,7 @@ EXTERN char_u e_sandbox[] INIT(= N_("E48: Not allowed in sandbox"));
#endif
EXTERN char_u e_secure[] INIT(= N_("E523: Not allowed here"));
#if defined(AMIGA) || defined(MACOS) || defined(MSWIN) \
- || defined(UNIX) || defined(VMS) || defined(OS2)
+ || defined(UNIX) || defined(VMS)
EXTERN char_u e_screenmode[] INIT(= N_("E359: Screen mode setting not supported"));
#endif
EXTERN char_u e_scroll[] INIT(= N_("E49: Invalid scroll size"));
diff --git a/src/macros.h b/src/macros.h
index caaca9a3ef..737eddf520 100644
--- a/src/macros.h
+++ b/src/macros.h
@@ -231,7 +231,7 @@
#if defined(UNIX) || defined(VMS) /* open in rw------- mode */
# define mch_open_rw(n, f) mch_open((n), (f), (mode_t)0600)
#else
-# if defined(MSDOS) || defined(MSWIN) || defined(OS2) /* open read/write */
+# if defined(MSDOS) || defined(MSWIN) /* open read/write */
# define mch_open_rw(n, f) mch_open((n), (f), S_IREAD | S_IWRITE)
# else
# define mch_open_rw(n, f) mch_open((n), (f), 0)
diff --git a/src/memline.c b/src/memline.c
index a1c07a967b..cd6d151e13 100644
--- a/src/memline.c
+++ b/src/memline.c
@@ -4211,8 +4211,7 @@ findswapname(buf, dirp, old_fname)
#endif
char_u *buf_fname = buf->b_fname;
-#if !defined(SHORT_FNAME) \
- && ((!defined(UNIX) && !defined(OS2)) || defined(ARCHIE))
+#if !defined(SHORT_FNAME) && (!defined(UNIX) || defined(ARCHIE))
# define CREATE_DUMMY_FILE
FILE *dummyfd = NULL;
@@ -4272,7 +4271,7 @@ findswapname(buf, dirp, old_fname)
fname = NULL;
break;
}
-#if (defined(UNIX) || defined(OS2)) && !defined(ARCHIE) && !defined(SHORT_FNAME)
+#if defined(UNIX) && !defined(ARCHIE) && !defined(SHORT_FNAME)
/*
* Some systems have a MS-DOS compatible filesystem that use 8.3 character
* file names. If this is the first try and the swap file name does not fit in
@@ -4323,10 +4322,6 @@ findswapname(buf, dirp, old_fname)
{
f1 = mch_open_rw((char *)fname,
O_RDWR|O_CREAT|O_EXCL|O_EXTRA);
-#if defined(OS2)
- if (f1 < 0 && errno == ENOENT)
- same = TRUE;
-#endif
created1 = TRUE;
}
if (f1 >= 0)
diff --git a/src/misc1.c b/src/misc1.c
index 5190db4a13..d1e762c9a7 100644
--- a/src/misc1.c
+++ b/src/misc1.c
@@ -3856,7 +3856,7 @@ init_homedir()
# endif
#endif
-#if defined(OS2) || defined(MSDOS) || defined(MSWIN)
+#if defined(MSDOS) || defined(MSWIN)
/*
* Default home dir is C:/
* Best assumption we can make in such a situation.
@@ -3995,7 +3995,7 @@ expand_env_esc(srcp, dst, dstlen, esc, one, startstr)
&& at_start
#endif
)
-#if defined(MSDOS) || defined(MSWIN) || defined(OS2)
+#if defined(MSDOS) || defined(MSWIN)
|| *src == '%'
#endif
|| (*src == '~' && at_start))
@@ -4024,21 +4024,16 @@ expand_env_esc(srcp, dst, dstlen, esc, one, startstr)
#endif
{
while (c-- > 0 && *tail != NUL && ((vim_isIDc(*tail))
-#if defined(MSDOS) || defined(MSWIN) || defined(OS2)
+#if defined(MSDOS) || defined(MSWIN)
|| (*src == '%' && *tail != '%')
#endif
))
{
-#ifdef OS2 /* env vars only in uppercase */
- *var++ = TOUPPER_LOC(*tail);
- tail++; /* toupper() may be a macro! */
-#else
*var++ = *tail++;
-#endif
}
}
-#if defined(MSDOS) || defined(MSWIN) || defined(OS2) || defined(UNIX)
+#if defined(MSDOS) || defined(MSWIN) || defined(UNIX)
# ifdef UNIX
if (src[1] == '{' && *tail != '}')
# else
@@ -4056,7 +4051,7 @@ expand_env_esc(srcp, dst, dstlen, esc, one, startstr)
#endif
*var = NUL;
var = vim_getenv(dst, &mustfree);
-#if defined(MSDOS) || defined(MSWIN) || defined(OS2) || defined(UNIX)
+#if defined(MSDOS) || defined(MSWIN) || defined(UNIX)
}
#endif
}
@@ -4249,7 +4244,7 @@ vim_getenv(name, mustfree)
char_u *pend;
int vimruntime;
-#if defined(OS2) || defined(MSDOS) || defined(MSWIN)
+#if defined(MSDOS) || defined(MSWIN)
/* use "C:/" when $HOME is not set */
if (STRCMP(name, "HOME") == 0)
return homedir;
@@ -5000,7 +4995,7 @@ get_past_head(path)
{
char_u *retval;
-#if defined(MSDOS) || defined(MSWIN) || defined(OS2)
+#if defined(MSDOS) || defined(MSWIN)
/* may skip "c:" */
if (isalpha(path[0]) && path[1] == ':')
retval = path + 2;
@@ -10882,7 +10877,7 @@ has_env_var(p)
if (*p == '\\' && p[1] != NUL)
++p;
else if (vim_strchr((char_u *)
-#if defined(MSDOS) || defined(MSWIN) || defined(OS2)
+#if defined(MSDOS) || defined(MSWIN)
"$%"
#else
"$"
diff --git a/src/misc2.c b/src/misc2.c
index beb3d4662e..f13a80e223 100644
--- a/src/misc2.c
+++ b/src/misc2.c
@@ -5521,7 +5521,7 @@ find_file_in_path_option(ptr, len, options, first, path_option,
if (vim_isAbsName(ff_file_to_find)
/* "..", "../path", "." and "./path": don't use the path_option */
|| rel_to_curdir
-#if defined(MSWIN) || defined(MSDOS) || defined(OS2)
+#if defined(MSWIN) || defined(MSDOS)
/* handle "\tmp" as absolute path */
|| vim_ispathsep(ff_file_to_find[0])
/* handle "c:name" as absolute path */
diff --git a/src/netbeans.c b/src/netbeans.c
index ea0c017ad6..2c15227675 100644
--- a/src/netbeans.c
+++ b/src/netbeans.c
@@ -1862,7 +1862,7 @@ nb_do_cmd(
if (buf_was_empty)
{
if (ff_detected == EOL_UNKNOWN)
-#if defined(MSDOS) || defined(MSWIN) || defined(OS2)
+#if defined(MSDOS) || defined(MSWIN)
ff_detected = EOL_DOS;
#else
ff_detected = EOL_UNIX;
diff --git a/src/option.c b/src/option.c
index 0c38de6896..dae2054f57 100644
--- a/src/option.c
+++ b/src/option.c
@@ -464,7 +464,7 @@ struct vimoption
/* 'isprint' for latin1 is also used for MS-Windows cp1252, where 0x80 is used
* for the currency sign. */
-#if defined(MSDOS) || defined(MSWIN) || defined(OS2)
+#if defined(MSDOS) || defined(MSWIN)
# define ISP_LATIN1 (char_u *)"@,~-255"
#else
# define ISP_LATIN1 (char_u *)"@,161-255"
@@ -501,7 +501,7 @@ static struct vimoption
(char_u *)NULL, PV_NONE,
#endif
{
-#if (defined(MSDOS) || defined(WIN3264) || defined(OS2)) && !defined(FEAT_GUI_W32)
+#if (defined(MSDOS) || defined(WIN3264)) && !defined(FEAT_GUI_W32)
(char_u *)128L,
#else
(char_u *)224L,
@@ -576,7 +576,7 @@ static struct vimoption
{"background", "bg", P_STRING|P_VI_DEF|P_RCLR,
(char_u *)&p_bg, PV_NONE,
{
-#if (defined(MSDOS) || defined(OS2) || defined(WIN3264)) && !defined(FEAT_GUI)
+#if (defined(MSDOS) || defined(WIN3264)) && !defined(FEAT_GUI)
(char_u *)"dark",
#else
(char_u *)"light",
@@ -1600,7 +1600,7 @@ static struct vimoption
{"isident", "isi", P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
(char_u *)&p_isi, PV_NONE,
{
-#if defined(MSDOS) || defined(MSWIN) || defined(OS2)
+#if defined(MSDOS) || defined(MSWIN)
(char_u *)"@,48-57,_,128-167,224-235",
#else
# ifdef EBCDIC
@@ -1626,7 +1626,7 @@ static struct vimoption
"251-254",
#else
(char_u *)"@,48-57,_",
-# if defined(MSDOS) || defined(MSWIN) || defined(OS2)
+# if defined(MSDOS) || defined(MSWIN)
(char_u *)"@,48-57,_,128-167,224-235"
# else
ISK_LATIN1
@@ -1636,7 +1636,7 @@ static struct vimoption
{"isprint", "isp", P_STRING|P_VI_DEF|P_RALL|P_COMMA|P_NODUP,
(char_u *)&p_isp, PV_NONE,
{
-#if defined(MSDOS) || defined(MSWIN) || defined(OS2) \
+#if defined(MSDOS) || defined(MSWIN) \
|| (defined(MACOS) && !defined(MACOS_X)) \
|| defined(VMS)
(char_u *)"@,~-255",
@@ -1682,14 +1682,10 @@ static struct vimoption
#ifdef VMS
(char_u *)"help",
#else
-# if defined(OS2)
- (char_u *)"view /",
-# else
-# ifdef USEMAN_S
+# ifdef USEMAN_S
(char_u *)"man -s",
-# else
+# else
(char_u *)"man",
-# endif
# endif
#endif
#endif
@@ -1737,7 +1733,7 @@ static struct vimoption
{"lines", NULL, P_NUM|P_NODEFAULT|P_NO_MKRC|P_VI_DEF|P_RCLR,
(char_u *)&Rows, PV_NONE,
{
-#if defined(MSDOS) || defined(WIN3264) || defined(OS2)
+#if defined(MSDOS) || defined(WIN3264)
(char_u *)25L,
#else
(char_u *)24L,
@@ -1969,7 +1965,7 @@ static struct vimoption
(char_u *)NULL, PV_NONE,
{(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
{"opendevice", "odev", P_BOOL|P_VI_DEF,
-#if defined(MSDOS) || defined(MSWIN) || defined(OS2)
+#if defined(MSDOS) || defined(MSWIN)
(char_u *)&p_odev, PV_NONE,
#else
(char_u *)NULL, PV_NONE,
@@ -2301,14 +2297,10 @@ static struct vimoption
# if defined(WIN3264)
(char_u *)"", /* set in set_init_1() */
# else
-# if defined(OS2)
- (char_u *)"cmd.exe",
-# else
-# if defined(ARCHIE)
+# if defined(ARCHIE)
(char_u *)"gos",
-# else
+# else
(char_u *)"sh",
-# endif
# endif
# endif
# endif
@@ -2321,18 +2313,14 @@ static struct vimoption
#if defined(MSDOS) || defined(MSWIN)
(char_u *)"/c",
#else
-# if defined(OS2)
- (char_u *)"/c",
-# else
(char_u *)"-c",
-# endif
#endif
(char_u *)0L} SCRIPTID_INIT},
{"shellpipe", "sp", P_STRING|P_VI_DEF|P_SECURE,
#ifdef FEAT_QUICKFIX
(char_u *)&p_sp, PV_NONE,
{
-#if defined(UNIX) || defined(OS2)
+#if defined(UNIX)
# ifdef ARCHIE
(char_u *)"2>",
# else
@@ -2765,7 +2753,7 @@ static struct vimoption
{"undolevels", "ul", P_NUM|P_VI_DEF,
(char_u *)&p_ul, PV_UL,
{
-#if defined(UNIX) || defined(WIN3264) || defined(OS2) || defined(VMS)
+#if defined(UNIX) || defined(WIN3264) || defined(VMS)
(char_u *)1000L,
#else
(char_u *)100L,
@@ -2807,7 +2795,7 @@ static struct vimoption
{"viminfo", "vi", P_STRING|P_ONECOMMA|P_NODUP|P_SECURE,
#ifdef FEAT_VIMINFO
(char_u *)&p_viminfo, PV_NONE,
-#if defined(MSDOS) || defined(MSWIN) || defined(OS2)
+#if defined(MSDOS) || defined(MSWIN)
{(char_u *)"", (char_u *)"'100,<50,s10,h,rA:,rB:"}
#else
# ifdef AMIGA
@@ -3199,7 +3187,7 @@ set_init_1()
* Don't use it if it is empty.
*/
if (((p = mch_getenv((char_u *)"SHELL")) != NULL && *p != NUL)
-#if defined(MSDOS) || defined(MSWIN) || defined(OS2)
+#if defined(MSDOS) || defined(MSWIN)
# ifdef __EMX__
|| ((p = mch_getenv((char_u *)"EMXSHELL")) != NULL && *p != NUL)
# endif
@@ -3349,10 +3337,10 @@ set_init_1()
}
#endif
-#if defined(FEAT_POSTSCRIPT) && (defined(MSWIN) || defined(OS2) || defined(VMS) || defined(EBCDIC) || defined(MAC) || defined(hpux))
+#if defined(FEAT_POSTSCRIPT) && (defined(MSWIN) || defined(VMS) || defined(EBCDIC) || defined(MAC) || defined(hpux))
/* Set print encoding on platforms that don't default to latin1 */
set_string_default("penc",
-# if defined(MSWIN) || defined(OS2)
+# if defined(MSWIN)
(char_u *)"cp1252"
# else
# ifdef VMS
@@ -3375,7 +3363,7 @@ set_init_1()
#ifdef FEAT_POSTSCRIPT
/* 'printexpr' must be allocated to be able to evaluate it. */
set_string_default("pexpr",
-# if defined(MSWIN) || defined(MSDOS) || defined(OS2)
+# if defined(MSWIN) || defined(MSDOS)
(char_u *)"system('copy' . ' ' . v:fname_in . (&printdevice == '' ? ' LPT1:' : (' \"' . &printdevice . '\"'))) . delete(v:fname_in)"
# else
# ifdef VMS
@@ -3525,7 +3513,7 @@ set_init_1()
options[opt_idx].flags |= P_DEF_ALLOCED;
}
-#if defined(MSDOS) || defined(MSWIN) || defined(OS2) || defined(MACOS) \
+#if defined(MSDOS) || defined(MSWIN) || defined(MACOS) \
|| defined(VMS)
if (STRCMP(p_enc, "latin1") == 0
# ifdef FEAT_MBYTE
@@ -3809,7 +3797,7 @@ set_init_2()
set_number_default("window", Rows - 1);
/* For DOS console the default is always black. */
-#if !((defined(MSDOS) || defined(OS2) || defined(WIN3264)) && !defined(FEAT_GUI))
+#if !((defined(MSDOS) || defined(WIN3264)) && !defined(FEAT_GUI))
/*
* If 'background' wasn't set by the user, try guessing the value,
* depending on the terminal name. Only need to check for terminals
@@ -3852,7 +3840,7 @@ set_init_2()
static char_u *
term_bg_default()
{
-#if defined(MSDOS) || defined(OS2) || defined(WIN3264)
+#if defined(MSDOS) || defined(WIN3264)
/* DOS console nearly always black */
return (char_u *)"dark";
#else
@@ -3877,7 +3865,7 @@ term_bg_default()
void
set_init_3()
{
-#if defined(UNIX) || defined(OS2) || defined(WIN3264)
+#if defined(UNIX) || defined(WIN3264)
/*
* Set 'shellpipe' and 'shellredir', depending on the 'shell' opti