summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-07-16 14:47:36 +0200
committerBram Moolenaar <Bram@vim.org>2016-07-16 14:47:36 +0200
commita06ecab7a5159e744448ace731036f0dc5f87dd4 (patch)
tree9474754ee4ef21fefea517d5fa2deae7c30c458d
parentbfafb4c4a01db3f8c508716daf689e0dfe92b649 (diff)
patch 7.4.2048v7.4.2048
Problem: There is still code and help for unsupported systems. Solution: Remove the code and text. (Hirohito Higashi)
-rw-r--r--runtime/doc/eval.txt43
-rw-r--r--runtime/lang/menu_sk_sk.vim2
-rw-r--r--runtime/optwin.vim20
-rw-r--r--src/Make_bc5.mak2
-rw-r--r--src/ex_docmd.c8
-rw-r--r--src/feature.h3
-rw-r--r--src/fileio.c21
-rw-r--r--src/globals.h2
-rw-r--r--src/main.c12
-rw-r--r--src/memfile.c9
-rw-r--r--src/memline.c10
-rw-r--r--src/menu.c2
-rw-r--r--src/misc1.c8
-rw-r--r--src/misc2.c2
-rw-r--r--src/option.c9
-rw-r--r--src/option.h16
-rw-r--r--src/os_unix.c211
-rw-r--r--src/os_unix.h4
-rw-r--r--src/proto.h2
-rw-r--r--src/term.c24
-rw-r--r--src/undo.c2
-rw-r--r--src/version.c8
-rw-r--r--src/vim.h20
-rw-r--r--src/xxd/xxd.c22
24 files changed, 93 insertions, 369 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 6e4195d4e1..2f3fa7718c 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1914,7 +1914,7 @@ USAGE RESULT DESCRIPTION ~
abs({expr}) Float or Number absolute value of {expr}
acos({expr}) Float arc cosine of {expr}
add({list}, {item}) List append {item} to |List| {list}
-and({expr}, {expr}) Number bitwise AND
+and({expr}, {expr}) Number bitwise AND
append({lnum}, {string}) Number append {string} below line {lnum}
append({lnum}, {list}) Number append lines {list} below line {lnum}
argc() Number number of files in the argument list
@@ -1932,7 +1932,7 @@ assert_notmatch({pat}, {text} [, {msg}]) none assert {pat} not matches {text}
assert_true({actual} [, {msg}]) none assert {actual} is true
asin({expr}) Float arc sine of {expr}
atan({expr}) Float arc tangent of {expr}
-atan2({expr}, {expr}) Float arc tangent of {expr1} / {expr2}
+atan2({expr}, {expr}) Float arc tangent of {expr1} / {expr2}
browse({save}, {title}, {initdir}, {default})
String put up a file requester
browsedir({title}, {initdir}) String put up a directory requester
@@ -1956,21 +1956,21 @@ ch_evalraw({handle}, {string} [, {options}])
any evaluate {string} on raw {handle}
ch_getbufnr({handle}, {what}) Number get buffer number for {handle}/{what}
ch_getjob({channel}) Job get the Job of {channel}
-ch_info({handle}) String info about channel {handle}
+ch_info({handle}) String info about channel {handle}
ch_log({msg} [, {handle}]) none write {msg} in the channel log file
ch_logfile({fname} [, {mode}]) none start logging channel activity
ch_open({address} [, {options}])
- Channel open a channel to {address}
-ch_read({handle} [, {options}]) String read from {handle}
+ Channel open a channel to {address}
+ch_read({handle} [, {options}]) String read from {handle}
ch_readraw({handle} [, {options}])
- String read raw from {handle}
+ String read raw from {handle}
ch_sendexpr({handle}, {expr} [, {options}])
any send {expr} over JSON {handle}
ch_sendraw({handle}, {string} [, {options}])
any send {string} over raw {handle}
ch_setoptions({handle}, {options})
none set options for {handle}
-ch_status({handle}) String status of channel {handle}
+ch_status({handle}) String status of channel {handle}
changenr() Number current change number
char2nr({expr}[, {utf8}]) Number ASCII/UTF8 value of first char in {expr}
cindent({lnum}) Number C indent for line {lnum}
@@ -1985,7 +1985,7 @@ copy({expr}) any make a shallow copy of {expr}
cos({expr}) Float cosine of {expr}
cosh({expr}) Float hyperbolic cosine of {expr}
count({list}, {expr} [, {ic} [, {start}]])
- Number count how many {expr} are in {list}
+ Number count how many {expr} are in {list}
cscope_connection([{num} , {dbpath} [, {prepend}]])
Number checks existence of cscope connection
cursor({lnum}, {col} [, {off}])
@@ -2002,7 +2002,7 @@ eval({string}) any evaluate {string} into its value
eventhandler() Number |TRUE| if inside an event handler
executable({expr}) Number 1 if executable {expr} exists
execute({command}) String execute {command} and get the output
-exepath({expr}) String full path of the command {expr}
+exepath({expr}) String full path of the command {expr}
exists({expr}) Number |TRUE| if {expr} exists
extend({expr1}, {expr2} [, {expr3}])
List/Dict insert items of {expr2} into {expr1}
@@ -2030,7 +2030,7 @@ foldtext() String line displayed for closed fold
foldtextresult({lnum}) String text for closed fold at {lnum}
foreground() Number bring the Vim window to the foreground
function({name} [, {arglist}] [, {dict}])
- Funcref reference to function {name}
+ Funcref reference to function {name}
garbagecollect([{atexit}]) none free memory, breaking cyclic references
get({list}, {idx} [, {def}]) any get item {idx} from {list} or {def}
get({dict}, {key} [, {def}]) any get item {key} from {dict} or {def}
@@ -2074,7 +2074,7 @@ getwinvar({nr}, {varname} [, {def}])
any variable {varname} in window {nr}
glob({expr} [, {nosuf} [, {list} [, {alllinks}]]])
any expand file wildcards in {expr}
-glob2regpat({expr}) String convert a glob pat into a search pat
+glob2regpat({expr}) String convert a glob pat into a search pat
globpath({path}, {expr} [, {nosuf} [, {list} [, {alllinks}]]])
String do glob({expr}) for all dirs in {path}
has({feature}) Number |TRUE| if feature {feature} supported
@@ -2097,22 +2097,22 @@ index({list}, {expr} [, {start} [, {ic}]])
input({prompt} [, {text} [, {completion}]])
String get input from the user
inputdialog({prompt} [, {text} [, {completion}]]])
- String like input() but in a GUI dialog
+ String like input() but in a GUI dialog
inputlist({textlist}) Number let the user pick from a choice list
inputrestore() Number restore typeahead
inputsave() Number save and clear typeahead
-inputsecret({prompt} [, {text}]) String like input() but hiding the text
+inputsecret({prompt} [, {text}]) String like input() but hiding the text
insert({list}, {item} [, {idx}]) List insert {item} in {list} [before {idx}]
-invert({expr}) Number bitwise invert
+invert({expr}) Number bitwise invert
isdirectory({directory}) Number |TRUE| if {directory} is a directory
islocked({expr}) Number |TRUE| if {expr} is locked
-isnan({expr}) Number |TRUE| if {expr} is NaN
+isnan({expr}) Number |TRUE| if {expr} is NaN
items({dict}) List key-value pairs in {dict}
job_getchannel({job}) Channel get the channel handle for {job}
job_info({job}) Dict get information about {job}
job_setoptions({job}, {options}) none set options for {job}
job_start({command} [, {options}])
- Job start a job
+ Job start a job
job_status({job}) String get the status of {job}
job_stop({job} [, {how}]) Number stop {job}
join({list} [, {sep}]) String join {list} items into one String
@@ -2123,7 +2123,7 @@ json_encode({expr}) String encode JSON
keys({dict}) List keys in {dict}
len({expr}) Number the length of {expr}
libcall({lib}, {func}, {arg}) String call {func} in library {lib} with {arg}
-libcallnr({lib}, {func}, {arg}) Number idem, but return a Number
+libcallnr({lib}, {func}, {arg}) Number idem, but return a Number
line({expr}) Number line nr of cursor, last line or mark
line2byte({lnum}) Number byte count of line {lnum}
lispindent({lnum}) Number Lisp indent for line {lnum}
@@ -2161,7 +2161,7 @@ mode([expr]) String current editing mode
mzeval({expr}) any evaluate |MzScheme| expression
nextnonblank({lnum}) Number line nr of non-blank line >= {lnum}
nr2char({expr}[, {utf8}]) String single char with ASCII/UTF8 value {expr}
-or({expr}, {expr}) Number bitwise OR
+or({expr}, {expr}) Number bitwise OR
pathshorten({expr}) String shorten directory names in a path
perleval({expr}) any evaluate |Perl| expression
pow({x}, {y}) Float {x} to the power of {y}
@@ -2269,7 +2269,7 @@ synID({lnum}, {col}, {trans}) Number syntax ID at {lnum} and {col}
synIDattr({synID}, {what} [, {mode}])
String attribute {what} of syntax ID {synID}
synIDtrans({synID}) Number translated syntax ID of {synID}
-synconcealed({lnum}, {col}) List info about concealing
+synconcealed({lnum}, {col}) List info about concealing
synstack({lnum}, {col}) List stack of syntax IDs at {lnum} and {col}
system({expr} [, {input}]) String output of shell command/filter {expr}
systemlist({expr} [, {input}]) List output of shell command/filter {expr}
@@ -2326,7 +2326,7 @@ winwidth({nr}) Number width of window {nr}
wordcount() Dict get byte/char/word statistics
writefile({list}, {fname} [, {flags}])
Number write list of lines to file {fname}
-xor({expr}, {expr}) Number bitwise XOR
+xor({expr}, {expr}) Number bitwise XOR
abs({expr}) *abs()*
@@ -7934,8 +7934,6 @@ diff Compiled with |vimdiff| and 'diff' support.
digraphs Compiled with support for digraphs.
directx Compiled with support for Direct-X and 'renderoptions'.
dnd Compiled with support for the "~ register |quote_~|.
-dos16 16 bits DOS version of Vim.
-dos32 32 bits DOS (DJGPP) version of Vim.
ebcdic Compiled on a machine with ebcdic character set.
emacs_tags Compiled with support for Emacs tags.
eval Compiled with expression evaluation support. Always
@@ -8008,7 +8006,6 @@ netbeans_enabled Compiled with support for |netbeans| and connected.
netbeans_intg Compiled with support for |netbeans|.
num64 Compiled with 64-bit |Number| support.
ole Compiled with OLE automation support for Win32.
-os2 OS/2 version of Vim.
packages Compiled with |packages| support.
path_extra Compiled with up/downwards search in 'path' and 'tags'
perl Compiled with Perl interface.
diff --git a/runtime/lang/menu_sk_sk.vim b/runtime/lang/menu_sk_sk.vim
index 0a7504d3ea..d02a7cf61d 100644
--- a/runtime/lang/menu_sk_sk.vim
+++ b/runtime/lang/menu_sk_sk.vim
@@ -2,7 +2,7 @@
" Translated By: Martin Lacko <lacko@host.sk>
" Last Change: 2002 May 27
-if has("win32") || has("win16") || has("dos16") || has("dos32")
+if has("win32")
source <sfile>:p:h/menu_sk_sk.1250.vim
else
source <sfile>:p:h/menu_sk_sk.iso_8859-2.vim
diff --git a/runtime/optwin.vim b/runtime/optwin.vim
index b780e03973..e534a912c3 100644
--- a/runtime/optwin.vim
+++ b/runtime/optwin.vim
@@ -540,7 +540,7 @@ call append("$", "scrolljump\tminimal number of lines to scroll at a time")
call append("$", " \tset sj=" . &sj)
call append("$", "ttyscroll\tmaximum number of lines to use scrolling instead of redrawing")
call append("$", " \tset tsl=" . &tsl)
-if has("gui") || has("msdos") || has("win32")
+if has("gui") || has("win32")
call append("$", "guicursor\tspecifies what the cursor looks like in different modes")
call <SID>OptionG("gcr", &gcr)
endif
@@ -1016,11 +1016,9 @@ call append("$", "patchmode\tkeep oldest version of a file; specifies file name
call <SID>OptionG("pm", &pm)
call append("$", "fsync\tforcibly sync the file to disk after writing it")
call <SID>BinOptionG("fs", &fs)
-if !has("msdos")
- call append("$", "shortname\tuse 8.3 file names")
- call append("$", "\t(local to buffer)")
- call <SID>BinOptionL("sn")
-endif
+call append("$", "shortname\tuse 8.3 file names")
+call append("$", "\t(local to buffer)")
+call <SID>BinOptionL("sn")
call append("$", "cryptmethod\tencryption method for file writing: zip or blowfish")
call append("$", "\t(local to buffer)")
call <SID>OptionL("cm")
@@ -1136,20 +1134,14 @@ if has("quickfix")
endif
-if has("msdos") || has("os2") || has("win16") || has("win32") || has("osfiletype")
+if has("win32") || has("osfiletype")
call <SID>Header("system specific")
- if has("msdos")
- call append("$", "bioskey\tcall the BIOS to get a keyoard character")
- call <SID>BinOptionG("biosk", &biosk)
- call append("$", "conskey\tuse direct console I/O to get a keyboard character")
- call <SID>BinOptionG("consk", &consk)
- endif
if has("osfiletype")
call append("$", "osfiletype\tOS-specific information about the type of file")
call append("$", "\t(local to buffer)")
call <SID>OptionL("oft")
endif
- if has("msdos") || has("os2") || has("win16") || has("win32")
+ if has("win32")
call append("$", "shellslash\tuse forward slashes in file names; for Unix-like shells")
call <SID>BinOptionG("ssl", &ssl)
endif
diff --git a/src/Make_bc5.mak b/src/Make_bc5.mak
index 3a11c8f869..84637dede3 100644
--- a/src/Make_bc5.mak
+++ b/src/Make_bc5.mak
@@ -1,7 +1,7 @@
#
# Makefile for Vim.
# Compiler: Borland C++ 5.0 and later 32-bit compiler
-# Targets: Dos16 or Win32 (Windows NT and Windows 95) (with/without GUI)
+# Targets: Win32 (Windows NT and Windows 95) (with/without GUI)
#
# NOTE: THIS IS OLD AND PROBABLY NO LONGER WORKS.
#
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index 646f7ec080..853a5977f5 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -7713,11 +7713,7 @@ ex_shell(exarg_T *eap UNUSED)
* list. This function takes over responsibility for freeing the list.
*
* XXX The list is made into the argument list. This is freed using
- * FreeWild(), which does a series of vim_free() calls, unless the two defines
- * __EMX__ and __ALWAYS_HAS_TRAILING_NUL_POINTER are set. In this case, a
- * routine _fnexplodefree() is used. This may cause problems, but as the drop
- * file functionality is (currently) not in EMX this is not presently a
- * problem.
+ * FreeWild(), which does a series of vim_free() calls.
*/
void
handle_drop(
@@ -7851,7 +7847,7 @@ alist_new(void)
# endif
#endif
-#if (!defined(UNIX) && !defined(__EMX__)) || defined(PROTO)
+#if !defined(UNIX) || 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
diff --git a/src/feature.h b/src/feature.h
index 2a090ab589..9dc7dc2892 100644
--- a/src/feature.h
+++ b/src/feature.h
@@ -56,8 +56,7 @@
/*
* For Unix, Mac and Win32 use +huge by default. These days CPUs are fast and
* Memory is cheap.
- * Use +big for older systems: Other MS-Windows, dos32, OS/2 and VMS.
- * The dos16 version has very little RAM available, use +small.
+ * Use +big for older systems: Other MS-Windows and VMS.
* Otherwise use +normal
*/
#if !defined(FEAT_TINY) && !defined(FEAT_SMALL) && !defined(FEAT_NORMAL) \
diff --git a/src/fileio.c b/src/fileio.c
index 235b412fa9..e9dca0c0a1 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -367,7 +367,7 @@ readfile(
*/
if (sfname == NULL)
sfname = fname;
-#if defined(UNIX) || defined(__EMX__)
+#if defined(UNIX)
fname = sfname;
#endif
@@ -3150,7 +3150,7 @@ buf_write(
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) /*XXX fix me sometime? */
int made_writable = FALSE; /* 'w' bit has been set */
#endif
/* writing everything */
@@ -7320,12 +7320,7 @@ vim_settempdir(char_u *tempdir)
{
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);
+ add_pathsep(buf);
vim_tempdir = vim_strsave(buf);
vim_free(buf);
}
@@ -7385,15 +7380,7 @@ vim_tempname(
if (itmp[0] != '$' && 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);
+ add_pathsep(itmp);
# ifdef HAVE_MKDTEMP
{
diff --git a/src/globals.h b/src/globals.h
index b89cac243f..3c92510f1c 100644
--- a/src/globals.h
+++ b/src/globals.h
@@ -197,7 +197,7 @@ EXTERN int need_maketitle INIT(= TRUE); /* call maketitle() soon */
#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
diff --git a/src/main.c b/src/main.c
index 26941bd6e7..5c3e9f9c09 100644
--- a/src/main.c
+++ b/src/main.c
@@ -75,7 +75,7 @@ typedef struct
char_u *serverStrEnc; /* encoding of serverStr */
char_u *servername; /* allocated name for our server */
#endif
-#if !defined(UNIX) && !defined(__EMX__)
+#if !defined(UNIX)
# define EXPAND_FILENAMES
int literal; /* don't expand file names */
#endif
@@ -183,7 +183,7 @@ main
#if defined(WIN32) && defined(FEAT_MBYTE)
/*
- * MingW expands command line arguments, which confuses our code to
+ * MinGW expands command line arguments, which confuses our code to
* convert when 'encoding' changes. Get the unexpanded arguments.
*/
argc = get_cmd_argsW(&argv);
@@ -231,10 +231,6 @@ main
#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
@@ -3216,7 +3212,7 @@ mainerr(
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
@@ -3269,7 +3265,7 @@ usage(void)
#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
diff --git a/src/memfile.c b/src/memfile.c
index 6b1a341e22..e2fadc2e53 100644
--- a/src/memfile.c
+++ b/src/memfile.c
@@ -602,16 +602,7 @@ mf_sync(memfile_T *mfp, int flags)
# ifdef HAVE_FSYNC
/*
* most Unixes have the very useful fsync() function, just what we need.
- * However, with OS/2 and EMX it is also available, but there are
- * reports of bad problems with it (a bug in HPFS.IFS).
- * So we disable use of it here in case someone tries to be smart
- * and changes os_os2_cfg.h... (even though there is no __EMX__ test
- * in the #if, as __EMX__ does not have sync(); we hope for a timely
- * sync from the system itself).
*/
-# if defined(__EMX__)
- error "Don't use fsync with EMX! Read emxdoc.doc or emxfix01.doc for info."
-# endif
if (STRCMP(p_sws, "fsync") == 0)
{
if (fsync(mfp->mf_fd))
diff --git a/src/memline.c b/src/memline.c
index bf1e91e4fc..f7c68b2da8 100644
--- a/src/memline.c
+++ b/src/memline.c
@@ -2038,7 +2038,7 @@ make_percent_swname(char_u *dir, char_u *name)
}
#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
@@ -2126,7 +2126,7 @@ swapfile_info(char_u *fname)
{
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)
{
@@ -4445,7 +4445,7 @@ findswapname(
}
#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
@@ -4497,13 +4497,13 @@ findswapname(
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
diff --git a/src/menu.c b/src/menu.c
index 2802de33d7..af50a7ac43 100644
--- a/src/menu.c
+++ b/src/menu.c
@@ -1818,7 +1818,7 @@ check_menu_pointer(vimmenu_T *root, vimmenu_T *menu_to_check)
* defined. This is done once here. add_menu_path() may have already been
* called to define these menus, and may be called again. This function calls
* itself recursively. Should be called at the top level with:
- * gui_create_initial_menus(root_menu, NULL);
+ * gui_create_initial_menus(root_menu);
*/
void
gui_create_initial_menus(vimmenu_T *menu)
diff --git a/src/misc1.c b/src/misc1.c
index a39658e38b..293ac9e935 100644
--- a/src/misc1.c
+++ b/src/misc1.c
@@ -11135,17 +11135,9 @@ FreeWild(int count, char_u **files)
{
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
}
/*
diff --git a/src/misc2.c b/src/misc2.c
index 23b6090cee..281f4af1ac 100644
--- a/src/misc2.c
+++ b/src/misc2.c
@@ -851,7 +851,7 @@ alloc_clear(unsigned size)
char_u *
alloc_check(unsigned size)
{
-#if !defined(UNIX) && !defined(__EMX__)
+#if !defined(UNIX)
if (sizeof(int) == 2 && size > 0x7fff)
{
/* Don't hide this message */
diff --git a/src/option.c b/src/option.c
index fbf07600ed..288c01bbaa 100644
--- a/src/option.c
+++ b/src/option.c
@@ -2004,11 +2004,7 @@ static struct vimoption options[] =
#if defined(AMIGA) || 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},
#if defined(DYNAMIC_PERL)
@@ -2344,7 +2340,7 @@ static struct vimoption options[] =
{"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 *)"",
@@ -3184,9 +3180,6 @@ set_init_1(void)
*/
if (((p = mch_getenv((char_u *)"SHELL")) != NULL && *p != NUL)
#if defined(MSWIN)
-# ifdef __EMX__
- || ((p = mch_getenv((char_u *)"EMXSHELL")) != NULL && *p != NUL)
-# endif
|| ((p = mch_getenv((char_u *)"COMSPEC")) != NULL && *p != NUL)
# ifdef WIN3264
|| ((p = (char_u *)default_shell()) != NULL && *p != NUL)
diff --git a/src/option.h b/src/option.h
index 8f75993db8..f05a466951 100644
--- a/src/option.h
+++ b/src/option.h
@@ -21,20 +21,16 @@
# if defined(WIN3264)
# define DFLT_EFM "%f(%l) : %t%*\\D%n: %m,%*[^\"]\"%f\"%*\\D%l: %m,%f(%l) : %m,%*[^ ] %f %l: %m,%f:%l:%c:%m,%f(%l):%m,%f:%l:%m,%f|%l| %m"
# else
-# if defined(__EMX__) /* put most common here (i.e. gcc format) at front */
-# define DFLT_EFM "%f:%l:%c:%m,%f(%l):%m,%f:%l:%m,%*[^\"]\"%f\"%*\\D%l: %m,\"%f\"%*\\D%l: %m,%f(%l:%c) : %m,%f|%l| %m"
+# if defined(__QNX__)
+# define DFLT_EFM "%f(%l):%*[^WE]%t%*\\D%n:%m,%f|%l| %m"
# else
-# if defined(__QNX__)
-# define DFLT_EFM "%f(%l):%*[^WE]%t%*\\D%n:%m,%f|%l| %m"
-# else
-# ifdef VMS
-# define DFLT_EFM "%A%p^,%C%%CC-%t-%m,%Cat line number %l in file %f,%f|%l| %m"
-# else /* Unix, probably */
-# ifdef EBCDIC
+# ifdef VMS
+# define DFLT_EFM "%A%p^,%C%%CC-%t-%m,%Cat line number %l in file %f,%f|%l| %m"
+# else /* Unix, probably */
+# ifdef EBCDIC
#define DFLT_EFM "%*[^ ] %*[^ ] %f:%l%*[ ]%m,%*[^\"]\"%f\"%*\\D%l: %m,\"%f\"%*\\D%l: %m,%f:%l:%c:%m,%f(%l):%m,%f:%l:%m,\"%f\"\\, line %l%*\\D%c%*[^ ] %m,%D%*\\a[%*\\d]: Entering directory %*[`']%f',%X%*\\a[%*\\d]: Leaving directory %*[`']%f',%DMaking %*\\a in %f,%f|%l| %m"
# else
#define DFLT_EFM "%*[^\"]\"%f\"%*\\D%l: %m,\"%f\"%*\\D%l: %m,%-G%f:%l: (Each undeclared identifier is reported only once,%-G%f:%l: for each function it appears in.),%-GIn file included from %f:%l:%c:,%-GIn file included from %f:%l:%c\\,,%-GIn file included from %f:%l:%c,%-GIn file included from %f:%l,%-G%*[ ]from %f:%l:%c,%-G%*[ ]from %f:%l:,%-G%*[ ]from %f:%l\\,,%-G%*[ ]from %f:%l,%f:%l:%c:%m,%f(%l):%m,%f:%l:%m,\"%f\"\\, line %l%*\\D%c%*[^ ] %m,%D%*\\a[%*\\d]: Entering directory %*[`']%f',%X%*\\a[%*\\d]: Leaving directory %*[`']%f',%D%*\\a: Entering directory %*[`']%f',%X%*\\a: Leaving directory %*[`']%f',%DMaking %*\\a in %f,%f|%l| %m"
-# endif
# endif
# endif
# endif
diff --git a/src/os_unix.c b/src/os_unix.c
index 32c1640f99..df39cd3fba 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -211,14 +211,10 @@ static RETSIGTYPE deathtrap SIGPROTOARG;
static void catch_int_signal(void);
static void set_signals(void);
static void catch_signals(RETSIGTYPE (*func_deadly)(), RETSIGTYPE (*func_other)());
-#ifndef __EMX__
static int have_wildcard(int, char_u **);
static int have_dollars(int, char_u **);
-#endif
-#ifndef __EMX__
static int save_patterns(int num_pat, char_u **pat, int *num_file, char_u ***file);
-#endif
#ifndef SIG_ERR
# define SIG_ERR ((RETSIGTYPE (*)())-1)
@@ -226,10 +222,8 @@ static int save_patterns(int num_pat, char_u **pat, int *num_file, char_u ***fil
/* 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(). */
@@ -570,13 +564,10 @@ mch_char_avail(void)
long_u
mch_total_mem(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 */
-# ifdef HAVE_SYSCTL
+# ifdef HAVE_SYSCTL
int mib[2], physmem;
size_t len;
@@ -586,9 +577,9 @@ mch_total_mem(int special UNUSED)
len = sizeof(physmem);
if (sysctl(mib, 2, &physmem, &len, NULL, 0) == 0)
mem = (long_u)physmem;
-# endif
+# endif
-# if defined(HAVE_SYS_SYSINFO_H) && defined(HAVE_SYSINFO)
+# if defined(HAVE_SYS_SYSINFO_H) && defined(HAVE_SYSINFO)
if (mem == 0)
{
struct sysinfo sinfo;
@@ -596,7 +587,7 @@ mch_total_mem(int special UNUSED)
/* Linux way of getting amount of RAM available */
if (sysinfo(&sinfo) == 0)
{
-# ifdef HAVE_SYSINFO_MEM_UNIT
+# ifdef HAVE_SYSINFO_MEM_UNIT
/* avoid overflow as much as possible */
while (shiftright > 0 && (sinfo.mem_unit & 1) == 0)
{
@@ -604,14 +595,14 @@ mch_total_mem(int special UNUSED)
--shiftright;
}
mem = sinfo.totalram * sinfo.mem_unit;
-# else
+# else
mem = sinfo.totalram;
-# endif
+# endif
}
}
-# endif
+# endif
-# ifdef HAVE_SYSCONF
+# ifdef HAVE_SYSCONF
if (mem == 0)
{
long pagesize, pagecount;
@@ -630,19 +621,19 @@ mch_total_mem(int special UNUSED)
mem = (long_u)pagesize * pagecount;
}
}
-# endif
+# endif
/* Return the minimum of the physical memory and the user limit, because
* using more than the user limit may cause Vim to be terminated. */
-# if defined(HAVE_SYS_RESOURCE_H) && defined(HAVE_GETRLIMIT)
+# if defined(HAVE_SYS_RESOURCE_H) && defined(HAVE_GETRLIMIT)
{
struct rlimit rlp;
if (getrlimit(RLIMIT_DATA, &rlp) == 0
&& rlp.rlim_cur < ((rlim_t)1 << (sizeof(long_u) * 8 - 1))
-# ifdef RLIM_INFINITY
+# ifdef RLIM_INFINITY
&& rlp.rlim_cur != RLIM_INFINITY
-# endif
+# endif
&& ((long_u)rlp.rlim_cur >> 10) < (mem >> shiftright)
)
{
@@ -650,12 +641,11 @@ mch_total_mem(int special UNUSED)
shiftright = 10;
}
}
-# endif
+# endif
if (mem > 0)
return mem >> shiftright;
return (long_u)0x1fffff;
-# endif
}
#endif
@@ -712,9 +702,6 @@ mch_delay(long msec, int ignoreinput)
# ifndef HAVE_SELECT
poll(NULL, 0, (int)msec);
# else
-# ifdef __EMX__
- _sleep2(msec);
-# else
{
struct timeval tv;
@@ -726,7 +713,6 @@ mch_delay(long msec, int ignoreinput)
*/
select(0, NULL, NULL, NULL, &tv);
}
-# endif /* __EMX__ */
# endif /* HAVE_SELECT */
# endif /* HAVE_NANOSLEEP */
#endif /* HAVE_USLEEP */
@@ -2608,17 +2594,13 @@ mch_FullName(
int
mch_isFullName(char_u *fname)
{
-#ifdef __EMX__
- return _fnisabs(fname);
-#else
-# ifdef VMS
+#ifdef VMS
return ( fname[0] == '/' || fname[0] == '.' ||
strchr((char *)fname,':') || strchr((char *)fname,'"') ||
(strchr((char *)fname,'[') && strchr((char *)fname,']'))||
(strchr((char *)fname,'<') && strchr((char *)fname,'>')) );
-# else
+#else
return (*fname == '/' || *fname == '~');
-# endif
#endif
}
@@ -3840,19 +3822,6 @@ mch_get_shellsize(void)
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
@@ -4102,9 +4071,6 @@ mch_call_shell(
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).
@@ -4125,7 +4091,6 @@ mch_call_shell(
putenv((char *)p); /* don't free the pointer! */
}
}
-# endif
out_flush();
@@ -4137,24 +4102,11 @@ mch_call_shell(
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(_(