On Thu, Mar 20, 2025 at 4:57 PM tom ehlert via Freedos-user
<freedos-user@lists.sourceforge.net> wrote:
>
> Hallo Herr Jim Hall via Freedos-user,
>
> am Donnerstag, 20. März 2025 um 20:28 schrieben Sie:
>
> > Definitely that first line is too long (I counted 530 characters) so
> > that's what's causing the error. And as Jerome said, if you break up
> > the first line into separate ECHO statements, that will prevent the
> > "line too long" error.
>
> So it looks like you discovered a bug in FreeCOM:
> this script was most likely created for MSDOS, and didn't throw error 
> messages.
>
> time to change FreeCOM's end of line detection method.
>
> Thanks for reporting the bug.
>
> Tom
>

The batch file as provided doesn't seem to be the actual one being
ran, or it is poorly written.  The ECHO OFF 1) ... if not exceeding
line length will display "OFF 1) ..." and continue to ECHO all
subsequent commands.

This is not a bug [error] in FreeCOM but apparently a design decision
that can cause compatibility issues.  FreeCOM will read a line and
look for the terminating newline.  If it doesn't find it then it
assumes the line is too long and aborts. MS-DOS 6, from a quick test,
when displaying the executing commands only shows the 1st 127
characters of any line in a batch file, so it looks like it reads up
to 127 characters per line and ignores the rest of the line.

If anyone wants to change FreeCOM to behave more like MS-DOS
command.com, look at the readbatchline() function in shell\batch.c and
make changes there.  Note: this function also performs FOR loops and
possibly other context specific work.

Jeremy


_______________________________________________
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user

Reply via email to