/*
- * Copyright (C) 1994-1996, Index Data I/S
+ * Copyright (C) 1994-1997, Index Data I/S
* All rights reserved.
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: recgrs.c,v $
- * Revision 1.3 1997-02-24 10:41:50 adam
+ * Revision 1.7 1997-09-05 15:30:10 adam
+ * Changed prototype for chr_map_input - added const.
+ * Added support for C++, headers uses extern "C" for public definitions.
+ *
+ * Revision 1.6 1997/09/04 13:54:40 adam
+ * Added MARC filter - type grs.marc.<syntax> where syntax refers
+ * to abstract syntax. New method tellf in retrieve/extract method.
+ *
+ * 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
} tab[] = {
{ "sgml", grs_read_sgml },
{ "regx", grs_read_regx },
+ { "marc", grs_read_marc },
{ NULL, NULL }
};
const char *cp = strchr (type, '.');
static void dumpkeys_word(data1_node *n, struct recExtractCtrl *p,
data1_att *att)
{
- char *b = n->u.data.data;
+ const char *b = n->u.data.data;
int remain;
- char **map = 0;
+ const char **map = 0;
remain = n->u.data.len - (b - n->u.data.data);
if (remain > 0)
i = 0;
while (map && *map && **map != *CHR_SPACE)
{
- char *cp = *map;
+ const char *cp = *map;
while (i < GRS_MAX_WORD && *cp)
buf[i++] = *(cp++);
static void dumpkeys_phrase(data1_node *n, struct recExtractCtrl *p,
data1_att *att)
{
- char *b = n->u.data.data;
- char buf[GRS_MAX_WORD+1], **map = 0;
+ const char *b = n->u.data.data;
+ char buf[GRS_MAX_WORD+1];
+ const char **map = 0;
RecWord wrd;
int i = 0, remain;
buf[i++] = *CHR_SPACE;
while (map && *map && **map != *CHR_SPACE)
{
- char *cp = *map;
+ const char *cp = *map;
if (i >= GRS_MAX_WORD)
break;
gri.readf = p->readf;
gri.seekf = p->seekf;
+ gri.tellf = p->tellf;
gri.endf = p->endf;
gri.fh = p->fh;
gri.offset = p->offset;
gri.readf = p->readf;
gri.seekf = p->seekf;
+ gri.tellf = p->tellf;
gri.endf = NULL;
gri.fh = p->fh;
gri.offset = 0;
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