[xiph-cvs] cvs commit: ices/src config.c

Michael Smith msmith at xiph.org
Fri Jun 28 21:35:07 PDT 2002



msmith      02/06/28 21:35:07

  Modified:    src      Tag: branch-beta2-rewrite config.c
  Log:
  Fix libxml header locations.

Revision  Changes    Path
No                   revision

<p>No                   revision

<p>1.6.2.4   +16 -12    ices/src/config.c

Index: config.c
===================================================================
RCS file: /usr/local/cvsroot/ices/src/config.c,v
retrieving revision 1.6.2.3
retrieving revision 1.6.2.4
diff -u -r1.6.2.3 -r1.6.2.4
--- config.c	2002/02/09 05:07:01	1.6.2.3
+++ config.c	2002/06/29 04:35:06	1.6.2.4
@@ -1,7 +1,7 @@
 /* config.c
  * - config file reading code, plus default settings.
  *
- * $Id: config.c,v 1.6.2.3 2002/02/09 05:07:01 msmith Exp $
+ * $Id: config.c,v 1.6.2.4 2002/06/29 04:35:06 msmith Exp $
  *
  * Copyright (c) 2001-2002 Michael Smith <msmith at labyrinth.net.au>
  *
@@ -16,9 +16,8 @@
 #include <string.h>
 #include <time.h>
 
-/* these might need tweaking for other systems */
-#include <xmlmemory.h>
-#include <parser.h>
+#include <libxml/xmlmemory.h>
+#include <libxml/parser.h>
 
 #include "thread.h"
 
@@ -81,6 +80,8 @@
 void config_free_params(module_param_t *param)
 {
         module_param_t *next;
+    if(!param)
+        return;
         next = NULL;
         do 
         {
@@ -101,8 +102,8 @@
     int i = 0, foundmodule=0;
     module_param_t *param, *params=NULL;
     
-    if(node == NULL || xmlIsBlankNode(node)) {
-        fprintf(stderr, "Null or empty node in config read\n");
+    if(node == NULL) {
+        fprintf(stderr, "CONFIG ERROR: Null node in config read\n");
         return NULL;
     }
 
@@ -116,16 +117,17 @@
     }
 
     if(!foundmodule) {
-        fprintf(stderr, "Could not find module \"%s\"\n", modulename);
+        fprintf(stderr, "CONFIG ERROR: Could not find module \"%s\"\n", 
+                modulename);
         return NULL;
     }
 
-    fprintf(stderr, "Configuring module \"%s\"...\n", modulename);
+    fprintf(stderr, "CONFIG: Configuring module \"%s\"...\n", modulename);
 
     node = node->xmlChildrenNode;
 
-    if(node == NULL || xmlIsBlankNode(node)) {
-        fprintf(stderr, "Null or empty node in config read\n");
+    if(node == NULL) {
+        fprintf(stderr, "CONFIG ERROR: Null node in config read\n");
         return NULL;
     }
 
@@ -183,7 +185,8 @@
                 if (strcmp(node->name, "module") == 0) {
             chain = _parse_module(doc, node, chain);
             if(!chain) {
-                fprintf(stderr, "Couldn't create processing chain\n");
+                fprintf(stderr, 
+                        "CONFIG ERROR: Couldn't create processing chain\n");
                 return -1;
             }
         }
@@ -224,7 +227,8 @@
     config->input_chain = chain;
 
     if(!chain) {
-        fprintf(stderr, "Could not create input processing chain.\n");
+        fprintf(stderr, 
+                "CONFIG ERROR: Could not create input processing chain.\n");
         return -1;
     }
 

<p><p><p>--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the commits mailing list