-/* $Id: safari.c,v 1.8 2005-06-23 06:45:47 adam Exp $
+/* $Id: safari.c,v 1.12 2006-05-10 08:13:31 adam Exp $
Copyright (C) 1995-2005
Index Data ApS
return tinfo;
}
-static void filter_config(void *clientData, Res res, const char *args)
+static ZEBRA_RES filter_config(void *clientData, Res res, const char *args)
{
-
+ return ZEBRA_OK;
}
static void filter_destroy(void *clientData)
static int fi_gets(struct fi_info *fi, char *dst, int max)
{
- int l;
- for (l = 0; l < max; l++)
+ int l = 0;
+ while(1)
{
- if (!fi_getchar(fi, dst+l))
+ char dstbyte;
+ if (!fi_getchar(fi, &dstbyte))
return 0;
- if (dst[l] == '\n')
+ if (dstbyte == '\n')
break;
+ if (l < max)
+ dst[l++] = dstbyte;
}
dst[l] = '\0';
return 1;
return RECCTRL_EXTRACT_ERROR_GENERIC;
sscanf(line, "%255s", p->match_criteria);
- recWord.index_type = 'w';
+ recWord.index_type = '0';
while (fi_gets(fi, line, sizeof(line)-1))
{
int nor = 0;
&filter_type,
0,
};
+/*
+ * Local variables:
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil
+ * End:
+ * vim: shiftwidth=4 tabstop=8 expandtab
+ */
+