[syslinux] 5.10 DISPLAY files (and SAY directive) issues
Ady
ady-sf at hotmail.com
Thu Mar 21 23:06:02 PDT 2013
> On Thu, Mar 21, 2013 at 11:25 AM, Ady <ady-sf at hotmail.com> wrote:
> >
> >> On Thu, 2013-03-21 at 14:17 +0200, Ady wrote:
> >>
> >> > Note: in "help.txt", there are no initial nor ending blank lines.
> >> > After the last line:
> >> > " USE F1 TO TEST"
> >> > there is no additional LF/CR.
> >>
> >>
> >> > After booting with the above cfg file, the third "say" directive is
> >> > presented in the SAME row as the last line of "help.txt" (shown by
> >> > the DISPLAY directive), right after the last character of "help.txt"
> >> > (at least the SAY statement doesn't overwrite the last line of
> >> > "help.txt"). The expected behavior for the SAY directive should be to
> >> > present a new (next) line; right?
> >>
> >> No, what you describe is exactly the behavior I would expect. The
> >> DISPLAY directive prints only what is in the file. If there is no CRLF
> >> at the end of the last line, then none is printed, and the next output,
> >> whatever it is, picks up at that point. It is a feature, not a bug,
> >> that Syslinux does not imagine a newline where there wasn't one.
> >>
> >
> > You are talking about the content of the DISPLAY file. In this
> > particular case, I am talking about the SAY directive.
> >
> > When a SAY directive is about to print the message, the pseudo-code
> > should be: if the cursor is not at column 1, go to column 1 of the
> > next row before printing the message.
>
> Perhaps there would be a case for someone to want this behavior.
>
Which behavior? Currently, the conflicting row for this case is
displayed as:
" USE F1 TO TESTThis is the 1st ending "S A Y"
directive"
(without initial and ending quotation marks, and in one row)
and the expected behavior should be:
" USE F1 TO TEST"
"This is the 1st ending "S A Y" directive"
(without initial and ending quotation marks, and in two consecutive
rows)
so I don't really understand what would be a different desired
behavior for the SAY directive. Note that for this case the
correction should be about the SAY directive ("if the cursor is not
at column 1, go to column 1 of the next row before printing the
message of the SAY directive").
> >> > After booting with the above cfg file (and after noting the
> >> > aforementioned behavior), press F1. Note that the last line of
> >> > "help.txt" is now OVERWRITTEN by the "boot:" prompt. In this case,
> >> > the expected behavior for the F1-F12 keys should be to show the
> >> > "boot:" prompt (when the F1-F12 key was pressed while being in CLI)
> >> > right after the last character of the displayed "help.txt" file, in
> >> > the same line (so the already displayed text is not scrolled up and
> >> > its last line not overwritten either).
> >>
> >> I agree -- it sounds like a CR (but not LF) is being emitted just before
> >> the "boot:" prompt, even though there is not one in the file. That
> >> seems wrong.
> >>
> >
> > The behavior seems to be related to the "boot:" prompt.
> >
> > During 5.00 pre-releases, after a text was shown by means of the
> > DISPLAY directive, the "boot:" prompt used to go back to column 1,
> > overwriting the last displayed row of "help.txt". At some point
> > during the development, this was corrected for the DISPLAY directive,
> > by leaving (showing) the "boot:" prompt at the next column of the
> > same row after the last character of "help.txt".
> >
> > It would seem that a similar effect needs to be implemented for
> > F1-F12.
>
> I'm pretty sure the *nix and DOS "standard" prefer having a trailing
> delimiter, *nix a LF, DOS a EM(EOF/Ctrl-Z), iirc. I'd say the
> recoverable error is that the file doesn't have this. However, this
> requirement should be documented or the behavior should be to ensure
> the last line is not overwritten.
>
I had already tested adding an ASCII 26 character and there is no
difference (at least not on the screen; I have not tested a serial
console output). Thus I hadn't even mentioned it. Additionally, this
character was never documented as a "MUST" requirement, and neither a
last empty line.
The only way to avoid all the problems is to waste one initial empty
line (although, the problem where the initial line was overwritten
was already solved during 5.00 development cycle) and one final empty
line (with or without ASCII 26). But that "condition" is relevant for
users (authors of cfg files) that already noticed these problems and
that are about to create a new "short" DISPLAY file. Wasting 1 screen
row from the 25 available, or having to specifically review and
"correct" old files are not "solutions" IMHO.
The solution, IMHO, is to correct the current issues (regarding the
"boot:" prompt column or regarding the SAY directive), so old files
can be used "as-is" and so all rows on the screen are usable (and
visible) in a _consistent_ manner, whether they are displayed by
means of the DISPLAY directive, by F1-F12, with or without additional
SAY messages, from the CLI or from the menu
UI.
TIA,
Ady.
More information about the Syslinux
mailing list