home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional / OS2PRO194.ISO / os2 / editor / elvis / sources / os2elvis.dif < prev    next >
Text File  |  1994-01-30  |  29KB  |  1,202 lines

  1. diff -cs old/Makefile.mix new/Makefile.mix
  2. *** old/Makefile.mix    Sun Apr  5 14:02:30 1992
  3. --- new/Makefile.mix    Wed Jun 10 09:56:41 1992
  4. ***************
  5. *** 17,22 ****
  6. --- 17,23 ----
  7.   #    COM    filename extension for executable support files -- .com, .tpp or null
  8.   #    EXTRA    version-specific object files used in elvis
  9.   #    EXTRA2    version-specific object files used in elvis & elvrec
  10. + #    CTYPE_    name of ctype object file for $(SMALL)-model executables
  11.   #    LIBS    any special libraries, such as "-ltermcap"
  12.   #    BIN    directory where executables should be installed
  13.   #    CC    the C compiler command, possibly with "memory model" flags
  14. ***************
  15. *** 23,30 ****
  16. --- 24,33 ----
  17.   #    CFLAGS    compiler flags used to select compile-time options
  18.   #    LNK    the linker command needed to link OBJ files (if not cc)
  19.   #    LFLAGS    linker flags used to select link-time options
  20. + #    LARGE    flag for large memory model compilation -- usually null
  21.   #    SMALL    flag for special small memory model compilation -- usually null
  22.   #    OF    link flag to control the output file's name -- usually -o<space>
  23. + #    OBF    compile flag to control object file's name -- varies
  24.   #    RF    flag used to denote "compile but don't link" -- usually -c
  25.   #    PROGS    the list of all programs
  26.   #    CHMEM    any extra commands to be run after ELVIS is linked
  27. ***************
  28. *** 31,37 ****
  29.   #    SORT    if the "tags" file must be sorted, then SORT=-DSORT
  30.   #    RM    the name of a program that deletes files
  31.   #    CP    name of a program that copies files -- copy or cp, usually
  32. ! #    SYS    type of system & compiler: unx/tos/os9/dos (maybe vms?)
  33.   #    DUMMY    usually nothing, but OS9 needs "dummy"
  34.   #    CFG    name of compiler configuration file -- usually null
  35.   
  36. --- 34,40 ----
  37.   #    SORT    if the "tags" file must be sorted, then SORT=-DSORT
  38.   #    RM    the name of a program that deletes files
  39.   #    CP    name of a program that copies files -- copy or cp, usually
  40. ! #    SYS    type of system & compiler: unx/tos/os9/dos/os2 (maybe vms?)
  41.   #    DUMMY    usually nothing, but OS9 needs "dummy"
  42.   #    CFG    name of compiler configuration file -- usually null
  43.   
  44. ***************
  45. *** 41,52 ****
  46. --- 44,58 ----
  47.   #COM=
  48.   #EXTRA=    unix$(OBJ)
  49.   #EXTRA2=
  50. + #CTYPE_=    ctype$(OBJ)
  51.   #LIBS=    -lterm
  52.   #BIN=    /usr/local/bin
  53.   #CC=    cc
  54.   #CFLAGS=    -DM_SYSV -O -DNO_SHIFT_FKEYS
  55.   #SMALL=
  56. + #LARGE=
  57.   #OF=    -o ""
  58. + #OBF=
  59.   #RF=    -c
  60.   #EVAL=    eval
  61.   #PROGS=    elvis$(EXE) ctags$(COM) ref$(COM) elvrec$(COM) fmt$(COM) \
  62. ***************
  63. *** 65,76 ****
  64. --- 71,85 ----
  65.   #COM=
  66.   #EXTRA=    unix$(OBJ)
  67.   #EXTRA2=
  68. + #CTYPE_=    ctype$(OBJ)
  69.   #LIBS=    -ltcap
  70.   #BIN=    /usr/local/bin
  71.   #CC=    cc -M2m -i
  72.   #CFLAGS=    -Ox -DCS_IBMPC
  73.   #SMALL=
  74. + #LARGE=
  75.   #OF=    -o ""
  76. + #OBF=
  77.   #RF=    -c
  78.   #EVAL=    eval
  79.   #PROGS=    elvis$(EXE) ctags$(COM) ref$(COM) elvrec$(COM) fmt$(COM) \
  80. ***************
  81. *** 89,100 ****
  82. --- 98,112 ----
  83.   #COM=    
  84.   #EXTRA=    unix$(OBJ)
  85.   #EXTRA2=
  86. + #CTYPE_=    ctype$(OBJ)
  87.   #LIBS=    -ltermcap
  88.   #BIN=    /usr/local/bin
  89.   #CC=    cc
  90.   #CFLAGS=    -Dbsd -O
  91.   #SMALL=
  92. + #LARGE=
  93.   #OF=    -o ""
  94. + #OBF=
  95.   #RF=    -c
  96.   #EVAL=    eval
  97.   #PROGS=    elvis$(EXE) ctags$(COM) ref$(COM) elvrec$(COM) elvprsv$(COM)
  98. ***************
  99. *** 112,117 ****
  100. --- 124,130 ----
  101.   #COM=
  102.   #EXTRA=    unix$(OBJ) tinyprnt$(OBJ)
  103.   #EXTRA2=
  104. + #CTYPE_=    ctype$(OBJ)
  105.   #LIBS=    -lterm
  106.   #BIN=    /usr/bin
  107.   #CC=    cc
  108. ***************
  109. *** 118,124 ****
  110. --- 131,139 ----
  111.   #CFLAGS=    -O -DCOHERENT -VSUVAR -DCRUNCH -DNO_CHARATTR -DNO_CURSORSHAPE \
  112.   #    -DNO_DIGRAPH -DNO_MKEXRC -DNO_POPUP -DNO_FKEYS -DNO_ABBR
  113.   #SMALL=
  114. + #LARGE=
  115.   #OF=    -o ""
  116. + #OBF=
  117.   #RF=    -c
  118.   #EVAL=    eval
  119.   #PROGS=    elvis$(EXE) ctags$(COM) ref$(COM) elvrec$(COM) fmt$(COM) \
  120. ***************
  121. *** 137,142 ****
  122. --- 152,158 ----
  123.   #COM=
  124.   #EXTRA=    unix$(OBJ)
  125.   #EXTRA2=
  126. + #CTYPE_=    ctype$(OBJ)
  127.   #LIBS=
  128.   #BIN=    /usr/bin
  129.   #CC=    cc
  130. ***************
  131. *** 143,149 ****
  132. --- 159,167 ----
  133.   ##CC=    gcc -s
  134.   #CFLAGS=
  135.   #SMALL=
  136. + #LARGE=
  137.   #OF=    -o ""
  138. + #OBF=
  139.   #RF=    -c
  140.   #EVAL=    eval
  141.   #PROGS=    elvis$(EXE) ctags$(COM) ref$(COM) elvrec$(COM) fmt$(COM) \
  142. ***************
  143. *** 162,167 ****
  144. --- 180,186 ----
  145.   #COM=
  146.   #EXTRA=    tinytcap$(OBJ) unix$(OBJ) tinyprnt$(OBJ)
  147.   #EXTRA2=
  148. + #CTYPE_=    ctype$(OBJ)
  149.   #LIBS=
  150.   #BIN=    /usr/bin
  151.   #CC=    cc -i
  152. ***************
  153. *** 171,177 ****
  154. --- 190,198 ----
  155.   #    -DNO_ERRLIST -DNO_FKEY -DNO_VISIBLE -DNO_COLOR -DNO_POPUP
  156.   ###(not -NO_AT -DNO_SENTENCE -DNO_ABBR -DNO_RECYCLE -DNO_MAGIC -DNO_CHARSEARCH)
  157.   #SMALL=
  158. + #LARGE=
  159.   #OF=    -o ""
  160. + #OBF=
  161.   #RF=    -c
  162.   #EVAL=    eval
  163.   #PROGS=    elvis$(EXE) ctags$(COM) ref$(COM) elvrec$(COM) fmt$(COM) \
  164. ***************
  165. *** 191,196 ****
  166. --- 212,218 ----
  167.   #COM=
  168.   #EXTRA=    amiga$(OBJ) amitty$(OBJ) amisysio$(OBJ)
  169.   #EXTRA2= tinytcap$(OBJ)
  170. + #CTYPE_=    ctype$(OBJ)
  171.   #LIBS=    -lc
  172.   #BIN=    sys:utilities
  173.   #CC=    cc
  174. ***************
  175. *** 198,204 ****
  176. --- 220,228 ----
  177.   #LNK=    ln
  178.   #LFLAGS=
  179.   #SMALL=
  180. + #LARGE=
  181.   #OF=    -o 
  182. + #OBF=
  183.   #RF=
  184.   #EVAL=
  185.   #PROGS1=    elvis$(EXE) ctags$(COM) ref$(COM) elvrec$(COM) fmt$(COM) 
  186. ***************
  187. *** 212,217 ****
  188. --- 236,277 ----
  189.   #DUMMY=
  190.   #CFG=
  191.   
  192. + #---- These settings are for OS/2 + MSC 6.0 + MS NMAKE ----
  193. + #OBJ=    .obj
  194. + #EXE=    .exe
  195. + #COM=    .exe
  196. + #EXTRA=    os2$(OBJ) sysdos$(OBJ) tinytcap$(OBJ)
  197. + #EXTRA2=    elvis.def
  198. + #CTYPE_=    ctype_$(OBJ)
  199. + #LIBS=
  200. + #BIN=    c:\os2
  201. + #CC=    cl
  202. + ##  FP is an optional environment variable to set default library names if use 
  203. + ##  80x87.  Add -DFASTPUT for 20x speed boost in redrawing screen (-DNO_CHARATTR
  204. + ##  and -DNO_VISIBLE may give extra 20%; for now, may as well).
  205. + ##CFLAGS= -nologo -O -Gs -DCS_IBMPC -DCS_SPECIAL -DINTERNAL_TAGS -DOS2 $(FP)
  206. + #CFLAGS= -nologo -O -Gs -DCS_IBMPC -DCS_SPECIAL -DINTERNAL_TAGS -DOS2 -DFASTPUT -DNO_CHARATTR -DNO_VISIBLE $(FP)
  207. + #LFLAGS=    -nologo -Lp -F 2000 $(FP)
  208. + #LARGE=    -AL
  209. + #SMALL=    -AS -Lp
  210. + #OF=    -o 
  211. + #OBF=    -Fo
  212. + #RF=    -c
  213. + #EVAL=
  214. + #PROGS1=    elvis$(EXE) ex$(COM) vi$(COM) view$(COM) elvrec$(COM)
  215. + #PROGS2=    wildcard$(COM) ctags$(COM) ref$(COM) fmt$(COM) elvprsv$(COM)
  216. + #PROGS=    $(PROGS1) $(PROGS2)
  217. + #CHMEM=
  218. + #SORT=
  219. + #RM=    del
  220. + #CP=    copy
  221. + #SYS=    os2
  222. + #DUMMY=
  223. + #CFG=
  224. + ##source file compilation rule:
  225. + #.c.obj:
  226. + #    $(CC) $(CFLAGS) $(LARGE) $(RF) $<
  227.   #---- These settings are recommended for MS-DOS + MS-C + NDMAKE ----
  228.   #OBJ=    .obj
  229.   #EXE=    .exe
  230. ***************
  231. *** 218,229 ****
  232. --- 278,292 ----
  233.   #COM=    .exe    # .com might work, try it
  234.   #EXTRA=    pc$(OBJ) sysdos$(OBJ) tinytcap$(OBJ)
  235.   #EXTRA2=
  236. + #CTYPE_=    ctype_$(OBJ)
  237.   #LIBS=
  238.   #BIN=    c:\dos
  239.   #CC=    cl
  240.   #CFLAGS=    -O -DCS_IBMPC -DCS_SPECIAL -DINTERNAL_TAGS
  241. + #LARGE=
  242.   #SMALL= /AM
  243.   #OF=    -o 
  244. + #OBF=    -Fo
  245.   #RF=    -c
  246.   #EVAL=
  247.   #PROGS1=    elvis$(EXE) ex$(COM) ctags$(COM) ref$(COM) elvrec$(COM)
  248. ***************
  249. *** 245,250 ****
  250. --- 308,314 ----
  251.   #COM=    .com
  252.   #EXTRA=    pc$(OBJ) sysdos$(OBJ) tinytcap$(OBJ)
  253.   #EXTRA2=
  254. + #CTYPE_=    ctype$(OBJ)    # ctype_$(OBJ) ?  If so, need to set OBF
  255.   #LIBS=@borland.rsp
  256.   #BIN=    c:\bin
  257.   #CFG=    borland.cfg borland.rsp
  258. ***************
  259. *** 259,268 ****
  260. --- 323,334 ----
  261.   #TC_CFLAGS1=    -ml -O -f- -w- -v -vi- -G- -DCS_IBMPC -DCS_SPECIAL -DINTERNAL_TAGS
  262.   #TC_CFLAGS2=    $(HDRS) $(CRNCH) -I$(TC_INC) -L$(TC_LIB)
  263.   ## extra flags for compiling support programs
  264. + #LARGE=
  265.   #SMALL=    -mt -lt -H- -v-
  266.   ## extra flags for linking elvis (strip symbols)
  267.   #EFLAGS=    -v-
  268.   #OF=    -e
  269. + #OBF=
  270.   #RF=    -c
  271.   #EVAL=
  272.   #PROGS1=    elvis$(EXE) ex$(COM) ctags$(COM) ref$(COM) elvrec$(COM)
  273. ***************
  274. *** 284,295 ****
  275. --- 350,364 ----
  276.   #COM=    .exe    # .com might work, try it
  277.   #EXTRA=    pc$(OBJ) sysdos$(OBJ) tinytcap$(OBJ)
  278.   #EXTRA2=
  279. + #CTYPE_=    ctype$(OBJ)
  280.   #LIBS=
  281.   #BIN=    a:
  282.   #CC=    cc -M2m -dos -F 4000
  283.   #CFLAGS=    -O -DCS_IBMPC -DCS_SPECIAL -DINTERNAL_TAGS -Dvolatile= -Dconst=
  284. + #LARGE=
  285.   #SMALL=
  286.   #OF=    -o ""
  287. + #OBF=
  288.   #RF=    -c
  289.   #EVAL=
  290.   #PROGS1=    elvis$(EXE) ex$(COM) ctags$(COM) ref$(COM) elvrec$(COM)
  291. ***************
  292. *** 309,321 ****
  293. --- 378,393 ----
  294.   #COM=    .ttp
  295.   #EXTRA=    sysdos$(OBJ) tinytcap$(OBJ)
  296.   #EXTRA2=    atari$(OBJ)
  297. + #CTYPE_=    ctype$(OBJ)
  298.   #LIBS=
  299.   #BIN=    c:\ #
  300.   #CC=    cc -VPEEP
  301.   ##CC=    gcc -s
  302.   #CFLAGS=    -O -DCS_IBMPC -DCS_SPECIAL
  303. + #LARGE=
  304.   #SMALL=
  305.   #OF=    -o 
  306. + #OBF=
  307.   #RF=    -c
  308.   #EVAL=
  309.   #PROGS=    elvis$(EXE) ctags$(COM) ref$(COM) elvrec$(COM) wildcard$(COM) \
  310. ***************
  311. *** 334,346 ****
  312. --- 406,421 ----
  313.   #COM=
  314.   #EXTRA=    tinyprnt$(OBJ)
  315.   #EXTRA2=    osk$(OBJ)
  316. + #CTYPE_=    ctype$(OBJ)
  317.   #LIBS=    -l=/dd/lib/termlib.l
  318.   #BIN=    /dd/usr/cmds
  319.   #CC=    cc
  320.   #ODIR=    /dd/usr/src/elvis
  321.   #CFLAGS=    -gq -m=2 -DNO_CURSORSHAPE
  322. + #LARGE=
  323.   #SMALL=
  324.   #OF=    -f=$(ODIR)/
  325. + #OBF=
  326.   #RF=    -r
  327.   #EVAL=
  328.   #PROGS=    elvis$(EXE) vi$(COM) view$(COM) input$(COM) ctags$(COM) ref$(COM) \
  329. ***************
  330. *** 366,377 ****
  331. --- 441,455 ----
  332.   #COM=    .exe
  333.   #EXTRA=    tinytcap$(OBJ)
  334.   #EXTRA2=    vmsio$(OBJ)
  335. + #CTYPE_=    ctype$(OBJ)
  336.   #LIBS=
  337.   #BIN
  338.   #CC=    cc
  339.   #CFLAGS=    /define=NO_CURSORSHAPE /define=INTERNAL_TAGS
  340. + #LARGE=
  341.   #SMALL=
  342.   #OF=    /exe=
  343. + #OBF=
  344.   #RF=
  345.   #PROGS=    elvis.exe elvprsv.exe elvrec.exe ctags.exe ref.exe
  346.   #CHMEM=
  347. ***************
  348. *** 418,423 ****
  349. --- 496,503 ----
  350.   SRC8=    ctype.c ctype.h borland.h novice.rc prsvdos.c prsvunix.c \
  351.       vmsbuild.com vmsio.c vmslink.opt vmsread.me vmssetup.com vmswild.c \
  352.       amiga.c amiprsv.c amistat.h amisysio.c amitty.c amiwild.c
  353. + #
  354. + # GRR: NEED TO ADD os2.c AND elvis.def IN HERE SOMEWHERE...
  355.   
  356.   ###########################################################################
  357.   all: $(PROGS)
  358. ***************
  359. *** 450,464 ****
  360.   shell$(COM): $(CFG) shell.c
  361.       $(CC) $(CFLAGS) $(SMALL) $(OF)shell$(COM) shell.c
  362.   
  363. ! wildcard$(COM): $(CFG) wildcard.c
  364. !     $(CC) $(CFLAGS) $(SMALL) $(OF)wildcard$(COM) wildcard.c ctype$(OBJ)
  365.   
  366.   fmt$(COM): $(CFG) fmt.c
  367.       $(CC) $(CFLAGS) $(SMALL) $(OF)fmt$(COM) fmt.c $(EXTRA2)
  368.   
  369. ! elvprsv$(COM): $(CFG) elvprsv.c amiprsv.c prsvunix.c prsvdos.c wildcard.c
  370. !     $(CC) $(CFLAGS) $(SMALL) $(OF)elvprsv$(COM) elvprsv.c ctype$(OBJ)
  371.   
  372.   ##############################################################################
  373.   # "It all depends..."
  374.   
  375. --- 530,547 ----
  376.   shell$(COM): $(CFG) shell.c
  377.       $(CC) $(CFLAGS) $(SMALL) $(OF)shell$(COM) shell.c
  378.   
  379. ! wildcard$(COM): $(CFG) wildcard.c $(CTYPE_)
  380. !     $(CC) $(CFLAGS) $(SMALL) $(OF)wildcard$(COM) wildcard.c $(CTYPE_)
  381.   
  382.   fmt$(COM): $(CFG) fmt.c
  383.       $(CC) $(CFLAGS) $(SMALL) $(OF)fmt$(COM) fmt.c $(EXTRA2)
  384.   
  385. ! elvprsv$(COM): $(CFG) elvprsv.c amiprsv.c prsvunix.c prsvdos.c wildcard.c $(CTYPE_)
  386. !     $(CC) $(CFLAGS) $(SMALL) $(OF)elvprsv$(COM) elvprsv.c $(CTYPE_)
  387.   
  388. + ctype_$(OBJ): $(CFG) ctype.c ctype.h
  389. +     $(CC) $(CFLAGS) $(SMALL) $(RF) $(OBF)ctype_$(OBJ) ctype.c
  390.   ##############################################################################
  391.   # "It all depends..."
  392.   
  393. ***************
  394. *** 473,478 ****
  395. --- 556,563 ----
  396.       $(CHMEM)
  397.       @touch $@
  398.   
  399. + linkelv.dos: linkelv.$(CC)
  400.   # elvis executable compilation rule for: all unix, os9, tos, msc dos
  401.   linkelv.unx linkelv.tos linkelv.os9 linkelv.cl: $(OBJS) $(EXTRA) $(EXTRA2)
  402.       $(CC) $(CFLAGS) $(OF)elvis$(EXE) $(OBJS) $(EXTRA) $(EXTRA2) $(LIBS)
  403. ***************
  404. *** 479,491 ****
  405.       $(CHMEM)
  406.       @touch $@
  407.   
  408. - linkelv.dos: linkelv.$(CC)
  409.   # elvis executable compilation rule for: borland tcc, bcc
  410.   linkelv.bcc linkelv.tcc: $(CFG) $(OBJS) $(EXTRA) $(EXTRA2)
  411.       $(CC) $(CFLAGS) $(LIBS)
  412.       @echo done > linkelv.$(CC)
  413.   
  414.   linkelv.vms: $(OBJS) $(EXTRA) $(EXTRA2)
  415.       link$(OF)elvis.exe main,$(CFG)/opt
  416.   
  417. --- 564,579 ----
  418.       $(CHMEM)
  419.       @touch $@
  420.   
  421.   # elvis executable compilation rule for: borland tcc, bcc
  422.   linkelv.bcc linkelv.tcc: $(CFG) $(OBJS) $(EXTRA) $(EXTRA2)
  423.       $(CC) $(CFLAGS) $(LIBS)
  424.       @echo done > linkelv.$(CC)
  425.   
  426. + # elvis executable compilation rule for: msc OS/2
  427. + linkelv.os2: $(CFG) $(OBJS) $(EXTRA) $(EXTRA2)
  428. +     $(CC) $(LARGE) $(LFLAGS) $(OF)elvis$(EXE) $(OBJS) $(EXTRA) $(EXTRA2) $(LIBS)
  429. +     @echo done > linkelv.os2
  430.   linkelv.vms: $(OBJS) $(EXTRA) $(EXTRA2)
  431.       link$(OF)elvis.exe main,$(CFG)/opt
  432.   
  433. ***************
  434. *** 513,518 ****
  435. --- 601,610 ----
  436.   linkex.unx linkex.tos linkex.xdos linkex.dos linkex.vms: $(CFG) alias.c
  437.       $(CC) $(CFLAGS) $(SMALL) $(OF)ex$(COM) alias.c
  438.   
  439. + linkex.os2: $(CFG) alias.c elvis.def
  440. +     $(CC) $(CFLAGS) $(SMALL) $(OF)ex$(COM) alias.c elvis.def
  441. +     @echo done > $@
  442.   linkex.os9: $(DUMMY)
  443.       @echo done >/nil
  444.   
  445. ***************
  446. *** 519,524 ****
  447. --- 611,620 ----
  448.   linkvi.ami linkvi.unx linkvi.tos linkvi.xdos linkvi.dos linkvi.vms: ex$(COM)
  449.       $(CP) ex$(COM) vi$(COM)
  450.   
  451. + linkvi.os2: ex$(COM)
  452. +     $(CP) ex$(COM) vi$(COM)
  453. +     @echo done > $@
  454.   linkvi.os9: alias.r
  455.       $(CC) $(CFLAGS) $(OF)vi$(COM) alias.r
  456.       @touch $@
  457. ***************
  458. *** 526,531 ****
  459. --- 622,631 ----
  460.   linkview.ami linkview.unx linkview.tos linkview.xdos linkview.dos linkview.vms: ex$(COM)
  461.       $(CP) ex$(COM) view$(COM)
  462.   
  463. + linkview.os2: ex$(COM)
  464. +     $(CP) ex$(COM) view$(COM)
  465. +     @echo done > $@
  466.   linkview.os9: alias.r
  467.       $(CC) $(CFLAGS) $(OF)view$(COM) alias.r
  468.       @touch $@
  469. ***************
  470. *** 533,538 ****
  471. --- 633,642 ----
  472.   linkinput.ami linkinput.unx linkinput.tos linkinput.xdos linkinput.dos linkinput.vms: ex$(COM)
  473.       $(CP) ex$(COM) input$(COM)
  474.   
  475. + linkinput.os2: ex$(COM)
  476. +     $(CP) ex$(COM) input$(COM)
  477. +     @echo done > $@
  478.   linkinput.os9: alias.r
  479.       $(CC) $(CFLAGS) $(OF)input$(COM) alias.r
  480.       @touch $@
  481. ***************
  482. *** 564,570 ****
  483.       @echo ::: YOU STILL NEED TO EDIT THE /ETC/RC FILE, OR WHATEVER,
  484.       @echo ::: TO HAVE TEMP FILES BE PRESERVED AFTER A SYSTEM CRASH.
  485.   
  486. ! inst.dos: $(DUMMY)
  487.       for %a in ($(PROGS1)) do copy %a $(BIN)
  488.       for %a in ($(PROGS2)) do copy %a $(BIN)
  489.       $(CP) $(BIN)\ex$(COM) $(BIN)\vi$(COM)
  490. --- 668,674 ----
  491.       @echo ::: YOU STILL NEED TO EDIT THE /ETC/RC FILE, OR WHATEVER,
  492.       @echo ::: TO HAVE TEMP FILES BE PRESERVED AFTER A SYSTEM CRASH.
  493.   
  494. ! inst.dos inst.os2: $(DUMMY)
  495.       for %a in ($(PROGS1)) do copy %a $(BIN)
  496.       for %a in ($(PROGS2)) do copy %a $(BIN)
  497.       $(CP) $(BIN)\ex$(COM) $(BIN)\vi$(COM)
  498. ***************
  499. *** 609,615 ****
  500.   clob.unx clob.tos clob.os9 clob.xdos clob.vms: $(DUMMY)
  501.       $(RM) tags refs $(PROGS)
  502.   
  503. ! clob.dos : $(DUMMY)
  504.       for %a in ($(PROGS1)) do $(RM) %a
  505.       for %a in ($(PROGS2)) do $(RM) %a
  506.       for %a in (tags refs) do $(RM) %a
  507. --- 713,719 ----
  508.   clob.unx clob.tos clob.os9 clob.xdos clob.vms: $(DUMMY)
  509.       $(RM) tags refs $(PROGS)
  510.   
  511. ! clob.dos clob.os2: $(DUMMY)
  512.       for %a in ($(PROGS1)) do $(RM) %a
  513.       for %a in ($(PROGS2)) do $(RM) %a
  514.       for %a in (tags refs) do $(RM) %a
  515. diff -cs old/config.h new/config.h
  516. *** old/config.h    Sun Apr  5 14:02:46 1992
  517. --- new/config.h    Sun Jun  7 11:55:38 1992
  518. ***************
  519. *** 42,48 ****
  520.   #   define COMPILED_BY    "IBM C/2 1.00"
  521.   #  else
  522.   #   define MICROSOFT    1
  523. ! #   define COMPILED_BY    "Microsoft C 5.10"
  524.   #  endif
  525.   # endif
  526.   #endif
  527. --- 42,58 ----
  528.   #   define COMPILED_BY    "IBM C/2 1.00"
  529.   #  else
  530.   #   define MICROSOFT    1
  531. ! #   ifdef _MSC_VER
  532. ! #    if (_MSC_VER == 700)
  533. ! #     define COMPILED_BY    "Microsoft C 7.00"
  534. ! #    else
  535. ! #     if (_MSC_VER == 600)
  536. ! #      define COMPILED_BY    "Microsoft C 6.00"
  537. ! #     else
  538. ! #      define COMPILED_BY    "Microsoft C 5.10"
  539. ! #     endif
  540. ! #    endif
  541. ! #   endif /* _MSC_VER */
  542.   #  endif
  543.   # endif
  544.   #endif
  545. ***************
  546. *** 104,112 ****
  547.   #endif
  548.   
  549.   #ifndef    MSDOS
  550. ! # define MSDOS    0        /* PC        */
  551.   #endif
  552.   
  553.   #ifndef    TOS
  554.   # define TOS    0        /* Atari ST    */
  555.   #endif
  556. --- 114,126 ----
  557.   #endif
  558.   
  559.   #ifndef    MSDOS
  560. ! # define MSDOS    0        /* PC DOS */
  561.   #endif
  562.   
  563. + #ifndef    OS2
  564. + # define OS2    0        /* PC OS/2 */
  565. + #endif
  566.   #ifndef    TOS
  567.   # define TOS    0        /* Atari ST    */
  568.   #endif
  569. ***************
  570. *** 194,200 ****
  571.    * just a macro...
  572.    */
  573.   #if !TOS && !AMIGA
  574. ! # define ttywrite(buf, len)    write(1, buf, (unsigned)(len))    /* raw write */
  575.   #endif
  576.   
  577.   /* The strchr() function is an official standard now, so everybody has it
  578. --- 208,218 ----
  579.    * just a macro...
  580.    */
  581.   #if !TOS && !AMIGA
  582. ! # if OS2 && defined(FASTPUT)
  583. ! #  define ttywrite(buf, len)    VioWrtTTY(buf, (USHORT)(len), 0)
  584. ! # else
  585. ! #  define ttywrite(buf, len)    write(1, buf, (unsigned)(len))    /* raw write */
  586. ! # endif
  587.   #endif
  588.   
  589.   /* The strchr() function is an official standard now, so everybody has it
  590. diff -cs old/curses.c new/curses.c
  591. *** old/curses.c    Sun Apr  5 14:02:56 1992
  592. --- new/curses.c    Sun Jun  7 11:46:56 1992
  593. ***************
  594. *** 193,199 ****
  595.        */
  596.       if (!termtype)
  597.       {
  598. ! #ifdef RAINBOW
  599.           if (*(unsigned char far*)(0xffff000eL) == 6   /* Rainbow 100a */
  600.            || *(unsigned char far*)(0xffff000eL) == 148)/* Rainbow 100b */
  601.           {
  602. --- 193,199 ----
  603.        */
  604.       if (!termtype)
  605.       {
  606. ! #if RAINBOW
  607.           if (*(unsigned char far*)(0xffff000eL) == 6   /* Rainbow 100a */
  608.            || *(unsigned char far*)(0xffff000eL) == 148)/* Rainbow 100b */
  609.           {
  610. ***************
  611. *** 204,212 ****
  612.               termtype = "pcbios";
  613.       }
  614.       if (!strcmp(termtype, "pcbios"))
  615. ! #else
  616.       if (!termtype)
  617. ! #endif
  618.       {
  619.   #if ANY_UNIX
  620.           write(2, "Environment variable TERM must be set\n", (unsigned)38);
  621. --- 204,212 ----
  622.               termtype = "pcbios";
  623.       }
  624.       if (!strcmp(termtype, "pcbios"))
  625. ! #else /* !MSDOS */
  626.       if (!termtype)
  627. ! #endif /* ?MSDOS */
  628.       {
  629.   #if ANY_UNIX
  630.           write(2, "Environment variable TERM must be set\n", (unsigned)38);
  631. ***************
  632. *** 276,281 ****
  633. --- 276,284 ----
  634.   #if AMIGA
  635.       amiclosewin();
  636.   #endif
  637. + #if OS2
  638. +     v_vio_restore();
  639. + #endif
  640.   }
  641.   
  642.   
  643. ***************
  644. *** 342,348 ****
  645.   #if MSDOS
  646.       raw_set_stdio(FALSE);
  647.   #endif
  648.   #if VMS
  649.       VMS_read_raw = 0;
  650.   #endif
  651. --- 345,350 ----
  652. ***************
  653. *** 776,782 ****
  654.           COLS = tgetnum("co");
  655.       }
  656.   #if MSDOS
  657. ! # ifdef RAINBOW
  658.       if (!strcmp(termtype, "rainbow"))
  659.       {
  660.           /* Determine whether Rainbow is in 80-column or 132-column mode */
  661. --- 778,787 ----
  662.           COLS = tgetnum("co");
  663.       }
  664.   #if MSDOS
  665. ! # if OS2
  666. !     v_vio_init(&lines, &cols);    /* also saves current state */
  667. ! # else /* !OS2 */
  668. ! #  if RAINBOW
  669.       if (!strcmp(termtype, "rainbow"))
  670.       {
  671.           /* Determine whether Rainbow is in 80-column or 132-column mode */
  672. ***************
  673. *** 783,793 ****
  674.           cols = *(unsigned char far *)0xee000f57L;
  675.       }
  676.       else
  677. ! # endif
  678.       {
  679.           lines = v_rows();
  680.           cols = v_cols();
  681.       }
  682.   #endif
  683.       if (lines >= 2 && cols >= 30)
  684.       {
  685. --- 788,799 ----
  686.           cols = *(unsigned char far *)0xee000f57L;
  687.       }
  688.       else
  689. ! #  endif
  690.       {
  691.           lines = v_rows();
  692.           cols = v_cols();
  693.       }
  694. + # endif /* ?OS2 */
  695.   #endif
  696.       if (lines >= 2 && cols >= 30)
  697.       {
  698. diff -cs old/curses.h new/curses.h
  699. *** old/curses.h    Sun Apr  5 14:03:08 1992
  700. --- new/curses.h    Tue Jun  9 23:59:44 1992
  701. ***************
  702. *** 30,35 ****
  703. --- 30,45 ----
  704.   extern void    v_move();
  705.   #endif
  706.   
  707. + #if OS2
  708. +   extern void    v_vio_init();
  709. +   extern void    v_vio_restore();
  710. + # ifndef GOT_OS2_H
  711. + #  define INCL_VIO
  712. + #  define INCL_NOPM
  713. + #  include <os2.h>
  714. + # endif
  715. + #endif
  716.   /* faddch() is a function.  a pointer to it is passed to tputs() */
  717.   extern int    faddch();
  718.   
  719. ***************
  720. *** 268,274 ****
  721.   
  722.   /* (pseudo)-Curses-functions */
  723.   
  724. ! #ifdef lint
  725.   # define _addCR        VOIDBIOS(;, (stdscr[-1] == '\n' ? qaddch('\r') : (stdscr[-1] = '\n')))
  726.   #else
  727.   # if OSK
  728. --- 278,284 ----
  729.   
  730.   /* (pseudo)-Curses-functions */
  731.   
  732. ! #ifdef lint        /* _addCR only used in addstr() macro */
  733.   # define _addCR        VOIDBIOS(;, (stdscr[-1] == '\n' ? qaddch('\r') : (stdscr[-1] = '\n')))
  734.   #else
  735.   # if OSK
  736. ***************
  737. *** 281,295 ****
  738.   #ifdef AZTEC_C
  739.   # define qaddch(ch)    CHECKBIOS(v_put(ch), (*stdscr = (ch), *stdscr++))
  740.   #else
  741. ! #define qaddch(ch)    CHECKBIOS(v_put(ch), (*stdscr++ = (ch)))
  742.   #endif
  743.   
  744.   #if OSK
  745. ! #define addch(ch)    if (qaddch(ch) == '\n') qaddch('\l'); else
  746.   #else
  747. ! #define addch(ch)    if (qaddch(ch) == '\n') qaddch('\r'); else
  748.   #endif
  749.   
  750.   extern void initscr();
  751.   extern void endwin();
  752.   extern void suspend_curses();
  753. --- 291,313 ----
  754.   #ifdef AZTEC_C
  755.   # define qaddch(ch)    CHECKBIOS(v_put(ch), (*stdscr = (ch), *stdscr++))
  756.   #else
  757. ! # define qaddch(ch)    CHECKBIOS(v_put(ch), (*stdscr++ = (ch)))
  758.   #endif
  759.   
  760.   #if OSK
  761. ! # define addch(ch)    if (qaddch(ch) == '\n') qaddch('\l'); else
  762.   #else
  763. ! # define addch(ch)    if (qaddch(ch) == '\n') qaddch('\r'); else
  764.   #endif
  765.   
  766. + #if (OS2 && defined(FASTPUT))
  767. + # define QADDCH(ch)    (*stdscr++ = (ch))
  768. + # define ADDCH(ch)    if (QADDCH(ch) == '\n') QADDCH('\r'); else
  769. + #else
  770. + # define QADDCH        qaddch
  771. + # define ADDCH        addch
  772. + #endif
  773.   extern void initscr();
  774.   extern void endwin();
  775.   extern void suspend_curses();
  776. ***************
  777. *** 317,319 ****
  778. --- 335,344 ----
  779.   #define noraw()
  780.   #define noecho()
  781.   #define nocbreak()
  782. + #if OS2
  783. + # define v_move(x,y)    VioSetCurPos((USHORT)(y), (USHORT)(x), 0)
  784. + # define audiobeep()    DosBeep(800, 32)
  785. + #else
  786. + # define audiobeep()    ttywrite("\007", 1)
  787. + #endif
  788. diff -cs old/elvprsv.c new/elvprsv.c
  789. *** old/elvprsv.c    Sun Apr  5 14:02:44 1992
  790. --- new/elvprsv.c    Tue Jun  9 20:56:12 1992
  791. ***************
  792. *** 49,54 ****
  793. --- 49,58 ----
  794.    *                    - tell user that file was preserved
  795.    */
  796.   
  797. + #if OS2
  798. + # define GOT_OS2_H    /* don't need video */
  799. + #endif
  800.   #include <stdio.h>
  801.   #include "config.h"
  802.   #include "vi.h"
  803. diff -cs old/redraw.c new/redraw.c
  804. *** old/redraw.c    Sun Apr  5 14:03:24 1992
  805. --- new/redraw.c    Sun Jun  7 12:16:00 1992
  806. ***************
  807. *** 395,400 ****
  808. --- 395,406 ----
  809.           clrtoeol();
  810.   #endif
  811.   
  812. +     /* OS/2 NOTE:  from here to OS2 ifdef, use ttywrite-like screen
  813. +      * updates if FASTPUT also defined (lose attributes, gain 9x speed)
  814. +      * --that is, save text in array and write whole line at once via
  815. +      * VioWrtTTY(), rather than one character at a time via v_put().
  816. +      */
  817.       /* skip stuff that was scrolled off left edge */
  818.       for (col = 0;
  819.            (i = *text) && col < limitcol; /* yes, ASSIGNMENT! */
  820. ***************
  821. *** 462,468 ****
  822.       /* adjust for control char that was partially visible */
  823.       while (col > limitcol)
  824.       {
  825. !         qaddch(' ');
  826.           limitcol++;
  827.       }
  828.   
  829. --- 468,474 ----
  830.       /* adjust for control char that was partially visible */
  831.       while (col > limitcol)
  832.       {
  833. !         QADDCH(' ');
  834.           limitcol++;
  835.       }
  836.   
  837. ***************
  838. *** 492,498 ****
  839.               i = col + tabstop - (col % tabstop);
  840.               do
  841.               {
  842. !                 qaddch(' ');
  843.                   col++;
  844.               } while (col < i);
  845.           }
  846. --- 498,504 ----
  847.               i = col + tabstop - (col % tabstop);
  848.               do
  849.               {
  850. !                 QADDCH(' ');
  851.                   col++;
  852.               } while (col < i);
  853.           }
  854. ***************
  855. *** 511,517 ****
  856.                   {
  857.                       do
  858.                       {
  859. !                         qaddch('\t');
  860.                           col += 8; /* not exact! */
  861.                       } while (col < i);
  862.                       col = i; /* NOW it is exact */
  863. --- 517,523 ----
  864.                   {
  865.                       do
  866.                       {
  867. !                         QADDCH('\t');
  868.                           col += 8; /* not exact! */
  869.                       } while (col < i);
  870.                       col = i; /* NOW it is exact */
  871. ***************
  872. *** 520,526 ****
  873.                   {
  874.                       do
  875.                       {
  876. !                         qaddch(' ');
  877.                           col++;
  878.                       } while (col < i);
  879.                   }
  880. --- 526,532 ----
  881.                   {
  882.                       do
  883.                       {
  884. !                         QADDCH(' ');
  885.                           col++;
  886.                       } while (col < i);
  887.                   }
  888. ***************
  889. *** 530,536 ****
  890.                   col = limitcol;
  891.                   if (has_AM)
  892.                   {
  893. !                     addch('\n');    /* GB */
  894.                   }
  895.               }
  896.           }
  897. --- 536,542 ----
  898.                   col = limitcol;
  899.                   if (has_AM)
  900.                   {
  901. !                     ADDCH('\n');    /* GB */
  902.                   }
  903.               }
  904.           }
  905. ***************
  906. *** 537,546 ****
  907.           else if (i >= 0 && i < ' ' || i == '\177')
  908.           {
  909.               col += 2;
  910. !             qaddch('^');
  911.               if (col <= limitcol)
  912.               {
  913. !                 qaddch(i ^ '@');
  914.               }
  915.           }
  916.   #ifndef NO_CHARATTR
  917. --- 543,552 ----
  918.           else if (i >= 0 && i < ' ' || i == '\177')
  919.           {
  920.               col += 2;
  921. !             QADDCH('^');
  922.               if (col <= limitcol)
  923.               {
  924. !                 QADDCH(i ^ '@');
  925.               }
  926.           }
  927.   #ifndef NO_CHARATTR
  928. ***************
  929. *** 575,584 ****
  930.           else
  931.           {
  932.               col++;
  933. !             qaddch(i);
  934.           }
  935.       }
  936.   
  937.       /* get ready for the next line */
  938.   #ifndef NO_CHARATTR
  939.       if (abnormal)
  940. --- 581,598 ----
  941.           else
  942.           {
  943.               col++;
  944. !             QADDCH(i);
  945.           }
  946.       }
  947.   
  948. + #if (OS2 && defined(FASTPUT))    /* like w{q}refresh() */
  949. +     if (stdscr != kbuf)
  950. +     {
  951. +         VioWrtTTY(kbuf, (USHORT)(stdscr-kbuf), 0);
  952. +         stdscr = kbuf;
  953. +     }
  954. + #endif    /* OS/2 NOTE:  end of ttywrite-style updates for OS/2 */
  955.       /* get ready for the next line */
  956.   #ifndef NO_CHARATTR
  957.       if (abnormal)
  958. ***************
  959. *** 803,813 ****
  960. --- 817,833 ----
  961.           }
  962.   
  963.           /* show the new line */
  964. + #if OS2 && defined(FASTPUT)   /* GRR:  should add VioWrtCharStrAttr version */
  965. +         VioWrtTTY(new, (USHORT)(end-new), 0);
  966.           for (scan = new, build = old; scan < end; )
  967. +             *build++ = *scan++;
  968. + #else
  969. +         for (scan = new, build = old; scan < end; )
  970.           {
  971.               qaddch(*scan);
  972.               *build++ = *scan++;
  973.           }
  974. + #endif
  975.           if (end < new + COLS - (*o_number ? 8 : 0))
  976.           {
  977.               clrtoeol();
  978. diff -cs old/sysdos.c new/sysdos.c
  979. *** old/sysdos.c    Sun Apr  5 14:02:36 1992
  980. --- new/sysdos.c    Wed Jun  3 23:01:54 1992
  981. ***************
  982. *** 56,63 ****
  983. --- 56,65 ----
  984.   {
  985.   #if MSDOS
  986.       char *cmdswitch="/c";
  987. + #if !OS2
  988.       if (_osmajor<4)
  989.           cmdswitch[0]=switchar();
  990. + #endif /* !OS2 */
  991.       return spawnle(P_WAIT, o_shell, o_shell, cmdswitch, cmd, (char *)0, environ);
  992.   #else
  993.       long    ssp;
  994. diff -cs old/tio.c new/tio.c
  995. *** old/tio.c    Sun Apr  5 14:03:32 1992
  996. --- new/tio.c    Sun Jun  7 12:12:44 1992
  997. ***************
  998. *** 330,336 ****
  999.       }
  1000.       else if (*o_errorbells)
  1001.       {
  1002. !         ttywrite("\007", 1);
  1003.       }
  1004.   
  1005.       /* discard any buffered input, and abort macros */
  1006. --- 330,336 ----
  1007.       }
  1008.       else if (*o_errorbells)
  1009.       {
  1010. !         audiobeep();
  1011.       }
  1012.   
  1013.       /* discard any buffered input, and abort macros */
  1014. Files old/vcmd.c and new/vcmd.c are identical
  1015. Files old/vi.c and new/vi.c are identical
  1016. diff -cs old/vi.h new/vi.h
  1017. *** old/vi.h    Sun Apr  5 14:03:40 1992
  1018. --- new/vi.h    Thu Jun  4 19:53:12 1992
  1019. ***************
  1020. *** 11,17 ****
  1021. --- 11,19 ----
  1022.   #define COPYING    "This version of ELVIS is freely redistributable."
  1023.   
  1024.   #include <errno.h>
  1025. + #if !(defined(_MSC_VER) && (_MSC_VER >= 600))  /* incompatible with MS C */
  1026.   extern int errno;
  1027. + #endif
  1028.   #if TOS && !defined(__GNUC__)
  1029.   #define ENOENT (-AEFILNF)
  1030.   #endif
  1031. diff -cs old/wildcard.c new/wildcard.c
  1032. *** old/wildcard.c    Sun Apr  5 14:02:38 1992
  1033. --- new/wildcard.c    Wed Jun 10 00:06:54 1992
  1034. ***************
  1035. *** 9,15 ****
  1036.    */
  1037.   
  1038.   /* this program implements wildcard expansion for elvis/dos. It works
  1039. !  * like UNIX echo, but uses the dos wildcard conventions
  1040.    * (*.* matches all files, * matches files without extension only,
  1041.    * filespecs may contain drive letters, wildcards not allowed in directory
  1042.    * names).
  1043. --- 9,15 ----
  1044.    */
  1045.   
  1046.   /* this program implements wildcard expansion for elvis/dos. It works
  1047. !  * like UNIX echo but uses the dos wildcard conventions
  1048.    * (*.* matches all files, * matches files without extension only,
  1049.    * filespecs may contain drive letters, wildcards not allowed in directory
  1050.    * names).
  1051. ***************
  1052. *** 24,57 ****
  1053.   #endif
  1054.   #include "ctype.h"
  1055.   #ifdef    __TURBOC__
  1056. ! #include <dir.h>
  1057.   #endif
  1058.   
  1059.   #ifdef    M_I86
  1060. ! #define    findfirst(a,b,c)    _dos_findfirst(a,c,b)
  1061. ! #define    findnext        _dos_findnext
  1062. ! #define    ffblk            find_t
  1063. ! #define    ff_name            name
  1064. ! #include <dos.h>
  1065.   #endif
  1066.   
  1067.   /* Atari TOS, MWC */
  1068.   #ifdef M68000
  1069. ! #include <stat.h>
  1070. ! #include <osbind.h>
  1071. ! #define    findfirst(a,b,c)    (Fsetdta(b), (Fsfirst(a,c)))
  1072. ! #define    findnext(x)        (Fsnext())
  1073. ! #define    ff_name    d_fname
  1074.   #endif
  1075.   
  1076.   /* Atari TOS, GNU-C */
  1077.   #ifdef __m68k__
  1078. ! #include <stat.h>
  1079. ! #include <osbind.h>
  1080. ! #define    findfirst(a,b,c)    (Fsetdta(b), (Fsfirst(a,c)))
  1081. ! #define    findnext(x)        (Fsnext())
  1082. ! #define    ff_name    dta_name
  1083. ! #define    DMABUFFER struct _dta
  1084.   #endif
  1085.   
  1086.   #define    MAXFILES    1000
  1087. --- 24,70 ----
  1088.   #endif
  1089.   #include "ctype.h"
  1090.   #ifdef    __TURBOC__
  1091. ! # include <dir.h>
  1092.   #endif
  1093.   
  1094.   #ifdef    M_I86
  1095. ! # if OS2
  1096. ! #  define INCL_NOPM
  1097. ! #  define INCL_DOS
  1098. ! #  include <os2.h>
  1099. !    HDIR hdir;            /* directory handle */
  1100. !    USHORT search;        /* count? */
  1101. ! #  define findfirst(a,b,c)    DosFindFirst(a,&hdir,c,b,sizeof(findbuf),&search,0L)
  1102. ! #  define findnext(b)        DosFindNext(hdir,b,sizeof(findbuf),&search)
  1103. ! #  define ffblk            FILEFINDBUF
  1104. ! #  define ff_name        achName
  1105. ! # else
  1106. ! #  define findfirst(a,b,c)    _dos_findfirst(a,c,b)
  1107. ! #  define findnext        _dos_findnext
  1108. ! #  define ffblk            struct find_t
  1109. ! #  define ff_name        name
  1110. ! #  include <dos.h>
  1111. ! # endif
  1112.   #endif
  1113.   
  1114.   /* Atari TOS, MWC */
  1115.   #ifdef M68000
  1116. ! # include <stat.h>
  1117. ! # include <osbind.h>
  1118. ! # define findfirst(a,b,c)    (Fsetdta(b), (Fsfirst(a,c)))
  1119. ! # define findnext(x)        (Fsnext())
  1120. ! # define ffblk            DMABUFFER
  1121. ! # define ff_name        d_fname
  1122.   #endif
  1123.   
  1124.   /* Atari TOS, GNU-C */
  1125.   #ifdef __m68k__
  1126. ! # include <stat.h>
  1127. ! # include <osbind.h>
  1128. ! # define findfirst(a,b,c)    (Fsetdta(b), (Fsfirst(a,c)))
  1129. ! # define findnext(x)        (Fsnext())
  1130. ! # define ffblk            struct _dta
  1131. ! # define ff_name        dta_name
  1132.   #endif
  1133.   
  1134.   #define    MAXFILES    1000
  1135. ***************
  1136. *** 101,113 ****
  1137.   {
  1138.       char *filespec;
  1139.       int wildcard=0;
  1140. ! #if defined(M68000) || defined(__m68k__)
  1141. !     DMABUFFER findbuf;
  1142. ! #else
  1143. !     struct ffblk findbuf;
  1144. ! #endif
  1145.       int err;
  1146. !     char buf[80];
  1147.       int lastn;
  1148.   
  1149.       strcpy(buf, name);
  1150. --- 114,122 ----
  1151.   {
  1152.       char *filespec;
  1153.       int wildcard=0;
  1154. !     ffblk findbuf;
  1155.       int err;
  1156. !     char buf[256];    /* OS/2:  256 allowed */
  1157.       int lastn;
  1158.   
  1159.       strcpy(buf, name);
  1160. ***************
  1161. *** 126,131 ****
  1162. --- 135,144 ----
  1163.       {
  1164.           lastn=nfiles;
  1165.           filespec++;
  1166. + #if OS2
  1167. +         hdir = HDIR_CREATE;
  1168. +         search = 1;
  1169. + #endif
  1170.           if ((err=findfirst(buf, &findbuf, 0))!=0)
  1171.               addfile(buf);
  1172.           while (!err)
  1173. ***************
  1174. *** 134,139 ****
  1175. --- 147,155 ----
  1176.               addfile(buf);
  1177.               err=findnext(&findbuf);
  1178.           }
  1179. + #if OS2
  1180. +         DosFindClose(hdir);
  1181. + #endif
  1182.           if (lastn!=nfiles)
  1183.               qsort(files+lastn, nfiles-lastn, sizeof(char *), pstrcmp);
  1184.       }
  1185.