lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Lynx-dev] Issues with -dont_wrap_pre and -nomargins


From: Thomas Dickey
Subject: Re: [Lynx-dev] Issues with -dont_wrap_pre and -nomargins
Date: Wed, 16 Sep 2009 16:51:31 -0400 (EDT)

On Wed, 16 Sep 2009, Claus Strommer wrote:

Just a quick followup:

Changing the definitions in LYOptions.c does not affect the output.
However, changing lines 469 and 485 in DefaultStyle.c from
                q->rightIndent = 0;
to
                q->rightIndent = 1;

does the trick.

That sounds as if it'll work for you (until I find a Good Fix)

Thanks for the help!

no problem (report bugs)

On 2009-09-16, at 4:59 AM, Thomas Dickey wrote:

----8<--snip--8<----


So my question is: Is there anything I can do to work around this? I would

...other than fixing the bug - perhaps not. (I'm working on xterm and mawk at the moment, intending to go back to lynx next...).

Just reading the code: It looks as if -nomargins goes to the no_margins variable, and _that_ is used in only a few places:

DefaultStyle.c:466:         if (no_margins) {
DefaultStyle.c:482:         if (no_margins) {
LYGlobalDefs.h:394:    extern BOOLEAN no_margins;
LYMain.c:393:BOOLEAN no_margins = FALSE;
LYMain.c:3622:      "nomargins",        4|SET_ARG,              no_margins,
LYOptions.c:35:#define MARGIN_STR (no_margins ? "" : "&nbsp;&nbsp;")
LYOptions.c:36:#define MARGIN_LEN (no_margins ?  0 : 2)
LYrcFile.h:159:#define RC_NO_MARGINS                   "no_margins"
LYReadCFG.c:1494:     PARSE_SET(RC_NO_MARGINS,           no_margins),

The uses in DefaultStyle.c and LYOptions.c are simple to change and see if the bug's behavior changes predictably. For instance, making -no_margins do a single character rather than none might make it usable for your script.

The derived variables are used in GridText.c's split_line() function, which is (complicated) where the boundary check is most likely off.
It's complicated, since there are long expressions such as

      spare = WRAP_COLS(text)
          - (int) style->rightIndent
          - indent
          + ctrl_chars_on_previous_line
          - LYstrExtent2(previous->data, previous->size);

But that's the area where the fix would probably be made - split_line.

very much like to keep using these two options, as it is important to me to be able to distinguish between lines and paragraphs. I am even willing to use other tools, if you can suggest any - but as far as I've seen, lynx is the only one which gives the desired options. Also, I'd like to stay away from the -width option (it does not allow me to specify infinite width, AND it breaks with tables - the attached b.html, for example).



--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net






--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net




reply via email to

[Prev in Thread] Current Thread [Next in Thread]