home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Professional
/
OS2PRO194.ISO
/
os2
/
editor
/
elvis
/
sources
/
os2elvis.dif
< prev
next >
Wrap
Text File
|
1994-01-30
|
29KB
|
1,202 lines
diff -cs old/Makefile.mix new/Makefile.mix
*** old/Makefile.mix Sun Apr 5 14:02:30 1992
--- new/Makefile.mix Wed Jun 10 09:56:41 1992
***************
*** 17,22 ****
--- 17,23 ----
# COM filename extension for executable support files -- .com, .tpp or null
# EXTRA version-specific object files used in elvis
# EXTRA2 version-specific object files used in elvis & elvrec
+ # CTYPE_ name of ctype object file for $(SMALL)-model executables
# LIBS any special libraries, such as "-ltermcap"
# BIN directory where executables should be installed
# CC the C compiler command, possibly with "memory model" flags
***************
*** 23,30 ****
--- 24,33 ----
# CFLAGS compiler flags used to select compile-time options
# LNK the linker command needed to link OBJ files (if not cc)
# LFLAGS linker flags used to select link-time options
+ # LARGE flag for large memory model compilation -- usually null
# SMALL flag for special small memory model compilation -- usually null
# OF link flag to control the output file's name -- usually -o<space>
+ # OBF compile flag to control object file's name -- varies
# RF flag used to denote "compile but don't link" -- usually -c
# PROGS the list of all programs
# CHMEM any extra commands to be run after ELVIS is linked
***************
*** 31,37 ****
# SORT if the "tags" file must be sorted, then SORT=-DSORT
# RM the name of a program that deletes files
# CP name of a program that copies files -- copy or cp, usually
! # SYS type of system & compiler: unx/tos/os9/dos (maybe vms?)
# DUMMY usually nothing, but OS9 needs "dummy"
# CFG name of compiler configuration file -- usually null
--- 34,40 ----
# SORT if the "tags" file must be sorted, then SORT=-DSORT
# RM the name of a program that deletes files
# CP name of a program that copies files -- copy or cp, usually
! # SYS type of system & compiler: unx/tos/os9/dos/os2 (maybe vms?)
# DUMMY usually nothing, but OS9 needs "dummy"
# CFG name of compiler configuration file -- usually null
***************
*** 41,52 ****
--- 44,58 ----
#COM=
#EXTRA= unix$(OBJ)
#EXTRA2=
+ #CTYPE_= ctype$(OBJ)
#LIBS= -lterm
#BIN= /usr/local/bin
#CC= cc
#CFLAGS= -DM_SYSV -O -DNO_SHIFT_FKEYS
#SMALL=
+ #LARGE=
#OF= -o ""
+ #OBF=
#RF= -c
#EVAL= eval
#PROGS= elvis$(EXE) ctags$(COM) ref$(COM) elvrec$(COM) fmt$(COM) \
***************
*** 65,76 ****
--- 71,85 ----
#COM=
#EXTRA= unix$(OBJ)
#EXTRA2=
+ #CTYPE_= ctype$(OBJ)
#LIBS= -ltcap
#BIN= /usr/local/bin
#CC= cc -M2m -i
#CFLAGS= -Ox -DCS_IBMPC
#SMALL=
+ #LARGE=
#OF= -o ""
+ #OBF=
#RF= -c
#EVAL= eval
#PROGS= elvis$(EXE) ctags$(COM) ref$(COM) elvrec$(COM) fmt$(COM) \
***************
*** 89,100 ****
--- 98,112 ----
#COM=
#EXTRA= unix$(OBJ)
#EXTRA2=
+ #CTYPE_= ctype$(OBJ)
#LIBS= -ltermcap
#BIN= /usr/local/bin
#CC= cc
#CFLAGS= -Dbsd -O
#SMALL=
+ #LARGE=
#OF= -o ""
+ #OBF=
#RF= -c
#EVAL= eval
#PROGS= elvis$(EXE) ctags$(COM) ref$(COM) elvrec$(COM) elvprsv$(COM)
***************
*** 112,117 ****
--- 124,130 ----
#COM=
#EXTRA= unix$(OBJ) tinyprnt$(OBJ)
#EXTRA2=
+ #CTYPE_= ctype$(OBJ)
#LIBS= -lterm
#BIN= /usr/bin
#CC= cc
***************
*** 118,124 ****
--- 131,139 ----
#CFLAGS= -O -DCOHERENT -VSUVAR -DCRUNCH -DNO_CHARATTR -DNO_CURSORSHAPE \
# -DNO_DIGRAPH -DNO_MKEXRC -DNO_POPUP -DNO_FKEYS -DNO_ABBR
#SMALL=
+ #LARGE=
#OF= -o ""
+ #OBF=
#RF= -c
#EVAL= eval
#PROGS= elvis$(EXE) ctags$(COM) ref$(COM) elvrec$(COM) fmt$(COM) \
***************
*** 137,142 ****
--- 152,158 ----
#COM=
#EXTRA= unix$(OBJ)
#EXTRA2=
+ #CTYPE_= ctype$(OBJ)
#LIBS=
#BIN= /usr/bin
#CC= cc
***************
*** 143,149 ****
--- 159,167 ----
##CC= gcc -s
#CFLAGS=
#SMALL=
+ #LARGE=
#OF= -o ""
+ #OBF=
#RF= -c
#EVAL= eval
#PROGS= elvis$(EXE) ctags$(COM) ref$(COM) elvrec$(COM) fmt$(COM) \
***************
*** 162,167 ****
--- 180,186 ----
#COM=
#EXTRA= tinytcap$(OBJ) unix$(OBJ) tinyprnt$(OBJ)
#EXTRA2=
+ #CTYPE_= ctype$(OBJ)
#LIBS=
#BIN= /usr/bin
#CC= cc -i
***************
*** 171,177 ****
--- 190,198 ----
# -DNO_ERRLIST -DNO_FKEY -DNO_VISIBLE -DNO_COLOR -DNO_POPUP
###(not -NO_AT -DNO_SENTENCE -DNO_ABBR -DNO_RECYCLE -DNO_MAGIC -DNO_CHARSEARCH)
#SMALL=
+ #LARGE=
#OF= -o ""
+ #OBF=
#RF= -c
#EVAL= eval
#PROGS= elvis$(EXE) ctags$(COM) ref$(COM) elvrec$(COM) fmt$(COM) \
***************
*** 191,196 ****
--- 212,218 ----
#COM=
#EXTRA= amiga$(OBJ) amitty$(OBJ) amisysio$(OBJ)
#EXTRA2= tinytcap$(OBJ)
+ #CTYPE_= ctype$(OBJ)
#LIBS= -lc
#BIN= sys:utilities
#CC= cc
***************
*** 198,204 ****
--- 220,228 ----
#LNK= ln
#LFLAGS=
#SMALL=
+ #LARGE=
#OF= -o
+ #OBF=
#RF=
#EVAL=
#PROGS1= elvis$(EXE) ctags$(COM) ref$(COM) elvrec$(COM) fmt$(COM)
***************
*** 212,217 ****
--- 236,277 ----
#DUMMY=
#CFG=
+ #---- These settings are for OS/2 + MSC 6.0 + MS NMAKE ----
+ #OBJ= .obj
+ #EXE= .exe
+ #COM= .exe
+ #EXTRA= os2$(OBJ) sysdos$(OBJ) tinytcap$(OBJ)
+ #EXTRA2= elvis.def
+ #CTYPE_= ctype_$(OBJ)
+ #LIBS=
+ #BIN= c:\os2
+ #CC= cl
+ ## FP is an optional environment variable to set default library names if use
+ ## 80x87. Add -DFASTPUT for 20x speed boost in redrawing screen (-DNO_CHARATTR
+ ## and -DNO_VISIBLE may give extra 20%; for now, may as well).
+ ##CFLAGS= -nologo -O -Gs -DCS_IBMPC -DCS_SPECIAL -DINTERNAL_TAGS -DOS2 $(FP)
+ #CFLAGS= -nologo -O -Gs -DCS_IBMPC -DCS_SPECIAL -DINTERNAL_TAGS -DOS2 -DFASTPUT -DNO_CHARATTR -DNO_VISIBLE $(FP)
+ #LFLAGS= -nologo -Lp -F 2000 $(FP)
+ #LARGE= -AL
+ #SMALL= -AS -Lp
+ #OF= -o
+ #OBF= -Fo
+ #RF= -c
+ #EVAL=
+ #PROGS1= elvis$(EXE) ex$(COM) vi$(COM) view$(COM) elvrec$(COM)
+ #PROGS2= wildcard$(COM) ctags$(COM) ref$(COM) fmt$(COM) elvprsv$(COM)
+ #PROGS= $(PROGS1) $(PROGS2)
+ #CHMEM=
+ #SORT=
+ #RM= del
+ #CP= copy
+ #SYS= os2
+ #DUMMY=
+ #CFG=
+ ##source file compilation rule:
+ #.c.obj:
+ # $(CC) $(CFLAGS) $(LARGE) $(RF) $<
+
#---- These settings are recommended for MS-DOS + MS-C + NDMAKE ----
#OBJ= .obj
#EXE= .exe
***************
*** 218,229 ****
--- 278,292 ----
#COM= .exe # .com might work, try it
#EXTRA= pc$(OBJ) sysdos$(OBJ) tinytcap$(OBJ)
#EXTRA2=
+ #CTYPE_= ctype_$(OBJ)
#LIBS=
#BIN= c:\dos
#CC= cl
#CFLAGS= -O -DCS_IBMPC -DCS_SPECIAL -DINTERNAL_TAGS
+ #LARGE=
#SMALL= /AM
#OF= -o
+ #OBF= -Fo
#RF= -c
#EVAL=
#PROGS1= elvis$(EXE) ex$(COM) ctags$(COM) ref$(COM) elvrec$(COM)
***************
*** 245,250 ****
--- 308,314 ----
#COM= .com
#EXTRA= pc$(OBJ) sysdos$(OBJ) tinytcap$(OBJ)
#EXTRA2=
+ #CTYPE_= ctype$(OBJ) # ctype_$(OBJ) ? If so, need to set OBF
#LIBS=@borland.rsp
#BIN= c:\bin
#CFG= borland.cfg borland.rsp
***************
*** 259,268 ****
--- 323,334 ----
#TC_CFLAGS1= -ml -O -f- -w- -v -vi- -G- -DCS_IBMPC -DCS_SPECIAL -DINTERNAL_TAGS
#TC_CFLAGS2= $(HDRS) $(CRNCH) -I$(TC_INC) -L$(TC_LIB)
## extra flags for compiling support programs
+ #LARGE=
#SMALL= -mt -lt -H- -v-
## extra flags for linking elvis (strip symbols)
#EFLAGS= -v-
#OF= -e
+ #OBF=
#RF= -c
#EVAL=
#PROGS1= elvis$(EXE) ex$(COM) ctags$(COM) ref$(COM) elvrec$(COM)
***************
*** 284,295 ****
--- 350,364 ----
#COM= .exe # .com might work, try it
#EXTRA= pc$(OBJ) sysdos$(OBJ) tinytcap$(OBJ)
#EXTRA2=
+ #CTYPE_= ctype$(OBJ)
#LIBS=
#BIN= a:
#CC= cc -M2m -dos -F 4000
#CFLAGS= -O -DCS_IBMPC -DCS_SPECIAL -DINTERNAL_TAGS -Dvolatile= -Dconst=
+ #LARGE=
#SMALL=
#OF= -o ""
+ #OBF=
#RF= -c
#EVAL=
#PROGS1= elvis$(EXE) ex$(COM) ctags$(COM) ref$(COM) elvrec$(COM)
***************
*** 309,321 ****
--- 378,393 ----
#COM= .ttp
#EXTRA= sysdos$(OBJ) tinytcap$(OBJ)
#EXTRA2= atari$(OBJ)
+ #CTYPE_= ctype$(OBJ)
#LIBS=
#BIN= c:\ #
#CC= cc -VPEEP
##CC= gcc -s
#CFLAGS= -O -DCS_IBMPC -DCS_SPECIAL
+ #LARGE=
#SMALL=
#OF= -o
+ #OBF=
#RF= -c
#EVAL=
#PROGS= elvis$(EXE) ctags$(COM) ref$(COM) elvrec$(COM) wildcard$(COM) \
***************
*** 334,346 ****
--- 406,421 ----
#COM=
#EXTRA= tinyprnt$(OBJ)
#EXTRA2= osk$(OBJ)
+ #CTYPE_= ctype$(OBJ)
#LIBS= -l=/dd/lib/termlib.l
#BIN= /dd/usr/cmds
#CC= cc
#ODIR= /dd/usr/src/elvis
#CFLAGS= -gq -m=2 -DNO_CURSORSHAPE
+ #LARGE=
#SMALL=
#OF= -f=$(ODIR)/
+ #OBF=
#RF= -r
#EVAL=
#PROGS= elvis$(EXE) vi$(COM) view$(COM) input$(COM) ctags$(COM) ref$(COM) \
***************
*** 366,377 ****
--- 441,455 ----
#COM= .exe
#EXTRA= tinytcap$(OBJ)
#EXTRA2= vmsio$(OBJ)
+ #CTYPE_= ctype$(OBJ)
#LIBS=
#BIN
#CC= cc
#CFLAGS= /define=NO_CURSORSHAPE /define=INTERNAL_TAGS
+ #LARGE=
#SMALL=
#OF= /exe=
+ #OBF=
#RF=
#PROGS= elvis.exe elvprsv.exe elvrec.exe ctags.exe ref.exe
#CHMEM=
***************
*** 418,423 ****
--- 496,503 ----
SRC8= ctype.c ctype.h borland.h novice.rc prsvdos.c prsvunix.c \
vmsbuild.com vmsio.c vmslink.opt vmsread.me vmssetup.com vmswild.c \
amiga.c amiprsv.c amistat.h amisysio.c amitty.c amiwild.c
+ #
+ # GRR: NEED TO ADD os2.c AND elvis.def IN HERE SOMEWHERE...
###########################################################################
all: $(PROGS)
***************
*** 450,464 ****
shell$(COM): $(CFG) shell.c
$(CC) $(CFLAGS) $(SMALL) $(OF)shell$(COM) shell.c
! wildcard$(COM): $(CFG) wildcard.c
! $(CC) $(CFLAGS) $(SMALL) $(OF)wildcard$(COM) wildcard.c ctype$(OBJ)
fmt$(COM): $(CFG) fmt.c
$(CC) $(CFLAGS) $(SMALL) $(OF)fmt$(COM) fmt.c $(EXTRA2)
! elvprsv$(COM): $(CFG) elvprsv.c amiprsv.c prsvunix.c prsvdos.c wildcard.c
! $(CC) $(CFLAGS) $(SMALL) $(OF)elvprsv$(COM) elvprsv.c ctype$(OBJ)
##############################################################################
# "It all depends..."
--- 530,547 ----
shell$(COM): $(CFG) shell.c
$(CC) $(CFLAGS) $(SMALL) $(OF)shell$(COM) shell.c
! wildcard$(COM): $(CFG) wildcard.c $(CTYPE_)
! $(CC) $(CFLAGS) $(SMALL) $(OF)wildcard$(COM) wildcard.c $(CTYPE_)
fmt$(COM): $(CFG) fmt.c
$(CC) $(CFLAGS) $(SMALL) $(OF)fmt$(COM) fmt.c $(EXTRA2)
! elvprsv$(COM): $(CFG) elvprsv.c amiprsv.c prsvunix.c prsvdos.c wildcard.c $(CTYPE_)
! $(CC) $(CFLAGS) $(SMALL) $(OF)elvprsv$(COM) elvprsv.c $(CTYPE_)
+ ctype_$(OBJ): $(CFG) ctype.c ctype.h
+ $(CC) $(CFLAGS) $(SMALL) $(RF) $(OBF)ctype_$(OBJ) ctype.c
+
##############################################################################
# "It all depends..."
***************
*** 473,478 ****
--- 556,563 ----
$(CHMEM)
@touch $@
+ linkelv.dos: linkelv.$(CC)
+
# elvis executable compilation rule for: all unix, os9, tos, msc dos
linkelv.unx linkelv.tos linkelv.os9 linkelv.cl: $(OBJS) $(EXTRA) $(EXTRA2)
$(CC) $(CFLAGS) $(OF)elvis$(EXE) $(OBJS) $(EXTRA) $(EXTRA2) $(LIBS)
***************
*** 479,491 ****
$(CHMEM)
@touch $@
- linkelv.dos: linkelv.$(CC)
-
# elvis executable compilation rule for: borland tcc, bcc
linkelv.bcc linkelv.tcc: $(CFG) $(OBJS) $(EXTRA) $(EXTRA2)
$(CC) $(CFLAGS) $(LIBS)
@echo done > linkelv.$(CC)
linkelv.vms: $(OBJS) $(EXTRA) $(EXTRA2)
link$(OF)elvis.exe main,$(CFG)/opt
--- 564,579 ----
$(CHMEM)
@touch $@
# elvis executable compilation rule for: borland tcc, bcc
linkelv.bcc linkelv.tcc: $(CFG) $(OBJS) $(EXTRA) $(EXTRA2)
$(CC) $(CFLAGS) $(LIBS)
@echo done > linkelv.$(CC)
+ # elvis executable compilation rule for: msc OS/2
+ linkelv.os2: $(CFG) $(OBJS) $(EXTRA) $(EXTRA2)
+ $(CC) $(LARGE) $(LFLAGS) $(OF)elvis$(EXE) $(OBJS) $(EXTRA) $(EXTRA2) $(LIBS)
+ @echo done > linkelv.os2
+
linkelv.vms: $(OBJS) $(EXTRA) $(EXTRA2)
link$(OF)elvis.exe main,$(CFG)/opt
***************
*** 513,518 ****
--- 601,610 ----
linkex.unx linkex.tos linkex.xdos linkex.dos linkex.vms: $(CFG) alias.c
$(CC) $(CFLAGS) $(SMALL) $(OF)ex$(COM) alias.c
+ linkex.os2: $(CFG) alias.c elvis.def
+ $(CC) $(CFLAGS) $(SMALL) $(OF)ex$(COM) alias.c elvis.def
+ @echo done > $@
+
linkex.os9: $(DUMMY)
@echo done >/nil
***************
*** 519,524 ****
--- 611,620 ----
linkvi.ami linkvi.unx linkvi.tos linkvi.xdos linkvi.dos linkvi.vms: ex$(COM)
$(CP) ex$(COM) vi$(COM)
+ linkvi.os2: ex$(COM)
+ $(CP) ex$(COM) vi$(COM)
+ @echo done > $@
+
linkvi.os9: alias.r
$(CC) $(CFLAGS) $(OF)vi$(COM) alias.r
@touch $@
***************
*** 526,531 ****
--- 622,631 ----
linkview.ami linkview.unx linkview.tos linkview.xdos linkview.dos linkview.vms: ex$(COM)
$(CP) ex$(COM) view$(COM)
+ linkview.os2: ex$(COM)
+ $(CP) ex$(COM) view$(COM)
+ @echo done > $@
+
linkview.os9: alias.r
$(CC) $(CFLAGS) $(OF)view$(COM) alias.r
@touch $@
***************
*** 533,538 ****
--- 633,642 ----
linkinput.ami linkinput.unx linkinput.tos linkinput.xdos linkinput.dos linkinput.vms: ex$(COM)
$(CP) ex$(COM) input$(COM)
+ linkinput.os2: ex$(COM)
+ $(CP) ex$(COM) input$(COM)
+ @echo done > $@
+
linkinput.os9: alias.r
$(CC) $(CFLAGS) $(OF)input$(COM) alias.r
@touch $@
***************
*** 564,570 ****
@echo ::: YOU STILL NEED TO EDIT THE /ETC/RC FILE, OR WHATEVER,
@echo ::: TO HAVE TEMP FILES BE PRESERVED AFTER A SYSTEM CRASH.
! inst.dos: $(DUMMY)
for %a in ($(PROGS1)) do copy %a $(BIN)
for %a in ($(PROGS2)) do copy %a $(BIN)
$(CP) $(BIN)\ex$(COM) $(BIN)\vi$(COM)
--- 668,674 ----
@echo ::: YOU STILL NEED TO EDIT THE /ETC/RC FILE, OR WHATEVER,
@echo ::: TO HAVE TEMP FILES BE PRESERVED AFTER A SYSTEM CRASH.
! inst.dos inst.os2: $(DUMMY)
for %a in ($(PROGS1)) do copy %a $(BIN)
for %a in ($(PROGS2)) do copy %a $(BIN)
$(CP) $(BIN)\ex$(COM) $(BIN)\vi$(COM)
***************
*** 609,615 ****
clob.unx clob.tos clob.os9 clob.xdos clob.vms: $(DUMMY)
$(RM) tags refs $(PROGS)
! clob.dos : $(DUMMY)
for %a in ($(PROGS1)) do $(RM) %a
for %a in ($(PROGS2)) do $(RM) %a
for %a in (tags refs) do $(RM) %a
--- 713,719 ----
clob.unx clob.tos clob.os9 clob.xdos clob.vms: $(DUMMY)
$(RM) tags refs $(PROGS)
! clob.dos clob.os2: $(DUMMY)
for %a in ($(PROGS1)) do $(RM) %a
for %a in ($(PROGS2)) do $(RM) %a
for %a in (tags refs) do $(RM) %a
diff -cs old/config.h new/config.h
*** old/config.h Sun Apr 5 14:02:46 1992
--- new/config.h Sun Jun 7 11:55:38 1992
***************
*** 42,48 ****
# define COMPILED_BY "IBM C/2 1.00"
# else
# define MICROSOFT 1
! # define COMPILED_BY "Microsoft C 5.10"
# endif
# endif
#endif
--- 42,58 ----
# define COMPILED_BY "IBM C/2 1.00"
# else
# define MICROSOFT 1
! # ifdef _MSC_VER
! # if (_MSC_VER == 700)
! # define COMPILED_BY "Microsoft C 7.00"
! # else
! # if (_MSC_VER == 600)
! # define COMPILED_BY "Microsoft C 6.00"
! # else
! # define COMPILED_BY "Microsoft C 5.10"
! # endif
! # endif
! # endif /* _MSC_VER */
# endif
# endif
#endif
***************
*** 104,112 ****
#endif
#ifndef MSDOS
! # define MSDOS 0 /* PC */
#endif
#ifndef TOS
# define TOS 0 /* Atari ST */
#endif
--- 114,126 ----
#endif
#ifndef MSDOS
! # define MSDOS 0 /* PC DOS */
#endif
+ #ifndef OS2
+ # define OS2 0 /* PC OS/2 */
+ #endif
+
#ifndef TOS
# define TOS 0 /* Atari ST */
#endif
***************
*** 194,200 ****
* just a macro...
*/
#if !TOS && !AMIGA
! # define ttywrite(buf, len) write(1, buf, (unsigned)(len)) /* raw write */
#endif
/* The strchr() function is an official standard now, so everybody has it
--- 208,218 ----
* just a macro...
*/
#if !TOS && !AMIGA
! # if OS2 && defined(FASTPUT)
! # define ttywrite(buf, len) VioWrtTTY(buf, (USHORT)(len), 0)
! # else
! # define ttywrite(buf, len) write(1, buf, (unsigned)(len)) /* raw write */
! # endif
#endif
/* The strchr() function is an official standard now, so everybody has it
diff -cs old/curses.c new/curses.c
*** old/curses.c Sun Apr 5 14:02:56 1992
--- new/curses.c Sun Jun 7 11:46:56 1992
***************
*** 193,199 ****
*/
if (!termtype)
{
! #ifdef RAINBOW
if (*(unsigned char far*)(0xffff000eL) == 6 /* Rainbow 100a */
|| *(unsigned char far*)(0xffff000eL) == 148)/* Rainbow 100b */
{
--- 193,199 ----
*/
if (!termtype)
{
! #if RAINBOW
if (*(unsigned char far*)(0xffff000eL) == 6 /* Rainbow 100a */
|| *(unsigned char far*)(0xffff000eL) == 148)/* Rainbow 100b */
{
***************
*** 204,212 ****
termtype = "pcbios";
}
if (!strcmp(termtype, "pcbios"))
! #else
if (!termtype)
! #endif
{
#if ANY_UNIX
write(2, "Environment variable TERM must be set\n", (unsigned)38);
--- 204,212 ----
termtype = "pcbios";
}
if (!strcmp(termtype, "pcbios"))
! #else /* !MSDOS */
if (!termtype)
! #endif /* ?MSDOS */
{
#if ANY_UNIX
write(2, "Environment variable TERM must be set\n", (unsigned)38);
***************
*** 276,281 ****
--- 276,284 ----
#if AMIGA
amiclosewin();
#endif
+ #if OS2
+ v_vio_restore();
+ #endif
}
***************
*** 342,348 ****
#if MSDOS
raw_set_stdio(FALSE);
#endif
-
#if VMS
VMS_read_raw = 0;
#endif
--- 345,350 ----
***************
*** 776,782 ****
COLS = tgetnum("co");
}
#if MSDOS
! # ifdef RAINBOW
if (!strcmp(termtype, "rainbow"))
{
/* Determine whether Rainbow is in 80-column or 132-column mode */
--- 778,787 ----
COLS = tgetnum("co");
}
#if MSDOS
! # if OS2
! v_vio_init(&lines, &cols); /* also saves current state */
! # else /* !OS2 */
! # if RAINBOW
if (!strcmp(termtype, "rainbow"))
{
/* Determine whether Rainbow is in 80-column or 132-column mode */
***************
*** 783,793 ****
cols = *(unsigned char far *)0xee000f57L;
}
else
! # endif
{
lines = v_rows();
cols = v_cols();
}
#endif
if (lines >= 2 && cols >= 30)
{
--- 788,799 ----
cols = *(unsigned char far *)0xee000f57L;
}
else
! # endif
{
lines = v_rows();
cols = v_cols();
}
+ # endif /* ?OS2 */
#endif
if (lines >= 2 && cols >= 30)
{
diff -cs old/curses.h new/curses.h
*** old/curses.h Sun Apr 5 14:03:08 1992
--- new/curses.h Tue Jun 9 23:59:44 1992
***************
*** 30,35 ****
--- 30,45 ----
extern void v_move();
#endif
+ #if OS2
+ extern void v_vio_init();
+ extern void v_vio_restore();
+ # ifndef GOT_OS2_H
+ # define INCL_VIO
+ # define INCL_NOPM
+ # include <os2.h>
+ # endif
+ #endif
+
/* faddch() is a function. a pointer to it is passed to tputs() */
extern int faddch();
***************
*** 268,274 ****
/* (pseudo)-Curses-functions */
! #ifdef lint
# define _addCR VOIDBIOS(;, (stdscr[-1] == '\n' ? qaddch('\r') : (stdscr[-1] = '\n')))
#else
# if OSK
--- 278,284 ----
/* (pseudo)-Curses-functions */
! #ifdef lint /* _addCR only used in addstr() macro */
# define _addCR VOIDBIOS(;, (stdscr[-1] == '\n' ? qaddch('\r') : (stdscr[-1] = '\n')))
#else
# if OSK
***************
*** 281,295 ****
#ifdef AZTEC_C
# define qaddch(ch) CHECKBIOS(v_put(ch), (*stdscr = (ch), *stdscr++))
#else
! #define qaddch(ch) CHECKBIOS(v_put(ch), (*stdscr++ = (ch)))
#endif
#if OSK
! #define addch(ch) if (qaddch(ch) == '\n') qaddch('\l'); else
#else
! #define addch(ch) if (qaddch(ch) == '\n') qaddch('\r'); else
#endif
extern void initscr();
extern void endwin();
extern void suspend_curses();
--- 291,313 ----
#ifdef AZTEC_C
# define qaddch(ch) CHECKBIOS(v_put(ch), (*stdscr = (ch), *stdscr++))
#else
! # define qaddch(ch) CHECKBIOS(v_put(ch), (*stdscr++ = (ch)))
#endif
#if OSK
! # define addch(ch) if (qaddch(ch) == '\n') qaddch('\l'); else
#else
! # define addch(ch) if (qaddch(ch) == '\n') qaddch('\r'); else
#endif
+ #if (OS2 && defined(FASTPUT))
+ # define QADDCH(ch) (*stdscr++ = (ch))
+ # define ADDCH(ch) if (QADDCH(ch) == '\n') QADDCH('\r'); else
+ #else
+ # define QADDCH qaddch
+ # define ADDCH addch
+ #endif
+
extern void initscr();
extern void endwin();
extern void suspend_curses();
***************
*** 317,319 ****
--- 335,344 ----
#define noraw()
#define noecho()
#define nocbreak()
+
+ #if OS2
+ # define v_move(x,y) VioSetCurPos((USHORT)(y), (USHORT)(x), 0)
+ # define audiobeep() DosBeep(800, 32)
+ #else
+ # define audiobeep() ttywrite("\007", 1)
+ #endif
diff -cs old/elvprsv.c new/elvprsv.c
*** old/elvprsv.c Sun Apr 5 14:02:44 1992
--- new/elvprsv.c Tue Jun 9 20:56:12 1992
***************
*** 49,54 ****
--- 49,58 ----
* - tell user that file was preserved
*/
+ #if OS2
+ # define GOT_OS2_H /* don't need video */
+ #endif
+
#include <stdio.h>
#include "config.h"
#include "vi.h"
diff -cs old/redraw.c new/redraw.c
*** old/redraw.c Sun Apr 5 14:03:24 1992
--- new/redraw.c Sun Jun 7 12:16:00 1992
***************
*** 395,400 ****
--- 395,406 ----
clrtoeol();
#endif
+ /* OS/2 NOTE: from here to OS2 ifdef, use ttywrite-like screen
+ * updates if FASTPUT also defined (lose attributes, gain 9x speed)
+ * --that is, save text in array and write whole line at once via
+ * VioWrtTTY(), rather than one character at a time via v_put().
+ */
+
/* skip stuff that was scrolled off left edge */
for (col = 0;
(i = *text) && col < limitcol; /* yes, ASSIGNMENT! */
***************
*** 462,468 ****
/* adjust for control char that was partially visible */
while (col > limitcol)
{
! qaddch(' ');
limitcol++;
}
--- 468,474 ----
/* adjust for control char that was partially visible */
while (col > limitcol)
{
! QADDCH(' ');
limitcol++;
}
***************
*** 492,498 ****
i = col + tabstop - (col % tabstop);
do
{
! qaddch(' ');
col++;
} while (col < i);
}
--- 498,504 ----
i = col + tabstop - (col % tabstop);
do
{
! QADDCH(' ');
col++;
} while (col < i);
}
***************
*** 511,517 ****
{
do
{
! qaddch('\t');
col += 8; /* not exact! */
} while (col < i);
col = i; /* NOW it is exact */
--- 517,523 ----
{
do
{
! QADDCH('\t');
col += 8; /* not exact! */
} while (col < i);
col = i; /* NOW it is exact */
***************
*** 520,526 ****
{
do
{
! qaddch(' ');
col++;
} while (col < i);
}
--- 526,532 ----
{
do
{
! QADDCH(' ');
col++;
} while (col < i);
}
***************
*** 530,536 ****
col = limitcol;
if (has_AM)
{
! addch('\n'); /* GB */
}
}
}
--- 536,542 ----
col = limitcol;
if (has_AM)
{
! ADDCH('\n'); /* GB */
}
}
}
***************
*** 537,546 ****
else if (i >= 0 && i < ' ' || i == '\177')
{
col += 2;
! qaddch('^');
if (col <= limitcol)
{
! qaddch(i ^ '@');
}
}
#ifndef NO_CHARATTR
--- 543,552 ----
else if (i >= 0 && i < ' ' || i == '\177')
{
col += 2;
! QADDCH('^');
if (col <= limitcol)
{
! QADDCH(i ^ '@');
}
}
#ifndef NO_CHARATTR
***************
*** 575,584 ****
else
{
col++;
! qaddch(i);
}
}
/* get ready for the next line */
#ifndef NO_CHARATTR
if (abnormal)
--- 581,598 ----
else
{
col++;
! QADDCH(i);
}
}
+ #if (OS2 && defined(FASTPUT)) /* like w{q}refresh() */
+ if (stdscr != kbuf)
+ {
+ VioWrtTTY(kbuf, (USHORT)(stdscr-kbuf), 0);
+ stdscr = kbuf;
+ }
+ #endif /* OS/2 NOTE: end of ttywrite-style updates for OS/2 */
+
/* get ready for the next line */
#ifndef NO_CHARATTR
if (abnormal)
***************
*** 803,813 ****
--- 817,833 ----
}
/* show the new line */
+ #if OS2 && defined(FASTPUT) /* GRR: should add VioWrtCharStrAttr version */
+ VioWrtTTY(new, (USHORT)(end-new), 0);
for (scan = new, build = old; scan < end; )
+ *build++ = *scan++;
+ #else
+ for (scan = new, build = old; scan < end; )
{
qaddch(*scan);
*build++ = *scan++;
}
+ #endif
if (end < new + COLS - (*o_number ? 8 : 0))
{
clrtoeol();
diff -cs old/sysdos.c new/sysdos.c
*** old/sysdos.c Sun Apr 5 14:02:36 1992
--- new/sysdos.c Wed Jun 3 23:01:54 1992
***************
*** 56,63 ****
--- 56,65 ----
{
#if MSDOS
char *cmdswitch="/c";
+ #if !OS2
if (_osmajor<4)
cmdswitch[0]=switchar();
+ #endif /* !OS2 */
return spawnle(P_WAIT, o_shell, o_shell, cmdswitch, cmd, (char *)0, environ);
#else
long ssp;
diff -cs old/tio.c new/tio.c
*** old/tio.c Sun Apr 5 14:03:32 1992
--- new/tio.c Sun Jun 7 12:12:44 1992
***************
*** 330,336 ****
}
else if (*o_errorbells)
{
! ttywrite("\007", 1);
}
/* discard any buffered input, and abort macros */
--- 330,336 ----
}
else if (*o_errorbells)
{
! audiobeep();
}
/* discard any buffered input, and abort macros */
Files old/vcmd.c and new/vcmd.c are identical
Files old/vi.c and new/vi.c are identical
diff -cs old/vi.h new/vi.h
*** old/vi.h Sun Apr 5 14:03:40 1992
--- new/vi.h Thu Jun 4 19:53:12 1992
***************
*** 11,17 ****
--- 11,19 ----
#define COPYING "This version of ELVIS is freely redistributable."
#include <errno.h>
+ #if !(defined(_MSC_VER) && (_MSC_VER >= 600)) /* incompatible with MS C */
extern int errno;
+ #endif
#if TOS && !defined(__GNUC__)
#define ENOENT (-AEFILNF)
#endif
diff -cs old/wildcard.c new/wildcard.c
*** old/wildcard.c Sun Apr 5 14:02:38 1992
--- new/wildcard.c Wed Jun 10 00:06:54 1992
***************
*** 9,15 ****
*/
/* this program implements wildcard expansion for elvis/dos. It works
! * like UNIX echo, but uses the dos wildcard conventions
* (*.* matches all files, * matches files without extension only,
* filespecs may contain drive letters, wildcards not allowed in directory
* names).
--- 9,15 ----
*/
/* this program implements wildcard expansion for elvis/dos. It works
! * like UNIX echo but uses the dos wildcard conventions
* (*.* matches all files, * matches files without extension only,
* filespecs may contain drive letters, wildcards not allowed in directory
* names).
***************
*** 24,57 ****
#endif
#include "ctype.h"
#ifdef __TURBOC__
! #include <dir.h>
#endif
#ifdef M_I86
! #define findfirst(a,b,c) _dos_findfirst(a,c,b)
! #define findnext _dos_findnext
! #define ffblk find_t
! #define ff_name name
! #include <dos.h>
#endif
/* Atari TOS, MWC */
#ifdef M68000
! #include <stat.h>
! #include <osbind.h>
! #define findfirst(a,b,c) (Fsetdta(b), (Fsfirst(a,c)))
! #define findnext(x) (Fsnext())
! #define ff_name d_fname
#endif
/* Atari TOS, GNU-C */
#ifdef __m68k__
! #include <stat.h>
! #include <osbind.h>
! #define findfirst(a,b,c) (Fsetdta(b), (Fsfirst(a,c)))
! #define findnext(x) (Fsnext())
! #define ff_name dta_name
! #define DMABUFFER struct _dta
#endif
#define MAXFILES 1000
--- 24,70 ----
#endif
#include "ctype.h"
#ifdef __TURBOC__
! # include <dir.h>
#endif
#ifdef M_I86
! # if OS2
! # define INCL_NOPM
! # define INCL_DOS
! # include <os2.h>
! HDIR hdir; /* directory handle */
! USHORT search; /* count? */
! # define findfirst(a,b,c) DosFindFirst(a,&hdir,c,b,sizeof(findbuf),&search,0L)
! # define findnext(b) DosFindNext(hdir,b,sizeof(findbuf),&search)
! # define ffblk FILEFINDBUF
! # define ff_name achName
! # else
! # define findfirst(a,b,c) _dos_findfirst(a,c,b)
! # define findnext _dos_findnext
! # define ffblk struct find_t
! # define ff_name name
! # include <dos.h>
! # endif
#endif
/* Atari TOS, MWC */
#ifdef M68000
! # include <stat.h>
! # include <osbind.h>
! # define findfirst(a,b,c) (Fsetdta(b), (Fsfirst(a,c)))
! # define findnext(x) (Fsnext())
! # define ffblk DMABUFFER
! # define ff_name d_fname
#endif
/* Atari TOS, GNU-C */
#ifdef __m68k__
! # include <stat.h>
! # include <osbind.h>
! # define findfirst(a,b,c) (Fsetdta(b), (Fsfirst(a,c)))
! # define findnext(x) (Fsnext())
! # define ffblk struct _dta
! # define ff_name dta_name
#endif
#define MAXFILES 1000
***************
*** 101,113 ****
{
char *filespec;
int wildcard=0;
! #if defined(M68000) || defined(__m68k__)
! DMABUFFER findbuf;
! #else
! struct ffblk findbuf;
! #endif
int err;
! char buf[80];
int lastn;
strcpy(buf, name);
--- 114,122 ----
{
char *filespec;
int wildcard=0;
! ffblk findbuf;
int err;
! char buf[256]; /* OS/2: 256 allowed */
int lastn;
strcpy(buf, name);
***************
*** 126,131 ****
--- 135,144 ----
{
lastn=nfiles;
filespec++;
+ #if OS2
+ hdir = HDIR_CREATE;
+ search = 1;
+ #endif
if ((err=findfirst(buf, &findbuf, 0))!=0)
addfile(buf);
while (!err)
***************
*** 134,139 ****
--- 147,155 ----
addfile(buf);
err=findnext(&findbuf);
}
+ #if OS2
+ DosFindClose(hdir);
+ #endif
if (lastn!=nfiles)
qsort(files+lastn, nfiles-lastn, sizeof(char *), pstrcmp);
}