0
0
mirror of https://github.com/vim/vim.git synced 2025-08-30 20:43:35 -04:00

patch 7.4.1399

Problem:    The MS-DOS code does not build.
Solution:   Remove the old MS-DOS code.
This commit is contained in:
Bram Moolenaar 2016-02-23 14:53:34 +01:00
parent 4e221c99e8
commit 48e330aff9
45 changed files with 163 additions and 4308 deletions

View File

@ -291,11 +291,9 @@ SRC_DOS = \
src/GvimExt/uninst.bat \
README_srcdos.txt \
src/INSTALLpc.txt \
src/Make_bc3.mak \
src/Make_bc5.mak \
src/Make_cyg.mak \
src/Make_cyg_ming.mak \
src/Make_djg.mak \
src/Make_ivc.mak \
src/Make_dvc.mak \
src/Make_ming.mak \
@ -321,8 +319,6 @@ SRC_DOS = \
src/if_perl_msvc/stdbool.h \
src/iid_ole.c \
src/os_dos.h \
src/os_msdos.c \
src/os_msdos.h \
src/os_w32dll.c \
src/os_w32exe.c \
src/os_win32.c \
@ -330,7 +326,6 @@ SRC_DOS = \
src/os_win32.h \
src/proto/gui_w32.pro \
src/proto/if_ole.pro \
src/proto/os_msdos.pro \
src/proto/os_win32.pro \
src/proto/os_mswin.pro \
src/testdir/Make_dos.mak \
@ -345,9 +340,7 @@ SRC_DOS = \
src/vimtbar.h \
src/xpm_w32.c \
src/xpm_w32.h \
src/xxd/Make_bc3.mak \
src/xxd/Make_bc5.mak \
src/xxd/Make_djg.mak \
src/xxd/Make_ming.mak \
src/xxd/Make_mvc.mak \
nsis/gvim.nsi \

View File

@ -1,184 +0,0 @@
# Makefile for Borland C++ 3.1 or 4.0 to compile a 16 bit version of Vim.
#
# NOTE: THIS IS OLD AND PROBABLY NO LONGER WORKS.
#
# There are compilation options at the end of this file.
#
# Command line variables:
# BOR path to root of Borland C (E:\BORLANDC)
# DEBUG set to "yes" for debugging (no)
# SPAWNO path to the spawno library directory, empty if you do not have
# it; use 8.3 filenames! (C:\CC\SPAWN)
.AUTODEPEND
!ifndef BOR
BOR = E:\BORLANDC
!endif
!if ("$(DEBUG)" == "yes")
DEBUG_FLAG = -v
!else
DEBUG_FLAG =
!endif
CC = $(BOR)\bin\bcc.exe +VIM.CFG
TLINK = $(BOR)\bin\tlink.exe
!ifndef SPAWNO
SPAWNO = C:\CC\SPAWN
!endif
!if ("$(SPAWNO)" == "")
LIBPATH = $(BOR)\LIB
INCLUDEPATH = $(BOR)\INCLUDE
SPAWND =
SPAWNL =
!else
LIBPATH = $(BOR)\LIB;$(SPAWNO)
INCLUDEPATH = $(BOR)\INCLUDE;$(SPAWNO)
SPAWND = ;SPAWNO
SPAWNL = spawnl.lib
!endif
# *Implicit Rules*
#
# use -v for debugging
#
.c.obj:
$(CC) -c $(DEBUG_FLAG) {$< }
# *List Macros*
EXE_dependencies = \
blowfish.obj \
buffer.obj \
charset.obj \
crypt.obj \
crypt_zip.obj \
diff.obj \
digraph.obj \
edit.obj \
eval.obj \
ex_cmds.obj \
ex_cmds2.obj \
ex_docmd.obj \
ex_eval.obj \
ex_getln.obj \
fileio.obj \
fold.obj \
getchar.obj \
hardcopy.obj \
hashtab.obj \
json.obj \
main.obj \
mark.obj \
memfile.obj \
memline.obj \
menu.obj \
message.obj \
misc1.obj \
misc2.obj \
move.obj \
os_msdos.obj \
normal.obj \
ops.obj \
option.obj \
popupmnu.obj \
quickfix.obj \
regexp.obj \
screen.obj \
search.obj \
sha256.obj \
spell.obj \
syntax.obj \
tag.obj \
term.obj \
ui.obj \
undo.obj \
window.obj
all: vim.exe install.exe uninstal.exe xxd/xxd.exe
# *Explicit Rules*
vim.exe: vim.cfg $(EXE_dependencies) version.c
$(CC) $(DEBUG_FLAG) -c version.c
$(TLINK) /x/c/L$(LIBPATH) $(DEBUG_FLAG) @&&|
c0l.obj $(EXE_dependencies) version.obj
vim
# no map file
$(SPAWNL) cl.lib
|
install.exe: dosinst.c
$(CC) -einstall $(DEBUG_FLAG) dosinst.c
uninstal.exe: uninstal.c
$(CC) $(DEBUG_FLAG) uninstal.c
# This may fail for older make versions, building xxd will fail anyway then.
xxd/xxd.exe: xxd/xxd.c
cd xxd
$(MAKE) -f Make_bc3.mak BOR=$(BOR) DEBUG=$(DEBUG)
cd ..
# cleaning up: Delete all generated files
clean:
-del *.obj
-del vim.exe
-del vim.sym
-del install.exe
-del uninstal.exe
-del xxd\*.obj
-del xxd\xxd.exe
-del vim.cfg
-del testdir\*.out
# Individual File Dependencies (incomplete)
ex_docmd.obj: ex_docmd.c ex_cmds.h
ex_eval.obj: ex_eval.c ex_cmds.h
main.obj: main.c globals.h option.h
term.obj: term.c term.h
version.obj: version.c version.h
# Compiler Configuration File
#
# The following compile options can be changed for better machines.
# replace -1- with -2 to produce code for a 80286 or higher
# replace -1- with -3 to produce code for a 80386 or higher
# add -v for source debugging
vim.cfg: Make_bc3.mak
copy &&|
-ml
-1-
-f-
-C
-N
-O
-Z
-k-
-d
-h
-vi-
-H=VIM.SYM
-w-par
-weas
-wpre
-Iproto
-I$(INCLUDEPATH)
-L$(LIBPATH)
-DMSDOS;FEAT_TINY$(SPAWND)
| vim.cfg
test:
cd testdir
$(MAKE) -f Make_dos.mak small
cd ..

View File

@ -7,6 +7,7 @@
#
# Contributed by Ben Singer.
# Updated 4/1997 by Ron Aaron
# 2016: removed support for 16 bit DOS
# 6/1997 - added support for 16 bit DOS
# Note: this has been tested, and works, for BC5. Your mileage may vary.
# Has been reported NOT to work with BC 4.52. Maybe it can be fixed?
@ -34,8 +35,7 @@
# name value (default)
#
# BOR path to root of Borland C install (c:\bc5)
# LINK name of the linker ($(BOR)\bin\ilink if OSTYPE is DOS16,
# $(BOR)\bin\ilink32 otherwise)
# LINK name of the linker ($(BOR)\bin\ilink32)
# GUI no or yes: set to yes if you want the GUI version (yes)
# LUA define to path to Lua dir to get Lua support (not defined)
# LUA_VER define to version of Lua being used (51)
@ -70,7 +70,6 @@
# GETTEXT no or yes: set to yes for multi-language support (yes)
# ICONV no or yes: set to yes for dynamic iconv support (yes)
# OLE no or yes: set to yes to make OLE gvim (no)
# OSTYPE DOS16 or WIN32 (WIN32)
# DEBUG no or yes: set to yes if you wish a DEBUGging build (no)
# CODEGUARD no or yes: set to yes if you want to use CODEGUARD (no)
# CPUNR 1 through 6: select -CPU argument to compile with (3)
@ -78,12 +77,11 @@
# USEDLL no or yes: set to yes to use the Runtime library DLL (no)
# For USEDLL=yes the cc3250.dll is required to run Vim.
# VIMDLL no or yes: create vim32.dll, and stub (g)vim.exe (no)
# ALIGN 1, 2 or 4: Alignment to use (4 for Win32, 2 for DOS16)
# ALIGN 1, 2 or 4: Alignment to use (4 for Win32)
# FASTCALL no or yes: set to yes to use register-based function protocol (yes)
# OPTIMIZE SPACE, SPEED, or MAXSPEED: type of optimization (MAXSPEED)
# POSTSCRIPT no or yes: set to yes for PostScript printing
# FEATURES TINY, SMALL, NORMAL, BIG or HUGE
# (BIG for WIN32, SMALL for DOS16)
# FEATURES TINY, SMALL, NORMAL, BIG or HUGE (BIG for WIN32)
# WINVER 0x0400 or 0x0500: minimum Win32 version to support (0x0400)
# CSCOPE no or yes: include support for Cscope interface (yes)
# NETBEANS no or yes: include support for Netbeans interface; also
@ -99,8 +97,7 @@
BOR = c:\bc5
!endif
### LINK: Name of the linker: tlink or ilink32 (this is below, depends on
# $(OSTYPE)
### LINK: Name of the linker: ilink32 (this is below)
### GUI: yes for GUI version, no for console version
!if ("$(GUI)"=="")
@ -166,12 +163,6 @@ CHANNEL = yes
### OLE: no for normal gvim, yes for OLE-capable gvim (only works with GUI)
#OLE = yes
### OSTYPE: DOS16 for Windows 3.1 version, WIN32 for Windows 95/98/NT/2000
# version
!if ("$(OSTYPE)"=="")
OSTYPE = WIN32
!endif
### DEBUG: Uncomment to make an executable for debugging
# DEBUG = yes
!if ("$(DEBUG)"=="yes")
@ -208,14 +199,10 @@ USEDLL = no
### VIMDLL: yes for a DLL version of VIM (NOT RECOMMENDED), no otherwise
#VIMDLL = yes
### ALIGN: alignment you desire: (1,2 or 4: s/b 4 for Win32, 2 for DOS)
### ALIGN: alignment you desire: (1,2 or 4: s/b 4 for Win32)
!if ("$(ALIGN)"=="")
!if ($(OSTYPE)==DOS16)
ALIGN = 2
!else
ALIGN = 4
!endif
!endif
### FASTCALL: yes to use FASTCALL calling convention (RECOMMENDED!), no otherwise
# Incompatible when calling external functions (like MSVC-compiled DLLs), so
@ -239,14 +226,10 @@ FASTCALL = yes
OPTIMIZE = MAXSPEED
!endif
### FEATURES: TINY, SMALL, NORMAL, BIG or HUGE (BIG for WIN32, SMALL for DOS16)
### FEATURES: TINY, SMALL, NORMAL, BIG or HUGE (BIG for WIN32)
!if ("$(FEATURES)"=="")
! if ($(OSTYPE)==DOS16)
FEATURES = SMALL
! else
FEATURES = BIG
!endif
!endif
### POSTSCRIPT: uncomment this line if you want PostScript printing
#POSTSCRIPT = yes
@ -266,24 +249,7 @@ WINVER = 0x0400
# Sanity checks for the above options:
#
!if ($(OSTYPE)==DOS16)
!if (($(CPUNR)+0)>4)
!error CPUNR Must be less than or equal to 4 for DOS16
!endif
!if (($(ALIGN)+0)>2)
!error ALIGN Must be less than or equal to 2 for DOS16
!endif
!else # not DOS16
!if (($(CPUNR)+0)<3)
!error CPUNR Must be greater or equal to 3 for WIN32
!endif
!endif
!if ($(OSTYPE)!=WIN32) && ($(OSTYPE)!=DOS16)
!error Check the OSTYPE variable again: $(OSTYPE) is not supported!
!endif
OSTYPE = WIN32
#
# Optimizations: change as desired (RECOMMENDATION: Don't change!):
@ -305,11 +271,6 @@ OPT = $(OPT) -pr
OPT = $(OPT) -vi-
!endif
!endif
!if ($(OSTYPE)==DOS16)
!undef GUI
!undef VIMDLL
!undef USEDLL
!endif
# shouldn't have to change:
LIB = $(BOR)\lib
INCLUDE = $(BOR)\include;.;proto
@ -483,16 +444,9 @@ TARGET = vimd.exe
# for now, anyway: VIMDLL is only for the GUI version
TARGET = vim.exe
!endif
!if ($(OSTYPE)==DOS16)
DEFINES= -DFEAT_$(FEATURES) -DMSDOS
EXETYPE=-ml
STARTUPOBJ = c0l.obj
LINK2 =
!else
EXETYPE=-WC
STARTUPOBJ = c0x32.obj
LINK2 = -ap -OS -o -P
!endif
RESFILE = vim.res
!endif
@ -545,16 +499,6 @@ DEFINES = $(DEFINES) -DMSWINPS
##### BASE COMPILER/TOOLS RULES #####
MAKE = $(BOR)\bin\make
CFLAGS = -w-aus -w-par -w-pch -w-ngu -w-csu -I$(INCLUDE)
!if ($(OSTYPE)==DOS16)
BRC =
!if ("$(LINK)"=="")
LINK = $(BOR)\BIN\TLink
!endif
CC = $(BOR)\BIN\Bcc
LFLAGS = -Tde -c -m -L$(LIB) $(DEBUG_FLAG) $(LINK2)
LFLAGSDLL =
CFLAGS = $(CFLAGS) -H- $(HEADERS)
!else
BRC = $(BOR)\BIN\brc32
!if ("$(LINK)"=="")
LINK = $(BOR)\BIN\ILink32
@ -563,7 +507,6 @@ CC = $(BOR)\BIN\Bcc32
LFLAGS = -OS -Tpe -c -m -L$(LIB) $(DEBUG_FLAG) $(LINK2)
LFLAGSDLL = -Tpd -c -m -L$(LIB) $(DEBUG_FLAG) $(LINK2)
CFLAGS = $(CFLAGS) -d -RT- -k- -Oi $(HEADERS) -f-
!endif
CC1 = -c
CC2 = -o
@ -583,8 +526,6 @@ CCARG = +$(OBJDIR)\bcc.cfg
.cpp.obj:
$(CC) $(CCARG) $(CC1) $(CC2)$@ $*.cpp
!if ($(OSTYPE)==DOS16)
!else # win32:
vimmain = \
$(OBJDIR)\os_w32exe.obj
!if ("$(VIMDLL)"=="yes")
@ -594,7 +535,6 @@ vimwinmain = \
vimwinmain = \
$(OBJDIR)\os_w32exe.obj
!endif
!endif
vimobj = \
$(OBJDIR)\blowfish.obj \
@ -720,13 +660,8 @@ vimobj = $(vimobj) \
$(OBJDIR)\gui_w32.obj
!endif
!if ($(OSTYPE)==WIN32)
vimobj = $(vimobj) \
$(OBJDIR)\os_win32.obj $(OBJDIR)\os_mswin.obj $(OBJDIR)\winclip.obj
!elif ($(OSTYPE)==DOS16)
vimobj = $(vimobj) \
$(OBJDIR)\os_msdos.obj
!endif
# Blab what we are going to do:
MSG = Compiling $(OSTYPE) $(TARGET) $(OLETARGET), with:
!if ("$(GUI)"=="yes")
@ -818,14 +753,10 @@ MSG = $(MSG) Align=$(ALIGNARG)
!message $(MSG)
!if ($(OSTYPE)==DOS16)
TARGETS = $(TARGET)
!else
!if ("$(VIMDLL)"=="yes")
TARGETS = $(DLLTARGET)
!endif
TARGETS = $(TARGETS) $(TARGET)
!endif
# Targets:
all: vim vimrun.exe install.exe xxd uninstal.exe GvimExt/gvimext.dll
@ -851,18 +782,10 @@ GvimExt/gvimext.dll: GvimExt/gvimext.cpp GvimExt/gvimext.rc GvimExt/gvimext.h
cd ..
install.exe: dosinst.c $(OBJDIR)\bcc.cfg
!if ($(OSTYPE)==WIN32)
$(CC) $(CCARG) -WC -DWIN32 -einstall dosinst.c
!else
$(CC) $(CCARG) -WC -einstall dosinst.c
!endif
uninstal.exe: uninstal.c $(OBJDIR)\bcc.cfg
!if ($(OSTYPE)==WIN32)
$(CC) $(CCARG) -WC -DWIN32 -O2 -euninstal uninstal.c
!else
$(CC) $(CCARG) -WC -O2 -euninstal uninstal.c
!endif
clean:
!if "$(OS)" == "Windows_NT"
@ -923,10 +846,7 @@ $(DLLTARGET): $(OBJDIR) $(vimdllobj)
cg32.lib+
!endif
# $(OSTYPE)==WIN32 causes os_mswin.c compilation. FEAT_SHORTCUT in it needs OLE
!if ("$(OLE)"=="yes" || $(OSTYPE)==WIN32)
ole2w32.lib +
!endif
!if ($(OSTYPE)==WIN32)
import32.lib+
!ifdef LUA
$(LUA_LIB_FLAG)lua.lib+
@ -955,9 +875,6 @@ $(DLLTARGET): $(OBJDIR) $(vimdllobj)
cw32.lib
!endif
vim.def
!else
cl.lib
!endif
|
!if ("$(VIMDLL)"=="yes")
@ -974,14 +891,11 @@ $(TARGET): $(OBJDIR) $(vimobj) $(OBJDIR)\$(RESFILE)
$(vimobj)
!endif
$<,$*
!if ($(OSTYPE)==WIN32)
!if ("$(CODEGUARD)"=="yes")
cg32.lib+
!endif
# $(OSTYPE)==WIN32 causes os_mswin.c compilation. FEAT_SHORTCUT in it needs OLE
!if ("$(OLE)"=="yes" || $(OSTYPE)==WIN32)
ole2w32.lib +
!endif
import32.lib+
!ifdef LUA
$(LUA_LIB_FLAG)lua.lib+
@ -1011,9 +925,6 @@ $(TARGET): $(OBJDIR) $(vimobj) $(OBJDIR)\$(RESFILE)
!endif
$(OBJDIR)\$(RESFILE)
!else
emu.lib + cl.lib
!endif
|
test:

View File

@ -1,112 +0,0 @@
#
# Makefile for VIM on MSDOS, using DJGPP 2.0
#
# NOTE: THIS IS OLD AND PROBABLY NO LONGER WORKS.
#
#>>>>> choose options:
### See feature.h for a list of optionals.
### Any other defines can be included here.
DEFINES =
#>>>>> name of the compiler and linker, name of lib directory
CC = gcc
#>>>>> end of choices
###########################################################################
INCL = vim.h globals.h option.h keymap.h macros.h ascii.h term.h os_msdos.h structs.h
CFLAGS = -O2 -DMSDOS -Iproto $(DEFINES) -Wall -Dinterrupt= -Dfar= -DMAXMEM=512 -D_NAIVE_DOS_REGS
OBJ = \
obj/blowfish.o \
obj/buffer.o \
obj/charset.o \
obj/crypt.o \
obj/crypt_zip.o \
obj/diff.o \
obj/digraph.o \
obj/edit.o \
obj/eval.o \
obj/ex_cmds.o \
obj/ex_cmds2.o \
obj/ex_docmd.o \
obj/ex_eval.o \
obj/ex_getln.o \
obj/fileio.o \
obj/fold.o \
obj/getchar.o \
obj/hardcopy.o \
obj/hashtab.o \
obj/main.o \
obj/mark.o \
obj/memfile.o \
obj/memline.o \
obj/menu.o \
obj/message.o \
obj/misc1.o \
obj/misc2.o \
obj/move.o \
obj/mbyte.o \
obj/normal.o \
obj/ops.o \
obj/option.o \
obj/os_msdos.o \
obj/popupmnu.o \
obj/quickfix.o \
obj/regexp.o \
obj/screen.o \
obj/search.o \
obj/sha256.o \
obj/spell.o \
obj/syntax.o \
obj/tag.o \
obj/term.o \
obj/ui.o \
obj/undo.o \
obj/window.o \
$(TERMLIB)
all: vim.exe install.exe uninstal.exe xxd/xxd.exe
# version.c is compiled each time, so that it sets the build time.
vim.exe: obj $(OBJ) version.c version.h
$(CC) $(CFLAGS) -s -o vim.exe version.c $(OBJ) -lpc
install.exe: dosinst.c
$(CC) $(CFLAGS) -s -o install.exe dosinst.c -lpc
uninstal.exe: uninstal.c
$(CC) $(CFLAGS) -s -o uninstal.exe uninstal.c -lpc
# This requires GNU make.
xxd/xxd.exe: xxd/xxd.c
$(MAKE) --directory=xxd -f Make_djg.mak
obj:
mkdir obj
tags:
command /c ctags *.c $(INCL) ex_cmds.h
clean:
-del obj\*.o
-rmdir obj
-del vim.exe
-del install.exe
-del xxd\xxd.exe
-del testdir\*.out
# This requires GNU make.
test:
$(MAKE) --directory=testdir -f Make_dos.mak
###########################################################################
obj/%.o: %.c obj $(INCL)
$(CC) -c $(CFLAGS) -o $@ $<
# Extra dependency (there are actually many more...)
obj/ex_docmd.o: ex_cmds.h

View File

@ -908,7 +908,7 @@ SANITIZER_LIBS = $(SANITIZER_CFLAGS)
### after changing this, you need to do "make reconfig".
#CONF_TERM_LIB = --with-tlib=ncurses
### For GCC on MSDOS, the ".exe" suffix will be added.
### For GCC on MS-Windows, the ".exe" suffix will be added.
#EXEEXT = .exe
#LNKEXT = .exe
@ -1715,7 +1715,7 @@ PRO_AUTO = \
# Resources used for the Mac are in one directory.
RSRC_DIR = os_mac_rsrc
PRO_MANUAL = os_amiga.pro os_msdos.pro os_win32.pro \
PRO_MANUAL = os_amiga.pro os_win32.pro \
os_mswin.pro winclip.pro os_beos.pro os_vms.pro $(PERL_PRO)
# Default target is making the executable and tools
@ -1836,7 +1836,7 @@ update-po:
# Generate function prototypes. This is not needed to compile vim, but if
# you want to use it, cproto is out there on the net somewhere -- Webb
#
# When generating os_amiga.pro, os_msdos.pro and os_win32.pro there will be a
# When generating os_amiga.pro and os_win32.pro there will be a
# few include files that can not be found, that's OK.
proto: $(PRO_AUTO) $(PRO_MANUAL)
@ -1864,10 +1864,6 @@ os_amiga.pro: os_amiga.c
$(CPROTO) -DAMIGA -UHAVE_CONFIG_H -DBPTR=char* $< > proto/$@
echo "/* vim: set ft=c : */" >> proto/$@
os_msdos.pro: os_msdos.c
$(CPROTO) -DMSDOS -UHAVE_CONFIG_H $< > proto/$@
echo "/* vim: set ft=c : */" >> proto/$@
os_win32.pro: os_win32.c
$(CPROTO) -DWIN32 -UHAVE_CONFIG_H $< > proto/$@
echo "/* vim: set ft=c : */" >> proto/$@

View File

@ -34,7 +34,7 @@ typedef union {
char_u uc[8];
} block8;
#if defined(WIN3264) || defined(DOS32)
#if defined(WIN3264)
/* MS-Windows is always little endian */
#else
# ifdef HAVE_CONFIG_H

View File

@ -541,9 +541,7 @@ buf_clear_file(buf_T *buf)
{
buf->b_ml.ml_line_count = 1;
unchanged(buf, TRUE);
#ifndef SHORT_FNAME
buf->b_shortname = FALSE;
#endif
buf->b_p_eol = TRUE;
buf->b_start_eol = TRUE;
#ifdef FEAT_MBYTE
@ -2911,9 +2909,7 @@ setfname(
}
#endif
#ifndef SHORT_FNAME
buf->b_shortname = FALSE;
#endif
buf_name_changed(buf);
return OK;
@ -4480,7 +4476,7 @@ fix_fname(char_u *fname)
# ifdef BACKSLASH_IN_FILENAME
|| strstr((char *)fname, "\\\\") != NULL
# endif
# if defined(MSWIN) || defined(DJGPP)
# if defined(MSWIN)
|| vim_strchr(fname, '~') != NULL
# endif
)

View File

@ -29,7 +29,7 @@ static int diff_flags = DIFF_FILLER;
static int diff_a_works = MAYBE; /* TRUE when "diff -a" works, FALSE when it
doesn't work, MAYBE when not checked yet */
#if defined(MSWIN) || defined(MSDOS)
#if defined(MSWIN)
static int diff_bin_works = MAYBE; /* TRUE when "diff --binary" works, FALSE
when it doesn't work, MAYBE when not
checked yet */
@ -733,7 +733,7 @@ ex_diffupdate(
break;
#endif
#if defined(MSWIN) || defined(MSDOS)
#if defined(MSWIN)
/* If the "-a" argument works, also check if "--binary" works. */
if (ok && diff_a_works == MAYBE && diff_bin_works == MAYBE)
{
@ -764,7 +764,7 @@ ex_diffupdate(
EMSG(_("E810: Cannot read or write temp files"));
EMSG(_("E97: Cannot create diffs"));
diff_a_works = MAYBE;
#if defined(MSWIN) || defined(MSDOS)
#if defined(MSWIN)
diff_bin_works = MAYBE;
#endif
goto theend;
@ -845,7 +845,7 @@ diff_file(
* non-zero when differences have been found. */
vim_snprintf((char *)cmd, len, "diff %s%s%s%s%s %s",
diff_a_works == FALSE ? "" : "-a ",
#if defined(MSWIN) || defined(MSDOS)
#if defined(MSWIN)
diff_bin_works == TRUE ? "--binary " : "",
#else
"",

View File

@ -39,73 +39,6 @@ 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)
/*
* MSDOS digraphs.
*/
{{'C', ',', 128}, /* ~@ XX */
{'u', '"', 129}, /* <20> */
{'e', '\'', 130}, /* */
{'a', '^', 131}, /* ƒ */
{'a', '"', 132}, /* „ */
{'a', '`', 133}, /* … */
{'a', '@', 134}, /* † */
{'c', ',', 135}, /* ~G XX */
{'e', '^', 136}, /* ~H XX */
{'e', '"', 137}, /* ‰ */
{'e', '`', 138}, /* Š */
{'i', '"', 139}, /* */
{'i', '^', 140}, /* Œ */
{'i', '`', 141}, /* <20> */
{'A', '"', 142}, /* ~N XX */
{'A', '@', 143}, /* <20> */
{'E', '\'', 144}, /* <20> */
{'a', 'e', 145}, /* */
{'A', 'E', 146}, /* */
{'o', '^', 147}, /* “ */
{'o', '"', 148}, /* ” */
{'o', '`', 149}, /* • */
{'u', '^', 150}, /* */
{'u', '`', 151}, /* — */
{'y', '"', 152}, /* ˜ */
{'O', '"', 153}, /* ™ */
{'U', '"', 154}, /* š */
{'c', '|', 155}, /* */
{'$', '$', 156}, /* œ */
{'Y', '-', 157}, /* ~] XX */
{'P', 't', 158}, /* ž */
{'f', 'f', 159}, /* Ÿ */
{'a', '\'', 160}, /*   */
{'i', '\'', 161}, /* ¡ */
{'o', '\'', 162}, /* ¢ */
{'u', '\'', 163}, /* x XX */
{'n', '~', 164}, /* ¤ */
{'N', '~', 165}, /* ¥ */
{'a', 'a', 166}, /* ¦ */
{'o', 'o', 167}, /* § */
{'~', '?', 168}, /* ¨ */
{'-', 'a', 169}, /* © */
{'a', '-', 170}, /* ª */
{'1', '2', 171}, /* « */
{'1', '4', 172}, /* ¬ */
{'~', '!', 173}, /* ­ */
{'<', '<', 174}, /* ® */
{'>', '>', 175}, /* ¯ */
{'s', 's', 225}, /* á */
{'j', 'u', 230}, /* æ */
{'o', '/', 237}, /* í */
{'+', '-', 241}, /* ñ */
{'>', '=', 242}, /* ò */
{'<', '=', 243}, /* ó */
{':', '-', 246}, /* ö */
{'~', '~', 247}, /* ÷ */
{'~', 'o', 248}, /* ø */
{'2', '2', 253}, /* ý */
{NUL, NUL, NUL}
};
#else /* !MSDOS */
#ifdef __MINT__
/*
@ -2007,7 +1940,6 @@ static digr_T digraphdefault[] =
# endif /* EBCDIC */
# endif /* !HPUX_DIGRAPHS */
#endif /* !__MINT__ */
#endif /* !MSDOS */
/*
* handle digraphs after typing a character

View File

@ -46,14 +46,14 @@
char *searchpath(char *name);
#endif
#if defined(DJGPP) || defined(UNIX_LINT)
#if defined(UNIX_LINT)
# include <unistd.h>
# include <errno.h>
#endif
#include "version.h"
#if defined(DJGPP) || defined(UNIX_LINT)
#if defined(UNIX_LINT)
# define vim_mkdir(x, y) mkdir((char *)(x), y)
#else
# if defined(WIN3264) && !defined(__BORLANDC__)
@ -63,9 +63,7 @@ char *searchpath(char *name);
# endif
#endif
#ifndef DJGPP
#define sleep(n) Sleep((n) * 1000)
#endif
/* ---------------------------------------- */
@ -423,9 +421,7 @@ run_command(char *cmd)
char *p;
/* On WinNT, 'start' is a shell built-in for cmd.exe rather than an
* executable (start.exe) like in Win9x. DJGPP, being a DOS program,
* is given the COMSPEC command.com by WinNT, so we have to find
* cmd.exe manually and use it. */
* executable (start.exe) like in Win9x. */
cmd_path = searchpath_save("cmd.exe");
if (cmd_path != NULL)
{
@ -640,14 +636,6 @@ char *sysdrive; /* system drive or "c:\" */
static void
do_inits(char **argv)
{
#ifdef DJGPP
/*
* Use Long File Names by default, if $LFN not set.
*/
if (getenv("LFN") == NULL)
putenv("LFN=y");
#endif
/* Find out the full path of our executable. */
if (my_fullpath(installdir, argv[0], BUFSIZE) == NULL)
{

View File

@ -13503,13 +13503,6 @@ f_has(typval_T *argvars, typval_T *rettv)
#ifdef __BEOS__
"beos",
#endif
#ifdef MSDOS
# ifdef DJGPP
"dos32",
# else
"dos16",
# endif
#endif
#ifdef MACOS
"mac",
#endif

View File

@ -1925,15 +1925,11 @@ write_viminfo(char_u *file, int forceit)
#ifdef UNIX
shortname,
#else
# ifdef SHORT_FNAME
TRUE,
# else
# ifdef FEAT_GUI_W32
gui_is_win32s(),
# else
FALSE,
# endif
# endif
#endif
fname,
#ifdef VMS

View File

@ -4256,8 +4256,7 @@ get_locale_val(int what)
{
char_u *loc;
/* Obtain the locale value from the libraries. For DJGPP this is
* redefined and it doesn't use the arguments. */
/* Obtain the locale value from the libraries. */
loc = (char_u *)setlocale(what, NULL);
# ifdef WIN32

View File

@ -3758,7 +3758,7 @@ set_one_cmd_context(
/* Check for environment variable */
if (*xp->xp_pattern == '$'
#if defined(MSDOS) || defined(MSWIN)
#if defined(MSWIN)
|| *xp->xp_pattern == '%'
#endif
)

View File

@ -4918,7 +4918,7 @@ expand_shellcmd(
if (*s == ' ')
++s; /* Skip space used for absolute path name. */
#if defined(MSDOS) || defined(MSWIN)
#if defined(MSWIN)
e = vim_strchr(s, ';');
#else
e = vim_strchr(s, ':');
@ -5217,7 +5217,7 @@ globpath(
copy_option_part(&path, buf, MAXPATHL, ",");
if (STRLEN(buf) + STRLEN(file) + 2 < MAXPATHL)
{
# if defined(MSWIN) || defined(MSDOS)
# if defined(MSWIN)
/* Using the platform's path separator (\) makes vim incorrectly
* treat it as an escape character, use '/' instead. */
if (*buf != NUL && !after_pathsep(buf, buf + STRLEN(buf)))

View File

@ -65,17 +65,13 @@
# if defined(UNIX) || defined(WIN3264) || defined(MACOS)
# define FEAT_HUGE
# else
# if defined(MSWIN) || defined(DJGPP) || defined(VMS) || defined(MACOS) || defined(AMIGA)
# if defined(MSWIN) || defined(VMS) || defined(MACOS) || defined(AMIGA)
# define FEAT_BIG
# else
# ifdef MSDOS
# define FEAT_SMALL
# else
# define FEAT_NORMAL
# endif
# endif
#endif
#endif
/*
* Each feature implies including the "smaller" ones.
@ -467,7 +463,7 @@
* and byte2line().
* Note: Required for Macintosh.
*/
#if defined(FEAT_NORMAL) && !defined(MSDOS)
#if defined(FEAT_NORMAL)
# define FEAT_TITLE
#endif
@ -541,7 +537,6 @@
* with HAVE_TGETENT defined).
*
* (nothing) Machine specific termcap entries will be included.
* This is default for win16 to save static data.
*
* SOME_BUILTIN_TCAPS Include most useful builtin termcap entries (used only
* with NO_BUILTIN_TCAPS not defined).
@ -1060,7 +1055,7 @@
# ifdef FEAT_BIG
# define FEAT_MOUSE_SGR
# endif
# if defined(FEAT_NORMAL) && (defined(MSDOS) || defined(WIN3264))
# if defined(FEAT_NORMAL) && defined(WIN3264)
# define DOS_MOUSE
# endif
# if defined(FEAT_NORMAL) && defined(__QNX__)
@ -1176,7 +1171,7 @@
*/
#ifdef FEAT_NORMAL
/* MS-DOS console and Win32 console can change cursor shape */
# if defined(MSDOS) || (defined(WIN3264) && !defined(FEAT_GUI_W32))
# if defined(WIN3264) && !defined(FEAT_GUI_W32)
# define MCH_CURSOR_SHAPE
# endif
# if defined(FEAT_GUI_W32) || defined(FEAT_GUI_MOTIF) \

View File

@ -445,7 +445,7 @@ readfile(
return FAIL;
}
#endif
#if defined(MSDOS) || defined(MSWIN)
#if defined(MSWIN)
/*
* MS-Windows allows opening a device, but we will probably get stuck
* trying to read it.
@ -521,12 +521,12 @@ readfile(
/*
* for UNIX: check readonly with perm and mch_access()
* for MSDOS and Amiga: check readonly by trying to open the file for writing
* for Amiga: check readonly by trying to open the file for writing
*/
file_readonly = FALSE;
if (read_stdin)
{
#if defined(MSDOS) || defined(MSWIN)
#if defined(MSWIN)
/* Force binary I/O on stdin to avoid CR-LF -> LF conversion. */
setmode(0, O_BINARY);
#endif
@ -561,7 +561,7 @@ readfile(
msg_scroll = msg_save;
#ifndef UNIX
/*
* On MSDOS and Amiga we can't open a directory, check here.
* On Amiga we can't open a directory, check here.
*/
isdir_f = (mch_isdir(fname));
perm = mch_getperm(fname); /* check if the file exists */
@ -3546,7 +3546,7 @@ buf_write(
}
if (c == NODE_WRITABLE)
{
# if defined(MSDOS) || defined(MSWIN)
# if defined(MSWIN)
/* MS-Windows allows opening a device, but we will probably get stuck
* trying to write to it. */
if (!p_odev)
@ -3791,7 +3791,7 @@ buf_write(
struct stat st_new;
char_u *dirp;
char_u *rootname;
#if defined(UNIX) && !defined(SHORT_FNAME)
#if defined(UNIX)
int did_set_shortname;
#endif
@ -3834,7 +3834,7 @@ buf_write(
goto nobackup;
}
#if defined(UNIX) && !defined(SHORT_FNAME)
#if defined(UNIX)
did_set_shortname = FALSE;
#endif
@ -3846,12 +3846,7 @@ buf_write(
/*
* Make backup file name.
*/
backup = buf_modname(
#ifdef SHORT_FNAME
TRUE,
#else
(buf->b_p_sn || buf->b_shortname),
#endif
backup = buf_modname((buf->b_p_sn || buf->b_shortname),
rootname, backup_ext, FALSE);
if (backup == NULL)
{
@ -3878,7 +3873,6 @@ buf_write(
{
vim_free(backup);
backup = NULL; /* no backup file to delete */
# ifndef SHORT_FNAME
/*
* may try again with 'shortname' set
*/
@ -3891,7 +3885,6 @@ buf_write(
/* setting shortname didn't help */
if (did_set_shortname)
buf->b_shortname = FALSE;
# endif
break;
}
#endif
@ -4059,12 +4052,7 @@ buf_write(
backup = NULL;
else
{
backup = buf_modname(
#ifdef SHORT_FNAME
TRUE,
#else
(buf->b_p_sn || buf->b_shortname),
#endif
backup = buf_modname((buf->b_p_sn || buf->b_shortname),
rootname, backup_ext, FALSE);
vim_free(rootname);
}
@ -4911,12 +4899,7 @@ restore_backup:
*/
if (*p_pm && dobackup)
{
char *org = (char *)buf_modname(
#ifdef SHORT_FNAME
TRUE,
#else
(buf->b_p_sn || buf->b_shortname),
#endif
char *org = (char *)buf_modname((buf->b_p_sn || buf->b_shortname),
fname, p_pm, FALSE);
if (backup != NULL)
@ -5287,7 +5270,7 @@ check_mtime(buf_T *buf, struct stat *st)
static int
time_differs(long t1, long t2)
{
#if defined(__linux__) || defined(MSDOS) || defined(MSWIN)
#if defined(__linux__) || defined(MSWIN)
/* On a FAT filesystem, esp. under Linux, there are only 5 bits to store
* the seconds. Since the roundoff is done when flushing the inode, the
* time may change unexpectedly by one second!!! */
@ -6030,9 +6013,9 @@ shorten_fname(char_u *full_path, char_u *dir_name)
if (fnamencmp(dir_name, full_path, len) == 0)
{
p = full_path + len;
#if defined(MSDOS) || defined(MSWIN)
#if defined(MSWIN)
/*
* MSDOS: when a file is in the root directory, dir_name will end in a
* MSWIN: 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
* case p may already be correct. <negri>
*/
@ -6047,7 +6030,7 @@ shorten_fname(char_u *full_path, char_u *dir_name)
#endif
}
}
#if defined(MSDOS) || defined(MSWIN)
#if 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
@ -6163,12 +6146,7 @@ modname(
char_u *ext,
int prepend_dot) /* may prepend a '.' to file name */
{
return buf_modname(
#ifdef SHORT_FNAME
TRUE,
#else
(curbuf->b_p_sn || curbuf->b_shortname),
#endif
return buf_modname((curbuf->b_p_sn || curbuf->b_shortname),
fname, ext, prepend_dot);
}
@ -6207,9 +6185,7 @@ buf_modname(
retval[fnamelen++] = PATHSEP;
retval[fnamelen] = NUL;
}
#ifndef SHORT_FNAME
prepend_dot = FALSE; /* nothing to prepend a dot to */
#endif
}
else
{
@ -6235,9 +6211,7 @@ buf_modname(
#ifdef USE_LONG_FNAME
&& (!USE_LONG_FNAME || shortname)
#else
# ifndef SHORT_FNAME
&& shortname
# endif
#endif
)
if (*ptr == '.') /* replace '.' by '_' */
@ -6250,10 +6224,8 @@ buf_modname(
}
/* the file name has at most BASENAMELEN characters. */
#ifndef SHORT_FNAME
if (STRLEN(ptr) > (unsigned)BASENAMELEN)
ptr[BASENAMELEN] = '\0';
#endif
s = ptr + STRLEN(ptr);
@ -6263,9 +6235,7 @@ buf_modname(
#ifdef USE_LONG_FNAME
if (!USE_LONG_FNAME || shortname)
#else
# ifndef SHORT_FNAME
if (shortname)
# endif
#endif
{
/*
@ -6320,7 +6290,6 @@ buf_modname(
*/
STRCPY(s, ext);
#ifndef SHORT_FNAME
/*
* Prepend the dot.
*/
@ -6333,7 +6302,6 @@ buf_modname(
STRMOVE(e + 1, e);
*e = '.';
}
#endif
/*
* Check that, after appending the extension, the file name is really

View File

@ -1677,15 +1677,6 @@ vgetc(void)
c = CSI;
#endif
}
#ifdef MSDOS
/*
* If K_NUL was typed, it is replaced by K_NUL, 3 in mch_inchar().
* Delete the 3 here.
*/
else if (c == K_NUL && vpeekc() == 3)
(void)vgetorpeek(TRUE);
#endif
/* a keypad or special function key was not mapped, use it like
* its ASCII equivalent */
switch (c)
@ -5241,7 +5232,7 @@ check_map(
}
#endif
#if defined(MSDOS) || defined(MSWIN) || defined(MACOS)
#if defined(MSWIN) || defined(MACOS)
#define VIS_SEL (VISUAL+SELECTMODE) /* abbreviation */
@ -5254,7 +5245,7 @@ static struct initmap
int mode;
} initmappings[] =
{
#if defined(MSDOS) || defined(MSWIN)
#if defined(MSWIN)
/* Use the Windows (CUA) keybindings. */
# ifdef FEAT_GUI
/* paste, copy and cut */
@ -5274,17 +5265,6 @@ static struct initmap
/* paste, copy and cut */
# ifdef FEAT_CLIPBOARD
# ifdef DJGPP
{(char_u *)"\316\122 \"*P", NORMAL}, /* SHIFT-Insert is "*P */
{(char_u *)"\316\122 \"-d\"*P", VIS_SEL}, /* SHIFT-Insert is "-d"*P */
{(char_u *)"\316\122 \022\017*", INSERT}, /* SHIFT-Insert is ^R^O* */
{(char_u *)"\316\222 \"*y", VIS_SEL}, /* CTRL-Insert is "*y */
# if 0 /* Shift-Del produces the same code as Del */
{(char_u *)"\316\123 \"*d", VIS_SEL}, /* SHIFT-Del is "*d */
# endif
{(char_u *)"\316\223 \"*d", VIS_SEL}, /* CTRL-Del is "*d */
{(char_u *)"\030 \"-d", VIS_SEL}, /* CTRL-X is "-d */
# else
{(char_u *)"\316\324 \"*P", NORMAL}, /* SHIFT-Insert is "*P */
{(char_u *)"\316\324 \"-d\"*P", VIS_SEL}, /* SHIFT-Insert is "-d"*P */
{(char_u *)"\316\324 \022\017*", INSERT}, /* SHIFT-Insert is ^R^O* */
@ -5292,7 +5272,6 @@ static struct initmap
{(char_u *)"\316\327 \"*d", VIS_SEL}, /* SHIFT-Del is "*d */
{(char_u *)"\316\330 \"*d", VIS_SEL}, /* CTRL-Del is "*d */
{(char_u *)"\030 \"-d", VIS_SEL}, /* CTRL-X is "-d */
# endif
# else
{(char_u *)"\316\324 P", NORMAL}, /* SHIFT-Insert is P */
{(char_u *)"\316\324 \"-dP", VIS_SEL}, /* SHIFT-Insert is "-dP */
@ -5325,7 +5304,7 @@ static struct initmap
void
init_mappings(void)
{
#if defined(MSDOS) || defined(MSWIN) ||defined(MACOS)
#if defined(MSWIN) ||defined(MACOS)
int i;
for (i = 0; i < (int)(sizeof(initmappings) / sizeof(struct initmap)); ++i)
@ -5333,8 +5312,7 @@ init_mappings(void)
#endif
}
#if defined(MSDOS) || defined(MSWIN) \
|| defined(FEAT_CMDWIN) || defined(MACOS) || defined(PROTO)
#if defined(MSWIN) || defined(FEAT_CMDWIN) || defined(MACOS) || defined(PROTO)
/*
* Add a mapping "map" for mode "mode".
* Need to put string in allocated memory, because do_map() will modify it.

View File

@ -19,7 +19,7 @@
*/
EXTERN long Rows /* nr of rows in the screen */
#ifdef DO_INIT
# if defined(MSDOS) || defined(WIN3264)
# if defined(WIN3264)
= 25L
# else
= 24L
@ -948,9 +948,6 @@ EXTERN int ctrl_x_mode INIT(= 0); /* Which Ctrl-X mode are we in? */
#endif
EXTERN int no_abbr INIT(= TRUE); /* TRUE when no abbreviations loaded */
#ifdef MSDOS
EXTERN int beep_count INIT(= 0); /* nr of beeps since last char typed */
#endif
#ifdef USE_EXE_NAME
EXTERN char_u *exe_name; /* the name of the executable */

View File

@ -226,7 +226,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) /* open read/write */
# if 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)

View File

@ -10,10 +10,6 @@
#define EXTERN
#include "vim.h"
#ifdef SPAWNO
# include <spawno.h> /* special MS-DOS swapping library */
#endif
#ifdef __CYGWIN__
# ifndef WIN32
# include <cygwin/version.h>
@ -505,8 +501,7 @@ main
/*
* mch_init() sets up the terminal (window) for use. This must be
* done after resetting full_screen, otherwise it may move the cursor
* (MSDOS).
* done after resetting full_screen, otherwise it may move the cursor.
* Note that we may use mch_exit() before mch_init()!
*/
mch_init();
@ -710,10 +705,6 @@ vim_main2(int argc UNUSED, char **argv UNUSED)
}
#endif
#ifdef SPAWNO /* special MSDOS swapping library */
init_SPAWNO("", SWAP_ANY);
#endif
#ifdef FEAT_VIMINFO
/*
* Read in registers, history etc, but not marks, from the viminfo file.

View File

@ -6005,7 +6005,7 @@ convert_setup_ext(
}
#if defined(FEAT_GUI) || defined(AMIGA) || defined(WIN3264) \
|| defined(MSDOS) || defined(PROTO)
|| defined(PROTO)
/*
* Do conversion on typed input characters in-place.
* The input and output are not NUL terminated!

View File

@ -541,7 +541,7 @@ mf_sync(memfile_T *mfp, int flags)
{
int status;
bhdr_T *hp;
#if defined(SYNC_DUP_CLOSE) && !defined(MSDOS)
#if defined(SYNC_DUP_CLOSE)
int fd;
#endif
int got_int_save = got_int;
@ -635,10 +635,6 @@ mf_sync(memfile_T *mfp, int flags)
status = FAIL;
}
#endif
#ifdef MSDOS
if (_dos_commit(mfp->mf_fd))
status = FAIL;
#else
#ifdef SYNC_DUP_CLOSE
/*
* Win32 is a bit more work: Duplicate the file handle and close it.
@ -647,7 +643,6 @@ mf_sync(memfile_T *mfp, int flags)
if ((fd = dup(mfp->mf_fd)) >= 0)
close(fd);
#endif
#endif
#ifdef AMIGA
# if defined(__AROS__) || defined(__amigaos4__)
if (fsync(mfp->mf_fd) != 0)
@ -1263,7 +1258,7 @@ mf_do_open(
* fname cannot be NameBuff, because it must have been allocated.
*/
mf_set_ffname(mfp);
#if defined(MSDOS) || defined(MSWIN)
#if defined(MSWIN)
/*
* A ":!cd e:xxx" may change the directory without us knowing, use the
* full pathname always. Careful: This frees fname!

View File

@ -326,13 +326,6 @@ ml_open(buf_T *buf)
curwin->w_nrwidth_line_count = 0;
#endif
#if defined(MSDOS) && !defined(DJGPP)
/* for 16 bit MS-DOS create a swapfile now, because we run out of
* memory very quickly */
if (p_uc != 0)
ml_open_file(buf);
#endif
/*
* fill block0 struct and write page 0
*/
@ -641,7 +634,7 @@ ml_setname(buf_T *buf)
memfile_T *mfp;
char_u *fname;
char_u *dirp;
#if defined(MSDOS) || defined(MSWIN)
#if defined(MSWIN)
char_u *p;
#endif
@ -672,7 +665,7 @@ ml_setname(buf_T *buf)
if (fname == NULL) /* no file name found for this dir */
continue;
#if defined(MSDOS) || defined(MSWIN)
#if defined(MSWIN)
/*
* Set full pathname for swap file now, because a ":!cd dir" may
* change directory without us knowing it.
@ -704,7 +697,7 @@ ml_setname(buf_T *buf)
vim_free(mfp->mf_fname);
mfp->mf_fname = fname;
vim_free(mfp->mf_ffname);
#if defined(MSDOS) || defined(MSWIN)
#if defined(MSWIN)
mfp->mf_ffname = NULL; /* mf_fname is full pathname already */
#else
mf_set_ffname(mfp);
@ -797,7 +790,7 @@ ml_open_file(buf_T *buf)
continue;
if (mf_open_file(mfp, fname) == OK) /* consumes fname! */
{
#if defined(MSDOS) || defined(MSWIN)
#if defined(MSWIN)
/*
* set full pathname for swap file now, because a ":!cd dir" may
* change directory without us knowing it.
@ -986,7 +979,7 @@ set_b0_fname(ZERO_BL *b0p, buf_T *buf)
b0p->b0_fname[0] = NUL;
else
{
#if defined(MSDOS) || defined(MSWIN) || defined(AMIGA)
#if defined(MSWIN) || defined(AMIGA)
/* Systems that cannot translate "~user" back into a path: copy the
* file name unmodified. Do use slashes instead of backslashes for
* portability. */
@ -1280,7 +1273,7 @@ ml_recover(void)
{
msg_start();
msg_outtrans_attr(mfp->mf_fname, attr | MSG_HIST);
#if defined(MSDOS) || defined(MSWIN)
#if defined(MSWIN)
if (STRNCMP(b0p->b0_hname, "PC ", 3) == 0)
MSG_PUTS_ATTR(_(" cannot be used with this version of Vim.\n"),
attr | MSG_HIST);
@ -2147,7 +2140,7 @@ swapfile_info(char_u *fname)
if (b0_magic_wrong(&b0))
{
#if defined(MSDOS) || defined(MSWIN)
#if defined(MSWIN)
if (STRNCMP(b0.b0_hname, "PC ", 3) == 0)
MSG_PUTS(_("\n [not usable with this version of Vim]"));
else
@ -2172,13 +2165,6 @@ recov_file_names(char_u **names, char_u *path, int prepend_dot)
{
int num_names;
#ifdef SHORT_FNAME
/*
* (MS-DOS) always short names
*/
names[0] = modname(path, (char_u *)".sw?", FALSE);
num_names = 1;
#else /* !SHORT_FNAME */
/*
* (Win32 and Win64) never short names, but do prepend a dot.
* (Not MS-DOS or Win32 or Win64) maybe short name, maybe not: Try both.
@ -2262,8 +2248,6 @@ end:
curbuf->b_shortname = shortname;
# endif
#endif /* !SHORT_FNAME */
return num_names;
}
@ -3953,11 +3937,7 @@ makeswapname(
#endif
r = buf_modname(
#ifdef SHORT_FNAME
TRUE,
#else
(buf->b_p_sn || buf->b_shortname),
#endif
fname_res,
(char_u *)
#if defined(VMS)
@ -3965,13 +3945,8 @@ makeswapname(
#else
".swp",
#endif
#ifdef SHORT_FNAME /* always 8.3 file name */
FALSE
#else
/* Prepend a '.' to the swap file name for the current directory. */
dir_name[0] == '.' && dir_name[1] == NUL
#endif
);
dir_name[0] == '.' && dir_name[1] == NUL);
if (r == NULL) /* out of memory */
return NULL;
@ -4152,12 +4127,10 @@ findswapname(
#ifdef AMIGA
BPTR fh;
#endif
#ifndef SHORT_FNAME
int r;
#endif
char_u *buf_fname = buf->b_fname;
#if !defined(SHORT_FNAME) && !defined(UNIX)
#if !defined(UNIX)
# define CREATE_DUMMY_FILE
FILE *dummyfd = NULL;
@ -4217,7 +4190,7 @@ findswapname(
fname = NULL;
break;
}
#if defined(UNIX) && !defined(SHORT_FNAME)
#if defined(UNIX)
/*
* 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
@ -4356,7 +4329,6 @@ findswapname(
*/
if (fname[n - 2] == 'w' && fname[n - 1] == 'p') /* first try */
{
#ifndef SHORT_FNAME
/*
* on MS-DOS compatible filesystems (e.g. messydos) file.doc.swp
* and file.doc are the same file. To guess if this problem is
@ -4379,7 +4351,6 @@ findswapname(
continue; /* try again with '.' replaced with '_' */
}
}
#endif
/*
* If we get here the ".swp" file really exists.
* Give an error message, unless recovering, no file name, we are

View File

@ -3676,28 +3676,9 @@ vim_beep(
&& !(gui.in_use && gui.starting)
#endif
)
{
out_str(T_VB);
}
else
{
#ifdef MSDOS
/*
* The number of beeps outputted is reduced to avoid having to
* wait for all the beeps to finish. This is only a problem on
* systems where the beeps don't overlap.
*/
if (beep_count == 0 || beep_count == 10)
{
out_char(BELL);
beep_count = 1;
}
else
++beep_count;
#else
out_char(BELL);
#endif
}
}
/* When 'verbose' is set and we are sourcing a script or executing a
@ -3811,7 +3792,7 @@ init_homedir(void)
# endif
#endif
#if defined(MSDOS) || defined(MSWIN)
#if defined(MSWIN)
/*
* Default home dir is C:/
* Best assumption we can make in such a situation.
@ -3947,7 +3928,7 @@ expand_env_esc(
&& at_start
#endif
)
#if defined(MSDOS) || defined(MSWIN)
#if defined(MSWIN)
|| *src == '%'
#endif
|| (*src == '~' && at_start))
@ -3976,7 +3957,7 @@ expand_env_esc(
#endif
{
while (c-- > 0 && *tail != NUL && ((vim_isIDc(*tail))
#if defined(MSDOS) || defined(MSWIN)
#if defined(MSWIN)
|| (*src == '%' && *tail != '%')
#endif
))
@ -3985,7 +3966,7 @@ expand_env_esc(
}
}
#if defined(MSDOS) || defined(MSWIN) || defined(UNIX)
#if defined(MSWIN) || defined(UNIX)
# ifdef UNIX
if (src[1] == '{' && *tail != '}')
# else
@ -4003,7 +3984,7 @@ expand_env_esc(
#endif
*var = NUL;
var = vim_getenv(dst, &mustfree);
#if defined(MSDOS) || defined(MSWIN) || defined(UNIX)
#if defined(MSWIN) || defined(UNIX)
}
#endif
}
@ -4194,7 +4175,7 @@ vim_getenv(char_u *name, int *mustfree)
char_u *pend;
int vimruntime;
#if defined(MSDOS) || defined(MSWIN)
#if defined(MSWIN)
/* use "C:/" when $HOME is not set */
if (STRCMP(name, "HOME") == 0)
return homedir;
@ -4932,7 +4913,7 @@ get_past_head(char_u *path)
{
char_u *retval;
#if defined(MSDOS) || defined(MSWIN)
#if defined(MSWIN)
/* may skip "c:" */
if (isalpha(path[0]) && path[1] == ':')
retval = path + 2;
@ -9734,13 +9715,13 @@ static int vim_backtick(char_u *p);
static int expand_backtick(garray_T *gap, char_u *pat, int flags);
# endif
# if defined(MSDOS) || defined(WIN3264)
# if defined(WIN3264)
/*
* File name expansion code for MS-DOS, Win16 and Win32. It's here because
* it's shared between these systems.
*/
# if defined(DJGPP) || defined(PROTO)
# define _cdecl /* DJGPP doesn't have this */
# if defined(PROTO)
# define _cdecl
# else
# ifdef __BORLANDC__
# define _cdecl _RTLENTRYF
@ -9762,12 +9743,6 @@ namelowcpy(
char_u *d,
char_u *s)
{
# ifdef DJGPP
if (USE_LONG_FNAME) /* don't lower case on Windows 95/NT systems */
while (*s)
*d++ = *s++;
else
# endif
while (*s)
*d++ = TOLOWER_LOC(*s++);
*d = NUL;
@ -10078,7 +10053,7 @@ mch_expandpath(
{
return dos_expandpath(gap, path, 0, flags, FALSE);
}
# endif /* MSDOS || WIN3264 */
# endif /* WIN3264 */
#if (defined(UNIX) && !defined(VMS)) || defined(USE_UNIXFILENAME) \
|| defined(PROTO)
@ -10444,7 +10419,7 @@ expand_path_option(char_u *curdir, garray_T *gap)
if (ga_grow(gap, 1) == FAIL)
break;
# if defined(MSWIN) || defined(MSDOS)
# if defined(MSWIN)
/* Avoid the path ending in a backslash, it fails when a comma is
* appended. */
len = (int)STRLEN(buf);
@ -10482,7 +10457,7 @@ get_path_cutoff(char_u *fname, garray_T *gap)
int j = 0;
while ((fname[j] == path_part[i][j]
# if defined(MSWIN) || defined(MSDOS)
# if defined(MSWIN)
|| (vim_ispathsep(fname[j]) && vim_ispathsep(path_part[i][j]))
#endif
) && fname[j] != NUL && path_part[i][j] != NUL)
@ -10603,7 +10578,7 @@ uniquefy_paths(garray_T *gap, char_u *pattern)
*/
short_name = shorten_fname(path, curdir);
if (short_name != NULL && short_name > path + 1
#if defined(MSWIN) || defined(MSDOS)
#if defined(MSWIN)
/* On windows,
* shorten_fname("c:\a\a.txt", "c:\a\b")
* returns "\a\a.txt", which is not really the short
@ -10743,7 +10718,7 @@ has_env_var(char_u *p)
if (*p == '\\' && p[1] != NUL)
++p;
else if (vim_strchr((char_u *)
#if defined(MSDOS) || defined(MSWIN)
#if defined(MSWIN)
"$%"
#else
"$"

View File

@ -805,12 +805,7 @@ alloc_does_fail(long_u size)
* Some memory is reserved for error messages and for being able to
* call mf_release_all(), which needs some memory for mf_trans_add().
*/
#if defined(MSDOS) && !defined(DJGPP)
# define SMALL_MEM
# define KEEP_ROOM 8192L
#else
#define KEEP_ROOM (2 * 8192L)
#endif
#define KEEP_ROOM_KB (KEEP_ROOM / 1024L)
/*
@ -892,7 +887,7 @@ lalloc(long_u size, int message)
char_u *p; /* pointer to new storage space */
static int releasing = FALSE; /* don't do mf_release_all() recursive */
int try_again;
#if defined(HAVE_AVAIL_MEM) && !defined(SMALL_MEM)
#if defined(HAVE_AVAIL_MEM)
static long_u allocated = 0; /* allocated since last avail check */
#endif
@ -909,12 +904,6 @@ lalloc(long_u size, int message)
mem_pre_alloc_l(&size);
#endif
#if defined(MSDOS) && !defined(DJGPP)
if (size >= 0xfff0) /* in MSDOS we can't deal with >64K blocks */
p = NULL;
else
#endif
/*
* Loop when out of memory: Try to release some memfile blocks and
* if some blocks are released call malloc again.
@ -934,14 +923,13 @@ lalloc(long_u size, int message)
/* 1. No check for available memory: Just return. */
goto theend;
#else
# ifndef SMALL_MEM
/* 2. Slow check for available memory: call mch_avail_mem() after
* allocating (KEEP_ROOM / 2) amount of memory. */
allocated += size;
if (allocated < KEEP_ROOM / 2)
goto theend;
allocated = 0;
# endif
/* 3. check for available memory: call mch_avail_mem() */
if (mch_avail_mem(TRUE) < KEEP_ROOM_KB && !releasing)
{
@ -5453,7 +5441,7 @@ find_file_in_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)
#if defined(MSWIN)
/* handle "\tmp" as absolute path */
|| vim_ispathsep(ff_file_to_find[0])
/* handle "c:name" as absolute path */
@ -5507,18 +5495,10 @@ find_file_in_path_option(
buf = suffixes;
for (;;)
{
if (
#ifdef DJGPP
/* "C:" by itself will fail for mch_getperm(),
* assume it's always valid. */
(find_what != FINDFILE_FILE && NameBuff[0] != NUL
&& NameBuff[1] == ':'
&& NameBuff[2] == NUL) ||
#endif
(mch_getperm(NameBuff) >= 0
if (mch_getperm(NameBuff) >= 0
&& (find_what == FINDFILE_BOTH
|| ((find_what == FINDFILE_DIR)
== mch_isdir(NameBuff)))))
== mch_isdir(NameBuff))))
{
file_name = vim_strsave(NameBuff);
goto theend;

View File

@ -1432,7 +1432,7 @@ nb_do_cmd(
if (buf_was_empty)
{
if (ff_detected == EOL_UNKNOWN)
#if defined(MSDOS) || defined(MSWIN)
#if defined(MSWIN)
ff_detected = EOL_DOS;
#else
ff_detected = EOL_UNIX;

View File

@ -155,9 +155,7 @@
#ifdef FEAT_SMARTINDENT
# define PV_SI OPT_BUF(BV_SI)
#endif
#ifndef SHORT_FNAME
#define PV_SN OPT_BUF(BV_SN)
#endif
#ifdef FEAT_SYN_HL
# define PV_SMC OPT_BUF(BV_SMC)
# define PV_SYN OPT_BUF(BV_SYN)
@ -352,9 +350,7 @@ static int p_ro;
#ifdef FEAT_SMARTINDENT
static int p_si;
#endif
#ifndef SHORT_FNAME
static int p_sn;
#endif
static long p_sts;
#if defined(FEAT_SEARCHPATH)
static char_u *p_sua;
@ -464,7 +460,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)
#if defined(MSWIN)
# define ISP_LATIN1 (char_u *)"@,~-255"
#else
# define ISP_LATIN1 (char_u *)"@,161-255"
@ -497,7 +493,7 @@ static struct vimoption options[] =
(char_u *)NULL, PV_NONE,
#endif
{
#if (defined(MSDOS) || defined(WIN3264)) && !defined(FEAT_GUI_W32)
#if (defined(WIN3264)) && !defined(FEAT_GUI_W32)
(char_u *)128L,
#else
(char_u *)224L,
@ -572,7 +568,7 @@ static struct vimoption options[] =
{"background", "bg", P_STRING|P_VI_DEF|P_RCLR,
(char_u *)&p_bg, PV_NONE,
{
#if (defined(MSDOS) || defined(WIN3264)) && !defined(FEAT_GUI)
#if (defined(WIN3264)) && !defined(FEAT_GUI)
(char_u *)"dark",
#else
(char_u *)"light",
@ -637,11 +633,7 @@ static struct vimoption options[] =
(char_u *)&p_bin, PV_BIN,
{(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
{"bioskey", "biosk",P_BOOL|P_VI_DEF,
#ifdef MSDOS
(char_u *)&p_biosk, PV_NONE,
#else
(char_u *)NULL, PV_NONE,
#endif
{(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
{"bomb", NULL, P_BOOL|P_NO_MKRC|P_VI_DEF|P_RSTAT,
#ifdef FEAT_MBYTE
@ -889,11 +881,7 @@ static struct vimoption options[] =
#endif
{(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
{"conskey", "consk",P_BOOL|P_VI_DEF,
#ifdef MSDOS
(char_u *)&p_consk, PV_NONE,
#else
(char_u *)NULL, PV_NONE,
#endif
{(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
{"copyindent", "ci", P_BOOL|P_VI_DEF|P_VIM,
(char_u *)&p_ci, PV_CI,
@ -1317,7 +1305,7 @@ static struct vimoption options[] =
{
# ifdef FEAT_GUI
(char_u *)"n-v-c:block-Cursor/lCursor,ve:ver35-Cursor,o:hor50-Cursor,i-ci:ver25-Cursor/lCursor,r-cr:hor20-Cursor/lCursor,sm:block-Cursor-blinkwait175-blinkoff150-blinkon175",
# else /* MSDOS or Win32 console */
# else /* Win32 console */
(char_u *)"n-v-c:block,o:hor50,i-ci:hor15,r-cr:hor30,sm:block",
# endif
(char_u *)0L}
@ -1596,7 +1584,7 @@ static struct vimoption options[] =
{"isident", "isi", P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
(char_u *)&p_isi, PV_NONE,
{
#if defined(MSDOS) || defined(MSWIN)
#if defined(MSWIN)
(char_u *)"@,48-57,_,128-167,224-235",
#else
# ifdef EBCDIC
@ -1622,7 +1610,7 @@ static struct vimoption options[] =
"251-254",
#else
(char_u *)"@,48-57,_",
# if defined(MSDOS) || defined(MSWIN)
# if defined(MSWIN)
(char_u *)"@,48-57,_,128-167,224-235"
# else
ISK_LATIN1
@ -1632,8 +1620,7 @@ static struct vimoption options[] =
{"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(MACOS) && !defined(MACOS_X)) \
#if defined(MSWIN) || (defined(MACOS) && !defined(MACOS_X)) \
|| defined(VMS)
(char_u *)"@,~-255",
#else
@ -1672,7 +1659,7 @@ static struct vimoption options[] =
{"keywordprg", "kp", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
(char_u *)&p_kp, PV_KP,
{
#if defined(MSDOS) || defined(MSWIN)
#if defined(MSWIN)
(char_u *)":help",
#else
# ifdef VMS
@ -1729,7 +1716,7 @@ static struct vimoption options[] =
{"lines", NULL, P_NUM|P_NODEFAULT|P_NO_MKRC|P_VI_DEF|P_RCLR,
(char_u *)&Rows, PV_NONE,
{
#if defined(MSDOS) || defined(WIN3264)
#if defined(WIN3264)
(char_u *)25L,
#else
(char_u *)24L,
@ -1880,7 +1867,7 @@ static struct vimoption options[] =
{"mouse", NULL, P_STRING|P_VI_DEF|P_FLAGLIST,
(char_u *)&p_mouse, PV_NONE,
{
#if defined(MSDOS) || defined(WIN3264)
#if defined(WIN3264)
(char_u *)"a",
#else
(char_u *)"",
@ -1903,7 +1890,7 @@ static struct vimoption options[] =
{"mousemodel", "mousem", P_STRING|P_VI_DEF,
(char_u *)&p_mousem, PV_NONE,
{
#if defined(MSDOS) || defined(MSWIN)
#if defined(MSWIN)
(char_u *)"popup",
#else
# if defined(MACOS)
@ -1962,7 +1949,7 @@ static struct vimoption options[] =
(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)
#if defined(MSWIN)
(char_u *)&p_odev, PV_NONE,
#else
(char_u *)NULL, PV_NONE,
@ -2008,7 +1995,7 @@ static struct vimoption options[] =
{"path", "pa", P_STRING|P_EXPAND|P_VI_DEF|P_COMMA|P_NODUP,
(char_u *)&p_path, PV_PATH,
{
#if defined AMIGA || defined MSDOS || defined MSWIN
#if defined(AMIGA) || defined(MSWIN)
(char_u *)".,,",
#else
# if defined(__EMX__)
@ -2294,21 +2281,17 @@ static struct vimoption options[] =
#ifdef VMS
(char_u *)"-",
#else
# if defined(MSDOS)
(char_u *)"command",
# else
# if defined(WIN3264)
(char_u *)"", /* set in set_init_1() */
# else
(char_u *)"sh",
# endif
# endif
#endif /* VMS */
(char_u *)0L} SCRIPTID_INIT},
{"shellcmdflag","shcf", P_STRING|P_VI_DEF|P_SECURE,
(char_u *)&p_shcf, PV_NONE,
{
#if defined(MSDOS) || defined(MSWIN)
#if defined(MSWIN)
(char_u *)"/c",
#else
(char_u *)"-c",
@ -2364,7 +2347,7 @@ static struct vimoption options[] =
{"shellxescape", "sxe", P_STRING|P_VI_DEF|P_SECURE,
(char_u *)&p_sxe, PV_NONE,
{
#if defined(MSDOS) || defined(WIN3264)
#if defined(WIN3264)
(char_u *)"\"&|<>()@^",
#else
(char_u *)"",
@ -2381,11 +2364,7 @@ static struct vimoption options[] =
{(char_u *)"", (char_u *)"filnxtToO"}
SCRIPTID_INIT},
{"shortname", "sn", P_BOOL|P_VI_DEF,
#ifdef SHORT_FNAME
(char_u *)NULL, PV_NONE,
#else
(char_u *)&p_sn, PV_SN,
#endif
{(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
{"showbreak", "sbr", P_STRING|P_VI_DEF|P_RALL,
#ifdef FEAT_LINEBREAK
@ -2795,7 +2774,7 @@ static struct vimoption options[] =
{"viminfo", "vi", P_STRING|P_ONECOMMA|P_NODUP|P_SECURE,
#ifdef FEAT_VIMINFO
(char_u *)&p_viminfo, PV_NONE,
#if defined(MSDOS) || defined(MSWIN)
#if defined(MSWIN)
{(char_u *)"", (char_u *)"'100,<50,s10,h,rA:,rB:"}
#else
# ifdef AMIGA
@ -3187,7 +3166,7 @@ set_init_1(void)
* Don't use it if it is empty.
*/
if (((p = mch_getenv((char_u *)"SHELL")) != NULL && *p != NUL)
#if defined(MSDOS) || defined(MSWIN)
#if defined(MSWIN)
# ifdef __EMX__
|| ((p = mch_getenv((char_u *)"EMXSHELL")) != NULL && *p != NUL)
# endif
@ -3363,7 +3342,7 @@ set_init_1(void)
#ifdef FEAT_POSTSCRIPT
/* 'printexpr' must be allocated to be able to evaluate it. */
set_string_default("pexpr",
# if defined(MSWIN) || defined(MSDOS)
# if defined(MSWIN)
(char_u *)"system('copy' . ' ' . v:fname_in . (&printdevice == '' ? ' LPT1:' : (' \"' . &printdevice . '\"'))) . delete(v:fname_in)"
# else
# ifdef VMS
@ -3513,8 +3492,7 @@ set_init_1(void)
options[opt_idx].flags |= P_DEF_ALLOCED;
}
#if defined(MSDOS) || defined(MSWIN) || defined(MACOS) \
|| defined(VMS)
#if defined(MSWIN) || defined(MACOS) || defined(VMS)
if (STRCMP(p_enc, "latin1") == 0
# ifdef FEAT_MBYTE
|| enc_utf8
@ -3793,7 +3771,7 @@ set_init_2(void)
set_number_default("window", Rows - 1);
/* For DOS console the default is always black. */
#if !((defined(MSDOS) || defined(WIN3264)) && !defined(FEAT_GUI))
#if !((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
@ -3836,7 +3814,7 @@ set_init_2(void)
static char_u *
term_bg_default(void)
{
#if defined(MSDOS) || defined(WIN3264)
#if defined(WIN3264)
/* DOS console nearly always black */
return (char_u *)"dark";
#else
@ -3963,15 +3941,14 @@ set_init_3(void)
}
#endif
#if defined(MSDOS) || defined(WIN3264)
#if defined(WIN3264)
/*
* Set 'shellcmdflag', 'shellxquote', and 'shellquote' depending on the
* 'shell' option.
* This is done after other initializations, where 'shell' might have been
* set, but only if they have not been set before. Default for p_shcf is
* "/c", for p_shq is "". For "sh" like shells it is changed here to
* "-c" and "\"", but not for DJGPP, because it starts the shell without
* command.com. And for Win32 we need to set p_sxq instead.
* "-c" and "\"". And for Win32 we need to set p_sxq instead.
*/
if (strstr((char *)gettail(p_sh), "sh") != NULL)
{
@ -3984,7 +3961,6 @@ set_init_3(void)
options[idx3].def_val[VI_DEFAULT] = p_shcf;
}
# ifndef DJGPP
# ifdef WIN3264
/* Somehow Win32 requires the quotes around the redirection too */
idx3 = findoption((char_u *)"sxq");
@ -4000,7 +3976,6 @@ set_init_3(void)
p_shq = (char_u *)"\"";
options[idx3].def_val[VI_DEFAULT] = p_shq;
}
# endif
# endif
}
else if (strstr((char *)gettail(p_sh), "cmd.exe") != NULL)
@ -4424,8 +4399,8 @@ do_set(
}
/*
* allow '=' and ':' as MSDOS command.com allows only one
* '=' character per "set" command line. grrr. (jw)
* allow '=' and ':' for hystorical reasons (MSDOS command.com
* allows only one '=' character per "set" command line. grrr. (jw)
*/
if (nextchar == '?'
|| (prefix == 1
@ -6558,7 +6533,7 @@ did_set_string_option(
{
out_str(T_ME);
redraw_later(CLEAR);
#if defined(MSDOS) || (defined(WIN3264) && !defined(FEAT_GUI_W32))
#if defined(WIN3264) && !defined(FEAT_GUI_W32)
/* Since t_me has been set, this probably means that the user
* wants to use this as default colors. Need to reset default
* background/foreground colors. */
@ -8794,12 +8769,6 @@ set_num_option(
}
limit_screen_size();
#ifdef DJGPP
/* avoid a crash by checking for a too large value of 'columns' */
if (old_Columns != Columns && full_screen && term_console)
mch_check_columns();
#endif
/*
* If the screen (shell) height has been changed, assume it is the
* physical screenheight.
@ -10389,9 +10358,7 @@ get_varp(struct vimoption *p)
#ifdef FEAT_SMARTINDENT
case PV_SI: return (char_u *)&(curbuf->b_p_si);
#endif
#ifndef SHORT_FNAME
case PV_SN: return (char_u *)&(curbuf->b_p_sn);
#endif
case PV_STS: return (char_u *)&(curbuf->b_p_sts);
#ifdef FEAT_SEARCHPATH
case PV_SUA: return (char_u *)&(curbuf->b_p_sua);
@ -10722,9 +10689,7 @@ buf_copy_options(buf_T *buf, int flags)
#endif
buf->b_p_sts = p_sts;
buf->b_p_sts_nopaste = p_sts_nopaste;
#ifndef SHORT_FNAME
buf->b_p_sn = p_sn;
#endif
#ifdef FEAT_COMMENTS
buf->b_p_com = vim_strsave(p_com);
#endif

View File

@ -18,7 +18,7 @@
#ifdef AMIGA
# define DFLT_EFM "%f>%l:%c:%t:%n:%m,%f:%l: %t%*\\D%n: %m,%f %l %t%*\\D%n: %m,%*[^\"]\"%f\"%*\\D%l: %m,%f:%l:%m,%f|%l| %m"
#else
# if defined(MSDOS) || defined(WIN3264)
# 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 */
@ -386,10 +386,6 @@ EXTERN char_u *p_bexpr;
#ifdef FEAT_BROWSE
EXTERN char_u *p_bsdir; /* 'browsedir' */
#endif
#ifdef MSDOS
EXTERN int p_biosk; /* 'bioskey' */
EXTERN int p_consk; /* 'conskey' */
#endif
#ifdef FEAT_LINEBREAK
EXTERN char_u *p_breakat; /* 'breakat' */
#endif
@ -671,7 +667,7 @@ EXTERN int p_more; /* 'more' */
#ifdef FEAT_MZSCHEME
EXTERN long p_mzq; /* 'mzquantum */
#endif
#if defined(MSDOS) || defined(MSWIN)
#if defined(MSWIN)
EXTERN int p_odev; /* 'opendevice' */
#endif
EXTERN char_u *p_opfunc; /* 'operatorfunc' */
@ -1074,9 +1070,7 @@ enum
#ifdef FEAT_SMARTINDENT
, BV_SI
#endif
#ifndef SHORT_FNAME
, BV_SN
#endif
#ifdef FEAT_SYN_HL
, BV_SMC
, BV_SYN

File diff suppressed because it is too large Load Diff

View File

@ -1,109 +0,0 @@
/* vi:set ts=8 sts=4 sw=4:
*
* VIM - Vi IMproved by Bram Moolenaar
*
* Do ":help uganda" in Vim to read copying and usage conditions.
* Do ":help credits" in Vim to see a list of people who contributed.
*/
/*
* MSDOS Machine-dependent things.
*/
#include "os_dos.h" /* common MS-DOS and Win32 stuff */
#define BINARY_FILE_IO
#define USE_EXE_NAME /* use argv[0] for $VIM */
#define SYNC_DUP_CLOSE /* sync() a file with dup() and close() */
#define USE_TERM_CONSOLE
#ifdef DJGPP
# include <fcntl.h> /* defines _USE_LFN */
# define USE_LONG_FNAME _USE_LFN /* decide at run time */
# define USE_FNAME_CASE
# define HAVE_PUTENV
#else
# define SHORT_FNAME /* always 8.3 file name */
#endif
#define HAVE_STDLIB_H
#define HAVE_STRING_H
#define HAVE_FCNTL_H
#define HAVE_STRCSPN
#define HAVE_STRICMP
#define HAVE_STRFTIME /* guessed */
#define HAVE_STRNICMP
#define HAVE_MEMSET
#define HAVE_QSORT
#define HAVE_ST_MODE /* have stat.st_mode */
#define HAVE_MATH_H
#if defined(__DATE__) && defined(__TIME__)
# define HAVE_DATE_TIME
#endif
#define BREAKCHECK_SKIP 1 /* call mch_breakcheck() each time, it's fast */
#define HAVE_AVAIL_MEM
/*
* Borland C++ 3.1 doesn't have _RTLENTRYF
*/
#ifdef __BORLANDC__
# if __BORLANDC__ < 0x450
# define _RTLENTRYF
# endif
#endif
#define FNAME_ILLEGAL "\"*?><|" /* illegal characters in a file name */
/* cproto fails on missing include files */
#ifndef PROTO
# include <dos.h>
# include <dir.h>
# include <time.h>
#endif
#ifdef DJGPP
# include <unistd.h>
# define HAVE_LOCALE_H
# define setlocale(c, p) djgpp_setlocale()
#endif
#ifndef DJGPP
typedef long off_t;
#endif
/*
* Try several directories to put the temp files.
*/
#define TEMPDIRNAMES "$TMP", "$TEMP", "c:\\TMP", "c:\\TEMP", ""
#define TEMPNAMELEN 128
#ifndef DFLT_MAXMEM
# define DFLT_MAXMEM 256 /* use up to 256Kbyte for buffer */
#endif
#ifndef DFLT_MAXMEMTOT
# define DFLT_MAXMEMTOT 0 /* decide in set_init */
#endif
#ifdef DJGPP
# define BASENAMELEN (_USE_LFN?250:8) /* length of base of file name */
#else
# define BASENAMELEN 8 /* length of base of file name */
#endif
/* codes for msdos mouse event */
#define MSDOS_MOUSE_LEFT 0x01
#define MSDOS_MOUSE_RIGHT 0x02
#define MSDOS_MOUSE_MIDDLE 0x04
#ifdef DJGPP
int mch_rename(const char *OldFile, const char *NewFile);
#else
# define mch_rename(src, dst) rename(src, dst)
#endif
#ifdef DJGPP
# define vim_mkdir(x, y) mkdir((char *)(x), y)
#else
# define vim_mkdir(x, y) mkdir((char *)(x))
#endif
#define mch_rmdir(x) rmdir((char *)(x))
#define mch_setenv(name, val, x) setenv(name, val, x)

View File

@ -38,9 +38,6 @@
# if defined(UNIX) || defined(__EMX__) || defined(VMS)
# include "os_unix.pro"
# endif
# if defined(MSDOS)
# include "os_msdos.pro"
# endif
# ifdef WIN3264
# include "os_win32.pro"
# include "os_mswin.pro"

View File

@ -1,48 +0,0 @@
/* os_msdos.c */
void mch_set_normal_colors(void);
void mch_update_cursor(void);
long_u mch_avail_mem(int special);
void mch_delay(long msec, int ignoreinput);
void mch_write(char_u *s, int len);
int mch_inchar(char_u *buf, int maxlen, long time, int tb_change_cnt);
int mch_char_avail(void);
void mch_suspend(void);
void mch_init(void);
int mch_check_win(int argc, char **argv);
int mch_input_isatty(void);
void fname_case(char_u *name, int len);
long mch_get_pid(void);
int mch_FullName(char_u *fname, char_u *buf, int len, int force);
void slash_adjust(char_u *p);
int mch_isFullName(char_u *fname);
void mch_early_init(void);
void mch_exit(int r);
void mch_settmode(int tmode);
void mch_setmouse(int on);
int mch_screenmode(char_u *arg);
int mch_get_shellsize(void);
void mch_set_shellsize(void);
void mch_new_shellsize(void);
void mch_check_columns(void);
int mch_call_shell(char_u *cmd, int options);
void mch_breakcheck(void);
int mch_has_exp_wildcard(char_u *p);
int mch_has_wildcard(char_u *p);
int mch_chdir(char *path);
char *djgpp_setlocale(void);
int clip_mch_own_selection(VimClipboard *cbd);
void clip_mch_lose_selection(VimClipboard *cbd);
void clip_mch_request_selection(VimClipboard *cbd);
void clip_mch_set_selection(VimClipboard *cbd);
long mch_getperm(char_u *name);
int mch_setperm(char_u *name, long perm);
void mch_hide(char_u *name);
int mch_isdir(char_u *name);
int mch_can_exe(char_u *name, char_u **path, int use_path);
int mch_nodetype(char_u *name);
int mch_dirname(char_u *buf, int len);
int mch_remove(char_u *name);
char_u *mch_getenv(char_u *name);
int mch_get_user_name(char_u *s, int len);
void mch_get_host_name(char_u *s, int len);
/* vim: set ft=c : */

View File

@ -1338,12 +1338,6 @@ bt_regcomp(char_u *expr, int re_flags)
if (reg(REG_NOPAREN, &flags) == NULL)
return NULL;
/* Small enough for pointer-storage convention? */
#ifdef SMALL_MALLOC /* 16 bit storage allocation */
if (regsize >= 65536L - 256L)
EMSG_RET_NULL(_("E339: Pattern too long"));
#endif
/* Allocate space. */
r = (bt_regprog_T *)lalloc(sizeof(bt_regprog_T) + regsize, TRUE);
if (r == NULL)

View File

@ -3191,7 +3191,6 @@ win_line(
}
}
#ifndef MSDOS
/* Check if the character under the cursor should not be inverted */
if (!highlight_match && lnum == curwin->w_cursor.lnum && wp == curwin
#ifdef FEAT_GUI
@ -3199,7 +3198,6 @@ win_line(
#endif
)
noinvcur = TRUE;
#endif
/* if inverting in this line set area_highlighting */
if (fromcol >= 0)
@ -9379,8 +9377,8 @@ win_do_lines(
* ScreenLines[] when t_CV isn't defined. That's faster than using
* win_line().
* Don't use a scroll region when we are going to redraw the text, writing
* a character in the lower right corner of the scroll region causes a
* scroll-up in the DJGPP version.
* a character in the lower right corner of the scroll region may cause a
* scroll-up .
*/
if (scroll_region
#ifdef FEAT_VERTSPLIT

View File

@ -1845,9 +1845,7 @@ struct file_buffer
#endif
int b_p_ro; /* 'readonly' */
long b_p_sw; /* 'shiftwidth' */
#ifndef SHORT_FNAME
int b_p_sn; /* 'shortname' */
#endif
#ifdef FEAT_SMARTINDENT
int b_p_si; /* 'smartindent' */
#endif
@ -1983,9 +1981,7 @@ struct file_buffer
access b_spell without #ifdef. */
#endif
#ifndef SHORT_FNAME
int b_shortname; /* this file has an 8.3 file name */
#endif
#ifdef FEAT_MZSCHEME
void *b_mzscheme_ref; /* The MzScheme reference to this buffer */

View File

@ -8055,7 +8055,7 @@ free_highlight(void)
void
restore_cterm_colors(void)
{
#if defined(MSDOS) || (defined(WIN3264) && !defined(FEAT_GUI_W32))
#if defined(WIN3264) && !defined(FEAT_GUI_W32)
/* Since t_me has been set, this probably means that the user
* wants to use this as default colors. Need to reset default
* background/foreground colors. */

View File

@ -10,7 +10,7 @@
*
* term.c: functions for controlling the terminal
*
* primitive termcap support for Amiga, MSDOS, and Win32 included
* primitive termcap support for Amiga and Win32 included
*
* NOTE: padding and variable substitution is not performed,
* when compiling without HAVE_TGETENT, we use tputs() and tgoto() dummies.
@ -428,7 +428,7 @@ static struct builtin_term builtin_termcaps[] =
# endif
# endif
# if defined(MSDOS) || defined(ALL_BUILTIN_TCAPS) || defined(__EMX__)
# if defined(ALL_BUILTIN_TCAPS) || defined(__EMX__)
/*
* 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
@ -513,107 +513,6 @@ static struct builtin_term builtin_termcaps[] =
{K_PAGEUP, "\316I"},
# endif
# if defined(MSDOS)
/*
* These codes are valid for the pc video. The entries that start with ESC |
* are translated into conio calls in os_msdos.c. Default for MSDOS.
*/
{(int)KS_NAME, "pcterm"},
{(int)KS_CE, "\033|K"},
{(int)KS_AL, "\033|L"},
{(int)KS_DL, "\033|M"},
# ifdef TERMINFO
{(int)KS_CS, "\033|%i%p1%d;%p2%dr"},
# ifdef FEAT_VERTSPLIT
{(int)KS_CSV, "\033|%i%p1%d;%p2%dV"},
# endif
# else
{(int)KS_CS, "\033|%i%d;%dr"},
# ifdef FEAT_VERTSPLIT
{(int)KS_CSV, "\033|%i%d;%dV"},
# endif
# endif
{(int)KS_CL, "\033|J"},
{(int)KS_ME, "\033|0m"}, /* normal */
{(int)KS_MR, "\033|112m"}, /* reverse: black on lightgrey */
{(int)KS_MD, "\033|15m"}, /* bold: white text */
{(int)KS_SE, "\033|0m"}, /* standout end */
{(int)KS_SO, "\033|31m"}, /* standout: white on blue */
{(int)KS_CZH, "\033|225m"}, /* italic mode: blue text on yellow */
{(int)KS_CZR, "\033|0m"}, /* italic mode end */
{(int)KS_US, "\033|67m"}, /* underscore mode: cyan text on red */
{(int)KS_UE, "\033|0m"}, /* underscore mode end */
{(int)KS_CCO, "16"}, /* allow 16 colors */
# ifdef TERMINFO
{(int)KS_CAB, "\033|%p1%db"}, /* set background color */
{(int)KS_CAF, "\033|%p1%df"}, /* set foreground color */
# else
{(int)KS_CAB, "\033|%db"}, /* set background color */
{(int)KS_CAF, "\033|%df"}, /* set foreground color */
# endif
{(int)KS_MS, "y"},
{(int)KS_UT, "y"},
{(int)KS_LE, "\b"},
# ifdef TERMINFO
{(int)KS_CM, "\033|%i%p1%d;%p2%dH"},
# else
{(int)KS_CM, "\033|%i%d;%dH"},
# endif
#ifdef DJGPP
{(int)KS_VB, "\033|B"}, /* visual bell */
#endif
{K_UP, "\316H"},
{K_DOWN, "\316P"},
{K_LEFT, "\316K"},
{K_RIGHT, "\316M"},
{K_S_LEFT, "\316s"},
{K_S_RIGHT, "\316t"},
{K_S_TAB, "\316\017"},
{K_F1, "\316;"},
{K_F2, "\316<"},
{K_F3, "\316="},
{K_F4, "\316>"},
{K_F5, "\316?"},
{K_F6, "\316@"},
{K_F7, "\316A"},
{K_F8, "\316B"},
{K_F9, "\316C"},
{K_F10, "\316D"},
{K_F11, "\316\205"},
{K_F12, "\316\206"},
{K_S_F1, "\316T"},
{K_S_F2, "\316U"},
{K_S_F3, "\316V"},
{K_S_F4, "\316W"},
{K_S_F5, "\316X"},
{K_S_F6, "\316Y"},
{K_S_F7, "\316Z"},
{K_S_F8, "\316["},
{K_S_F9, "\316\\"},
{K_S_F10, "\316]"},
{K_S_F11, "\316\207"},
{K_S_F12, "\316\210"},
{K_INS, "\316R"},
{K_DEL, "\316S"},
{K_HOME, "\316G"},
{K_END, "\316O"},
{K_PAGEDOWN, "\316Q"},
{K_PAGEUP, "\316I"},
{K_KPLUS, "\316N"},
{K_KMINUS, "\316J"},
{K_KMULTIPLY, "\3167"},
{K_K0, "\316\332"},
{K_K1, "\316\336"},
{K_K2, "\316\342"},
{K_K3, "\316\346"},
{K_K4, "\316\352"},
{K_K5, "\316\356"},
{K_K6, "\316\362"},
{K_K7, "\316\366"},
{K_K8, "\316\372"},
{K_K9, "\316\376"},
# endif
# if defined(WIN3264) || defined(ALL_BUILTIN_TCAPS) || defined(__EMX__)
/*
* These codes are valid for the Win32 Console . The entries that start with
@ -1369,10 +1268,6 @@ static struct builtin_term builtin_termcaps[] =
# define DEFAULT_TERM (char_u *)"win32"
#endif
#ifdef MSDOS
# define DEFAULT_TERM (char_u *)"pcterm"
#endif
#if defined(UNIX) && !defined(__MINT__)
# define DEFAULT_TERM (char_u *)"ansi"
#endif
@ -1971,7 +1866,7 @@ set_termname(char_u *term)
/* termcap failed to report size */
/* set defaults, in case ui_get_shellsize() also fails */
width = 80;
#if defined(MSDOS) || defined(WIN3264)
#if defined(WIN3264)
height = 25; /* console is often 25 lines */
#else
height = 24; /* most terminals are 24 lines */
@ -4482,7 +4377,7 @@ check_termcode(
if (key_name[0] == (int)KS_MOUSE)
{
/*
* For xterm and MSDOS we get "<t_mouse>scr", where
* For xterm we get "<t_mouse>scr", where
* s == encoded button state:
* 0x20 = left button down
* 0x21 = middle button down
@ -4646,7 +4541,7 @@ check_termcode(
#endif
)
{
# if !defined(MSWIN) && !defined(MSDOS)
# if !defined(MSWIN)
/*
* Handle mouse events.
* Recognize the xterm mouse wheel, but not in the GUI, the

View File

@ -641,9 +641,9 @@ u_savecommon(
u_getbot();
}
#if !defined(UNIX) && !defined(DJGPP) && !defined(WIN32) && !defined(__EMX__)
#if !defined(UNIX) && !defined(WIN32) && !defined(__EMX__)
/*
* With Amiga and MSDOS 16 bit we can't handle big undo's, because
* With Amiga we can't handle big undo's, because
* then u_alloc_line would have to allocate a block larger than 32K
*/
if (size >= 8000)

View File

@ -289,41 +289,7 @@ remove_start_menu(void)
static void
delete_uninstall_key(void)
{
#ifdef WIN3264
reg_delete_key(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Vim " VIM_VERSION_SHORT);
#else
FILE *fd;
char buf[BUFSIZE];
/*
* On DJGPP we delete registry entries by creating a .inf file and
* installing it.
*/
fd = fopen("vim.inf", "w");
if (fd != NULL)
{
fprintf(fd, "[version]\n");
fprintf(fd, "signature=\"$CHICAGO$\"\n\n");
fprintf(fd, "[DefaultInstall]\n");
fprintf(fd, "DelReg=DeleteMe\n\n");
fprintf(fd, "[DeleteMe]\n");
fprintf(fd, "HKLM,\"Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Vim " VIM_VERSION_SHORT "\"\n");
fclose(fd);
/* Don't know how to detect Win NT with DJGPP. Hack: Just try the Win
* 95/98/ME method, since the DJGPP version can't use long filenames
* on Win NT anyway. */
sprintf(buf, "rundll setupx.dll,InstallHinfSection DefaultInstall 132 %s\\vim.inf", installdir);
run_command(buf);
#if 0
/* Windows NT method (untested). */
sprintf(buf, "rundll32 syssetup,SetupInfObjectInstallAction DefaultInstall 128 %s\\vim.inf", installdir);
run_command(buf);
#endif
remove("vim.inf");
}
#endif
}
int

View File

@ -748,6 +748,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1399,
/**/
1398,
/**/
@ -3709,13 +3711,6 @@ list_version(void)
# endif
# endif
#endif
#ifdef MSDOS
# ifdef DJGPP
MSG_PUTS(_("\n32-bit MS-DOS version"));
# else
MSG_PUTS(_("\n16-bit MS-DOS version"));
# endif
#endif
#ifdef MACOS
# ifdef MACOS_X
# ifdef MACOS_X_UNIX

View File

@ -27,8 +27,7 @@
# endif
#endif
#if defined(MSDOS) || defined(WIN32) || defined(_WIN64) \
|| defined(__EMX__)
#if defined(WIN32) || defined(_WIN64) || defined(__EMX__)
# include "vimio.h"
#endif
@ -164,21 +163,6 @@
#ifdef WIN3264
# define VIM_SIZEOF_INT 4
#endif
#ifdef MSDOS
# ifdef DJGPP
# ifndef FEAT_GUI_GTK /* avoid problems when generating prototypes */
# define VIM_SIZEOF_INT 4 /* 32 bit ints */
# endif
# define DOS32
# define FEAT_CLIPBOARD
# else
# ifndef FEAT_GUI_GTK /* avoid problems when generating prototypes */
# define VIM_SIZEOF_INT 2 /* 16 bit ints */
# endif
# define SMALL_MALLOC /* 16 bit storage allocation */
# define DOS16
# endif
#endif
#ifdef AMIGA
/* Be conservative about sizeof(int). It could be 4 too. */
@ -303,10 +287,6 @@
# include "os_amiga.h"
#endif
#ifdef MSDOS
# include "os_msdos.h"
#endif
#ifdef WIN3264
# include "os_win32.h"
#endif
@ -462,11 +442,11 @@ typedef unsigned long u8char_T; /* long should be 32 bits or more */
#ifdef _DCC
# include <sys/stat.h>
#endif
#if defined(MSDOS) || defined(MSWIN)
#if defined(MSWIN)
# include <sys/stat.h>
#endif
#if defined(HAVE_ERRNO_H) || defined(DJGPP) \
#if defined(HAVE_ERRNO_H) \
|| defined(WIN32) || defined(_WIN64) || defined(__EMX__)
# include <errno.h>
#endif

View File

@ -6438,7 +6438,7 @@ vim_FullName(
/* something failed; use the file name (truncate when too long) */
vim_strncpy(buf, fname, len - 1);
}
#if defined(MACOS_CLASSIC) || defined(MSDOS) || defined(MSWIN)
#if defined(MACOS_CLASSIC) || defined(MSWIN)
slash_adjust(buf);
#endif
return retval;

View File

@ -1,31 +0,0 @@
# Simple makefile for Borland C++ 4.0
# 3.1 can NOT be used, it has problems with the fileno() define.
# Command line variables:
# BOR path to root of Borland C (E:\BORLANDC)
# DEBUG set to "yes" for debugging (no)
!ifndef BOR
BOR = e:\bc4
!endif
!if ("$(DEBUG)" == "yes")
DEBUG_FLAG = -v -DDEBUG
!else
DEBUG_FLAG =
!endif
CC = $(BOR)\bin\bcc
INC = -I$(BOR)\include
LIB = -L$(BOR)\lib
# The following compile options can be changed for better machines.
# replace -1- with -2 to produce code for a 80286 or higher
# replace -1- with -3 to produce code for a 80386 or higher
# add -v for source debugging
OPTIMIZE= -1- -Ox
CFLAGS = -A -mc -DMSDOS $(DEBUG_FLAG) $(OPTIMIZE) $(INC) $(LIB)
xxd.exe: xxd.c
$(CC) $(CFLAGS) xxd.c

View File

@ -1,9 +0,0 @@
# The most simplistic Makefile, for DJGPP on MS-DOS
CFLAGS = -O2 -Wall
xxd.exe: xxd.c
gcc $(CFLAGS) -s -o xxd.exe xxd.c -lpc
clean:
del xxd.exe