lynx-dev
[Top][All Lists]
Advanced

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

lynx-dev disappearing empty lines (was: THANKS AND QUESTION)


From: Klaus Weide
Subject: lynx-dev disappearing empty lines (was: THANKS AND QUESTION)
Date: Tue, 4 Jan 2000 06:09:23 -0600 (CST)

On Thu, 6 Jan 2000, Vlad Harchev wrote:
> On Mon, 3 Jan 2000, Klaus Weide wrote:
> > On Sun, 2 Jan 2000 address@hidden wrote:
> > > 
> > >    Linkname: Lynx-Dev Discussion List
> > >         URL: http://www.crl.com/~subir/lynx/lynx_help/lynx-dev.html
> > > 
> > > The only difference is that the version (p)rinted from the source view
> > > lacks blank lines present in the (d)ownloaded version.
> > 
> > Clearly a bug.
> 
>   I've experimented with this file (well, may be different - I used the one 
> that  is bundled with lynx)

a)

We are talking about dev.17, not any previous version.  (It doesn't seem
to matter whether NO_DUMP_WITH_BACKSPACES was defined or not during
compilation).

Visit that page.

Go to source mode.   You know, the Real source mode, not -pretty... etc.

'P'rint.

Save to a file.

b)

Replace the function print_wwwfile_to_fd with an earlier incarnation
without all that newish stuff.  There's one appended at the end of
this message for your convenience.

Continue as under a).

c) diff the two files.


> and didn't find any differences (well, last 
> newline in the file gets lost when printed from source view, and of course 
> heading comment is not inserted) - as I understand another bug is experienced 
> where all but 1st newline in the sequences are lost. 

Why do you say "another bug"?  That seems to be exactly the one we are talking
about.

>  I tried that file with lss-enabled dev14 and with lss-disabled dev16, with
> and without psrc mode.
>  What version of lynx you have problems with? How it was configured? Also
> please send diffs.

Please make your own diffs as described.  (I didn't keep a copy of both outputs
and don't want to recompile yet again.)

   Klaus

-------

PUBLIC void print_wwwfile_to_fd ARGS2(
        FILE *,         fp,
        int,            is_reply)
{
    register int i;
    int first = TRUE;
    HTLine * line;

    if (!HTMainText)
        return;

    line = HTMainText->last_line->next;
    for (;; line = line->next) {
        if (!first
         && line->data[0] != LY_SOFT_NEWLINE)
            fputc('\n',fp);
        first = FALSE;

        /*
         *  Add news-style quotation if requested. - FM
         */
        if (is_reply) {
            fputc('>',fp);
        }

        /*
         *  Add offset.
         */
        for (i = 0; i < (int)line->offset; i++) {
             fputc(' ', fp);
        }

        /*
         *  Add data.
         */
        for (i = 0; line->data[i] != '\0'; i++) {
            if (!IsSpecialAttrChar(line->data[i])) {
                fputc(line->data[i], fp);
            } else if (line->data[i] == LY_SOFT_HYPHEN &&
                line->data[i + 1] == '\0') { /* last char on line */
                if (dump_output_immediately &&
                    LYRawMode &&
                    LYlowest_eightbit[current_char_set] <= 173 &&
                    (LYCharSet_UC[current_char_set].enc == UCT_ENC_8859 ||
                     LYCharSet_UC[current_char_set].like8859 &
                                  UCT_R_8859SPECL)) {
                    fputc(0xad, fp); /* the iso8859 byte for SHY */
                } else {
                    fputc('-', fp);
                }
            } else if (dump_output_immediately && use_underscore) {
                switch (line->data[i]) {
                    case LY_UNDERLINE_START_CHAR:
                    case LY_UNDERLINE_END_CHAR:
                        fputc('_', fp);
                        break;
                    case LY_BOLD_START_CHAR:
                    case LY_BOLD_END_CHAR:
                        break;
                }
            }
        }

        if (line == HTMainText->last_line)
            break;

#ifdef VMS
        if (HadVMSInterrupt)
            break;
#endif /* VMS */
    }
    fputc('\n',fp);

}



reply via email to

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