[srm-cvs] CVS Update: - Revert srm_debug patch

From: <d.rethans[@]jdimedia.nl>
Date: Sun Aug 25 2002 - 14:04:37 CEST

Date: Sun Aug 25 14:04:35 CEST 2002
User: Derick Rethans
Directory: srm/modules/standard

Log Message:
 [1.00]
 - Revert srm_debug patch
 
Modified files:
           srm/main/main.c (version: 1.58)
           srm/main/srm_config.h.in (version: 1.26)
           srm/main/src/connection.c (version: 1.65)
           srm/main/src/error.c (version: 1.26)
           srm/main/src/srm_client.h (version: 1.25)
           srm/main/src/srm_storage.c (version: 1.32)
           srm/main/src/srm_value.c (version: 1.49)
           srm/main/src/srm_value.h (version: 1.52)
           srm/modules/auth/auth.c (version: 1.24)
           srm/modules/auth/srm_auth.h (version: 1.9)
           srm/modules/mhttp/mhttp.c (version: 1.11)
           srm/modules/standard/standard.c (version: 1.35)

[FILE: /srm/main/main.c]

--- srm/main/main.c:1.57 Wed Jun 26 11:04:51 2002 GMT
+++ srm/main/main.c Sun Aug 25 10:04:30 2002 GMT
@@ -1,4 +1,4 @@
-/* $Id: cvstemp,v 1.57 2002/06/26 13:04:51 kalowsky Exp $ */
+/* $Id: cvstemp,v 1.58 2002/08/25 12:04:30 derick Exp $ */
 
 /* The contents of this file are subject to the Vulcan Logic Public
  * License Version 1.1 (the "License"); you may not use this file
@@ -63,17 +63,24 @@
 static int srm_caught_signal = -1;
 int srm_shutdown;
 static int srm_no_signal_handling = 0;
+#ifdef SRM_DEBUG
+static int srm_no_fork = 1;
+static int srm_log_to_screen = 1;
+#else
 static int srm_no_fork = 0;
 static int srm_log_to_screen = 0;
+#endif
 
 static void srm_show_usage (void)
 {
- printf ("Usage: srmd [-d] [-h] [-S] [-L] [-V] [-X]\n");
- printf (" -d Run the daemon in debug mode\n");
+#ifdef SRM_DEBUG
+ printf ("Usage: srmd [-h] [-S] [-L] [-V]\n");
+ printf (" -L Do not log to screen but to the logfile\n");
+#else
+ printf ("Usage: srmd [-h] [-S] [-L] [-V] [-X]\n");
         printf (" -L Log to screen instead of the logfile\n");
- printf (" In debug mode, this flag is automatic\n");
         printf (" -X Do not fork into background\n");
- printf (" In debug mode, this flag is automatic\n");
+#endif
         printf (" -h Show this help message\n");
         printf (" -S Disable signal handling\n");
         printf (" -V Show the version number\n");
@@ -83,34 +90,35 @@
 {
         int arg;
 
- while ((arg = getopt (argc, argv, "dhLSVX")) != EOF) {
+ while ((arg = getopt (argc, argv, "hLSVX")) != EOF) {
                 switch (arg) {
- case 'd':
- srm_debug = 1;
- srm_log_to_screen = 1;
- srm_no_fork = 1;
- break;
                         case 'h':
                                 srm_show_usage();
                                 exit(0);
                                 break;
                         case 'L':
+#ifdef SRM_DEBUG
+ srm_log_to_screen = 0;
+#else
                                 srm_log_to_screen = 1;
+#endif
                                 break;
                         case 'S':
                                 srm_no_signal_handling = 1;
                                 break;
                         case 'V':
-#if defined(SRM_DEBUG)
- printf ("SRM version %s %u (DEBUG SYMBOLS)\n", SRM_VERSION, SRM_API_VERSION);
+#ifdef SRM_DEBUG
+ printf ("SRM version %s %u (debug build)\n", SRM_VERSION, SRM_API_VERSION);
 #else
                                 printf ("SRM version %s %u\n", SRM_VERSION, SRM_API_VERSION);
 #endif
                                 exit (0);
                                 break;
+#ifndef SRM_DEBUG
                         case 'X':
                                 srm_no_fork = 1;
                                 break;
+#endif
                         default:
                                 return SRM_FAILED;
                 }
@@ -193,8 +201,6 @@
 /******************************************************************************
 ** Initializing phase
 */
- /* initialize system to be not in debug mode yet */
- srm_debug = 0;
 
 /* Parsing commandline arguments */
         if (srm_parse_commandline(argc, argv) == SRM_FAILED) {
@@ -251,9 +257,9 @@
 /* Starting modules */
         srm_load_modules ();
 
- if (srm_debug) {
- srm_functionlist_dump ();
- }
+#ifdef SRM_DEBUG
+ srm_functionlist_dump ();
+#endif
 
 
 /******************************************************************************

[FILE: /srm/main/srm_config.h.in]

--- srm/main/srm_config.h.in:1.25 Wed Jun 26 11:03:17 2002 GMT
+++ srm/main/srm_config.h.in Sun Aug 25 10:04:30 2002 GMT
@@ -1,4 +1,4 @@
-/* $Id: cvstemp,v 1.25 2002/06/26 13:03:17 derick Exp $ */
+/* $Id: cvstemp,v 1.26 2002/08/25 12:04:30 derick Exp $ */
 
 /* The contents of this file are subject to the Vulcan Logic Public
  * License Version 1.1 (the "License"); you may not use this file
@@ -96,7 +96,5 @@
 
 void srm_error (int value, char *format, ...);
 void srm_fmt_message (int level, char *group, char *format, ...);
-
-extern int srm_debug;
 
 #endif

[FILE: /srm/main/src/connection.c]

--- srm/main/src/connection.c:1.64 Tue Jun 25 18:56:58 2002 GMT
+++ srm/main/src/connection.c Sun Aug 25 10:04:32 2002 GMT
@@ -1,4 +1,4 @@
-/* $Id: cvstemp,v 1.64 2002/06/25 20:56:58 kalowsky Exp $ */
+/* $Id: cvstemp,v 1.65 2002/08/25 12:04:32 derick Exp $ */
 
 /* The contents of this file are subject to the Vulcan Logic Public
  * License Version 1.1 (the "License"); you may not use this file
@@ -142,15 +142,16 @@
                 header.type = type;
         }
         header.data_length = size;
- if (srm_debug) {
- dump_packet ((srm_ui8*) &header, sizeof (header));
- }
+
+#ifdef SRM_DEBUG
+ dump_packet ((srm_ui8*) &header, sizeof (header));
+#endif
         write (fd, &header, sizeof (header));
 /* Now the data */
         if (size > 0) {
- if (srm_debug) {
- dump_packet (data, size);
- }
+#ifdef SRM_DEBUG
+ dump_packet (data, size);
+#endif
                 write (fd, data, size);
         }
 } /* 1}}} */
@@ -207,13 +208,13 @@
 
         ret_val = srm_value_init();
 /* Get command from packet */
- if (srm_debug) {
- dump_packet ((srm_ui8*) data, dsize);
- }
+#ifdef SRM_DEBUG
+ dump_packet ((srm_ui8*) data, dsize);
+#endif
         deserialize (data, dsize, (struct srm_value**) &command, 0);
- if (srm_debug) {
- srm_value_dump (command, 0);
- }
+#ifdef SRM_DEBUG
+ srm_value_dump (command, 0);
+#endif
         params = SRMVALP_LIST(command);
         cmd = (struct srm_value *) SRM_LLIST_VALP (SRM_LLIST_HEAD (params));
         srm_fmt_message (LL_DATA, "Notice", "Process Command: %s", cmd->s_value);
@@ -229,16 +230,16 @@
         if (status == SRM_FAILED) {
                 srm_set_error_string ((struct srm_value**) &ret_val, ERRMSG_FUNC_NOT_EXIST);
         }
- if (srm_debug) {
- srm_value_dump (ret_val, 1);
- }
+#ifdef SRM_DEBUG
+ srm_value_dump (ret_val, 1);
+#endif
 
 /* Sending the result */
         serialize (ret_val, (srm_ui8**) &ret_data, &length);
 
- if (srm_debug) {
- dump_packet (ret_data, length);
- }
+#ifdef SRM_DEBUG
+ dump_packet (ret_data, length);
+#endif
 
         server_send_packet (fd, PKT_DATA, ret_data, length, packet);
         
@@ -259,9 +260,9 @@
 
         ret_val = srm_value_init();
         /* Getting data from packet */
- if (srm_debug) {
- dump_packet ((srm_ui8*) pdata, dsize);
- }
+#ifdef SRM_DEBUG
+ dump_packet ((srm_ui8*) pdata, dsize);
+#endif
         deserialize (pdata, dsize, (struct srm_value**) &command, 0);
         srm_fmt_message (LL_DATA, "Notice", "Store data");
         e = SRM_LLIST_HEAD (command->list);
@@ -271,9 +272,9 @@
         e = SRM_LLIST_NEXT(e);
         data = (struct srm_value *) SRM_LLIST_VALP(e);
         srm_fmt_message (LL_DATA, "Store", "Store = %d", store->u8_value);
- if (srm_debug) {
- srm_value_dump (data, 0);
- }
+#ifdef SRM_DEBUG
+ srm_value_dump (data, 0);
+#endif
 
         switch (store->u8_value) {
                 case SRM_ST_APPLICATION:
@@ -322,9 +323,9 @@
 
         ret_val = srm_value_init();
         /* Getting data from packet */
- if (srm_debug) {
- dump_packet ((srm_ui8*) pdata, dsize);
- }
+#ifdef SRM_DEBUG
+ dump_packet ((srm_ui8*) pdata, dsize);
+#endif
         deserialize (pdata, dsize, (struct srm_value**) &command, 0);
         srm_fmt_message (LL_DATA, "Notice", "Retrieve data");
         store = (struct srm_value *) SRM_LLIST_VALP (SRM_LLIST_HEAD (command->list));
@@ -353,9 +354,9 @@
         }
 
 /* Sending the result */
- if (srm_debug) {
- srm_value_dump (ret_val, 0);
- }
+#ifdef SRM_DEBUG
+ srm_value_dump (ret_val, 0);
+#endif
         serialize (ret_val, (srm_ui8**) &ret_data, &length);
         server_send_packet (fd, PKT_DATA, ret_data, length, packet);
         
@@ -378,16 +379,16 @@
 
         ret_val = srm_value_init();
         /* Getting data from packet */
- if (srm_debug) {
- dump_packet ((srm_ui8*) pdata, dsize);
- }
+#ifdef SRM_DEBUG
+ dump_packet ((srm_ui8*) pdata, dsize);
+#endif
         deserialize (pdata, dsize, (struct srm_value**) &command, 0);
         srm_fmt_message (LL_DATA, "Notice", "Delete data");
         store = (struct srm_value *) SRM_LLIST_VALP (SRM_LLIST_HEAD (command->list));
         key = (struct srm_value *) SRM_LLIST_VALP (SRM_LLIST_NEXT (SRM_LLIST_HEAD (command->list)));
- if (srm_debug) {
- srm_fmt_message (LL_DATA, "Delete", "Store = %d", store->u8_value);
- }
+#ifdef SRM_DEBUG
+ srm_fmt_message (LL_DATA, "Delete", "Store = %d", store->u8_value);
+#endif
 
         switch (store->u8_value) {
                 case SRM_ST_APPLICATION:
@@ -462,10 +463,10 @@
                 connection_abort (fd);
                 return SRM_FAILED;
         } else {
- if (srm_debug) {
- dump_packet ((srm_ui8*) &header, length);
- }
- /* Checking for more data if needed */
+#ifdef SRM_DEBUG
+ dump_packet ((srm_ui8*) &header, length);
+#endif
+ /* Checking for more data if needed */
                 if (header.data_length != 0) {
                         data = malloc (header.data_length);
                         while (read_bytes < header.data_length) {

[FILE: /srm/main/src/error.c]

--- srm/main/src/error.c:1.25 Mon Jan 14 18:53:52 2002 GMT
+++ srm/main/src/error.c Sun Aug 25 10:04:32 2002 GMT
@@ -1,4 +1,4 @@
-/* $Id: cvstemp,v 1.25 2002/01/14 19:53:52 peter Exp $ */
+/* $Id: cvstemp,v 1.26 2002/08/25 12:04:32 derick Exp $ */
 
 /* The contents of this file are subject to the Vulcan Logic Public
  * License Version 1.1 (the "License"); you may not use this file
@@ -29,8 +29,6 @@
 #include "srm_config.h"
 #include "srm_value.h"
 
-#define SET_ERROR_MAXLENGTH 255 /* {FIX ME: Dodgy :/ } */
-
 static FILE *logfile;
 static int debug_level;
 static pthread_mutex_t log_mtx = PTHREAD_MUTEX_INITIALIZER;
@@ -131,25 +129,5 @@
                 fflush(logfile);
         }
         pthread_mutex_unlock(&log_mtx);
-}
-
-void srm_set_error_string (srm_value** err_sval, char* format, ...)
-{
- va_list ap;
-
- if (!*err_sval)
- *err_sval = srm_value_init();
-
- /* Set the error bits in the type */
- (*err_sval)->type = SRM_VALUE_STR | SRM_VALUE_ERROR;
-
- if (((*err_sval)->s_value = malloc (SET_ERROR_MAXLENGTH)) == NULL) {
- printf ("I'm already in the bloody error function MKAY!? Hell must be breaking loose\n");
- exit(1);
- }
-
- va_start (ap, format);
- (void) vsnprintf ((*err_sval)->s_value, SET_ERROR_MAXLENGTH, format, ap);
- (*err_sval)->value_length = strlen ((*err_sval)->s_value);
 }
 

[FILE: /srm/main/src/srm_client.h]

--- srm/main/src/srm_client.h:1.24 Wed Jun 26 11:03:18 2002 GMT
+++ srm/main/src/srm_client.h Sun Aug 25 10:04:32 2002 GMT
@@ -1,4 +1,4 @@
-/* $Id: cvstemp,v 1.24 2002/06/26 13:03:18 derick Exp $ */
+/* $Id: cvstemp,v 1.25 2002/08/25 12:04:32 derick Exp $ */
 
 /* The contents of this file are subject to the Vulcan Logic Public
  * License Version 1.1 (the "License"); you may not use this file
@@ -29,8 +29,6 @@
 #include "srm_config.h"
 #include "srm_hash.h"
 #include "srm_value.h"
-
-int srm_debug;
 
 typedef struct connect_data_t {
         int sock;

[FILE: /srm/main/src/srm_storage.c]

--- srm/main/src/srm_storage.c:1.31 Fri Jun 21 01:05:34 2002 GMT
+++ srm/main/src/srm_storage.c Sun Aug 25 10:04:32 2002 GMT
@@ -1,4 +1,4 @@
-/* $Id: cvstemp,v 1.31 2002/06/21 03:05:34 kalowsky Exp $ */
+/* $Id: cvstemp,v 1.32 2002/08/25 12:04:32 derick Exp $ */
 
 /* The contents of this file are subject to the Vulcan Logic Public
  * License Version 1.1 (the "License"); you may not use this file
@@ -140,9 +140,9 @@
 
 int srm_global_data_store (srm_ui8* key, srm_ui8 key_length, struct srm_value* data)
 {
- if (srm_debug) {
- srm_fmt_message (LL_DATA, "Notice", "Storing data with key `%s`", key);
- }
+#ifdef SRM_DEBUG
+ srm_fmt_message (LL_DATA, "Notice", "Storing data with key `%s`", key);
+#endif
         srm_hash_add (AST, key, key_length, (void*) data);
         return SRM_SUCCESS;
 }
@@ -174,9 +174,9 @@
 
 int srm_session_data_store (srm_ui8* key, srm_ui8 key_length, struct srm_value* data)
 {
- if (srm_debug) {
+#ifdef SRM_DEBUG
                 srm_fmt_message (LL_DATA, "Notice", "Storing data with key `%s`", key);
- }
+#endif
         srm_hash_add (SST, key, key_length, (void*) data);
         return SRM_SUCCESS;
 }

[FILE: /srm/main/src/srm_value.c]

--- srm/main/src/srm_value.c:1.48 Wed Jun 26 11:03:18 2002 GMT
+++ srm/main/src/srm_value.c Sun Aug 25 10:04:32 2002 GMT
@@ -1,4 +1,4 @@
-/* $Id: cvstemp,v 1.48 2002/06/26 13:03:18 derick Exp $ */
+/* $Id: cvstemp,v 1.49 2002/08/25 12:04:32 derick Exp $ */
 
 /* The contents of this file are subject to the Vulcan Logic Public
  * License Version 1.1 (the "License"); you may not use this file
@@ -48,6 +48,26 @@
         return tmp;
 }
 
+void srm_set_error_string (srm_value** err_sval, char* format, ...)
+{
+ va_list ap;
+
+ if (!*err_sval)
+ *err_sval = srm_value_init();
+
+ /* Set the error bits in the type */
+ (*err_sval)->type = SRM_VALUE_STR | SRM_VALUE_ERROR;
+
+ if (((*err_sval)->s_value = malloc (SET_ERROR_MAXLENGTH)) == NULL) {
+ printf ("I'm already in the bloody error function MKAY!? Hell must be breaking loose\n");
+ exit(1);
+ }
+
+ va_start (ap, format);
+ (void) vsnprintf ((*err_sval)->s_value, SET_ERROR_MAXLENGTH, format, ap);
+ (*err_sval)->value_length = strlen ((*err_sval)->s_value);
+}
+
 struct srm_value* srm_value_duplicate (srm_value *original)
 {
         int type = original->type;
@@ -93,21 +113,21 @@
                         break;
                         
                 case SRM_VALUE_HASH:
- if (srm_debug) {
- printf("srm_value_duplicate() called with SRM_VALUE_HASH: Not Implemented yet.\n");
- }
+#ifdef SRM_DEBUG
+ printf("srm_value_duplicate() called with SRM_VALUE_HASH: Not Implemented yet.\n");
+#endif
                         return NULL;
 
                 case SRM_VALUE_OBJECT:
- if (srm_debug) {
- printf("srm_value_duplicate() called with SRM_VALUE_HASH: Not Implemented yet.\n");
- }
+#ifdef SRM_DEBUG
+ printf("srm_value_duplicate() called with SRM_VALUE_HASH: Not Implemented yet.\n");
+#endif
                         return NULL;
 
                 case SRM_VALUE_LIST:
- if (srm_debug) {
- printf("srm_value_duplicate() called with SRM_VALUE_LIST: Not Implemented yet.\n");
- }
+#ifdef SRM_DEBUG
+ printf("srm_value_duplicate() called with SRM_VALUE_LIST: Not Implemented yet.\n");
+#endif
                         return NULL;
                  default:
                         return NULL;

[FILE: /srm/main/src/srm_value.h]

--- srm/main/src/srm_value.h:1.51 Thu Jun 06 09:06:50 2002 GMT
+++ srm/main/src/srm_value.h Sun Aug 25 10:04:32 2002 GMT
@@ -1,4 +1,4 @@
-/* $Id: cvstemp,v 1.51 2002/06/06 11:06:50 derick Exp $ */
+/* $Id: cvstemp,v 1.52 2002/08/25 12:04:32 derick Exp $ */
 
 /* The contents of this file are subject to the Vulcan Logic Public
  * License Version 1.1 (the "License"); you may not use this file
@@ -356,6 +356,8 @@
         int ref_count;
 } srm_value;
 /* }}} */
+
+#define SET_ERROR_MAXLENGTH 255 /* {FIX ME: Dodgy :/ } */
 
 typedef struct srm_host_t {
         char* host;

[FILE: /srm/modules/auth/auth.c]

--- srm/modules/auth/auth.c:1.23 Fri Jun 21 01:41:24 2002 GMT
+++ srm/modules/auth/auth.c Sun Aug 25 10:04:34 2002 GMT
@@ -1,4 +1,4 @@
-/* $Id: cvstemp,v 1.23 2002/06/21 03:41:24 kalowsky Exp $ */
+/* $Id: cvstemp,v 1.24 2002/08/25 12:04:34 derick Exp $ */
 
 /* The contents of this file are subject to the Vulcan Logic Public
  * License Version 1.1 (the "License"); you may not use this file
@@ -328,11 +328,11 @@
                 return FALSE;
         diff = 1;
 
- if (srm_debug) {
- printf("USER : %s\n", auth->user);
- printf("DIFF : %d\n", (int) diff);
- printf("TL : %d\n", (int) auth->timeleft);
- }
+#ifdef SRM_DEBUG
+ printf("USER : %s\n", auth->user);
+ printf("DIFF : %d\n", (int) diff);
+ printf("TL : %d\n", (int) auth->timeleft);
+#endif
 
         if (auth->timeleft <= diff) {
                 free (auth->user);

[FILE: /srm/modules/auth/srm_auth.h]

--- srm/modules/auth/srm_auth.h:1.8 Tue Feb 19 17:42:51 2002 GMT
+++ srm/modules/auth/srm_auth.h Sun Aug 25 10:04:34 2002 GMT
@@ -1,4 +1,4 @@
-/* $Id: cvstemp,v 1.8 2002/02/19 18:42:51 derick Exp $ */
+/* $Id: cvstemp,v 1.9 2002/08/25 12:04:34 derick Exp $ */
 
 /* The contents of this file are subject to the Vulcan Logic Public
  * License Version 1.1 (the "License"); you may not use this file
@@ -43,8 +43,10 @@
 } auth_auth_info;
 
 #if HAVE_SRM_AUTH
+#ifndef srmmod_auth_ptr
 extern s_module_entry auth_module_entry;
 #define srmmod_auth_ptr &auth_module_entry
+#endif
 
 SRM_LOAD(auth);
 SRM_UNLOAD(auth);
@@ -57,9 +59,11 @@
 SRM_FUNCTION(auth_logout);
 
 /* Thread function */
+#ifndef srmmod_auth_tid
 SRM_MTHREAD_FUNCTION(auth);
 extern pthread_t auth_thread_id;
 #define srmmod_auth_tid &auth_thread_id
+#endif
 
 #else
 #define srmmod_auth_ptr NULL

[FILE: /srm/modules/mhttp/mhttp.c]

--- srm/modules/mhttp/mhttp.c:1.10 Fri Jun 21 07:51:06 2002 GMT
+++ srm/modules/mhttp/mhttp.c Sun Aug 25 10:04:35 2002 GMT
@@ -1,4 +1,4 @@
-/* $Id: cvstemp,v 1.10 2002/06/21 09:51:06 derick Exp $ */
+/* $Id: cvstemp,v 1.11 2002/08/25 12:04:35 derick Exp $ */
 
 /* The contents of this file are subject to the Vulcan Logic Public
  * License Version 1.1 (the "License"); you may not use this file
@@ -183,11 +183,11 @@
                                 default:
                                         pthread_mutex_lock(&http_mutex);
                                         if (-1 != (http_buffer[http_wcount % HTTP_BUFLEN] = accept (fd, (struct sockaddr*) &client, &client_len))) {
- if (srm_debug) {
- iaddr = &client.sin_addr;
- host = gethostbyaddr ((char *) iaddr, sizeof (struct in_addr), AF_INET);
- srm_fmt_message (LL_CONNECTION, "HTTP", "Connect from: %s\n", host->h_name);
- }
+#ifdef SRM_DEBUG
+ iaddr = &client.sin_addr;
+ host = gethostbyaddr ((char *) iaddr, sizeof (struct in_addr), AF_INET);
+ srm_fmt_message (LL_CONNECTION, "HTTP", "Connect from: %s\n", host->h_name);
+#endif
                                                 http_wcount++;
                                                 sem_post(&http_connections);
                                         }
@@ -217,9 +217,9 @@
         srm_value *arg1;
         char *get;
     
- if (srm_debug) {
- srm_value_dump (input, 0);
- }
+#ifdef SRM_DEBUG
+ srm_value_dump (input, 0);
+#endif
       
         SRM_ARGC_CHECK (1);
         SRM_GET_ARG (0, (arg1), STR);

[FILE: /srm/modules/standard/standard.c]

--- srm/modules/standard/standard.c:1.34 Fri Jun 21 01:05:36 2002 GMT
+++ srm/modules/standard/standard.c Sun Aug 25 10:04:35 2002 GMT
@@ -1,4 +1,4 @@
-/* $Id: cvstemp,v 1.34 2002/06/21 03:05:36 kalowsky Exp $ */
+/* $Id: cvstemp,v 1.35 2002/08/25 12:04:35 derick Exp $ */
 
 /* The contents of this file are subject to the Vulcan Logic Public
  * License Version 1.1 (the "License"); you may not use this file
@@ -75,16 +75,16 @@
 {
         struct srm_value *record;
 
- if (srm_debug) {
- printf ("Item: %s\n", e->key.value.str.val);
- }
+#ifdef SRM_DEBUG
+ printf ("Item: %s\n", e->key.value.str.val);
+#endif
         record = srm_value_init();
         VALP_SET_STR(record);
         SRMVALP_STR(record) = (char *) srm_hash_key_to_str (&e->key, &record->value_length);
         srm_llist_insert_next ((srm_llist *) data, NULL, (void *) record);
- if (srm_debug) {
- srm_value_dump (record, 0);
- }
+#ifdef SRM_DEBUG
+ srm_value_dump (record, 0);
+#endif
 }
 /* }}} */
 
@@ -160,9 +160,9 @@
         srm_value *arg1;
         void *dummy;
 
- if (srm_debug) {
- srm_value_dump (input, 0);
- }
+#ifdef SRM_DEBUG
+ srm_value_dump (input, 0);
+#endif
 
         SRM_ARGC_CHECK (1);
         SRM_GET_ARG (0, (arg1), STR);
@@ -195,9 +195,9 @@
         srm_value *arg1;
         void *dummy;
 
- if (srm_debug) {
- srm_value_dump (input, 0);
- }
+#ifdef SRM_DEBUG
+ srm_value_dump (input, 0);
+#endif
 
         SRM_ARGC_CHECK (1);
         SRM_GET_ARG (0, (arg1), STR);
@@ -220,9 +220,9 @@
         char *info[4];
         int i;
 
- if (srm_debug) {
- srm_value_dump (input, 0);
- }
+#ifdef SRM_DEBUG
+ srm_value_dump (input, 0);
+#endif
 
         SRM_ARGC_CHECK (1);
         SRM_GET_ARG (0, (arg1), STR);
@@ -245,9 +245,9 @@
                         VALP_SET_STR(record);
                 }
 
- if (srm_debug) {
- srm_value_dump (record, 0);
- }
+#ifdef SRM_DEBUG
+ srm_value_dump (record, 0);
+#endif
 
                 SRM_RETVAL_LIST(list);
         } else {
@@ -290,9 +290,9 @@
         void *dummy;
         srm_value *key = NULL;
 
- if (srm_debug) {
- srm_value_dump (input, 0);
- }
+#ifdef SRM_DEBUG
+ srm_value_dump (input, 0);
+#endif
 
         SRM_ARGC_CHECK (1);
         SRM_GET_ARG (0, (arg1), STR);
@@ -319,9 +319,9 @@
         srm_value *arg1;
         srm_value *key = NULL;
 
- if (srm_debug) {
- srm_value_dump (input, 0);
- }
+#ifdef SRM_DEBUG
+ srm_value_dump (input, 0);
+#endif
 
         SRM_ARGC_CHECK (1);
         SRM_GET_ARG (0, (arg1), STR);
Received on Sun Aug 25 14:41:20 2002

This archive was generated by hypermail 2.1.8 : Tue Jan 06 2009 - 06:00:02 CET