# Copyright (C) 1995, Index Data I/S
# All rights reserved.
# Sebastian Hammer, Adam Dickmeiss
-# $Id: Makefile,v 1.25 1995-11-27 14:21:53 adam Exp $
+# $Id: Makefile,v 1.26 1995-12-04 14:22:25 adam Exp $
SHELL=/bin/sh
RANLIB=ranlib
-YAZLIB=../../yaz/lib/libyaz.a
-YAZINC=-I../../yaz/include
-OSILIB=../../xtimosi/src/libmosi.a ../../yaz/lib/librfc.a
+#YAZLIB=../../yaz/lib/libyaz.a
+YAZLIB=-lyaz
+#YAZINC=-I../../yaz/include
+#OSILIB=../../xtimosi/src/libmosi.a ../../yaz/lib/librfc.a
+OSILIB=../../xtimosi/src/libmosi.a -lrfc
#NETLIB=-lnsl -lsocket
INCLUDE=-I../include $(YAZINC)
TPROG3=zebrasrv
DEFS=$(INCLUDE)
O1 = main.o dir.o dirs.o trav.o extract.o kinput.o kcompare.o \
- symtab.o text.o recctrl.o structrec.o recindex.o
+ symtab.o text.o recctrl.o structrec.o recindex.o regxread.o
O2 = kdump.o
O3 = zserver.o kcompare.o zrpn.o zsets.o text.o recctrl.o structrec.o \
- attribute.o recindex.o zlogs.o
+ attribute.o recindex.o zlogs.o regxread.o
CPP=$(CC) -E
all: $(TPROG1) $(TPROG2) $(TPROG3)
-$(TPROG1): $(O1) ../lib/dict.a \
- ../lib/isam.a ../lib/bfile.a ../lib/alexutil.a
- $(CC) $(CFLAGS) -o $(TPROG1) $(O1) ../lib/dict.a \
- ../lib/isam.a ../lib/bfile.a ../lib/alexutil.a \
+$(TPROG1): $(O1) ../lib/dict.a ../lib/isam.a \
+ ../lib/bfile.a ../lib/dfa.a ../lib/alexutil.a
+ $(CC) $(CFLAGS) -o $(TPROG1) $(O1) \
+ ../lib/dict.a ../lib/isam.a \
+ ../lib/bfile.a ../lib/dfa.a ../lib/alexutil.a \
$(YAZLIB)
$(TPROG2): $(O2)
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: extract.c,v $
- * Revision 1.36 1995-11-30 08:34:29 adam
+ * Revision 1.37 1995-12-04 14:22:27 adam
+ * Extra arg to recType_byName.
+ * Started work on new regular expression parsed input to
+ * structured records.
+ *
+ * Revision 1.36 1995/11/30 08:34:29 adam
* Started work on commit facility.
* Changed a few malloc/free to xmalloc/xfree.
*
static int recordExtract (SYSNO *sysno, const char *fname,
struct recordGroup *rGroup, int deleteFlag,
int fd,
- RecType recType)
+ RecType recType,
+ const char *subType)
{
struct recExtractCtrl extractCtrl;
int r;
char gprefix[128];
char ext[128];
char ext_res[128];
+ char subType[128];
RecType recType;
struct recordGroup rGroupM;
struct recordGroup *rGroup = &rGroupM;
logf (LOG_LOG, "? record %s", fname);
return 0;
}
- if (!(recType = recType_byName (rGroup->recordType)))
+ if (!(recType = recType_byName (rGroup->recordType, subType)))
{
logf (LOG_WARN, "No such record type: %s", rGroup->recordType);
return 0;
}
}
file_read_start (fd);
- recordExtract (sysno, fname, rGroup, deleteFlag, fd, recType);
+ recordExtract (sysno, fname, rGroup, deleteFlag, fd, recType, subType);
file_read_stop (fd);
if (fd != -1)
close (fd);
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: zserver.c,v $
- * Revision 1.28 1995-11-28 09:09:48 adam
+ * Revision 1.29 1995-12-04 14:22:32 adam
+ * Extra arg to recType_byName.
+ * Started work on new regular expression parsed input to
+ * structured records.
+ *
+ * Revision 1.28 1995/11/28 09:09:48 adam
* Zebra config renamed.
* Use setting 'recordId' to identify record now.
* Bug fix in recindex.c: rec_release_blocks was invokeded even
char *fname, *file_type;
RecType rt;
struct recRetrieveCtrl retrieveCtrl;
+ char subType[128];
rec = rec_get (zi->records, sysno);
file_type = rec->info[recInfo_fileType];
fname = rec->info[recInfo_filename];
- if (!(rt = recType_byName (file_type)))
+ if (!(rt = recType_byName (file_type, subType)))
{
logf (LOG_FATAL|LOG_ERRNO, "Retrieve: Cannot handle type %s",
file_type);
}
retrieveCtrl.readf = record_ext_read;
}
+ retrieveCtrl.subType = subType;
retrieveCtrl.localno = sysno;
retrieveCtrl.score = score;
retrieveCtrl.odr = stream;