New function iso2709_display to display MARC records in a
[egate.git] / util / iso2709.c
index 927df07..bfb691f 100644 (file)
@@ -1,14 +1,19 @@
 /*
-   gw-res.c: Iso2709 record management
+   Iso2709 record management
 
    Europagate, 1994-1995.
 
    $Log: iso2709.c,v $
-   Revision 1.2  1995/02/10 16:50:32  adam
-   Indicator field moved to 'struct iso2709_dir' from 'struct
-   iso2709_field'.
-   Function iso2709_rm implemented - to delete a MARC record.
-
+   Revision 1.3  1995/02/10 17:05:18  adam
+   New function iso2709_display to display MARC records in a
+   line-by-line format. The iso2709_cvt function no longer
+   prints the record to stderr.
+
+ * Revision 1.2  1995/02/10  16:50:32  adam
+ * Indicator field moved to 'struct iso2709_dir' from 'struct
+ * iso2709_field'.
+ * Function iso2709_rm implemented - to delete a MARC record.
+ *
  * Revision 1.1.1.1  1995/02/09  17:27:11  adam
  * Initial version of email gateway under CVS control.
  *
@@ -115,10 +120,6 @@ Iso2709Rec iso2709_cvt (const char *buf)
     }
     pos++;
     /* deal with datafields */
-#if 0
-    fprintf (stderr, "indicator_len=%d, identifier_len=%d\n", 
-             p->indicator_length, p->identifier_length);
-#endif
     for (dp = p->directory; dp; dp = dp->next)
     {
         int tag00;
@@ -142,9 +143,6 @@ Iso2709Rec iso2709_cvt (const char *buf)
             tag00 = 0;
         else
             tag00 = 1;
-        fprintf (stderr, "%s", dp->tag);
-        if (dp->indicator)
-            fprintf (stderr, " %s", dp->indicator);
         while (1)
         {
             int dpos_n;
@@ -166,9 +164,6 @@ Iso2709Rec iso2709_cvt (const char *buf)
             strncpyx ((*fpp)->data, buf+dpos, dpos_n - dpos);
             dpos = dpos_n;
             
-            if ((*fpp)->identifier)
-                fprintf (stderr, " *%s", (*fpp)->identifier);
-            fprintf (stderr, " %s", (*fpp)->data);
             if (buf[dpos] == ISO2709_FS)
                 break;
             
@@ -176,7 +171,6 @@ Iso2709Rec iso2709_cvt (const char *buf)
             *fpp = malloc (sizeof(**fpp));
             (*fpp)->next = NULL;
         }
-        fprintf (stderr, "\n");
     }
     return p;
 }