lynx-dev
[Top][All Lists]
Advanced

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

Re: lynx-dev dev.26 problem with -dump


From: dickey
Subject: Re: lynx-dev dev.26 problem with -dump
Date: Tue, 15 Sep 1998 17:00:36 -0400 (EDT)

> 
> I have discovered that "-dump" is not dumping in the same format as lynx 
> uses for display, as was the case in dev.16 and before. (And I didn't see 
> anything in the CHANGES file mentioning a by-design change). 
it was a side-effect of another change (implementing the softnewline
for wrapping lines).
>  
> In particular, blank lines are being left out where they usually are found 
> (such as between a heading and its paragraph, between paragraphs, etc.) 
I noticed that (and one other bug) too, and have a fix in my pending changes
for dev27.

Index: src/GridText.c
--- lynx2.8.1dev.26+/src/GridText.c     Sun Sep 13 10:41:19 1998
+++ lynx2.8.1dev.26a+/src/GridText.c    Sun Sep 13 17:18:01 1998
@@ -2458,18 +2458,14 @@
     else {
        /*
         * If we're displaying document source, wrap long lines to keep all of
-        * the source visible.  Note that we splice the pieces together with
-        * a recursion on this function to supply the character that is removed
-        * by 'split_line'.
+        * the source visible.
         */
        int target = (int)(line->offset + line->size);
-       if ((target > (LYcols-1) - style->rightIndent) &&
+       if ((target >= (LYcols-1) - style->rightIndent) &&
                HTisDocumentSource()) {
-           int gap = line->data[line->size - 1];
            new_line(text);
            line = text->last_line;
            HText_appendCharacter (text, LY_SOFT_NEWLINE);
-           HText_appendCharacter (text, gap);
        }
     }
 
@@ -4746,8 +4742,7 @@
     line = HTMainText->last_line->next;
     for (;; line = line->next) {
        if (!first
-        && line->data[0] != LY_SOFT_NEWLINE
-        && line->data[0] != '\0')
+        && line->data[0] != LY_SOFT_NEWLINE)
            fputc('\n',fp);
        first = FALSE;
 
@@ -4836,8 +4831,7 @@
 
     for (;; line = line->next) {
        if (!first
-        && line->data[0] != LY_SOFT_NEWLINE
-        && line->data[0] != '\0')
+        && line->data[0] != LY_SOFT_NEWLINE)
            fputc('\n',fp);
        first = FALSE;
        /*
  
> For example, the test file: 
>  
> <HTML><HEAD><TITLE>test dump</TITLE></HEAD><BODY> 
> <H1>Head1</H1> 
> <P>text</P> 
> <P>text2</P> 
> <H2>Head2</H2> 
> <P>text3</P> 
> </BODY></HTML> 
>  
> displays in both dev.16 and dev.26 and dumps from dev.16 as: 
>  
>                                      Head1 
>                                         
>    text 
>     
>    text2 
>      
> Head2 
>  
>    text3 
>  
> which is what I would want (except for the line following Head1 and prior 
> to text2 and Head2 which actually contain spaces ... it would be nice to 
> have lynx remove trailing spaces on a line before transmitting it.)  
>  
> However, the real problem is that this test dumps from dev.26 as: 
>  
>                                      Head1                                    
>     
>    text    
>    text2    
> Head2 
>    text3 
>  
> Note that on what had been lines with only spaces on them (after Head1 and 
> before text2 and Head2) the newline was lost and the spaces became  
> training spaces on a line with text on it. 
>  
> This happens on both HP-UX 10.x and Apollo Domain/OS builds of dev.26. 
>  
>  Dave Eaton 
> -- 
>  Artronic Development  - Your Web Site Solution 
>  12629 N. Tatum Blvd., Suite 224; Phoenix, AZ 85032 
>  e-mail: address@hidden - voice: (602) 953-0336  -  http://www.arde.com 


-- 
Thomas E. Dickey
address@hidden
http://www.clark.net/pub/dickey

reply via email to

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