* Sebastian Hammer, Adam Dickmeiss
*
* $Log: extract.c,v $
- * Revision 1.92 1999-03-09 16:27:49 adam
+ * 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
+ * Updated dictionary. Implemented "compression" of dictionary.
+ *
+ * Revision 1.92 1999/03/09 16:27:49 adam
* More work on SDRKit integration.
*
* Revision 1.91 1999/02/12 13:29:22 adam
key_buf_used = 0;
key_file_no = 0;
- if (!(matchDict = dict_open (bfs, GMATCH_DICT, 50, rw)))
+ if (!(matchDict = dict_open (bfs, GMATCH_DICT, 50, rw, 0)))
{
logf (LOG_FATAL, "dict_open fail of %s", GMATCH_DICT);
return -1;
static int recordExtract (SYSNO *sysno, const char *fname,
struct recordGroup *rGroup, int deleteFlag,
struct file_read_info *fi,
- RecType recType, char *subType)
+ RecType recType, char *subType, void *clientData)
{
RecordAttr *recordAttr;
int r;
logInfo.rGroup = rGroup;
log_event_start (recordLogPreamble, &logInfo);
- r = (*recType->extract)(&extractCtrl);
+ r = (*recType->extract)(clientData, &extractCtrl);
log_event_start (NULL, NULL);
struct recordGroup rGroupM;
struct recordGroup *rGroup = &rGroupM;
struct file_read_info *fi;
+ void *clientData;
memcpy (rGroup, rGroupP, sizeof(*rGroupP));
if (!*rGroup->recordType)
return 0;
if (!(recType =
- recType_byName (rGroup->recTypes, rGroup->recordType, subType)))
+ recType_byName (rGroup->recTypes, rGroup->recordType, subType,
+ &clientData)))
{
logf (LOG_WARN, "No such record type: %s", rGroup->recordType);
return 0;
{
file_begin (fi);
r = recordExtract (sysno, fname, rGroup, deleteFlag, fi,
- recType, subType);
+ recType, subType, clientData);
} while (r && !sysno && fi->file_more);
file_read_stop (fi);
if (fd != -1)