Better diagnostics for extraction process.
authorAdam Dickmeiss <adam@indexdata.dk>
Fri, 21 May 1999 12:00:17 +0000 (12:00 +0000)
committerAdam Dickmeiss <adam@indexdata.dk>
Fri, 21 May 1999 12:00:17 +0000 (12:00 +0000)
configure
configure.in
include/recctrl.h
index/extract.c
recctrl/recgrs.c
recctrl/rectext.c
recctrl/sgmlread.c

index 5ccddee..83a0dac 100755 (executable)
--- a/configure
+++ b/configure
@@ -1020,17 +1020,19 @@ echo "configure:1009: checking for Tcl" >&5
         SHLIB_VERSION=$TCL_SHLIB_VERSION
         echo "$ac_t""$TCL_VERSION" 1>&6
        ODEFS="-DHAVE_TCL_H=1"
         SHLIB_VERSION=$TCL_SHLIB_VERSION
         echo "$ac_t""$TCL_VERSION" 1>&6
        ODEFS="-DHAVE_TCL_H=1"
+else
+       ODEFS="-DHAVE_TCL_H=0"
 fi
 #
 # sockets
 checkBoth=0
 echo $ac_n "checking for connect""... $ac_c" 1>&6
 fi
 #
 # sockets
 checkBoth=0
 echo $ac_n "checking for connect""... $ac_c" 1>&6
-echo "configure:1029: checking for connect" >&5
+echo "configure:1031: checking for connect" >&5
 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1034 "configure"
+#line 1036 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char connect(); below.  */
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char connect(); below.  */
@@ -1053,7 +1055,7 @@ connect();
 
 ; return 0; }
 EOF
 
 ; return 0; }
 EOF
-if { (eval echo configure:1057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_connect=yes"
 else
   rm -rf conftest*
   eval "ac_cv_func_connect=yes"
 else
@@ -1074,7 +1076,7 @@ fi
 
 if test "$ac_cv_func_connect" = "no"; then
        echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
 
 if test "$ac_cv_func_connect" = "no"; then
        echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
-echo "configure:1078: checking for main in -lsocket" >&5
+echo "configure:1080: checking for main in -lsocket" >&5
 ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1082,14 +1084,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsocket  $LIBS"
 cat > conftest.$ac_ext <<EOF
   ac_save_LIBS="$LIBS"
 LIBS="-lsocket  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1086 "configure"
+#line 1088 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:1093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1115,12 +1117,12 @@ if test "$checkBoth" = "1"; then
        oldLibs=$LIBS
        LIBS="$LIBS -lsocket -lnsl"
        echo $ac_n "checking for accept""... $ac_c" 1>&6
        oldLibs=$LIBS
        LIBS="$LIBS -lsocket -lnsl"
        echo $ac_n "checking for accept""... $ac_c" 1>&6
-echo "configure:1119: checking for accept" >&5
+echo "configure:1121: checking for accept" >&5
 if eval "test \"`echo '$''{'ac_cv_func_accept'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
 if eval "test \"`echo '$''{'ac_cv_func_accept'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1124 "configure"
+#line 1126 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char accept(); below.  */
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char accept(); below.  */
@@ -1143,7 +1145,7 @@ accept();
 
 ; return 0; }
 EOF
 
 ; return 0; }
 EOF
-if { (eval echo configure:1147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_accept=yes"
 else
   rm -rf conftest*
   eval "ac_cv_func_accept=yes"
 else
@@ -1165,12 +1167,12 @@ fi
 
 fi
 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
 
 fi
 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
-echo "configure:1169: checking for gethostbyname" >&5
+echo "configure:1171: checking for gethostbyname" >&5
 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1174 "configure"
+#line 1176 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char gethostbyname(); below.  */
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char gethostbyname(); below.  */
@@ -1193,7 +1195,7 @@ gethostbyname();
 
 ; return 0; }
 EOF
 
 ; return 0; }
 EOF
-if { (eval echo configure:1197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_gethostbyname=yes"
 else
   rm -rf conftest*
   eval "ac_cv_func_gethostbyname=yes"
 else
@@ -1211,7 +1213,7 @@ if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
-echo "configure:1215: checking for main in -lnsl" >&5
+echo "configure:1217: checking for main in -lnsl" >&5
 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1219,14 +1221,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lnsl  $LIBS"
 cat > conftest.$ac_ext <<EOF
   ac_save_LIBS="$LIBS"
 LIBS="-lnsl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1223 "configure"
+#line 1225 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:1230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1251,7 +1253,7 @@ fi
 #
 # tcpd wrapper
 echo $ac_n "checking for main in -lwrap""... $ac_c" 1>&6
 #
 # tcpd wrapper
 echo $ac_n "checking for main in -lwrap""... $ac_c" 1>&6
-echo "configure:1255: checking for main in -lwrap" >&5
+echo "configure:1257: checking for main in -lwrap" >&5
 ac_lib_var=`echo wrap'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 ac_lib_var=`echo wrap'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1259,14 +1261,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lwrap  $LIBS"
 cat > conftest.$ac_ext <<EOF
   ac_save_LIBS="$LIBS"
 LIBS="-lwrap  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1263 "configure"
+#line 1265 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:1270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1289,12 +1291,12 @@ fi
 # 
 # headers
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
 # 
 # headers
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1293: checking for ANSI C header files" >&5
+echo "configure:1295: checking for ANSI C header files" >&5
 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1298 "configure"
+#line 1300 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -1302,7 +1304,7 @@ else
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1306: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1308: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -1319,7 +1321,7 @@ rm -f conftest*
 if test $ac_cv_header_stdc = yes; then
   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
 if test $ac_cv_header_stdc = yes; then
   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 1323 "configure"
+#line 1325 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -1337,7 +1339,7 @@ fi
 if test $ac_cv_header_stdc = yes; then
   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
 if test $ac_cv_header_stdc = yes; then
   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 1341 "configure"
+#line 1343 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -1358,7 +1360,7 @@ if test "$cross_compiling" = yes; then
   :
 else
   cat > conftest.$ac_ext <<EOF
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 1362 "configure"
+#line 1364 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -1369,7 +1371,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
 exit (0); }
 
 EOF
 exit (0); }
 
 EOF
-if { (eval echo configure:1373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   :
 else
 then
   :
 else
index 492aa2c..2c0dc13 100644 (file)
@@ -1,5 +1,5 @@
 # Zebra, Index Data Aps, 1994-1999
 # Zebra, Index Data Aps, 1994-1999
-# $Id: configure.in,v 1.6 1999-05-21 11:08:46 adam Exp $
+# $Id: configure.in,v 1.7 1999-05-21 12:00:17 adam Exp $
 # See the file LICENSE.2 for details.
 #
 AC_INIT(include/zebraver.h)
 # See the file LICENSE.2 for details.
 #
 AC_INIT(include/zebraver.h)
@@ -42,6 +42,8 @@ if test -r ${tclconfig}/tclConfig.sh; then
         SHLIB_VERSION=$TCL_SHLIB_VERSION
         AC_MSG_RESULT($TCL_VERSION)
        ODEFS="-DHAVE_TCL_H=1"
         SHLIB_VERSION=$TCL_SHLIB_VERSION
         AC_MSG_RESULT($TCL_VERSION)
        ODEFS="-DHAVE_TCL_H=1"
+else
+       ODEFS="-DHAVE_TCL_H=0"
 fi
 #
 # sockets
 fi
 #
 # sockets
index 15b7597..44d4618 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: recctrl.h,v $
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: recctrl.h,v $
- * Revision 1.29  1999-05-20 12:57:18  adam
+ * Revision 1.30  1999-05-21 12:00:17  adam
+ * Better diagnostics for extraction process.
+ *
+ * Revision 1.29  1999/05/20 12:57:18  adam
  * Implemented TCL filter. Updated recctrl system.
  *
  * Revision 1.28  1999/03/02 16:15:42  quinn
  * Implemented TCL filter. Updated recctrl system.
  *
  * Revision 1.28  1999/03/02 16:15:42  quinn
@@ -186,6 +189,10 @@ struct recType
                     struct recRetrieveCtrl *ctrl); /* Retrieve proc */
 };
 
                     struct recRetrieveCtrl *ctrl); /* Retrieve proc */
 };
 
+#define RECCTRL_EXTRACT_OK    0
+#define RECCTRL_EXTRACT_EOF   1
+#define RECCTRL_EXTRACT_ERROR 2
+
 typedef struct recTypes *RecTypes;
 
 RecTypes recTypes_init (data1_handle dh);
 typedef struct recTypes *RecTypes;
 
 RecTypes recTypes_init (data1_handle dh);
index d235a44..da261e2 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: extract.c,v $
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: extract.c,v $
- * Revision 1.94  1999-05-20 12:57:18  adam
+ * Revision 1.95  1999-05-21 12:00:17  adam
+ * Better diagnostics for extraction process.
+ *
+ * Revision 1.94  1999/05/20 12:57:18  adam
  * Implemented TCL filter. Updated recctrl system.
  *
  * Revision 1.93  1999/05/15 14:36:38  adam
  * Implemented TCL filter. Updated recctrl system.
  *
  * Revision 1.93  1999/05/15 14:36:38  adam
@@ -1297,14 +1300,16 @@ static int recordExtract (SYSNO *sysno, const char *fname,
 
         log_event_start (NULL, NULL);
 
 
         log_event_start (NULL, NULL);
 
-        if (r)      
-        {
+       if (r == RECCTRL_EXTRACT_EOF)
+           return 0;
+       else if (r == RECCTRL_EXTRACT_ERROR)
+       {
             /* error occured during extraction ... */
             if (rGroup->flagRw &&
                records_processed < rGroup->fileVerboseLimit)
             {
             /* error occured during extraction ... */
             if (rGroup->flagRw &&
                records_processed < rGroup->fileVerboseLimit)
             {
-                logf (LOG_WARN, "fail %s %s %ld code = %d", rGroup->recordType,
-                      fname, (long) recordOffset, r);
+                logf (LOG_WARN, "fail %s %s %ld", rGroup->recordType,
+                      fname, (long) recordOffset);
             }
             return 0;
         }
             }
             return 0;
         }
index a8ed698..e4c910a 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: recgrs.c,v $
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: recgrs.c,v $
- * Revision 1.27  1999-05-20 12:57:18  adam
+ * Revision 1.28  1999-05-21 12:00:17  adam
+ * Better diagnostics for extraction process.
+ *
+ * Revision 1.27  1999/05/20 12:57:18  adam
  * Implemented TCL filter. Updated recctrl system.
  *
  * Revision 1.26  1999/03/02 16:15:44  quinn
  * Implemented TCL filter. Updated recctrl system.
  *
  * Revision 1.26  1999/03/02 16:15:44  quinn
@@ -201,8 +204,9 @@ struct grs_handlers {
     struct grs_handler *handlers;
 };
 
     struct grs_handler *handlers;
 };
 
-static data1_node *read_grs_type (struct grs_handlers *h,
-                                 struct grs_read_info *p, const char *type)
+static int read_grs_type (struct grs_handlers *h,
+                         struct grs_read_info *p, const char *type,
+                         data1_node **root)
 {
     struct grs_handler *gh = h->handlers;
     const char *cp = strchr (type, '.');
 {
     struct grs_handler *gh = h->handlers;
     const char *cp = strchr (type, '.');
@@ -218,19 +222,18 @@ static data1_node *read_grs_type (struct grs_handlers *h,
     {
         if (!memcmp (type, gh->type->type, cp-type))
        {
     {
         if (!memcmp (type, gh->type->type, cp-type))
        {
-           data1_node *node;
            if (!gh->initFlag)
            {
                gh->initFlag = 1;
                gh->clientData = (*gh->type->init)();
            }
            p->clientData = gh->clientData;
            if (!gh->initFlag)
            {
                gh->initFlag = 1;
                gh->clientData = (*gh->type->init)();
            }
            p->clientData = gh->clientData;
-            node = (gh->type->read)(p);
+            *root = (gh->type->read)(p);
            gh->clientData = p->clientData;
            gh->clientData = p->clientData;
-           return node;
+           return 0;
        }
     }
        }
     }
-    return NULL;
+    return 1;
 }
 
 static void grs_add_handler (struct grs_handlers *h, RecTypeGrs t)
 }
 
 static void grs_add_handler (struct grs_handlers *h, RecTypeGrs t)
@@ -416,9 +419,10 @@ static int grs_extract(void *clientData, struct recExtractCtrl *p)
     gri.mem = mem;
     gri.dh = p->dh;
 
     gri.mem = mem;
     gri.dh = p->dh;
 
-    n = read_grs_type (h, &gri, p->subType);
+    if (read_grs_type (h, &gri, p->subType, &n))
+       return RECCTRL_EXTRACT_ERROR;
     if (!n)
     if (!n)
-        return -1;
+        return RECCTRL_EXTRACT_EOF;
 
     oe.proto = PROTO_Z3950;
     oe.oclass = CLASS_SCHEMA;
 
     oe.proto = PROTO_Z3950;
     oe.oclass = CLASS_SCHEMA;
@@ -429,11 +433,11 @@ static int grs_extract(void *clientData, struct recExtractCtrl *p)
     if (dumpkeys(n, p, 0) < 0)
     {
        data1_free_tree(p->dh, n);
     if (dumpkeys(n, p, 0) < 0)
     {
        data1_free_tree(p->dh, n);
-       return -2;
+       return RECCTRL_EXTRACT_ERROR;
     }
     data1_free_tree(p->dh, n);
     nmem_destroy(mem);
     }
     data1_free_tree(p->dh, n);
     nmem_destroy(mem);
-    return 0;
+    return RECCTRL_EXTRACT_OK;
 }
 
 /*
 }
 
 /*
@@ -532,7 +536,12 @@ static int grs_retrieve(void *clientData, struct recRetrieveCtrl *p)
     gri.dh = p->dh;
 
     logf (LOG_DEBUG, "grs_retrieve");
     gri.dh = p->dh;
 
     logf (LOG_DEBUG, "grs_retrieve");
-    node = read_grs_type (h, &gri, p->subType);
+    if (read_grs_type (h, &gri, p->subType, &node))
+    {
+       p->diagnostic = 14;
+        nmem_destroy (mem);
+       return 0;
+    }
     if (!node)
     {
        p->diagnostic = 14;
     if (!node)
     {
        p->diagnostic = 14;
index 6d36db3..24d1c63 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: rectext.c,v $
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: rectext.c,v $
- * Revision 1.10  1999-05-20 12:57:18  adam
+ * Revision 1.11  1999-05-21 12:00:17  adam
+ * Better diagnostics for extraction process.
+ *
+ * Revision 1.10  1999/05/20 12:57:18  adam
  * Implemented TCL filter. Updated recctrl system.
  *
  * Revision 1.9  1998/10/16 08:14:38  adam
  * Implemented TCL filter. Updated recctrl system.
  *
  * Revision 1.9  1998/10/16 08:14:38  adam
@@ -145,7 +148,7 @@ static int text_extract (void *clientData, struct recExtractCtrl *p)
         }
     } while (r > 0);
     buf_close (fi);
         }
     } while (r > 0);
     buf_close (fi);
-    return 0;
+    return RECCTRL_EXTRACT_OK;
 }
 
 static int text_retrieve (void *clientData, struct recRetrieveCtrl *p)
 }
 
 static int text_retrieve (void *clientData, struct recRetrieveCtrl *p)
index 79e7e6f..4fa9780 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: sgmlread.c,v $
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: sgmlread.c,v $
- * Revision 1.6  1999-05-20 12:57:18  adam
+ * Revision 1.7  1999-05-21 12:00:17  adam
+ * Better diagnostics for extraction process.
+ *
+ * Revision 1.6  1999/05/20 12:57:18  adam
  * Implemented TCL filter. Updated recctrl system.
  *
  * Revision 1.5  1999/02/02 14:51:31  adam
  * Implemented TCL filter. Updated recctrl system.
  *
  * Revision 1.5  1999/02/02 14:51:31  adam
 
 static data1_node *grs_read_sgml (struct grs_read_info *p)
 {
 
 static data1_node *grs_read_sgml (struct grs_read_info *p)
 {
-    logf (LOG_LOG, "grs_read_sgml");
     return data1_read_record (p->dh, p->readf, p->fh, p->mem);
 }
 
 static void *grs_init_sgml()
 {
     return data1_read_record (p->dh, p->readf, p->fh, p->mem);
 }
 
 static void *grs_init_sgml()
 {
-    logf (LOG_LOG, "grs_init_gsml");
     return 0;
 }
 
 static void grs_destroy_sgml(void *clientData)
 {
     return 0;
 }
 
 static void grs_destroy_sgml(void *clientData)
 {
-    logf (LOG_LOG, "grs_destroy_sgml");
 }
 
 static struct recTypeGrs sgml_type = {
 }
 
 static struct recTypeGrs sgml_type = {