Bug fix: Match handler didn't terminate the resulting string!
[idzebra-moved-to-github.git] / recctrl / recgrs.c
index 601e80a..3f57db8 100644 (file)
@@ -4,7 +4,17 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: recgrs.c,v $
- * Revision 1.2  1996-10-11 16:06:43  quinn
+ * 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
  * Fixed arguments to nodetogr
  *
  * Revision 1.1  1996/10/11  10:57:25  adam
@@ -385,7 +395,7 @@ static int grs_extract(struct recExtractCtrl *p)
     if (dumpkeys(n, p, 0) < 0)
     {
        data1_free_tree(n);
-       return -1;
+       return -2;
     }
     data1_free_tree(n);
     nmem_destroy(mem);
@@ -568,9 +578,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