Update of /cvsroot/mod-xhtml-neg/mod_xhtml_neg
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22178
Modified Files:
mod_xhtml_neg.c
Log Message:
Turned mod_xhtml_strempty into a macro.
Index: mod_xhtml_neg.c
===================================================================
RCS file: /cvsroot/mod-xhtml-neg/mod_xhtml_neg/mod_xhtml_neg.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -C2 -d -r1.40 -r1.41
*** mod_xhtml_neg.c 13 Apr 2004 13:20:58 -0000 1.40
--- mod_xhtml_neg.c 15 Apr 2004 13:58:05 -0000 1.41
***************
*** 143,146 ****
--- 143,156 ----
/**
+ * Test whether a string is empty without having to do a full scan of the
+ * string just to return a length, as per strlen.
+ *
+ * @param str a string pointer, possibly NULL, to be tested
+ * @return non-zero if the pointer is NULL, or points to a zero-length
+ * string, otherwise zero
+ */
+ #define mod_xhtml_strempty(str) ((((str) == NULL) || (*(str) == '\0')) ? 1 : 0)
+
+ /**
* Enumeration for determining whether processing should be enabled for
* this module. By default, we set the directory config state to
***************
*** 224,241 ****
/**
- * Test whether a string is empty without having to do a full scan of the
- * string just to return a length, as per strlen.
- *
- * @param str a string pointer, possibly NULL, to be tested
- * @return non-zero if the pointer is NULL, or points to a zero-length
- * string, otherwise zero
- * @todo could macro-ise this function.
- */
-
- static int mod_xhtml_strempty( const char *str ) {
- return (( str == NULL ) || ( str[0] == '\0' )) ? 1 : 0;
- }
-
- /**
* Calculate the length of the given string. The pointer may be NULL.
*
--- 234,237 ----
|