W3C home > Mailing lists > Public > www-lib@w3.org > January to March 2001

Re: HTAnchor_delete ?

From: Serge Adda <sAdda@infovista.com>
Date: Mon, 5 Mar 2001 11:43:52 -0500 (EST)
Message-ID: <F520B214418AD4119F7000508BD90CC21388B5@hq01sr02.infovista.com>
To: "'www-lib@w3.org'" <www-lib@w3.org>
Anton,
I had the same problem. I think it is a bug.
This is the code I have added at line 511 in HTAnchor_delete (HTParentAnchor
* me):

    if (adult_table) {
    	int hash;
	const char *p;
	HTList * adults;
	HTList *grownups;
	HTList * last;
	HTParentAnchor * foundAnchor;

	/* Select list from hash table */
	for(p=me->address, hash=0; *p; p++)
	    hash = (int) ((hash * 3 + (*(unsigned char*)p)) %
PARENT_HASH_SIZE);
	adults = adult_table[hash];

	/* Search list for anchor */
	grownups = adults;
	last = grownups;
	while ((foundAnchor = (HTParentAnchor *)
HTList_nextObject(grownups))){
	  if (!strcmp(foundAnchor->address, me->address)) {
	    HTList_quickRemoveElement (grownups, last);
	    break;
	  }
	  last = grownups;
	}
    }

Regards,
--
Serge Adda
Server Development Manager
InfoVista S.A.                  http://www.infovista.com
6, rue de la Terre de Feu 
91952 Courtaboeuf Cedex 
Tel: (+33) 1 64 86 79 37 
Fax:(+33) 1 64 86 79 79 
Received on Monday, 5 March 2001 11:45:30 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 23 April 2007 18:18:38 GMT