X-Git-Url: http://sru.miketaylor.org.uk/?a=blobdiff_plain;f=index%2Ftrav.c;h=4accc882638042d62975f74ab4e33296d9c14ef2;hb=b879b04a092d5b00cc866cf16f755e55053d2e89;hp=27a803c3cbe20b2495848809c52253056e03a618;hpb=e12dd8d52a43a7159afd90fd2fa80b0072fd2ce7;p=idzebra-moved-to-github.git diff --git a/index/trav.c b/index/trav.c index 27a803c..4accc88 100644 --- a/index/trav.c +++ b/index/trav.c @@ -4,7 +4,10 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: trav.c,v $ - * Revision 1.1 1995-09-01 14:06:36 adam + * Revision 1.2 1995-09-04 12:33:43 adam + * Various cleanup. YAZ util used instead. + * + * Revision 1.1 1995/09/01 14:06:36 adam * Split of work into more files. * */ @@ -17,7 +20,7 @@ #include #include -#include +#include #include "index.h" static void repository_extract_r (int cmd, char *rep) @@ -60,17 +63,17 @@ void copy_file (const char *dst, const char *src) if (d_fd == -1) { - log (LOG_FATAL|LOG_ERRNO, "Cannot create %s", dst); + logf (LOG_FATAL|LOG_ERRNO, "Cannot create %s", dst); exit (1); } if (s_fd == -1) { - log (LOG_FATAL|LOG_ERRNO, "Cannot open %s", src); + logf (LOG_FATAL|LOG_ERRNO, "Cannot open %s", src); exit (1); } if (!(buf = malloc (4096))) { - log (LOG_FATAL|LOG_ERRNO, "malloc"); + logf (LOG_FATAL|LOG_ERRNO, "malloc"); exit (1); } while ((r=read (s_fd, buf, 4096))>0) @@ -79,13 +82,13 @@ void copy_file (const char *dst, const char *src) i = write (d_fd, buf + w, r - w); if (i == -1) { - log (LOG_FATAL|LOG_ERRNO, "write"); + logf (LOG_FATAL|LOG_ERRNO, "write"); exit (1); } } if (r) { - log (LOG_FATAL|LOG_ERRNO, "read"); + logf (LOG_FATAL|LOG_ERRNO, "read"); exit (1); } free (buf); @@ -100,9 +103,9 @@ void del_file (const char *dst) void del_dir (const char *dst) { - log (LOG_DEBUG, "rmdir of %s", dst); + logf (LOG_DEBUG, "rmdir of %s", dst); if (rmdir (dst) == -1) - log (LOG_ERRNO|LOG_WARN, "rmdir"); + logf (LOG_ERRNO|LOG_WARN, "rmdir"); } void repository_update_r (int cmd, char *dst, char *src);