Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tc build fixes 01 #125

Merged
merged 8 commits into from
Dec 27, 2024
23 changes: 23 additions & 0 deletions ci_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,27 @@ cp config.std config.mak
dosemu -td -q -K . -E "build.bat wc"
mv -i command.com _output/wc_dos/english/.

# Turbo C 2.01 (DOS) (slow so just Spanish)
if [ -d ${HOME}/.dosemu/drive_c/tc201 ] ; then
export LNG=spanish

mkdir -p _output/tc2_dos/${LNG}
git clean -q -x -d -f -e _output -e _watcom -e _downloads
{
echo set LNG=${LNG}

echo set COMPILER=TC2
echo set TC2_BASE='C:\\tc201'
echo set XNASM=nasm
echo set XUPX=upx --8086 --best
echo set OLDPATH=%PATH%
echo set PATH='%TC2_BASE%;C:\\devel\\nasm;C:\\bin;%WATCOM%\\binw;%OLDPATH%'
} | unix2dos > config.bat

cp config.std config.mak

dosemu -td -q -K . -E "build.bat"
mv -i command.com _output/tc2_dos/${LNG}/.
fi

echo done
2 changes: 1 addition & 1 deletion include/cswap.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ extern unsigned char far dosCMDNAME[128];

extern int cdecl XMSexec(void);

#ifdef __WATCOMC__
#if defined(__WATCOMC__)
typedef unsigned long xmsfunc(unsigned request, unsigned dx, void *si);
#pragma aux xmsfunc = parm [ax] [dx] [si] modify [bx cx]
extern xmsfunc far *far XMSdriverAdress;
Expand Down
2 changes: 1 addition & 1 deletion include/resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ typedef struct { /* type of a control area */
#include "algndflt.h"

typedef int (*res_callbackp_t)(res_majorid_t, res_minorid_t
, unsigned long, int, void *);
, unsigned long, int, void * const);

#define RES_COOKIE "FREECOM "

Expand Down
179 changes: 91 additions & 88 deletions lib/makefile.mak
Original file line number Diff line number Diff line change
Expand Up @@ -36,134 +36,134 @@ OBJ4 = critend.obj\
ctxt_adr.obj\
ctxt_as.obj\
ctxt_chg.obj\
ctxt_clr.obj\
ctxt_get.obj
OBJ5 = ctxt_inf.obj\
ctxt_clr.obj
OBJ5 = ctxt_get.obj\
ctxt_inf.obj\
ctxt_mk.obj\
ctxt_mkb.obj\
ctxt_mkn.obj\
ctxt_pop.obj\
ctxt_psh.obj\
ctxt_rnu.obj\
ctxt_set.obj
OBJ6 = ctxt_ss.obj\
ctxt_psh.obj
OBJ6 = ctxt_rnu.obj\
ctxt_set.obj\
ctxt_ss.obj\
ctxt_vw.obj\
curdatel.obj\
curtime.obj\
cwd.obj\
dateget.obj\
cwd.obj
OBJ7 = dateget.obj\
dateset.obj\
dbg_c.obj
OBJ7 = dbg_mem.obj\
dbg_c.obj\
dbg_mem.obj\
dbg_prnt.obj\
dbg_s.obj\
dbg_sn.obj\
devopen.obj\
dbg_sn.obj
OBJ8 = devopen.obj\
dfn_err.obj\
dispcnt.obj\
dispexit.obj
OBJ8 = drvnum.obj\
dispexit.obj\
drvnum.obj\
efct_001.obj\
exec.obj\
exec1.obj\
exec.obj
OBJ9 = exec1.obj\
farread.obj\
filecomp.obj\
fdattr.obj
OBJ9 = fdevopen.obj\
fdattr.obj\
fdevopen.obj\
fdsattr.obj\
fillcomp.obj\
find.obj\
fillcomp.obj
OBJ10 = find.obj\
freep.obj\
frsysblk.obj\
fstpcpy.obj\
gallstr.obj
OBJ10 = get1mcb.obj\
getenv.obj\
goxy.obj\
gallstr.obj\
get1mcb.obj\
getenv.obj
OBJ11 = goxy.obj\
grabfcom.obj\
gumblink.obj\
hdlrctxt.obj\
hist_get.obj\
hist_set.obj
OBJ11 = inputdos.obj\
is_empty.obj\
hist_set.obj\
inputdos.obj
OBJ12 = is_empty.obj\
is_fnamc.obj\
is_fnstr.obj\
is_pchr.obj\
isadev.obj\
keyprsd.obj\
kswap_c.obj
OBJ12 = lastdget.obj\
OBJ13 = lastdget.obj\
lastdset.obj\
leadopt.obj\
lfnfuncs.obj\
lowexec.obj\
ltrimcl.obj\
ltrimsp.obj\
lwr1wd.obj
OBJ13 = match.obj\
ltrimsp.obj
OBJ14 = lwr1wd.obj\
match.obj\
messages.obj\
mk_rddir.obj\
mktmpfil.obj\
msg_dflt.obj\
msg_dps.obj\
msg_fstr.obj\
msg_get.obj
OBJ14 = msg_gpt.obj\
msg_dps.obj
OBJ15 = msg_fstr.obj\
msg_get.obj\
msg_gpt.obj\
msg_mkey.obj\
msg_prmp.obj\
mux_ae.obj\
myperror.obj\
nls.obj\
myperror.obj
OBJ16 = nls.obj\
nls_date.obj\
nls_time.obj
OBJ15 = num_fmt.obj\
nls_time.obj\
num_fmt.obj\
onoff.obj\
openf.obj\
optsb.obj\
optsi.obj\
optsb.obj
OBJ17 = optsi.obj\
optss.obj\
parsenum.obj\
pr_date.obj
OBJ16 = pr_prmpt.obj\
pr_date.obj\
pr_prmpt.obj\
pr_time.obj\
prf.obj\
prprompt.obj\
prf.obj
OBJ18 = prprompt.obj\
readcmd.obj\
realnum.obj\
res.obj\
res_r.obj\
res_vald.obj
OBJ17 = res_w.obj\
resfile.obj\
res_vald.obj\
res_w.obj
OBJ19 = resfile.obj\
rmtmpfil.obj\
rtrimcl.obj\
rtrimsp.obj\
salloc.obj\
samefile.obj\
scancmd.obj
OBJ18 = scanopt.obj\
OBJ20 = scanopt.obj\
session.obj\
showcmds.obj\
skqwd.obj\
spfnam.obj\
split.obj\
sumblink.obj
OBJ19 = timeget.obj\
OBJ21 = timeget.obj\
timeset.obj\
tmpnam.obj\
trimcl.obj\
trimsp.obj\
truepath.obj\
truncate.obj\
txtlend.obj
OBJ20 = unquote.obj\
truncate.obj
OBJ22 = txtlend.obj\
unquote.obj\
vcgetch.obj\
vcgetstr.obj\
where.obj\
delay.obj
OBJ21 = err1.obj\
err2.obj\
delay.obj\
err1.obj
OBJ23 = err2.obj\
err3.obj\
err4.obj\
err5.obj\
Expand All @@ -172,78 +172,78 @@ OBJ21 = err1.obj\
err8.obj\
err9.obj\
err10.obj
OBJ22 = err11.obj\
OBJ24 = err11.obj\
err12.obj\
err13.obj\
err14.obj\
err15.obj\
err16.obj\
err17.obj\
err18.obj\
err19.obj\
err20.obj
OBJ23 = err21.obj\
err18.obj
OBJ25 = err19.obj\
err20.obj\
err21.obj\
err22.obj\
err23.obj\
err24.obj\
err25.obj\
err26.obj\
err27.obj\
err28.obj\
err27.obj
OBJ26 = err28.obj\
err29.obj\
err30.obj
OBJ24 = err31.obj\
err30.obj\
err31.obj\
err32.obj\
err33.obj\
err34.obj\
err35.obj\
err36.obj\
err37.obj\
err36.obj
OBJ27 = err37.obj\
err38.obj\
err39.obj\
err40.obj
OBJ25 = err41.obj\
err40.obj\
err41.obj\
err42.obj\
err43.obj\
err44.obj\
err45.obj\
err46.obj\
err45.obj
OBJ28 = err46.obj\
err47.obj\
err48.obj\
err49.obj\
err50.obj
OBJ26 = err51.obj\
err50.obj\
err51.obj\
err52.obj\
err53.obj\
err54.obj\
err55.obj\
err54.obj
OBJ29 = err55.obj\
err56.obj\
err57.obj\
err58.obj\
err59.obj\
err60.obj
OBJ27 = err61.obj\
err60.obj\
err61.obj\
err62.obj\
err63.obj\
err64.obj\
err63.obj
OBJ30 = err64.obj\
err65.obj\
err66.obj\
err67.obj\
err68.obj\
err69.obj\
err70.obj
OBJ28 = err71.obj\
err72.obj\
err73.obj\
err70.obj\
err71.obj\
err72.obj
OBJ31 = err73.obj\
err74.obj\
err75.obj\
err76.obj\
err77.obj\
err78.obj\
err79.obj\
err80.obj
OBJ29 = err81.obj\
err82.obj\
err80.obj\
err81.obj
OBJ32 = err82.obj\
err83.obj\
err84.obj\
err85.obj\
Expand All @@ -255,7 +255,7 @@ echolib.bat : ../scripts/echolib.bat

freecom.rsp : echolib.bat $(OBJ16) $(OBJ17) $(OBJ18) $(OBJ19) $(OBJ20) \
$(OBJ21) $(OBJ22) $(OBJ23) $(OBJ24) $(OBJ25) $(OBJ26) $(OBJ27) $(OBJ28) \
$(OBJ29) makefile.mak
$(OBJ29) $(OBJ30) $(OBJ31) $(OBJ32) makefile.mak
$(RMFILES) freecom.rsp
$(ECHOLIB) freecom.rsp $(OBJ1)
$(ECHOLIB) freecom.rsp $(OBJ2)
Expand Down Expand Up @@ -286,6 +286,9 @@ $(OBJ29) makefile.mak
$(ECHOLIB) freecom.rsp $(OBJ27)
$(ECHOLIB) freecom.rsp $(OBJ28)
$(ECHOLIB) freecom.rsp $(OBJ29)
$(ECHOLIB) freecom.rsp $(OBJ30)
$(ECHOLIB) freecom.rsp $(OBJ31)
$(ECHOLIB) freecom.rsp $(OBJ32)

freecom.lib : $(CFG) $(OBJ1) $(OBJ2) $(OBJ3) $(OBJ4) $(OBJ5) $(OBJ6) $(OBJ7) \
$(OBJ8) $(OBJ9) $(OBJ10) $(OBJ11) $(OBJ12) $(OBJ13) $(OBJ14) $(OBJ15) \
Expand Down
2 changes: 1 addition & 1 deletion lib/mk_rddir.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

static int optRecursiveMode, optQuiet;

//#define COMMAND_EXTENSIONS
/*#define COMMAND_EXTENSIONS*/
#ifdef COMMAND_EXTENSIONS
optScanFct(opt_md_rd)
{
Expand Down
17 changes: 12 additions & 5 deletions scripts/echolib.bat
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
@echo off
if "%2%3%4%5%6%7%8%9" == "" goto nothing
set FILE=%1
set STR=+%2

:loop
shift
if "%2" == "" goto end
set STR=%STR% +%2
goto loop
:end

set AMP=&
if "%AMP%" == "" set AMP=^^^&
echo %2 %3 %4 %5 %6 %7 %8 %9 %AMP%>>%1
shift
if not "%9" == "" echo echolib.bat arguments overflow
:nothing

echo %STR% %AMP%>> %FILE%
Loading