httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gst...@hyperreal.org
Subject cvs commit: apache-1.3/src/lib/expat-lite hashtable.c hashtable.h xmlparse.c
Date Fri, 14 Jan 2000 09:03:51 GMT
gstein      00/01/14 01:03:50

  Modified:    src/lib/expat-lite hashtable.c hashtable.h xmlparse.c
  Log:
  rename the lookup() function to hashTableLookup() to avoid possible
  name clashes (since the function is exported from the httpd executable).
  
  Revision  Changes    Path
  1.2       +1 -1      apache-1.3/src/lib/expat-lite/hashtable.c
  
  Index: hashtable.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/lib/expat-lite/hashtable.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- hashtable.c	1999/05/31 10:56:24	1.1
  +++ hashtable.c	2000/01/14 09:03:48	1.2
  @@ -58,7 +58,7 @@
     return h;
   }
   
  -NAMED *lookup(HASH_TABLE *table, KEY name, size_t createSize)
  +NAMED *hashTableLookup(HASH_TABLE *table, KEY name, size_t createSize)
   {
     size_t i;
     if (table->size == 0) {
  
  
  
  1.2       +1 -1      apache-1.3/src/lib/expat-lite/hashtable.h
  
  Index: hashtable.h
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/lib/expat-lite/hashtable.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- hashtable.h	1999/05/31 10:56:25	1.1
  +++ hashtable.h	2000/01/14 09:03:48	1.2
  @@ -56,7 +56,7 @@
     size_t usedLim;
   } HASH_TABLE;
   
  -NAMED *lookup(HASH_TABLE *table, KEY name, size_t createSize);
  +NAMED *hashTableLookup(HASH_TABLE *table, KEY name, size_t createSize);
   void hashTableInit(HASH_TABLE *);
   void hashTableDestroy(HASH_TABLE *);
   
  
  
  
  1.3       +20 -20    apache-1.3/src/lib/expat-lite/xmlparse.c
  
  Index: xmlparse.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/lib/expat-lite/xmlparse.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- xmlparse.c	1999/06/02 07:15:03	1.2
  +++ xmlparse.c	2000/01/14 09:03:49	1.3
  @@ -1132,7 +1132,7 @@
   				next - enc->minBytesPerChar);
   	if (!name)
   	  return XML_ERROR_NO_MEMORY;
  -	entity = (ENTITY *)lookup(&dtd.generalEntities, name, 0);
  +	entity = (ENTITY *)hashTableLookup(&dtd.generalEntities, name, 0);
   	poolDiscard(&dtd.pool);
   	if (!entity) {
   	  if (dtd.complete || dtd.standalone)
  @@ -1496,12 +1496,12 @@
     const XML_Char *localPart;
   
     if (tagNamePtr) {
  -    elementType = (ELEMENT_TYPE *)lookup(&dtd.elementTypes, tagNamePtr->str, 0);
  +    elementType = (ELEMENT_TYPE *)hashTableLookup(&dtd.elementTypes, tagNamePtr->str,
0);
       if (!elementType) {
         tagNamePtr->str = poolCopyString(&dtd.pool, tagNamePtr->str);
         if (!tagNamePtr->str)
   	return XML_ERROR_NO_MEMORY;
  -      elementType = (ELEMENT_TYPE *)lookup(&dtd.elementTypes, tagNamePtr->str, sizeof(ELEMENT_TYPE));
  +      elementType = (ELEMENT_TYPE *)hashTableLookup(&dtd.elementTypes, tagNamePtr->str,
sizeof(ELEMENT_TYPE));
         if (!elementType)
           return XML_ERROR_NO_MEMORY;
         if (ns && !setElementTypePrefix(parser, elementType))
  @@ -1613,7 +1613,7 @@
         if (appAtts[i][-1] == 2) {
           ATTRIBUTE_ID *id;
           ((XML_Char *)(appAtts[i]))[-1] = 0;
  -	id = (ATTRIBUTE_ID *)lookup(&dtd.attributeIds, appAtts[i], 0);
  +	id = (ATTRIBUTE_ID *)hashTableLookup(&dtd.attributeIds, appAtts[i], 0);
   	if (id->prefix->binding) {
   	  int j;
   	  const BINDING *b = id->prefix->binding;
  @@ -2037,7 +2037,7 @@
   	const XML_Char *name = poolStoreString(&dtd.pool, encoding, s, next);
   	if (!name)
   	  return XML_ERROR_NO_MEMORY;
  -	declElementType = (ELEMENT_TYPE *)lookup(&dtd.elementTypes, name, sizeof(ELEMENT_TYPE));
  +	declElementType = (ELEMENT_TYPE *)hashTableLookup(&dtd.elementTypes, name, sizeof(ELEMENT_TYPE));
   	if (!declElementType)
   	  return XML_ERROR_NO_MEMORY;
   	if (declElementType->name != name)
  @@ -2129,7 +2129,7 @@
   	if (!name)
   	  return XML_ERROR_NO_MEMORY;
   	if (dtd.complete) {
  -	  declEntity = (ENTITY *)lookup(&dtd.generalEntities, name, sizeof(ENTITY));
  +	  declEntity = (ENTITY *)hashTableLookup(&dtd.generalEntities, name, sizeof(ENTITY));
   	  if (!declEntity)
   	    return XML_ERROR_NO_MEMORY;
   	  if (declEntity->name != name) {
  @@ -2439,7 +2439,7 @@
   			       next - enc->minBytesPerChar);
   	if (!name)
   	  return XML_ERROR_NO_MEMORY;
  -	entity = (ENTITY *)lookup(&dtd.generalEntities, name, 0);
  +	entity = (ENTITY *)hashTableLookup(&dtd.generalEntities, name, 0);
   	poolDiscard(&temp2Pool);
   	if (!entity) {
   	  if (dtd.complete) {
  @@ -2696,7 +2696,7 @@
         }
         if (!poolAppendChar(&dtd.pool, XML_T('\0')))
   	return 0;
  -      prefix = (PREFIX *)lookup(&dtd.prefixes, poolStart(&dtd.pool), sizeof(PREFIX));
  +      prefix = (PREFIX *)hashTableLookup(&dtd.prefixes, poolStart(&dtd.pool), sizeof(PREFIX));
         if (!prefix)
   	return 0;
         if (prefix->name == poolStart(&dtd.pool))
  @@ -2721,7 +2721,7 @@
     if (!name)
       return 0;
     ++name;
  -  id = (ATTRIBUTE_ID *)lookup(&dtd.attributeIds, name, sizeof(ATTRIBUTE_ID));
  +  id = (ATTRIBUTE_ID *)hashTableLookup(&dtd.attributeIds, name, sizeof(ATTRIBUTE_ID));
     if (!id)
       return 0;
     if (id->name != name)
  @@ -2739,7 +2739,7 @@
         if (name[5] == '\0')
   	id->prefix = &dtd.defaultPrefix;
         else
  -	id->prefix = (PREFIX *)lookup(&dtd.prefixes, name + 6, sizeof(PREFIX));
  +	id->prefix = (PREFIX *)hashTableLookup(&dtd.prefixes, name + 6, sizeof(PREFIX));
         id->xmlns = 1;
       }
       else {
  @@ -2753,7 +2753,7 @@
   	  }
   	  if (!poolAppendChar(&dtd.pool, XML_T('\0')))
   	    return 0;
  -	  id->prefix = (PREFIX *)lookup(&dtd.prefixes, poolStart(&dtd.pool), sizeof(PREFIX));
  +	  id->prefix = (PREFIX *)hashTableLookup(&dtd.prefixes, poolStart(&dtd.pool),
sizeof(PREFIX));
   	  if (id->prefix->name == poolStart(&dtd.pool))
   	    poolFinish(&dtd.pool);
   	  else
  @@ -2846,7 +2846,7 @@
         ENTITY *e;
         if (!poolAppendChar(&tempPool, XML_T('\0')))
   	return 0;
  -      e = (ENTITY *)lookup(&dtd.generalEntities, poolStart(&tempPool), 0);
  +      e = (ENTITY *)hashTableLookup(&dtd.generalEntities, poolStart(&tempPool),
0);
         if (e)
   	e->open = 1;
         if (*s != XML_T('\0'))
  @@ -2861,7 +2861,7 @@
         else {
   	if (!poolAppendChar(&tempPool, XML_T('\0')))
   	  return 0;
  -	prefix = (PREFIX *)lookup(&dtd.prefixes, poolStart(&tempPool), sizeof(PREFIX));
  +	prefix = (PREFIX *)hashTableLookup(&dtd.prefixes, poolStart(&tempPool), sizeof(PREFIX));
   	if (!prefix)
   	  return 0;
           if (prefix->name == poolStart(&tempPool))
  @@ -2971,7 +2971,7 @@
       name = poolCopyString(&(newDtd->pool), oldP->name);
       if (!name)
         return 0;
  -    if (!lookup(&(newDtd->prefixes), name, sizeof(PREFIX)))
  +    if (!hashTableLookup(&(newDtd->prefixes), name, sizeof(PREFIX)))
         return 0;
     }
   
  @@ -2993,7 +2993,7 @@
       if (!name)
         return 0;
       ++name;
  -    newA = (ATTRIBUTE_ID *)lookup(&(newDtd->attributeIds), name, sizeof(ATTRIBUTE_ID));
  +    newA = (ATTRIBUTE_ID *)hashTableLookup(&(newDtd->attributeIds), name, sizeof(ATTRIBUTE_ID));
       if (!newA)
         return 0;
       newA->maybeTokenized = oldA->maybeTokenized;
  @@ -3002,7 +3002,7 @@
         if (oldA->prefix == &oldDtd->defaultPrefix)
   	newA->prefix = &newDtd->defaultPrefix;
         else
  -	newA->prefix = (PREFIX *)lookup(&(newDtd->prefixes), oldA->prefix->name,
0);
  +	newA->prefix = (PREFIX *)hashTableLookup(&(newDtd->prefixes), oldA->prefix->name,
0);
       }
     }
   
  @@ -3020,7 +3020,7 @@
       name = poolCopyString(&(newDtd->pool), oldE->name);
       if (!name)
         return 0;
  -    newE = (ELEMENT_TYPE *)lookup(&(newDtd->elementTypes), name, sizeof(ELEMENT_TYPE));
  +    newE = (ELEMENT_TYPE *)hashTableLookup(&(newDtd->elementTypes), name, sizeof(ELEMENT_TYPE));
       if (!newE)
         return 0;
       if (oldE->nDefaultAtts) {
  @@ -3030,9 +3030,9 @@
       }
       newE->allocDefaultAtts = newE->nDefaultAtts = oldE->nDefaultAtts;
       if (oldE->prefix)
  -      newE->prefix = (PREFIX *)lookup(&(newDtd->prefixes), oldE->prefix->name,
0);
  +      newE->prefix = (PREFIX *)hashTableLookup(&(newDtd->prefixes), oldE->prefix->name,
0);
       for (i = 0; i < newE->nDefaultAtts; i++) {
  -      newE->defaultAtts[i].id = (ATTRIBUTE_ID *)lookup(&(newDtd->attributeIds),
oldE->defaultAtts[i].id->name, 0);
  +      newE->defaultAtts[i].id = (ATTRIBUTE_ID *)hashTableLookup(&(newDtd->attributeIds),
oldE->defaultAtts[i].id->name, 0);
         newE->defaultAtts[i].isCdata = oldE->defaultAtts[i].isCdata;
         if (oldE->defaultAtts[i].value) {
   	newE->defaultAtts[i].value = poolCopyString(&(newDtd->pool), oldE->defaultAtts[i].value);
  @@ -3057,7 +3057,7 @@
       name = poolCopyString(&(newDtd->pool), oldE->name);
       if (!name)
         return 0;
  -    newE = (ENTITY *)lookup(&(newDtd->generalEntities), name, sizeof(ENTITY));
  +    newE = (ENTITY *)hashTableLookup(&(newDtd->generalEntities), name, sizeof(ENTITY));
       if (!newE)
         return 0;
       if (oldE->systemId) {
  
  
  

Mime
View raw message