projects
/
idzebra-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
returning default schema name or identifier when no element set is specified
[idzebra-moved-to-github.git]
/
recctrl
/
csvread.c
diff --git
a/recctrl/csvread.c
b/recctrl/csvread.c
index
988d5fe
..
6e2b064
100644
(file)
--- a/
recctrl/csvread.c
+++ b/
recctrl/csvread.c
@@
-1,4
+1,4
@@
-/* $Id: csvread.c,v 1.2 2005-12-05 13:58:52 marc Exp $
+/* $Id: csvread.c,v 1.5 2006-05-10 08:13:28 adam Exp $
Copyright (C) 1995-2005
Index Data ApS
Copyright (C) 1995-2005
Index Data ApS
@@
-46,7
+46,7
@@
struct csv_getc_info {
};
*/
};
*/
-static struct csv_t {
+struct csv_t {
NMEM nmem;
int buf_size;
char *buf;
NMEM nmem;
int buf_size;
char *buf;
@@
-66,7
+66,7
@@
static struct csv_t {
};
};
-static void grs_config_csv(void *clientData, Res res, const char *args)
+static ZEBRA_RES grs_config_csv(void *clientData, Res res, const char *args)
{
int i;
struct csv_t *csvp = (struct csv_t*) clientData;
{
int i;
struct csv_t *csvp = (struct csv_t*) clientData;
@@
-91,8
+91,8
@@
static void grs_config_csv(void *clientData, Res res, const char *args)
/* csvp->field_names = 0; */ /*nmem_strdup(csvp->nmem, "a|b|c|d|e");*/
csvp->field_name
/* csvp->field_names = 0; */ /*nmem_strdup(csvp->nmem, "a|b|c|d|e");*/
csvp->field_name
- = nmem_malloc(csvp->nmem,
- sizeof(*(csvp->field_name)) * csvp->max_nr_fields);
+ = nmem_malloc(csvp->nmem,
+ sizeof(*(csvp->field_name)) * csvp->max_nr_fields);
for (i = 0; i < csvp->max_nr_fields; i++){
csvp->field_name[i] = 0;
}
for (i = 0; i < csvp->max_nr_fields; i++){
csvp->field_name[i] = 0;
}
@@
-103,6
+103,7
@@
static void grs_config_csv(void *clientData, Res res, const char *args)
*/
yaz_log (YLOG_LOG, "Ended CSV filter grs_config_csv");
*/
yaz_log (YLOG_LOG, "Ended CSV filter grs_config_csv");
+ return ZEBRA_OK;
}
}
@@
-261,9
+262,9
@@
static data1_node *grs_read_csv (struct grs_read_info *gri)
static void *grs_init_csv(Res res, RecType recType)
{
static void *grs_init_csv(Res res, RecType recType)
{
- yaz_log (YLOG_LOG, "Called CSV filter grs_init_csv");
NMEM m = nmem_create();
struct csv_t *csvp = (struct csv_t *) nmem_malloc(m, sizeof(*csvp));
NMEM m = nmem_create();
struct csv_t *csvp = (struct csv_t *) nmem_malloc(m, sizeof(*csvp));
+ yaz_log (YLOG_LOG, "Called CSV filter grs_init_csv");
csvp->nmem = m;
yaz_log (YLOG_LOG, "Ended CSV filter grs_init_csv");
return csvp;
csvp->nmem = m;
yaz_log (YLOG_LOG, "Ended CSV filter grs_init_csv");
return csvp;
@@
-333,3
+334,11
@@
idzebra_filter
&grs_type_csv,
0,
};
&grs_type_csv,
0,
};
+/*
+ * Local variables:
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil
+ * End:
+ * vim: shiftwidth=4 tabstop=8 expandtab
+ */
+