1. jdhore
  2. miv

Commits

jdhore  committed 8a5ed55

Remove OS2/EMX support.

  • Participants
  • Parent commits 864c57f
  • Branches default

Comments (0)

Files changed (37)

File Filelist

View file
 		src/xxd/Make_vms.mms \
 		vimtutor.com \
 
-# source files for OS/2 (in the extra archive)
-SRC_OS2 =	\
-		src/Make_os2.mak \
-		src/os_os2_cfg.h \
-		src/testdir/Make_os2.mak \
-		src/testdir/todos.vim \
-		src/testdir/os2.vim \
-		src/xxd/Make_os2.mak \
-
 # source files for QNX (in the extra archive)
 SRC_QNX =	\
 		src/os_qnx.c \
 
 # source files for the extra archive (all sources that are not for Unix)
 SRC_EXTRA =	\
-		$(SRC_AMI) \
-		$(SRC_AMI_DOS) \
 		$(SRC_DOS) \
 		$(SRC_DOS_BIN) \
 		$(SRC_MAC) \
-		$(SRC_OS2) \
 		$(SRC_QNX) \
 		$(SRC_VMS) \
 		README_os390.txt \
 BIN_VMS =	\
 		README_vms.txt \
 
-# files for OS/2 binary (also in extra archive)
-BIN_OS2 =	\
-		README_os2.txt \
-
 # binary files for extra archive
 BIN_EXTRA =	\
-		$(BIN_AMI) \
 		$(BIN_DOS) \
 		$(BIN_OLE) \
 		$(BIN_W32S) \
 		$(BIN_VMS) \
-		$(BIN_OS2) \
 
 # all files for extra archive
 EXTRA =		\

File Makefile

View file
 #		gvim##_s.zip		exe for Win32s GUI
 #
 # OBSOLETE
-# os2bin	vim##os2.zip		binary for OS/2
-#					(use RT from dosrt)
-#
 # farsi		farsi##.zip		Farsi fonts
 #
 #    All output files are created in the "dist" directory.  Existing files are
 # - go to ../nsis and do "makensis gvim.nsi" (takes a few minutes).
 # - Copy gvim##.exe to the dist directory.
 #
-# OS/2: (OBSOLETE, OS/2 version is no longer distributed)
-# - Unpack the Unix archive.
-# - "make -f Make_os2.mak".
-# - Rename the executables to vimos2.exe, xxdos2.exe and teeos2.exe and copy
-#   them to here.
-# - "make os2bin".
 
 VIMVER	= vim-$(MAJOR).$(MINOR)
 VERSION = $(MAJOR)$(MINOR)
 COMMENT_OLE = comment/$(VERSION)-bin-ole
 COMMENT_W32S = comment/$(VERSION)-bin-w32s
 COMMENT_SRC = comment/$(VERSION)-src
-COMMENT_OS2 = comment/$(VERSION)-bin-os2
 COMMENT_HTML = comment/$(VERSION)-html
 COMMENT_FARSI = comment/$(VERSION)-farsi
 
 	cp uninstalw32.exe dist/vim/$(VIMRTDIR)/uninstal.exe
 	cd dist && zip -9 -rD -z gvim$(VERSION)_s.zip vim <$(COMMENT_W32S)
 
-os2bin: dist no_title.vim dist/$(COMMENT_OS2)
-	-rm -rf dist/vim$(VERSION)os2.zip
-	-rm -rf dist/vim
-	mkdir dist/vim
-	mkdir dist/vim/$(VIMRTDIR)
-	tar cf - \
-		$(BIN_OS2) \
-		| (cd dist/vim/$(VIMRTDIR); tar xf -)
-	find dist/vim/$(VIMRTDIR) -type f -exec $(VIM) -e -X -u no_title.vim -c ":set tx|wq" {} \;
-	cp vimos2.exe dist/vim/$(VIMRTDIR)/vim.exe
-	cp xxdos2.exe dist/vim/$(VIMRTDIR)/xxd.exe
-	cp teeos2.exe dist/vim/$(VIMRTDIR)/tee.exe
-	cp emx.dll emxlibcs.dll dist/vim/$(VIMRTDIR)
-	cd dist && zip -9 -rD -z vim$(VERSION)os2.zip vim <$(COMMENT_OS2)
-
 html: dist dist/$(COMMENT_HTML)
 	-rm -rf dist/vim$(VERSION)html.zip
 	cd runtime/doc && zip -9 -z ../../dist/vim$(VERSION)html.zip *.html <../../dist/$(COMMENT_HTML)

File README.txt

View file
 INSTALLATION
 
 See one of these files for system-specific instructions:
-README_ami.txt		Amiga
 README_unix.txt		Unix
 README_dos.txt		MS-DOS and MS-Windows
-README_os2.txt		OS/2
 README_mac.txt		Macintosh
 README_vms.txt		VMS
 

File README_os2.txt

-README_os2.txt for version 7.3 of Vim: Vi IMproved.
-
-This file explains the installation of Vim on OS/2 systems.
-See "README.txt" for general information about Vim.
-
-
-NOTE: You will need two archives:
-  vim73rt.zip	contains the runtime files (same as for the PC version)
-  vim73os2.zip	contains the OS/2 executables
-
-1. Go to the directory where you want to put the Vim files.  Examples:
-	cd C:\
-	cd D:\editors
-
-2. Unpack the zip archives.  This will create a new directory "vim/vim73",
-   in which all the distributed Vim files are placed.  Since the directory
-   name includes the version number, it is unlikely that you overwrite
-   existing files.
-   Examples:
-	pkunzip -d vim73os2.zip
-	unzip vim73os2.zip
-
-   After you unpacked the files, you can still move the whole directory tree
-   to another location.
-
-3. Add the directory where vim.exe is to your path.  The simplest is to add a
-   line to your autoexec.bat.  Examples:
-	set path=%path%;C:\vim\vim73
-	set path=%path%;D:\editors\vim\vim73
-
-That's it!
-
-
-Extra remarks:
-
-- To avoid confusion between distributed files of different versions and your
-  own modified vim scripts, it is recommended to use this directory layout:
-  ("C:\vim" is used here as the root, replace with the path you use)
-  Your own files:
-	C:\vim\_vimrc			Your personal vimrc.
-	C:\vim\_viminfo			Dynamic info for 'viminfo'.
-	C:\vim\...			Other files you made.
-  Distributed files:
-	C:\vim\vim73\vim.exe		The Vim version 7.3 executable.
-	C:\vim\vim73\doc\*.txt		The version 7.3 documentation files.
-	C:\vim\vim73\bugreport.vim	A Vim version 7.3 script.
-	C:\vim\vim73\...		Other version 7.3 distributed files.
-  In this case the $VIM environment variable would be set like this:
-	set VIM=C:\vim
-
-- You can put your Vim executable anywhere else.  If the executable is not
-  with the other distributed Vim files, you should set $VIM.  The simplest is
-  to add a line to your autoexec.bat.  Examples:
-	set VIM=c:\vim
-	set VIM=d:\editors\vim
-
-For further information, type this inside Vim:
-	:help os2

File src/INSTALL

View file
 Contents:
 1. Generic
 2. Unix
-3. OS/2 (with EMX 0.9b)
 
 See INSTALLmac.txt              for Macintosh
 See INSTALLpc.txt               for PC (MS-DOS, Windows 95/98/NT/XP)
 And to not search for locally installed headers and libraries at all, use:
 	./configure --without-local-dir
 
-
-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.
-
 -----------------------------------------------------------------------------
 
 The rest of this file is based on the INSTALL file that comes with GNU

File src/Make_os2.mak

-#
-# 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 \
-	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)
-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)

File src/digraph.c

View file
  * 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.
 	 */
 	{NUL, NUL, NUL}
 	};
 
-#else	/* !MSDOS && !OS2 */
+#else	/* !MSDOS */
 #  ifdef HPUX_DIGRAPHS
 
 	/*
 #    endif /* Macintosh */
 #   endif /* EBCDIC */
 #  endif    /* !HPUX_DIGRAPHS */
-#endif	/* !MSDOS && !OS2 */
+#endif	/* !MSDOS */
 
 /*
  * handle digraphs after typing a character

File src/eval.c

View file
 #if defined(MACOS_X_UNIX)
 	"macunix",
 #endif
-#ifdef OS2
-	"os2",
-#endif
 #ifdef __QNX__
 	"qnx",
 #endif

File src/ex_cmds.c

View file
     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.

File src/ex_docmd.c

View file
 
 	/* Check for environment variable */
 	if (*xp->xp_pattern == '$'
-#if defined(MSDOS) || defined(MSWIN) || defined(OS2)
+#if defined(MSDOS) || defined(MSWIN)
 		|| *xp->xp_pattern == '%'
 #endif
 		)
 		 * 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);
 # endif
 #endif
 
-#if (!defined(UNIX) && !defined(__EMX__)) || defined(ARCHIE) || defined(PROTO)
+#if (!defined(UNIX)) || defined(ARCHIE) || defined(PROTO)
 /*
  * Expand the file names in the global argument list.
  * If "fnum_list" is not NULL, use "fnum_list[fnum_len]" as a list of buffer

File src/ex_getln.c

View file
 	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, ':');

File src/feature.h

View file
  */
 #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)
+# if defined(MSWIN) || defined(DJGPP) || defined(VMS) || defined(MACOS)
 #  define FEAT_BIG
 # else
 #  ifdef MSDOS
  * +mouse		Any mouse support (any of the above enabled).
  */
 /* OS/2 has no mouse support */
-#if !defined(OS2)
 # ifdef FEAT_NORMAL
 #  define FEAT_MOUSE_XTERM
 # endif
 # if defined(FEAT_NORMAL) && defined(__QNX__)
 #  define FEAT_MOUSE_PTERM
 # endif
-#endif
 
 #if defined(FEAT_NORMAL) && defined(HAVE_GPM)
 # define FEAT_MOUSE_GPM

File src/fileio.c

View file
      */
     if (sfname == NULL)
 	sfname = fname;
-#if defined(UNIX) || defined(__EMX__)
+#if defined(UNIX)
     fname = sfname;
 #endif
 
 	    return FAIL;
 	}
 
-# 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.
     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
     int		    prev_got_int = got_int;
     int		    file_readonly = FALSE;  /* overwritten file is read-only */
     static char	    *err_readonly = "is read-only (cannot override: \"W\" in 'cpoptions')";
-#if defined(UNIX) || defined(__EMX__XX)	    /*XXX fix me sometime? */
+#if defined(UNIX)
     int		    made_writable = FALSE;  /* 'w' bit has been set */
 #endif
 					/* writing everything */
     }
     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)
     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
 #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
 	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
     {
 	if (vim_FullName(tempdir, buf, MAXPATHL, FALSE) == FAIL)
 	    STRCPY(buf, tempdir);
-# ifdef __EMX__
-	if (vim_strchr(buf, '/') != NULL)
-	    STRCAT(buf, "/");
-	else
-# endif
 	    add_pathsep(buf);
 	vim_tempdir = vim_strsave(buf);
 	vim_free(buf);
 	    expand_env((char_u *)tempdirs[i], itmp, TEMPNAMELEN - 20);
 	    if (mch_isdir(itmp))		/* directory exists */
 	    {
-# ifdef __EMX__
-		/* If $TMP contains a forward slash (perhaps using bash or
-		 * tcsh), don't add a backslash, use a forward slash!
-		 * Adding 2 backslashes didn't work. */
-		if (vim_strchr(itmp, '/') != NULL)
-		    STRCAT(itmp, "/");
-		else
-# endif
 		    add_pathsep(itmp);
 
 # ifdef HAVE_MKDTEMP

File src/getchar.c

View file
 }
 #endif
 
-#if defined(MSDOS) || defined(MSWIN) || defined(OS2) || defined(MACOS)
+#if defined(MSDOS) || defined(MSWIN) || defined(MACOS)
 
 #define VIS_SEL	(VISUAL+SELECTMODE)	/* abbreviation */
 
     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 */
     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)
 #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".

File src/globals.h

View file
  */
 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
 #endif
 
 EXTERN int	quit_more INIT(= FALSE);    /* 'q' hit at "--more--" msg */
-#if defined(UNIX) || defined(__EMX__) || defined(VMS) || defined(MACOS_X)
+#if defined(UNIX) || defined(VMS) || defined(MACOS_X)
 EXTERN int	newline_on_exit INIT(= FALSE);	/* did msg in altern. screen */
 EXTERN int	intr_char INIT(= 0);	    /* extra interrupt character */
 #endif
 #endif
 EXTERN char_u e_secure[]	INIT(= N_("E523: Not allowed here"));
 #if defined(MACOS) || defined(MSWIN) || defined(UNIX) \
-    || defined(VMS) || defined(OS2)
+    || 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"));

File src/macros.h

View file
 #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)

File src/main.c

View file
     char_u	*serverStrEnc;		/* encoding of serverStr */
     char_u	*servername;		/* allocated name for our server */
 #endif
-#if (!defined(UNIX) && !defined(__EMX__)) || defined(ARCHIE)
+#if (!defined(UNIX)) || defined(ARCHIE)
     int		literal;		/* don't expand file names */
 #endif
 #ifdef MSWIN
 #endif
     starttime = time(NULL);
 
-#ifdef __EMX__
-    _wildcard(&params.argc, &params.argv);
-#endif
-
 #ifdef FEAT_MBYTE
     (void)mb_init();	/* init mb_bytelen_tab[] to ones */
 #endif
 
     if (GARGCOUNT > 0)
     {
-#if (!defined(UNIX) && !defined(__EMX__)) || defined(ARCHIE)
+#if (!defined(UNIX)) || defined(ARCHIE)
 	/*
 	 * Expand wildcards in file names.
 	 */
 		}
 		else if (STRNICMP(argv[0] + argv_idx, "literal", 7) == 0)
 		{
-#if (!defined(UNIX) && !defined(__EMX__)) || defined(ARCHIE)
+#if (!defined(UNIX)) || defined(ARCHIE)
 		    parmp->literal = TRUE;
 #endif
 		}
 #endif
 
 	    alist_add(&global_alist, p,
-#if (!defined(UNIX) && !defined(__EMX__)) || defined(ARCHIE)
+#if (!defined(UNIX)) || defined(ARCHIE)
 		    parmp->literal ? 2 : 0	/* add buffer nr after exp. */
 #else
 		    2		/* add buffer number now and use curbuf */
     int		n;	/* one of the ME_ defines */
     char_u	*str;	/* extra argument or NULL */
 {
-#if defined(UNIX) || defined(__EMX__) || defined(VMS)
+#if defined(UNIX) || defined(VMS)
     reset_signals();		/* kill us with CTRL-C here, if you like */
 #endif
 
 #endif
     };
 
-#if defined(UNIX) || defined(__EMX__) || defined(VMS)
+#if defined(UNIX) || defined(VMS)
     reset_signals();		/* kill us with CTRL-C here, if you like */
 #endif
 
 
     mch_msg(_("\n\nArguments:\n"));
     main_msg(_("--\t\t\tOnly file names after this"));
-#if (!defined(UNIX) && !defined(__EMX__)) || defined(ARCHIE)
+#if (!defined(UNIX)) || defined(ARCHIE)
     main_msg(_("--literal\t\tDon't expand wildcards"));
 #endif
 #ifdef FEAT_OLE

File src/memfile.c

View file
 	 * in the #if, as __EMX__ does not have sync(); we hope for a timely
 	 * sync from the system itself).
 	 */
-#  if defined(__EMX__)
-   error "Dont use fsync with EMX! Read emxdoc.doc or emxfix01.doc for info."
-#  endif
 	if (STRCMP(p_sws, "fsync") == 0)
 	{
 	    if (fsync(mfp->mf_fd))

File src/memline.c

View file
 }
 #endif
 
-#if (defined(UNIX) || defined(__EMX__) || defined(VMS)) && (defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG))
+#if (defined(UNIX) || defined(VMS)) && (defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG))
 static int process_still_running;
 #endif
 
 		{
 		    MSG_PUTS(_("\n        process ID: "));
 		    msg_outnum(char_to_long(b0.b0_pid));
-#if defined(UNIX) || defined(__EMX__)
+#if defined(UNIX)
 		    /* EMX kill() not working correctly, it seems */
 		    if (kill((pid_t)char_to_long(b0.b0_pid), 0) == 0)
 		    {
 	    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
 		    {
 			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)
 		    }
 #endif
 
-#if (defined(UNIX) || defined(__EMX__) || defined(VMS)) && (defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG))
+#if (defined(UNIX) || defined(VMS)) && (defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG))
 		    process_still_running = FALSE;
 #endif
 #ifdef FEAT_AUTOCMD
 				    name == NULL
 					?  (char_u *)_("Swap file already exists!")
 					: name,
-# if defined(UNIX) || defined(__EMX__) || defined(VMS)
+# if defined(UNIX) || defined(VMS)
 				    process_still_running
 					? (char_u *)_("&Open Read-Only\n&Edit anyway\n&Recover\n&Quit\n&Abort") :
 # endif
 					(char_u *)_("&Open Read-Only\n&Edit anyway\n&Recover\n&Delete it\n&Quit\n&Abort"), 1, NULL, FALSE);
 
-# if defined(UNIX) || defined(__EMX__) || defined(VMS)
+# if defined(UNIX) || defined(VMS)
 			if (process_still_running && choice >= 4)
 			    choice++;	/* Skip missing "Delete it" button */
 # endif

File src/misc1.c

View file
 # 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.
 		    && at_start
 #endif
 	   )
-#if defined(MSDOS) || defined(MSWIN) || defined(OS2)
+#if defined(MSDOS) || defined(MSWIN)
 		|| *src == '%'
 #endif
 		|| (*src == '~' && at_start))
 #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
 #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
 	    }
     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;
 {
     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;
 {
     if (count <= 0 || files == NULL)
 	return;
-#if defined(__EMX__) && defined(__ALWAYS_HAS_TRAILING_NULL_POINTER) /* XXX */
-    /*
-     * Is this still OK for when other functions than expand_wildcards() have
-     * been used???
-     */
-    _fnexplodefree((char **)files);
-#else
     while (count--)
 	vim_free(files[count]);
     vim_free(files);
-#endif
 }
 
 /*

File src/misc2.c

View file
 alloc_check(size)
     unsigned	    size;
 {
-#if !defined(UNIX) && !defined(__EMX__)
+#if !defined(UNIX)
     if (sizeof(int) == 2 && size > 0x7fff)
     {
 	/* Don't hide this message */
     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 */

File src/netbeans.c

View file
 		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;

File src/option.c

View file
 
 /* '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"
 			    (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,
     {"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",
     {"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
 				    "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
     {"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",
 #ifdef VMS
 			    (char_u *)"help",
 #else
-# if defined(OS2)
-			    (char_u *)"view /",
-# else
 #  ifdef USEMAN_S
 			    (char_u *)"man -s",
 #  else
 			    (char_u *)"man",
 #  endif
-# endif
 #endif
 #endif
 				(char_u *)0L} SCRIPTID_INIT},
     {"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,
 			    (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,
 #if defined MSDOS || defined MSWIN
 			    (char_u *)".,,",
 #else
-# if defined(__EMX__)
-			    (char_u *)".,/emx/include,,",
-# else /* Unix, probably */
 			    (char_u *)".,/usr/include,,",
-# endif
 #endif
 				(char_u *)0L} SCRIPTID_INIT},
     {"preserveindent", "pi", P_BOOL|P_VI_DEF|P_VIM,
 #   if defined(WIN3264)
 			    (char_u *)"",	/* set in set_init_1() */
 #   else
-#    if defined(OS2)
-			    (char_u *)"cmd.exe",
-#    else
 #     if defined(ARCHIE)
 			    (char_u *)"gos",
 #     else
 			    (char_u *)"sh",
 #     endif
-#    endif
 #   endif
 #  endif
 # endif
 #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
     {"shellxquote", "sxq",  P_STRING|P_VI_DEF|P_SECURE,
 			    (char_u *)&p_sxq, PV_NONE,
 			    {
-#if defined(UNIX) && defined(USE_SYSTEM) && !defined(__EMX__)
+#if defined(UNIX) && defined(USE_SYSTEM)
 			    (char_u *)"\"",
 #else
 			    (char_u *)"",
     {"undolevels",  "ul",   P_NUM|P_VI_DEF,
 			    (char_u *)&p_ul, PV_NONE,
 			    {
-#if defined(UNIX) || defined(WIN3264) || defined(OS2) || defined(VMS)
+#if defined(UNIX) || defined(WIN3264) || defined(VMS)
 			    (char_u *)1000L,
 #else
 			    (char_u *)100L,
     {"viminfo",	    "vi",   P_STRING|P_COMMA|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
 			    {(char_u *)"", (char_u *)"'100,<50,s10,h"}
      * 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)
-# ifdef __EMX__
-	    || ((p = mch_getenv((char_u *)"EMXSHELL")) != NULL && *p != NUL)
-# endif
+#if defined(MSDOS) || defined(MSWIN)
 	    || ((p = mch_getenv((char_u *)"COMSPEC")) != NULL && *p != NUL)
 # ifdef WIN3264
 	    || ((p = default_shell()) != NULL && *p != NUL)
     }
 #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
 #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
 		options[opt_idx].flags |= P_DEF_ALLOCED;
 	    }
 
-#if defined(MSDOS) || defined(MSWIN) || defined(OS2) || defined(MACOS) \
-		|| defined(VMS)
+#if defined(MSDOS) || defined(MSWIN) || defined(MACOS) || defined(VMS)
 	    if (STRCMP(p_enc, "latin1") == 0
 # ifdef FEAT_MBYTE
 		    || enc_utf8
     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
     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
     void
 set_init_3()
 {
-#if defined(UNIX) || defined(OS2) || defined(WIN3264)
+#if defined(UNIX) || defined(WIN3264)
 /*
  * Set 'shellpipe' and 'shellredir', depending on the 'shell' option.
  * This is done after other initializations, where 'shell' might have been
 	 */
 	if (	   fnamecmp(p, "csh") == 0
 		|| fnamecmp(p, "tcsh") == 0
-# if defined(OS2) || defined(WIN3264)	/* also check with .exe extension */
+# if defined(WIN3264)	/* also check with .exe extension */
 		|| fnamecmp(p, "csh.exe") == 0
 		|| fnamecmp(p, "tcsh.exe") == 0
 # endif
 	    }
 	}
 	else
-# ifndef OS2	/* Always use bourne shell style redirection if we reach this */
 	    if (       fnamecmp(p, "sh") == 0
 		    || fnamecmp(p, "ksh") == 0
 		    || fnamecmp(p, "mksh") == 0
 		    || fnamecmp(p, "cmd.exe") == 0
 #  endif
 		    )
-# endif
 	    {
 #if defined(FEAT_QUICKFIX)
 		if (do_sp)
     }
 #endif
 
-#if defined(MSDOS) || defined(WIN3264) || defined(OS2)
+#if defined(MSDOS) || defined(WIN3264)
     /*
      * Set 'shellcmdflag and 'shellquote' depending on the 'shell' option.
      * This is done after other initializations, where 'shell' might have been

File src/option.h

View file
 #ifdef FEAT_MZSCHEME
 EXTERN long	p_mzq;		/* 'mzquantum */
 #endif
-#if defined(MSDOS) || defined(MSWIN) || defined(OS2)
+#if defined(MSDOS) || defined(MSWIN)
 EXTERN int	p_odev;		/* 'opendevice' */
 #endif
 EXTERN char_u	*p_opfunc;	/* 'operatorfunc' */

File src/os_os2_cfg.h

-/* os_os2_cfg.h */
-/* vi:set ts=8 sts=4 sw=4: */
-
-#define CASE_INSENSITIVE_FILENAME   /* ignore case when comparing file names */
-#define SPACE_IN_FILENAME
-#define BACKSLASH_IN_FILENAME
-#define BINARY_FILE_IO
-#define USE_CRNL		/* lines end in CR-NL instead of NL */
-#define NO_EXPANDPATH		/* always call mch_expand_wildcards */
-#define USE_EXE_NAME		/* use argv[0] for $VIM */
-#define USE_TERM_CONSOLE
-#define HAVE_DUP		/* have dup() */
-
-#define FNAME_ILLEGAL "\"*?><|" /* illegal characters in a file name */
-
-/*
- * The rest is manually generated from configure.in by Paul Slootman.
- */
-
-/* Define unless no X support found */
-#undef HAVE_X11
-
-/* Define when terminfo support found */
-#undef TERMINFO
-
-/* Define when termcap.h contains ospeed */
-#define HAVE_OSPEED	1
-
-#define HAVE_STRICMP
-#define HAVE_STRNICMP
-
-/* Define when ospeed can be extern */
-#define OSPEED_EXTERN
-
-/* Define when termcap.h contains UP, BC and PC */
-#define HAVE_UP_BC_PC	1
-
-/* Define when UP, BC and PC can be extern */
-#define UP_BC_PC_EXTERN
-
-/* Define when termcap.h defines outfuntype */
-#undef HAVE_OUTFUNTYPE
-
-/* Define when __DATE__ " " __TIME__ can be used */
-#define HAVE_DATE_TIME	1
-
-#undef UNIX	/* define always by current configure script */
-
-/* Defined to the size of an int */
-#define SIZEOF_INT 4
-
-/*
- * If we cannot trust one of the following from the libraries, we use our
- * own safe but probably slower mch_memmove().
- */
-#define USEBCOPY	1
-#undef USEMEMMOVE
-#undef USEMEMCPY
-
-/* Define to empty if the keyword does not work.  */
-#undef const
-
-/* Define to `int' if <sys/types.h> doesn't define.  */
-#undef mode_t
-
-/* Define to `long' if <sys/types.h> doesn't define.  */
-#undef off_t
-
-/* Define to `long' if <sys/types.h> doesn't define.  */
-#undef pid_t
-
-/* Define to `unsigned' if <sys/types.h> doesn't define.  */
-#undef size_t
-
-/* Define to `int' if <sys/types.h> doesn't define.  */
-#undef uid_t
-
-/* Define to `int' if <sys/types.h> doesn't define.  */
-#undef gid_t
-
-/* Define if you can safely include both <sys/time.h> and <time.h>.  */
-#define TIME_WITH_SYS_TIME	1
-
-/* Define if you can safely include both <sys/time.h> and <sys/select.h>.  */
-#define SYS_SELECT_WITH_SYS_TIME	1
-
-/* Define as the return type of signal handlers (int or void).	*/
-#define RETSIGTYPE void
-
-/* Define as the command at the end of signal handlers ("" or "return 0;").  */
-#define SIGRETURN
-
-/* Define if toupper/tolower only work on lower/uppercase characters */
-#undef BROKEN_TOUPPER
-
-/* Define if tgetstr() has a second argument that is (char *) */
-#undef TGETSTR_CHAR_P
-
-/* Define if you have the sigset() function.  */
-#undef HAVE_SIGSET
-
-/* Define if the getcwd() function should not be used.	*/
-#undef BAD_GETCWD
-
-/* Define if you have the getcwd() function.  */
-#define HAVE_GETCWD	1
-
-/* Define if you have the getwd() function.  */
-#define HAVE_GETWD	1
-
-/* Define if you have the select() function.  */
-#define HAVE_SELECT	1
-
-/* Define if you have the strcspn() function.  */
-#define HAVE_STRCSPN	1
-
-/* Define if you have the strtol() function.  */
-#define HAVE_STRTOL	1
-
-/* Define if you have the tgetent() function.  */
-#define HAVE_TGETENT	1
-
-#define HAVE_STRFTIME	    /* guessed */
-
-/* Define if you have the memset() function.  */
-#define HAVE_MEMSET	1
-
-/* Define if you have the strerror() function.	*/
-#define HAVE_STRERROR	1
-
-/* Define if you have the strcasecmp() function. */
-#undef HAVE_STRCASECMP
-
-/* Define if you have the fchown() function.  */
-#undef HAVE_FCHOWN
-
-/* Define if you have the rename() function. */
-#define HAVE_RENAME	1
-
-/* Define if you have the fsync() function. */
-#undef HAVE_FSYNC   /* exists, but apparently Bad Things happen when used */
-
-/* Define if you have the fchdir() function. */
-#undef HAVE_FCHDIR
-
-/* Define if you have the setenv() function. */
-#undef HAVE_SETENV
-
-/* Define if you have the putenv() function. */
-#define HAVE_PUTENV	1
-
-/* Define if you have the gettimeofday() function. */
-#undef HAVE_GETTIMEOFDAY
-
-/* Define if you have the getpwuid() function. */
-#undef HAVE_GETPWUID
-
-/* Define if you have the getpwnam() function. */
-#undef HAVE_GETPWNAM
-
-/* Define if you have the qsort() function. */
-#define HAVE_QSORT  1
-
-/* Define if you have the <dirent.h> header file.  */
-#define HAVE_DIRENT_H	1
-
-/* Define if you have the <sys/ndir.h> header file.  */
-#undef HAVE_SYS_NDIR_H
-
-/* Define if you have the <sys/dir.h> header file.  */
-#undef HAVE_SYS_DIR_H
-
-/* Define if you have the <ndir.h> header file.  */
-#undef HAVE_NDIR_H
-
-/* Define if you have <sys/wait.h> that is POSIX.1 compatible.	*/
-#define HAVE_SYS_WAIT_H 1
-
-/* Define if you have a <sys/wait.h> that is not POSIX.1 compatible. */
-#undef HAVE_UNION_WAIT
-
-/* This is currently unused in vim: */
-/* Define if you have the ANSI C header files. */
-/* #undef STDC_HEADERS */
-
-/* added by David Sanders */
-#define HAVE_STDARG_H 1
-
-/* instead, we check a few STDC things ourselves */
-#define HAVE_STDLIB_H	1
-#undef HAVE_STRING_H	/* On EMX it is better to use strings.h */
-
-/* Define if you have the <sys/select.h> header file.  */
-#undef HAVE_SYS_SELECT_H
-
-/* Define if you have the <sys/utsname.h> header file.	*/
-#define HAVE_SYS_UTSNAME_H	1
-
-/* Define if you have the <termcap.h> header file.  */
-#define HAVE_TERMCAP_H	1
-
-/* Define if you have the <fcntl.h> header file.  */
-#define HAVE_FCNTL_H	1
-
-/* Define if you have the <sgtty.h> header file.  */
-#define HAVE_SGTTY_H	1
-
-/* Define if you have the <sys/ioctl.h> header file.  */
-#define HAVE_SYS_IOCTL_H	1
-
-/* Define if you have the <sys/time.h> header file.  */
-#define HAVE_SYS_TIME_H
-
-/* Define if you have the <termio.h> header file.  */
-#undef HAVE_TERMIO_H
-
-/* Define if you have the <unistd.h> header file.  */
-#define HAVE_UNISTD_H	1
-
-/* Define if you have the <stropts.h> header file. */
-#undef HAVE_STROPTS_H
-
-/* Define if you have the <errno.h> header file. */
-#define HAVE_ERRNO_H	1
-
-/* Define if you have the <strings.h> header file. */
-#define HAVE_STRINGS_H	1
-
-/* Define if you have the <sys/systeminfo.h> header file. */
-#undef HAVE_SYS_SYSTEMINFO_H
-
-/* Define if you have the <locale.h> header file. */
-#define HAVE_LOCALE_H	1
-
-/* Define if you have the <sys/stream.h> header file. */
-#undef HAVE_SYS_STREAM_H
-
-/* Define if you have the <sys/ptem.h> header file. */
-#undef HAVE_SYS_PTEM_H
-
-/* Define if you have the <termios.h> header file. */
-#define HAVE_TERMIOS_H	1
-
-/* Define if you have the <libc.h> header file. */
-#undef HAVE_LIBC_H
-
-/* Define if you have the <sys/statfs.h> header file. */
-#undef HAVE_SYS_STATFS_H
-
-/* Define if you have the <sys/poll.h> header file. */
-#undef HAVE_SYS_POLL_H
-
-/* Define if you have the <pwd.h> header file. */
-#undef HAVE_PWD_H

File src/os_unix.c

View file
 static void catch_int_signal __ARGS((void));
 static void set_signals __ARGS((void));
 static void catch_signals __ARGS((RETSIGTYPE (*func_deadly)(), RETSIGTYPE (*func_other)()));
-#ifndef __EMX__
 static int  have_wildcard __ARGS((int, char_u **));
 static int  have_dollars __ARGS((int, char_u **));
-#endif
-
-#ifndef __EMX__
+
 static int save_patterns __ARGS((int num_pat, char_u **pat, int *num_file, char_u ***file));
-#endif
 
 #ifndef SIG_ERR
 # define SIG_ERR	((RETSIGTYPE (*)())-1)
 
 /* volatile because it is used in signal handler sig_winch(). */
 static volatile int do_resize = FALSE;
-#ifndef __EMX__
 static char_u	*extra_shell_arg = NULL;
 static int	show_shell_mess = TRUE;
-#endif
 /* volatile because it is used in signal handler deathtrap(). */
 static volatile int deadly_signal = 0;	    /* The signal we caught */
 /* volatile because it is used in signal handler deathtrap(). */
 	len = read_from_input_buf(buf, (long)maxlen);
 	if (len > 0)
 	{
-#ifdef OS2
-	    int i;
-
-	    for (i = 0; i < len; i++)
-		if (buf[i] == 0)
-		    buf[i] = K_NUL;
-#endif
 	    return len;
 	}
     }
 mch_total_mem(special)
     int special UNUSED;
 {
-# ifdef __EMX__
-    return ulimit(3, 0L) >> 10;   /* always 32MB? */
-# else
     long_u	mem = 0;
     long_u	shiftright = 10;  /* how much to shift "mem" right for Kbyte */
 
     len = sizeof(physmem);
     if (sysctl(mib, 2, &physmem, &len, NULL, 0) == 0)
 	mem = (long_u)physmem;
-#  endif
 
 #  if defined(HAVE_SYS_SYSINFO_H) && defined(HAVE_SYSINFO)
     if (mem == 0)
 #  ifndef HAVE_SELECT
 	poll(NULL, 0, (int)msec);
 #  else
-#   ifdef __EMX__
-	_sleep2(msec);
-#   else
 	{
 	    struct timeval tv;
 
 	     */
 	    select(0, NULL, NULL, NULL, &tv);
 	}
-#   endif /* __EMX__ */
 #  endif /* HAVE_SELECT */
 # endif /* HAVE_NANOSLEEP */
 #endif /* HAVE_USLEEP */
     int	    argc UNUSED;
     char    **argv UNUSED;
 {
-#ifdef OS2
-    /*
-     * Store argv[0], may be used for $VIM.  Only use it if it is an absolute
-     * name, mostly it's just "vim" and found in the path, which is unusable.
-     */
-    if (mch_isFullName(argv[0]))
-	exe_name = vim_strsave((char_u *)argv[0]);
-#endif
     if (isatty(1))
 	return OK;
     return FAIL;
 #endif
 }
 
-#if defined(OS2) || defined(PROTO)
+#if defined(PROTO)
 /*
  * Replace all slashes by backslashes.
  * When 'shellslash' set do it the other way around.
     int		force;		/* also expand when already absolute path */
 {
     int		l;
-#ifdef OS2
-    int		only_drive;	/* file name is only a drive letter */
-#endif
 #ifdef HAVE_FCHDIR
     int		fd = -1;
     static int	dont_fchdir = FALSE;	/* TRUE when fchdir() doesn't work */
 	 * and then do the getwd() (and get back to where we were).
 	 * This will get the correct path name with "../" things.
 	 */
-#ifdef OS2
-	only_drive = 0;
-	if (((p = vim_strrchr(fname, '/')) != NULL)
-		|| ((p = vim_strrchr(fname, '\\')) != NULL)
-		|| (((p = vim_strchr(fname,  ':')) != NULL) && ++only_drive))
-#else
 	if ((p = vim_strrchr(fname, '/')) != NULL)
-#endif
 	{
 #ifdef HAVE_FCHDIR
 	    /*
 	    }
 	    else
 	    {
-#ifdef OS2
-		/*
-		 * compensate for case where ':' from "D:" was the only
-		 * path separator detected in the file name; the _next_
-		 * character has to be removed, and then restored later.
-		 */
-		if (only_drive)
-		    p++;
-#endif
 		/* The directory is copied into buf[], to be able to remove
 		 * the file name without changing it (could be a string in
 		 * read-only memory) */
 			fname = p + 1;
 		    *buf = NUL;
 		}
-#ifdef OS2
-		if (only_drive)
-		{
-		    p--;
-		    if (retval != FAIL)
-			fname--;
-		}
-#endif
 	    }
 	}
 	if (mch_dirname(buf, len) == FAIL)
 mch_isFullName(fname)
     char_u	*fname;
 {
-#ifdef __EMX__
-    return _fnisabs(fname);
-#else
 # ifdef VMS
     return ( fname[0] == '/'	       || fname[0] == '.'	    ||
 	     strchr((char *)fname,':') || strchr((char *)fname,'"') ||
 # else
     return (*fname == '/' || *fname == '~');
 # endif
-#endif
 }
 
 #if defined(USE_FNAME_CASE) || defined(PROTO)
 	return NODE_NORMAL;
     if (S_ISREG(st.st_mode) || S_ISDIR(st.st_mode))
 	return NODE_NORMAL;
-#ifndef OS2
     if (S_ISBLK(st.st_mode))	/* block device isn't writable */
 	return NODE_OTHER;
-#endif
     /* Everything else is writable? */
     return NODE_WRITABLE;
 }
     char_u	*p;
 
     /*
-     * For OS/2 use _scrsize().
-     */
-# ifdef __EMX__
-    {
-	int s[2];
-
-	_scrsize(s);
-	columns = s[0];
-	rows = s[1];
-    }
-# endif
-
-    /*
      * 1. try using an ioctl. It is the most accurate method.
      *
      * Try using TIOCGWINSZ first, some systems that have it also define
     int		tmode = cur_tmode;
 #ifdef USE_SYSTEM	/* use system() to start the shell: simple but slow */
     int	    x;
-# ifndef __EMX__
     char_u  *newcmd;   /* only needed for unix */
-# else
-    /*
-     * Set the preferred shell in the EMXSHELL environment variable (but
-     * only if it is different from what is already in the environment).
-     * Emx then takes care of whether to use "/c" or "-c" in an
-     * intelligent way. Simply pass the whole thing to emx's system() call.
-     * Emx also starts an interactive shell if system() is passed an empty
-     * string.
-     */
-    char_u *p, *old;
-
-    if (((old = (char_u *)getenv("EMXSHELL")) == NULL) || STRCMP(old, p_sh))
-    {
-	/* should check HAVE_SETENV, but I know we don't have it. */
-	p = alloc(10 + strlen(p_sh));
-	if (p)
-	{
-	    sprintf((char *)p, "EMXSHELL=%s", p_sh);
-	    putenv((char *)p);	/* don't free the pointer! */
-	}
-    }
-# endif
 
     out_flush();
 
     loose_clipboard();
 # endif
 
-# ifdef __EMX__
-    if (cmd == NULL)
-	x = system("");	/* this starts an interactive shell in emx */
-    else
-	x = system((char *)cmd);
-    /* system() returns -1 when error occurs in starting shell */
-    if (x == -1 && !emsg_silent)
-    {
-	MSG_PUTS(_("\nCannot execute shell "));
-	msg_outtrans(p_sh);
-	msg_putchar('\n');
-    }
-# else /* not __EMX__ */
     if (cmd == NULL)
 	x = system((char *)p_sh);
     else
 	;
     else if (x == 127)
 	MSG_PUTS(_("\nCannot execute shell sh\n"));
-# endif	/* __EMX__ */
     else if (x && !(options & SHELL_SILENT))
     {
 	MSG_PUTS(_("\nshell returned "));
 	    mzquantum_used = TRUE;
 	}
 # endif
-# ifdef __EMX__
-	/* don't check for incoming chars if not in raw mode, because select()
-	 * always returns TRUE then (in some version of emx.dll) */
-	if (curr_tmode != TMODE_RAW)
-	    return 0;
-# endif
-
 	if (towait >= 0)
 	{
 	    tv.tv_sec = towait / 1000;
     size_t	len;
     char_u	*p;
     int		dir;
-#ifdef __EMX__
-    /*
-     * This is the OS/2 implementation.
-     */
-# define EXPL_ALLOC_INC	16
-    char_u	**expl_files;
-    size_t	files_alloced, files_free;
-    char_u	*buf;
-    int		has_wildcard;
-
-    *num_file = 0;	/* default: no files found */
-    files_alloced = EXPL_ALLOC_INC; /* how much space is allocated */
-    files_free = EXPL_ALLOC_INC;    /* how much space is not used  */
-    *file = (char_u **)alloc(sizeof(char_u **) * files_alloced);
-    if (*file == NULL)
-	return FAIL;
-
-    for (; num_pat > 0; num_pat--, pat++)
-    {
-	expl_files = NULL;
-	if (vim_strchr(*pat, '$') || vim_strchr(*pat, '~'))
-	    /* expand environment var or home dir */
-	    buf = expand_env_save(*pat);
-	else
-	    buf = vim_strsave(*pat);
-	expl_files = NULL;
-	has_wildcard = mch_has_exp_wildcard(buf);  /* (still) wildcards? */
-	if (has_wildcard)   /* yes, so expand them */
-	    expl_files = (char_u **)_fnexplode(buf);
-
-	/*
-	 * return value of buf if no wildcards left,
-	 * OR if no match AND EW_NOTFOUND is set.
-	 */
-	if ((!has_wildcard && ((flags & EW_NOTFOUND) || mch_getperm(buf) >= 0))
-		|| (expl_files == NULL && (flags & EW_NOTFOUND)))
-	{   /* simply save the current contents of *buf */
-	    expl_files = (char_u **)alloc(sizeof(char_u **) * 2);
-	    if (expl_files != NULL)
-	    {
-		expl_files[0] = vim_strsave(buf);
-		expl_files[1] = NULL;
-	    }
-	}
-	vim_free(buf);
-
-	/*
-	 * Count number of names resulting from expansion,
-	 * At the same time add a backslash to the end of names that happen to
-	 * be directories, and replace slashes with backslashes.
-	 */
-	if (expl_files)
-	{
-	    for (i = 0; (p = expl_files[i]) != NULL; i++)
-	    {
-		dir = mch_isdir(p);
-		/* If we don't want dirs and this is one, skip it */
-		if ((dir && !(flags & EW_DIR)) || (!dir && !(flags & EW_FILE)))
-		    continue;
-
-		/* Skip files that are not executable if we check for that. */
-		if (!dir && (flags & EW_EXEC) && !mch_can_exe(p))
-		    continue;
-
-		if (--files_free == 0)
-		{
-		    /* need more room in table of pointers */
-		    files_alloced += EXPL_ALLOC_INC;
-		    *file = (char_u **)vim_realloc(*file,
-					   sizeof(char_u **) * files_alloced);
-		    if (*file == NULL)
-		    {
-			EMSG(_(e_outofmem));
-			*num_file = 0;
-			return FAIL;
-		    }
-		    files_free = EXPL_ALLOC_INC;
-		}
-		slash_adjust(p);
-		if (dir)
-		{
-		    /* For a directory we add a '/', unless it's already
-		     * there. */
-		    len = STRLEN(p);
-		    if (((*file)[*num_file] = alloc(len + 2)) != NULL)
-		    {
-			STRCPY((*file)[*num_file], p);
-			if (!after_pathsep((*file)[*num_file],
-						    (*file)[*num_file] + len))
-			{
-			    (*file)[*num_file][len] = psepc;
-			    (*file)[*num_file][len + 1] = NUL;
-			}
-		    }
-		}
-		else
-		{
-		    (*file)[*num_file] = vim_strsave(p);
-		}
-
-		/*
-		 * Error message already given by either alloc or vim_strsave.
-		 * Should return FAIL, but returning OK works also.
-		 */
-		if ((*file)[*num_file] == NULL)
-		    break;
-		(*num_file)++;
-	    }
-	    _fnexplodefree((char **)expl_files);
-	}
-    }
-    return OK;
-
-#else /* __EMX__ */
     /*
      * This is the non-OS/2 implementation (really Unix).
      */
 	return save_patterns(num_pat, pat, num_file, file);
     return FAIL;
 
-#endif /* __EMX__ */
 }
 
 #endif /* VMS */
 
-#ifndef __EMX__
     static int
 save_patterns(num_pat, pat, num_file, file)
     int		num_pat;
     *num_file = num_pat;
     return OK;
 }
-#endif
 
 
 /*
 {
     for ( ; *p; mb_ptr_adv(p))
     {
-#ifndef OS2
 	if (*p == '\\' && p[1] != NUL)
 	    ++p;
 	else
-#endif
 	    if (vim_strchr((char_u *)
 #ifdef VMS
 				    "*?%"
 #else
-# ifdef OS2
-				    "*?"
-# else
 				    "*?[{'"
-# endif
 #endif
 						, *p) != NULL)
 	    return TRUE;
 {
     for ( ; *p; mb_ptr_adv(p))
     {
-#ifndef OS2
 	if (*p == '\\' && p[1] != NUL)
 	    ++p;
 	else
-#endif
 	    if (vim_strchr((char_u *)
 #ifdef VMS
 				    "*?%$"
 #else
-# ifdef OS2
-#  ifdef VIM_BACKTICK
-				    "*?$`"
-#  else
-				    "*?$"
-#  endif
-# else
 				    "*?[{`'$"
-# endif
 #endif
 						, *p) != NULL
 		|| (*p == '~' && p[1] != NUL))
     return FALSE;
 }
 
-#ifndef __EMX__
     static int
 have_wildcard(num, file)
     int	    num;
 	    return TRUE;
     return FALSE;
 }
-#endif	/* ifndef __EMX__ */
 
 #ifndef HAVE_RENAME
 /*

File src/os_unix.h

View file
 # include <stdlib.h>
 #endif
 
-#ifdef __EMX__
-# define HAVE_TOTAL_MEM
-#endif
-
 #if defined(__CYGWIN__) || defined(__CYGWIN32__)
 # define WIN32UNIX	/* Compiling for Win32 using Unix files. */
 # define BINARY_FILE_IO
 # endif
 #endif
 
-#if !defined(USR_EXRC_FILE2) && defined(OS2)
-# define USR_EXRC_FILE2 "$VIM/.exrc"
-#endif
 #if !defined(USR_EXRC_FILE2) && defined(VMS)
 # define USR_EXRC_FILE2 "sys$login:_exrc"
 #endif
 # endif
 #endif
 
-#if !defined(USR_VIMRC_FILE2) && defined(OS2)
-# define USR_VIMRC_FILE2 "$VIM/.vimrc"
-#endif
 #if !defined(USR_VIMRC_FILE2) && defined(VMS)
 # define USR_VIMRC_FILE2 "sys$login:_vimrc"
 #endif
 #   define VIMINFO_FILE "$HOME/.viminfo"
 #  endif
 # endif
-# if !defined(VIMINFO_FILE2) && defined(OS2)
-#  define VIMINFO_FILE2 "$VIM/.viminfo"
-# endif
 # if !defined(VIMINFO_FILE2) && defined(VMS)
 #  define VIMINFO_FILE2 "sys$login:_viminfo"
 # endif
 #endif
 
 #ifndef DFLT_BDIR
-# ifdef OS2
-#  define DFLT_BDIR     ".,c:/tmp,~/tmp,~/"
-# else
 #  ifdef VMS
 #   define DFLT_BDIR    "./,sys$login:,tmp:"
 #  else
 #   define DFLT_BDIR    ".,~/tmp,~/"    /* default for 'backupdir' */
 #  endif
-# endif
 #endif
 
 #ifndef DFLT_DIR
-# ifdef OS2
-#  define DFLT_DIR      ".,~/tmp,c:/tmp,/tmp"
-# else
 #  ifdef VMS
 #   define DFLT_DIR     "./,sys$login:,tmp:"
 #  else
 #   define DFLT_DIR     ".,~/tmp,/var/tmp,/tmp" /* default for 'directory' */
 #  endif
-# endif
 #endif
 
 #ifndef DFLT_VDIR
-# ifdef OS2
-#  define DFLT_VDIR     "$VIM/vimfiles/view"
-# else
 #  ifdef VMS
 #   define DFLT_VDIR    "sys$login:vimfiles/view"
 #  else
 #   define DFLT_VDIR    "$HOME/.vim/view"       /* default for 'viewdir' */
 #  endif
-# endif
 #endif
 
 #define DFLT_ERRORFILE		"errors.err"
 
-#ifdef OS2
-# define DFLT_RUNTIMEPATH	"$HOME/vimfiles,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after,$HOME/vimfiles/after"
-#else
 # ifdef VMS
 #  define DFLT_RUNTIMEPATH      "sys$login:vimfiles,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after,sys$login:vimfiles/after"
 # else
 #   define DFLT_RUNTIMEPATH	"~/.vim,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after,~/.vim/after"
 #  endif
 # endif
-#endif
 
-#ifdef OS2
-/*
- * Try several directories to put the temp files.
- */
-# define TEMPDIRNAMES	"$TMP", "$TEMP", "c:\\TMP", "c:\\TEMP", ""
-# define TEMPNAMELEN	128
-#else
 # ifdef VMS
 #  ifndef VAX
 #   define VMS_TEMPNAM    /* to fix default .LIS extension */
 #  define TEMPDIRNAMES  "$TMPDIR", "/tmp", ".", "$HOME"
 #  define TEMPNAMELEN    256
 # endif
-#endif
 
 /* Special wildcards that need to be handled by the shell */
 #define SPECIAL_WILDCHAR    "`'{"

File src/proto.h

View file
 #  define XImage int
 # endif
 
-# if defined(UNIX) || defined(__EMX__) || defined(VMS)
+# if defined(UNIX) || defined(VMS)
 #  include "os_unix.pro"
 # endif
 # if defined(MSDOS) || defined(WIN16)

File src/term.c

View file
     {K_RIGHT,		"\033[C"},
 # endif
 
-# if defined(UNIX) || defined(ALL_BUILTIN_TCAPS) || defined(SOME_BUILTIN_TCAPS) || defined(__EMX__)
+# if defined(UNIX) || defined(ALL_BUILTIN_TCAPS) || defined(SOME_BUILTIN_TCAPS)
 /*
  * standard ANSI terminal, default for unix
  */
 #  endif
 # endif
 
-# if defined(MSDOS) || defined(ALL_BUILTIN_TCAPS) || defined(__EMX__)
+# if defined(MSDOS) || defined(ALL_BUILTIN_TCAPS)
 /*
  * These codes are valid when nansi.sys or equivalent has been installed.
  * Function keys on a PC are preceded with a NUL. These are converted into
  * K_NUL '\316' in mch_inchar(), because we cannot handle NULs in key codes.
  * CTRL-arrow is used instead of SHIFT-arrow.
  */
-#ifdef __EMX__
-    {(int)KS_NAME,	"os2ansi"},
-#else
     {(int)KS_NAME,	"pcansi"},
     {(int)KS_DL,	"\033[M"},
     {(int)KS_AL,	"\033[L"},
-#endif
     {(int)KS_CE,	"\033[K"},
     {(int)KS_CL,	"\033[2J"},
     {(int)KS_ME,	"\033[0m"},
     {K_K9,		"\316\376"},
 # endif
 
-# if defined(WIN3264) || defined(ALL_BUILTIN_TCAPS) || defined(__EMX__)
+# if defined(WIN3264) || defined(ALL_BUILTIN_TCAPS)
 /*
  * These codes are valid for the Win32 Console .  The entries that start with
  * ESC | are translated into console calls in os_win32.c.  The function keys