-/* $Id: update_path.c,v 1.5 2007-12-20 11:15:42 adam Exp $
- Copyright (C) 1995-2007
- Index Data ApS
-
-This file is part of the Zebra server.
+/* This file is part of the Zebra server.
+ Copyright (C) 2004-2013 Index Data
Zebra is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
*/
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
#include <stdio.h>
#include <assert.h>
#include <sys/types.h>
rep[rep_len] = '/';
else
--rep_len;
-
+
for (i=0; e[i].name; i++)
{
char *ecp;
yaz_log(YLOG_FATAL, "dict_open fail of %s", FMATCH_DICT);
return;
}
-
+
strncpy(src, path, sizeof(src)-1);
src[sizeof(src)-1]='\0';
src_len = strlen(src);
-
+
if (src_len && src[src_len-1] != '/')
{
src[src_len] = '/';
src[++src_len] = '\0';
}
-
+
di = dirs_open(dict, src, zh->m_flag_rw);
-
+
while ((dst = dirs_read(di)))
yaz_log(YLOG_LOG, "%s", dst->path);
dirs_free(&di);
}
-ZEBRA_RES zebra_update_from_path(ZebraHandle zh, const char *path,
+ZEBRA_RES zebra_update_from_path(ZebraHandle zh, const char *path,
enum zebra_recctrl_action_t action)
{
if (!strcmp(path, "") || !strcmp(path, "-"))
{
char src[1024];
-
+
while (scanf("%1020s", src) == 1)
repositoryExtract(zh, src, action);
}
/*
* Local variables:
* c-basic-offset: 4
+ * c-file-style: "Stroustrup"
* indent-tabs-mode: nil
* End:
* vim: shiftwidth=4 tabstop=8 expandtab