[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lynx-dev [PATCH] to dev13 - various fixes
From: |
Vlad Harchev |
Subject: |
Re: lynx-dev [PATCH] to dev13 - various fixes |
Date: |
Sun, 31 Oct 1999 21:35:49 +0400 (SAMT) |
On Sun, 31 Oct 1999, Klaus Weide wrote:
> On Sun, 31 Oct 1999, Vlad Harchev wrote:
>
> >
> > * Bug in psrcmode code fixed. Now htmlsrc_tag encloses only tagname, not
> > everything in generalized brackets <,>,</,/> - reported by KW
>
> Note on detail: /> is not in general treated as a closing "generalized
> bracket". Not thus that it's not implemented (that too), it would
> interfere with error recovery for some URLs that are improperly not
> quoted: <A HREF=http://some.site/>. Or to give an example where it
> actually would make a difference, <BASE HREF=http://some.site/some/dir/>.
I'm not exactly sure about /> - you wrote the support for it.
>
> > # ------------------------------------
> > # comment COMM
> > -# tag TAG everything in gen. brackets
> > +# tag TAG tag name only
> ^
> Should that say "recognized tag"?
Yes, it should be. But seeing another lexeme with name 'badtag' user can
guess that.
> >
> > /*these are generic macors for any pools (provided those structures have
> > the
> > - same members as HTStyleChangePool) - VH */
> > -/*this macro sets 'ptr' to the "allocated" storage or NULL on failure.*/
> > +same members as HTStyleChangePool). Pools are used for allocation of
> > groups
> > +of objects of the same type T. Pools are represented as a list of
> > structures
> > +of type P (called pool chunks here). Structure P has an array of N objects
> > of
> > +type T named 'data' (the number N in the array can be chosen arbitrary),
> > +pointer to the next pool chunk named 'pool', and the number of free items
> > +in that pool chunk named 'free_items'. Ie, here is a definition of the
> > +structure P:
> > + struct P
> > + {
> > + T data[N];
> > + struct P* next;
> > + int free_items;
> > + };
> > + It's recommened that sizeof(P) be memory page size minus 32 in order
> > malloced
> > +chunks to fit in machine page size.
> > + Allocation of 'n' items in the pool is implemented as decrementing member
> > +'free_items' by 'n' if 'free_items' >= 'n', or allocating a new pool chunk
> > and
> > +allocating 'n' items in that new chunk.
>
> ... or a combination? (use up free_items, and allocate 'n - free_items' items
> in new chunk)
No - what will happen with string then? For best memory utilization,
allocate items one by one in loop if a run can be splitted.
>
> Klaus
>
Best regards,
-Vlad