[Openvas-commits] r3356 - in trunk/openvas-manager: . src/tests

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed May 13 12:26:24 CEST 2009


Author: mattm
Date: 2009-05-13 12:26:24 +0200 (Wed, 13 May 2009)
New Revision: 3356

Modified:
   trunk/openvas-manager/ChangeLog
   trunk/openvas-manager/src/tests/common.c
   trunk/openvas-manager/src/tests/common.h
Log:
	* src/tests/common.c (DO_CHILDREN): Move to header.

	* src/tests/common.h (DO_CHILDREN): New macro, from common.c.


Modified: trunk/openvas-manager/ChangeLog
===================================================================
--- trunk/openvas-manager/ChangeLog	2009-05-13 10:23:15 UTC (rev 3355)
+++ trunk/openvas-manager/ChangeLog	2009-05-13 10:26:24 UTC (rev 3356)
@@ -1,5 +1,11 @@
 2009-05-13  Matthew Mundell <mmundell at intevation.de>
 
+	* src/tests/common.c (DO_CHILDREN): Move to header.
+
+	* src/tests/common.h (DO_CHILDREN): New macro, from common.c.
+
+2009-05-13  Matthew Mundell <mmundell at intevation.de>
+
 	* src/tests/omp_status_3.c: Remove tracing.
 
 2009-05-13  Matthew Mundell <mmundell at intevation.de>

Modified: trunk/openvas-manager/src/tests/common.c
===================================================================
--- trunk/openvas-manager/src/tests/common.c	2009-05-13 10:23:15 UTC (rev 3355)
+++ trunk/openvas-manager/src/tests/common.c	2009-05-13 10:26:24 UTC (rev 3356)
@@ -784,41 +784,6 @@
   return 1;
 }
 
-/**
- * @brief Do something for each child of an entity.
- *
- * Calling "break" during body exits the loop.
- *
- * @param[in]  entity  The entity.
- * @param[in]  child   Name to use for child variable.
- * @param[in]  temp    Name to use for internal variable.
- * @param[in]  body    The code to run for each child.
- */
-#define DO_CHILDREN(entity, child, temp, body)      \
-  do                                                \
-    {                                               \
-      GSList* temp = entity->entities;              \
-      while (temp)                                  \
-        {                                           \
-          entity_t child = temp->data;              \
-          {                                         \
-            body;                                   \
-          }                                         \
-          temp = g_slist_next (temp);               \
-        }                                           \
-    }                                               \
-  while (0)
-
-#if 0
-/* Lisp version of DO_CHILDREN. */
-(defmacro do-children ((entity child) &body body)
-  "Do something for each child of an entity."
-  (let ((temp (gensym)))
-    `(while ((,temp (entity-entities ,entity) (rest ,temp)))
-            (,temp)
-       , at body)))
-#endif
-
 
 /* OMP. */
 

Modified: trunk/openvas-manager/src/tests/common.h
===================================================================
--- trunk/openvas-manager/src/tests/common.h	2009-05-13 10:23:15 UTC (rev 3355)
+++ trunk/openvas-manager/src/tests/common.h	2009-05-13 10:26:24 UTC (rev 3356)
@@ -85,6 +85,42 @@
 
 /* OMP. */
 
+// FIX temp export
+/**
+ * @brief Do something for each child of an entity.
+ *
+ * Calling "break" during body exits the loop.
+ *
+ * @param[in]  entity  The entity.
+ * @param[in]  child   Name to use for child variable.
+ * @param[in]  temp    Name to use for internal variable.
+ * @param[in]  body    The code to run for each child.
+ */
+#define DO_CHILDREN(entity, child, temp, body)      \
+  do                                                \
+    {                                               \
+      GSList* temp = entity->entities;              \
+      while (temp)                                  \
+        {                                           \
+          entity_t child = temp->data;              \
+          {                                         \
+            body;                                   \
+          }                                         \
+          temp = g_slist_next (temp);               \
+        }                                           \
+    }                                               \
+  while (0)
+
+#if 0
+/* Lisp version of DO_CHILDREN. */
+(defmacro do-children ((entity child) &body body)
+  "Do something for each child of an entity."
+  (let ((temp (gensym)))
+    `(while ((,temp (entity-entities ,entity) (rest ,temp)))
+            (,temp)
+       , at body)))
+#endif
+
 int
 authenticate (gnutls_session_t* session,
               const char* username,



More information about the Openvas-commits mailing list