- From: Wayne Davison <wayne@clari.net>
- Date: Thu, 2 Mar 2000 15:44:29 -0800 (PST)
- To: www-lib@w3.org
The HTArray_firstObject() macro is defined such that if you don't use a variable named exactly "data" as the second parameter, you get a syntax error (because of the reference to the "data" name in the structure). I suggest changing the variable in the define from "data" to "dp". Here's a patch for the HTArray.html file: --- HTArray.html Wed May 13 19:10:14 1998 +++ HTArray.html.new Thu Mar 2 15:43:41 2000 @@ -82,10 +82,10 @@ Fast macros to traverse a macro ending in a NULL element. <PRE> -#define HTArray_firstObject(me, data) \ - ((me) && ((data)=(me)->data) ? *(data)++ : NULL) -#define HTArray_nextObject(me, data) \ - ((me) && (data) ? *(data)++ : NULL) +#define HTArray_firstObject(me, dp) \ + ((me) && ((dp)=(me)->data) ? *(dp)++ : NULL) +#define HTArray_nextObject(me, dp) \ + ((me) && (dp) ? *(dp)++ : NULL) </PRE> <H2>Sort an Array</H2> ..wayne..
Received on Thursday, 2 March 2000 18:44:34 UTC