On Mon, 10 Oct 2011, Bela Lubkin wrote:
Thomas Dickey wrote:
On Mon, 10 Oct 2011, Bela Lubkin wrote:
So for my original purpose (avoiding buffer-size-imposed line wrap in
"-dump" output) it might be better to kludge it. Add a "-dont_wrap"
flag (following the example of "-dont_wrap_pre"). When inserting a
line break due to running out of buffer space, remember the reason;
when actually outputting it, if the reason was "out of space" rather
than "document said so", output the line without a trailing newline.
"-dont_wrap" would also set "-width" to the applicable max (so that the
"out of space, don't newline" path isn't exercised unnecessarily).
hmm - but the dump is working from essentially the same data that would
be displayed - and already subject to line-length. I recall that lynx
uses some special control characters to denote things like bold- and
underline-, as well as something related to wrapping. There may/may
not be enough existing logic to make an option like that relatively
simply to implement.
I looked at the wrap code scattered around GridText.c and HTML.c (plus
little bits in HTMLGen.c, SGML.c, LYCharUtils.c, LYCurses.c, LYMain.c)
and decided not to tread there...
perhaps LY_SOFT_NEWLINE does what's needed (for bookkeeping purposes).
--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net
_______________________________________________
Lynx-dev mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lynx-dev