OSSP CVS Repository

ossp - Check-in [1840]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 1840
Date: 2002-Feb-11 13:34:29 (local)
2002-Feb-11 12:34:29 (UTC)
User:ms
Branch:
Comment: Added debugging support and made a few corrections.

PR: Submitted by: Reviewed by: Approved by: Obtained from:

Tickets:
Inspections:
Files:
ossp-pkg/rc/rc_private.h      1.1 -> 1.2     33 inserted, 6 deleted

ossp-pkg/rc/rc_private.h 1.1 -> 1.2

--- rc_private.h 2002/02/07 12:35:25     1.1
+++ rc_private.h 2002/02/11 12:34:29     1.2
@@ -27,13 +27,40 @@
 **  rc_private.h: Run-command processor ISO C private API header file
 */
 
-#ifndef __OSSPRC_P_H__
-#define __OSSPRC_P_H__
+#ifndef __OSSPRC_PRIVATE_H__
+#define __OSSPRC_PRIVATE_H__
 
-#include "rc_config.h"
+#ifdef HAVE_CONFIG_H
+#include "ac_config.h"
+#endif
+
+/* Assertion and tracing support */
+#include <assert.h>
+#ifndef DEBUG
+#define NDEBUG
+#define TRACE(expr) ((void)0)
+#else
+#define TRACE(str)  fprintf(stderr, "%s:%d: %s\n", __FILE__, __LINE__, str)
+#endif
 
-#ifdef HAVE_SYS_TIME_H /* must come after include rc_config.h */
-#include <sys/time.h>
+/* Memory debugging support */
+#if defined(HAVE_DMALLOC_H) && defined(WITH_DMALLOC)
+#include "dmalloc.h"
 #endif
 
-#endif /* __OSSPRC_P_H__ */
+/* Define the ability to throw OSSP ex exceptions       */
+#include "ex.h" /* OSSP ex exception handling library   */
+#define RC_THROW(rv) \
+    (  (rv) != RC_OK && (ex_catching && !ex_shielding) \
+     ? (ex_throw(ossprc_id, NULL, (rv)), (rv)) : (rv))
+
+#include "val.h"
+
+
+/* Main rc configuration storage */
+typedef struct {
+    void *pvCtx;
+    val_t *pVal;
+} rc_config_t;
+
+#endif /* __OSSPRC_PRIVATE_H__ */

CVSTrac 2.0.1