Hallo Herr Tom Ehlert,

that syntax is unfortunately incompatible with FreeCOM itself and
COMMAND.COM too. How about this:
===

@echo off
set FILE=%1
set STR=+%2
rem read-only environment variable in cmd.exe (ignored there)
set CmdExtVersion=

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

if "%CmdExtVersion%" == "" goto commandcom

rem in cmd.exe CmdExtVersion is set to either 1 or 2.
echo %STR% ^&>> %FILE%

goto theend

:commandcom
set STR=%STR% &

echo %STR%>> %FILE%

:theend


==
as for stack growing down to heap I think the compiler's stack
checking / malloc returning NULL should take care of that..

Bart


On 5 February 2018 at 10:47, Tom Ehlert <t...@drivesnapshot.de> wrote:
> Hallo Herr Bart Oldeman,
>
> am 5. Februar 2018 um 11:06 schrieben Sie:
>
>> Hi Matej,
>
>> thanks for the feedback. I reproduced the issue with DIRCMD=/OGN/LFN.
>> It doesn't happen with the GCC compiled version either. I'll need to
>> debug this a bit.
>> OW has heap after stack unlike the other compilers, which have stack
>> after heap. Stack after heap allows a bit of flexibility as the two
>> grow to each other, so perhaps it's just that the heap is too small.
> if it's trashing the stack, this should be detected somehow, and
> printing some diagnostic message.
>
>
>> I'll let you know.
>
> for TCPP and Windows, please replace in ECHOLIB.BAT
>
>        ...
>        set STR=%STR% &
>
>        echo %STR%>> %FILE%
> by
>
>        echo %STR% ^&>> %FILE%
>
>
> as a standalone '&' has special meaning for Windows CMD and gets eaten
>
> otherwise TCPP builds out of the box (something that wasn't possible
> for ~10 years). compliments.
>
> Tom
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Freedos-devel mailing list
> Freedos-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/freedos-devel

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel

Reply via email to