[syslinux] com32: \n to \r\n?

H. Peter Anvin hpa at zytor.com
Tue Jun 24 09:29:55 PDT 2008


Ferenc Wagner wrote:
> 
> I wonder if CRLF conversion should be done in the com32 library.
> com32/modules is full of standard C printf("...\n") statements, which
> display OK on VGA but produce staircase effect over a serial
> connection.  The core terminates each line with CRLF, which comes out
> OK in both cases.  I patched mboot.c to make its output readable, and
> could do so with the other modules as well, but is that really the
> right direction?  I hope the concept of binary/ASCII open modes will
> not be introduced in Syslinux...


Hm, I thought that was already being done.  You say this is the case for 
mboot.c32.  It uses console_ansi_std(), which is not used all that much 
-- that might be the source of the problem.

*Look deeper*

Okay, in menu system I have used the ANSI escape code to convert \n -> 
\r\n on the *client side*, but mboot.c32 not actually using the ANSI 
engine it requested, doesn't emit it and doesn't do the right things.  I 
did this way back before I actually filtered serial output; it was 
almost certainly a bad idea.

It's not like newline is particularly useful by itself.  There is a CSI 
sequence for moving the cursor down if needed.

Want to try this patch out for me?

	-hpa
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: diff
URL: <http://www.zytor.com/pipermail/syslinux/attachments/20080624/b5bd72f8/attachment.ksh>


More information about the Syslinux mailing list