Minor changes.
[idzebra-moved-to-github.git] / recctrl / recgrs.c
index c9c8a73..f23dbb1 100644 (file)
@@ -4,7 +4,18 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: recgrs.c,v $
- * Revision 1.3  1997-02-24 10:41:50  adam
+ * Revision 1.6  1997-09-04 13:54:40  adam
+ * Added MARC filter - type grs.marc.<syntax> where syntax refers
+ * to abstract syntax. New method tellf in retrieve/extract method.
+ *
+ * Revision 1.5  1997/07/15 16:29:03  adam
+ * Initialized dummy variable to keep checker gcc happy.
+ *
+ * Revision 1.4  1997/04/30 08:56:08  quinn
+ * null
+ *
+ * Revision 1.2  1996/10/11  16:06:43  quinn
+ * Revision 1.3  1997/02/24 10:41:50  adam
  * Cleanup of code and commented out the "end element-end-record" code.
  *
  * Revision 1.2  1996/10/11 16:06:43  quinn
@@ -121,6 +132,7 @@ static data1_node *read_grs_type (struct grs_read_info *p, const char *type)
     } tab[] = {
         { "sgml",  grs_read_sgml },
         { "regx",  grs_read_regx },
+        { "marc",  grs_read_marc },
         { NULL, NULL }
     };
     const char *cp = strchr (type, '.');
@@ -377,6 +389,7 @@ static int grs_extract(struct recExtractCtrl *p)
 
     gri.readf = p->readf;
     gri.seekf = p->seekf;
+    gri.tellf = p->tellf;
     gri.endf = p->endf;
     gri.fh = p->fh;
     gri.offset = p->offset;
@@ -472,6 +485,7 @@ static int grs_retrieve(struct recRetrieveCtrl *p)
     
     gri.readf = p->readf;
     gri.seekf = p->seekf;
+    gri.tellf = p->tellf;
     gri.endf = NULL;
     gri.fh = p->fh;
     gri.offset = 0;
@@ -571,9 +585,10 @@ static int grs_retrieve(struct recRetrieveCtrl *p)
        p->input_format : VAL_SUTRS))
     {
        data1_marctab *marctab;
-       int dummy;
+        int dummy;
 
        case VAL_GRS1:
+           dummy = 0;
            if (!(p->rec_buf = data1_nodetogr(node, selected, p->odr, &dummy)))
                p->diagnostic = 2; /* this should be better specified */
            else