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
-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
-#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. */
; 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
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_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
-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
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
-#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. */
; 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
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
-#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. */
; 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
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_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
-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
#
# 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_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
-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
#
# 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
-#line 1298 "configure"
+#line 1300 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
#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*
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
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
:
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')
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
# 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)
SHLIB_VERSION=$TCL_SHLIB_VERSION
AC_MSG_RESULT($TCL_VERSION)
ODEFS="-DHAVE_TCL_H=1"
+else
+ ODEFS="-DHAVE_TCL_H=0"
fi
#
# sockets
* 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
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);
* 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
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)
{
- 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;
}
* 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
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, '.');
{
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;
- node = (gh->type->read)(p);
+ *root = (gh->type->read)(p);
gh->clientData = p->clientData;
- return node;
+ return 0;
}
}
- return NULL;
+ return 1;
}
static void grs_add_handler (struct grs_handlers *h, RecTypeGrs t)
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)
- return -1;
+ return RECCTRL_EXTRACT_EOF;
oe.proto = PROTO_Z3950;
oe.oclass = CLASS_SCHEMA;
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);
- return 0;
+ return RECCTRL_EXTRACT_OK;
}
/*
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;
* 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
}
} while (r > 0);
buf_close (fi);
- return 0;
+ return RECCTRL_EXTRACT_OK;
}
static int text_retrieve (void *clientData, struct recRetrieveCtrl *p)
* 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
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()
{
- logf (LOG_LOG, "grs_init_gsml");
return 0;
}
static void grs_destroy_sgml(void *clientData)
{
- logf (LOG_LOG, "grs_destroy_sgml");
}
static struct recTypeGrs sgml_type = {