Reformat: delete trailing whitespace
[yaz-moved-to-github.git] / src / marc_read_xml.c
index 59ffb00..e121aa0 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of the YAZ toolkit.
- * Copyright (C) 1995-2010 Index Data
+ * Copyright (C) 1995-2012 Index Data
  * See the file LICENSE for details.
  */
 
@@ -18,7 +18,6 @@
 
 #include <stdio.h>
 #include <string.h>
-#include <ctype.h>
 #include <yaz/marcdisp.h>
 #include <yaz/wrbuf.h>
 #include <yaz/yaz-util.h>
@@ -60,7 +59,7 @@ int yaz_marc_read_xml_subfields(yaz_marc_t mt, const xmlNode *ptr)
                 }
                 if (ptr_code->type == XML_TEXT_NODE)
                 {
-                    ctrl_data_len = 
+                    ctrl_data_len =
                         strlen((const char *)ptr_code->content);
                 }
                 else
@@ -277,7 +276,7 @@ static int yaz_marc_read_xml_fields(yaz_marc_t mt, const xmlNode *ptr)
                 /* note that indstr[0] is unused so we use indstr[1..] */
                 yaz_marc_add_datafield_xml(mt, ptr_tag,
                                            indstr+1, strlen(indstr+1));
-                
+
                 if (yaz_marc_read_xml_subfields(mt, ptr->children))
                     return -1;
             }
@@ -366,7 +365,7 @@ int yaz_marc_read_xml(yaz_marc_t mt, const xmlNode *ptr)
 {
     int format = 0;
     yaz_marc_reset(mt);
-    
+
     for(; ptr; ptr = ptr->next)
         if (ptr->type == XML_ELEMENT_NODE)
         {
@@ -377,7 +376,7 @@ int yaz_marc_read_xml(yaz_marc_t mt, const xmlNode *ptr)
             }
             else if (!strcmp((const char *) ptr->name, "r"))
             {
-                format = YAZ_MARC_TMARCXML;
+                format = YAZ_MARC_TURBOMARC;
                 break;
             }
             else
@@ -397,12 +396,12 @@ int yaz_marc_read_xml(yaz_marc_t mt, const xmlNode *ptr)
     ptr = ptr->children;
     if (yaz_marc_read_xml_leader(mt, &ptr))
         return -1;
-    
+
     switch (format)
     {
     case YAZ_MARC_MARCXML:
         return yaz_marc_read_xml_fields(mt, ptr->next);
-    case YAZ_MARC_TMARCXML:
+    case YAZ_MARC_TURBOMARC:
         return yaz_marc_read_turbo_xml_fields(mt, ptr->next);
     }
     return -1;