dreid 01/07/02 02:01:39
Modified: include apr_sms.h
memory/unix apr_sms.c sms_private.h
Log:
Clean up some warnings and add an APR_ to the start of the debug
options so that the exports scripts hide them correctly.
Revision Changes Path
1.23 +10 -10 apr/include/apr_sms.h
Index: apr_sms.h
===================================================================
RCS file: /home/cvs/apr/include/apr_sms.h,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- apr_sms.h 2001/07/02 08:32:24 1.22
+++ apr_sms.h 2001/07/02 09:01:35 1.23
@@ -104,13 +104,13 @@
* Function definitions are at the end of the file...
*/
-/* DEBUG_SHOW_STRUCTURE
+/* APR_DEBUG_SHOW_STRUCTURE
* This turns on a print of the ancestory of the SMS when
* creating/destroying an SMS so it's place in the world can be seen.
*/
-/* #define DEBUG_SHOW_STRUCTURE 1 */
+ #define APR_DEBUG_SHOW_STRUCTURE 1
-/* DEBUG_SHOW_FUNCTIONS
+/* APR_DEBUG_SHOW_FUNCTIONS
* This turns on debug printing of every call to i
* apr_sms_create
* apr_sms_destroy
@@ -119,13 +119,13 @@
* Format of output is
* CREATE - sms 0x0000000 [STANDARD] has been created
*/
-/* #define DEBUG_SHOW_FUNCTIONS 1 */
+ #define APR_DEBUG_SHOW_FUNCTIONS 1
-/* DEBUG_TAG_SMS
+/* APR_DEBUG_TAG_SMS
* Turn on the ability to give an SMS a "tag" that can be used to identify
* it.
*/
-/* #define DEBUG_TAG_SMS 1 */
+ #define APR_DEBUG_TAG_SMS 1
/**
* @package APR memory system
@@ -344,23 +344,23 @@
/* NB These are only available if the debugging option has been turned on. */
-#if DEBUG_SHOW_STRUCTURE
+#ifdef APR_DEBUG_SHOW_STRUCTURE
/**
* Show the heirachy of the sms
* @param sms The sms to show the information for
* @param direction Do we show up (to parent) or down (to children)
*/
APR_DECLARE(void) apr_sms_show_structure(apr_sms_t *sms, int direction);
-#endif /* DEBUG_SHOW_STRUCTURE */
+#endif /* APR_DEBUG_SHOW_STRUCTURE */
-#if DEBUG_TAG_SMS
+#ifdef APR_DEBUG_TAG_SMS
/**
* Set the debugging tag for an sms
* @param tag The tag to give the sms
* @param sms The sms to apply the tag to
*/
APR_DECLARE(void) apr_sms_tag(const char*tag, apr_sms_t *sms);
-#endif
+#endif /* APR_DEBUG_TAG_SMS */
#ifdef __cplusplus
}
1.32 +7 -4 apr/memory/unix/apr_sms.c
Index: apr_sms.c
===================================================================
RCS file: /home/cvs/apr/memory/unix/apr_sms.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- apr_sms.c 2001/07/02 08:32:27 1.31
+++ apr_sms.c 2001/07/02 09:01:37 1.32
@@ -69,6 +69,9 @@
#ifdef APR_ASSERT_MEMORY
#include <assert.h>
#endif
+#if defined(APR_DEBUG_SHOW_STRUCTURE)
+#include <stdio.h>
+#endif
#include <memory.h> /* strikerXXX: had to add this for windows to stop
* complaining, please autoconf the include stuff
@@ -771,7 +774,7 @@
return sms->parent;
}
-#if DEBUG_SHOW_STRUCTURE
+#if APR_DEBUG_SHOW_STRUCTURE
static void add_sms(char *a, char *b, apr_sms_t *sms, apr_sms_t *caller,
int sib)
{
@@ -807,7 +810,7 @@
APR_DECLARE(void) apr_sms_show_structure(apr_sms_t *sms, int direction)
{
apr_sms_t *thesms, *sibling;
- int levels = 0, i = 0, j = 0;
+ int levels = 0, i = 0;
char l1[100], l2[100];
if (direction == 1) {
@@ -867,9 +870,9 @@
}
}
}
-#endif /* DEBUG_SHOW_STRUCTURE */
+#endif /* APR_DEBUG_SHOW_STRUCTURE */
-#if DEBUG_TAG_SMS
+#if APR_DEBUG_TAG_SMS
APR_DECLARE(void) apr_sms_tag(const char *tag, apr_sms_t *sms)
{
sms->tag = tag;
1.3 +1 -1 apr/memory/unix/sms_private.h
Index: sms_private.h
===================================================================
RCS file: /home/cvs/apr/memory/unix/sms_private.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- sms_private.h 2001/07/02 08:32:27 1.2
+++ sms_private.h 2001/07/02 09:01:38 1.3
@@ -92,7 +92,7 @@
apr_status_t (*lock_fn) (apr_sms_t *sms);
apr_status_t (*unlock_fn) (apr_sms_t *sms);
-#if DEBUG_TAG_SMS
+#if APR_DEBUG_TAG_SMS
const char *tag;
#endif
};