-
Notifications
You must be signed in to change notification settings - Fork 39
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
build: modify echolib.bat to minimize environment use and args check #117
Conversation
jmalak
commented
Dec 23, 2024
- change to be similar as echoto.bat nethod
- no more then 10 parameters are used
- add arguments overflow check to echolib.bat
- add arguments overflow check to echoto.bat
- change to be similar as echoto.bat nethod - no more then 10 parameters are used - add arguments overflow check to echolib.bat - add arguments overflow check to echoto.bat
Hi @jmalak I'm currently trying to get TurboC 2.01 compiling again and have hit the max args with echoto.bat. Is it possible to save the 1st arg to a variable and shift, so getting to use one more arg? It seemed to work for me, but I'm not really understanding the environment space issue with dos and wouldn't like to recreate the original problem. ajb@calypso:/clients/common/fdos/freecom.git$ git show 770f500cdbd83d94223c48c5fdbbb19fd5d36c79
commit 770f500cdbd83d94223c48c5fdbbb19fd5d36c79
Author: Andrew Bird <ajb@spheresystems.co.uk>
Date: Sun Dec 22 00:54:09 2024 +0000
Build: Turbo C needs another arg from echoto
diff --git a/scripts/echoto.bat b/scripts/echoto.bat
index d792a4c..ddcae9a 100644
--- a/scripts/echoto.bat
+++ b/scripts/echoto.bat
@@ -1,4 +1,6 @@
@echo off
-if "%2%3%4%5%6%7%8%9" == "" goto nothing
-echo %2 %3 %4 %5 %6 %7 %8 %9 >>%1
+set FILE=%1
+shift
+if "%1%2%3%4%5%6%7%8%9" == "" goto nothing
+echo %1 %2 %3 %4 %5 %6 %7 %8 %9 >> %FILE%
:nothing |
I am also not remembering on original problem now. |
Okay, I've changed things here to use two CFLAGS variables, and updated the ${COMPILER}.mak files (there are others apart from tc2) |
If I remember properly then TC is combination of turboc.cfg file and command line. |
I'm seeing a slight problem with this and Turbo C 2.01. The old script produced this
whereas the new produces
TLINK then complains about unexpected character 'a' |
add missing (+) character for module files
for now it will be best to return echolib.bat to original version. |