Enlightenment CVS committal

Author  : mej
Project : eterm
Module  : libast

Dir     : eterm/libast/include


Modified Files:
        libast.h 


Log Message:
Tue Nov 18 23:15:59 2003                        Michael Jennings (mej)

Added D_*_IF macros for doing debugging conditionals more cleanly.

Removed the bogus "next" member function from the array and vector
interface classes.

Fleshed out the iterator interface and implemented it for arrays.

Fixed stupid mistake that made property functions overly type-strict.

Cleaned up the "show" member functions.

Added a routine for testing a regexp vs. a C string.

Property-ized the URL class objects.

===================================================================
RCS file: /cvsroot/enlightenment/eterm/libast/include/libast.h,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -3 -r1.37 -r1.38
--- libast.h    10 Nov 2003 19:29:17 -0000      1.37
+++ libast.h    19 Nov 2003 04:21:14 -0000      1.38
@@ -30,8 +30,8 @@
  * including all required system headers and LibAST Object headers.
  *
  * @author Michael Jennings <[EMAIL PROTECTED]>
- * @version $Revision: 1.37 $
- * @date $Date: 2003/11/10 19:29:17 $
+ * @version $Revision: 1.38 $
+ * @date $Date: 2003/11/19 04:21:14 $
  */
 
 #ifndef _LIBAST_H_
@@ -728,9 +728,16 @@
  * @see DOXGRP_DEBUG
  * @ingroup DOXGRP_DEBUG
  */
-#define D_OPTIONS(x)           DPRINTF1(x)
+#if DEBUG >= DEBUG_OPTIONS
+#  define D_OPTIONS_IF           if (DEBUG_LEVEL >= DEBUG_OPTIONS)
+#  define D_OPTIONS(x)           do { D_OPTIONS_IF {DPRINTF(x);} } while (0)
+#else
+#  define D_OPTIONS_IF           if (0)
+#  define D_OPTIONS(x)           NOP
+#endif
+
 /** Set object system debugging to level 2.  @see DOXGRP_DEBUG */
-#define DEBUG_OBJ              2
+#define DEBUG_OBJ                2
 /**
  * Object debugging macro.
  *
@@ -741,9 +748,16 @@
  * @see DOXGRP_DEBUG
  * @ingroup DOXGRP_DEBUG
  */
-#define D_OBJ(x)               DPRINTF2(x)
+#if DEBUG >= DEBUG_OBJ
+#  define D_OBJ_IF               if (DEBUG_LEVEL >= DEBUG_OBJ)
+#  define D_OBJ(x)               do { D_OBJ_IF {DPRINTF(x);} } while (0)
+#else
+#  define D_OBJ_IF               if (0)
+#  define D_OBJ(x)               NOP
+#endif
+
 /** Set config file parser debugging to level 3.  @see DOXGRP_DEBUG */
-#define DEBUG_CONF             3
+#define DEBUG_CONF               3
 /**
  * Config file parser debugging macro.
  *
@@ -754,9 +768,16 @@
  * @see DOXGRP_DEBUG
  * @ingroup DOXGRP_DEBUG
  */
-#define D_CONF(x)              DPRINTF3(x)
+#if DEBUG >= DEBUG_CONF
+#  define D_CONF_IF              if (DEBUG_LEVEL >= DEBUG_CONF)
+#  define D_CONF(x)              do { D_CONF_IF {DPRINTF(x);} } while (0)
+#else
+#  define D_CONF_IF              if (0)
+#  define D_CONF(x)              NOP
+#endif
+
 /** Set memory allocation debugging to level 5.  @see DOXGRP_DEBUG */
-#define DEBUG_MEM              5
+#define DEBUG_MEM                5
 /**
  * Memory allocation debugging macro.
  *
@@ -767,9 +788,16 @@
  * @see DOXGRP_DEBUG
  * @ingroup DOXGRP_DEBUG
  */
-#define D_MEM(x)               DPRINTF5(x)
+#if DEBUG >= DEBUG_MEM
+#  define D_MEM_IF               if (DEBUG_LEVEL >= DEBUG_MEM)
+#  define D_MEM(x)               do { D_MEM_IF {DPRINTF(x);} } while (0)
+#else
+#  define D_MEM_IF               if (0)
+#  define D_MEM(x)               NOP
+#endif
+
 /** Set strings module debugging to level 9999.  @see DOXGRP_DEBUG */
-#define DEBUG_STRINGS          9999
+#define DEBUG_STRINGS            9999
 /**
  * String routine debugging macro.
  *
@@ -780,9 +808,15 @@
  * @see DOXGRP_DEBUG
  * @ingroup DOXGRP_DEBUG
  */
-#define D_STRINGS(x)           D_NEVER(x)
+#if DEBUG >= DEBUG_STRINGS
+#  define D_STRINGS_IF           if (DEBUG_LEVEL >= DEBUG_STRINGS)
+#  define D_STRINGS(x)           do { D_STRINGS_IF {DPRINTF(x);} } while (0)
+#else
+#  define D_STRINGS_IF           if (0)
+#  define D_STRINGS(x)           NOP
+#endif
 /** Set lexer/parser debugging to level 9999.  @see DOXGRP_DEBUG */
-#define DEBUG_PARSE            9999
+#define DEBUG_PARSE              9999
 /**
  * Lexer/parser debugging macro.
  *
@@ -793,7 +827,13 @@
  * @see DOXGRP_DEBUG
  * @ingroup DOXGRP_DEBUG
  */
-#define D_PARSE(x)             D_NEVER(x)
+#if DEBUG >= DEBUG_PARSE
+#  define D_PARSE_IF             if (DEBUG_LEVEL >= DEBUG_PARSE)
+#  define D_PARSE(x)             do { D_PARSE_IF {DPRINTF(x);} } while (0)
+#else
+#  define D_PARSE_IF             if (0)
+#  define D_PARSE(x)             NOP
+#endif
 
 
 




-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to