lynx-dev
[Top][All Lists]
Advanced

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

Re: lynx-dev patch: fix for disappearing empty lines when dump'ing


From: Klaus Weide
Subject: Re: lynx-dev patch: fix for disappearing empty lines when dump'ing
Date: Wed, 5 Jan 2000 15:00:37 -0600 (CST)

On Wed, 5 Jan 2000, Vlad Harchev wrote:

>  Tom, expect a huge offsets applying this patch (I still use pre-dev16, and it
> differs from dev17 in so many of places...). I inserted fragments of dev17's
> print_*_to_fd to dev16's GridText.c, saved as 'old/src/GridText.c', edited and
> tested code, and saved as 'fixef/src/GridText.c', and made a diff (So I hope
> that 'patch' won't bark). 
>   1st hunk is at the very begining of split_line.
> 
> diff -ru old/src/GridText.c fixed/src/GridText.c
> --- old/src/GridText.c        Sun Jan  9 06:15:29 2000
> +++ fixed/src/GridText.c      Sun Jan  9 06:26:18 2000
> @@ -2385,6 +2385,22 @@
>      cur_hy_word_size = 0;
>  #endif

It won't work for patch, there is not cur_hy_anything in dev.17, but
I'll let Tom try to deal with that...

>  
> +    cp = previous->data;
> +    if (cp[0] == LY_BOLD_START_CHAR || cp[0] == LY_UNDERLINE_START_CHAR) {
> +     switch (cp[1]) {
> +         case LY_SOFT_NEWLINE:
> +             cp[1] = cp[0];
> +             cp[0] = LY_SOFT_NEWLINE;
> +             break;
> +         case LY_BOLD_START_CHAR:
> +         case LY_UNDERLINE_START_CHAR:
> +             if (cp[2]==LY_SOFT_NEWLINE) {
> +                 cp[2] = cp[1];
> +                 cp[1] = cp[0];
> +                 cp[0] = LY_SOFT_NEWLINE;
> +             };
> +     };
> +    };

I think this will normally work.  But being at the beginning of split_line,
it will actually apply with a one line delay.  First split_line() gets called,
*then* LY_SOFT_NEWLINE gets appended - at least in the "normal" code (I don't
know whether and hoow this changes with your various options).  The the
fixup doesn't apply to the LY_SOFT_NEWLINE for *this* line break, but
for the previous one.  Confusing, and in some obscure situation it may never
apply (if the last line never gets terminated with split_line()...)

   Klaus



reply via email to

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