lynx-dev
[Top][All Lists]
Advanced

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

Re: lynx-dev 2.8.1rel.2 patches


From: Klaus Weide
Subject: Re: lynx-dev 2.8.1rel.2 patches
Date: Mon, 16 Nov 1998 10:20:21 -0600 (CST)

On Mon, 16 Nov 1998, Leonid Pauzner wrote:

> >  I have just re-subscribed to the list, after some time away..
> > I see lynx dev is alive and well, and has made progress, in spite of the
> > somewhat (hmm...) messy code I left behind. (Sorry Leonid and others..
> > it probably wasn't much fun cleaning up the chartrans stuff.)
> 
> Hello Klaus!
> I want to add internal cache for html sources in Lynx,
> will explain my point of view in a separate message,
> currently I am not sure where the stream should be redirected
> and a little lost with anchor structure survey,
> so you help appreciated.

Ok, I will look at that discussion. 

> > *** lynx2-8-1.orig/src/LYBookmark.c   Wed Oct 14 07:23:56 1998
> > --- lynx2-8-1/src/LYBookmark.c        Sat Nov 14 19:34:25 1998
> >   /*
> > +  * Check whether we have any visible (non-blank) chars.
> > +  */
> > + PRIVATE  BOOLEAN havevisible ARGS1(CONST char *, Title)
> > + {
> > +     CONST char *p = Title;
> > +     unsigned char c;
> > +     long unicode;
> > +
> > +     for ( ; *p; p++) {
> > +     c = (unsigned char)(TOASCII(*p));
> > +     if (c > 32 && c < 127)
> > +         return(TRUE);
> > +     if (c <= 32 || c == 127)
> > +         continue;
> > +     if (LYHaveCJKCharacterSet || !UCCanUniTranslateFrom(current_char_set))
> > +         return(TRUE);
> > +     unicode = UCTransToUni(*p, current_char_set);
> > +     if (unicode > 32 && unicode < 127)
> > +         return(TRUE);
> > +     if (c <= 32 || (c >= 127 && c <= 160) || c == 0xad)
>                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>                        This line is ISO-8859 specific
> 
> > +         continue;
> > +     if (unicode >= 0x2000 && unicode < 0x200f)
> > +         continue;
> > +     return(TRUE);
> > +     }
> > +     return(FALSE); /* if we came here */
> > + }

Yes, that was meant to use the translated value, i.e. replace `c' with
`unicode' in that line.  Good catch.

> > ! PRIVATE  char* title_convert8bit ARGS1(CONST char *, Title)
> >   {
> >       CONST char *p = Title;
> >       char temp[256];
> > +     char *p0;
> >       char *q = temp;
> >       char *comment = NULL;
> >       char *ncr     = NULL;
> >       char *buf = NULL;
> > +     int charset_in  = current_char_set;
> > +     int charset_out = -1;
>                        ^^^^^
>                        Why not   = UCGetLYhndl_byMIME("us-ascii"); ?
>                        I was trying hard to eliminate -1 where possible.

Just to avoid calling it when it's not needed.  The -1 is used only as a
flag locally.  But if you want to change it, no problem.

Originally -1 for a charset was used as a flag for `hasnt' been
determined' or `not available' or `invalid' in various places, throughout
the chartrans code.

   Klaus

reply via email to

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