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
Read-only sets uses common no write handler
[idzebra-moved-to-github.git]
/
index
/
dirs.c
diff --git
a/index/dirs.c
b/index/dirs.c
index
feb5929
..
b51704b
100644
(file)
--- a/
index/dirs.c
+++ b/
index/dirs.c
@@
-1,5
+1,5
@@
/* This file is part of the Zebra server.
/* This file is part of the Zebra server.
- Copyright (C) 1994-2009 Index Data
+ 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
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
@@
-18,6
+18,9
@@
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
*/
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <stdio.h>
#include <string.h>
#include <assert.h>
@@
-59,13
+62,13
@@
static int dirs_client_proc(char *name, const char *info, int pos,
entry = ci->entries + ci->no_cur;
if (info[0] == sizeof(entry->sysno)+sizeof(entry->mtime))
{
entry = ci->entries + ci->no_cur;
if (info[0] == sizeof(entry->sysno)+sizeof(entry->mtime))
{
- strcpy(entry->path, name + ci->prelen);
+ strcpy(entry->path, name + ci->prelen);
entry->kind = dirs_file;
memcpy(&entry->sysno, info+1, sizeof(entry->sysno));
entry->kind = dirs_file;
memcpy(&entry->sysno, info+1, sizeof(entry->sysno));
- memcpy(&entry->mtime, info+1+sizeof(entry->sysno),
+ memcpy(&entry->mtime, info+1+sizeof(entry->sysno),
sizeof(entry->mtime));
ci->no_cur++;
sizeof(entry->mtime));
ci->no_cur++;
- }
+ }
else if (info[0] == sizeof(entry->mtime))
{
strcpy(entry->path, name + ci->prelen);
else if (info[0] == sizeof(entry->mtime))
{
strcpy(entry->path, name + ci->prelen);
@@
-117,10
+120,10
@@
struct dirs_info *dirs_fopen(Dict dict, const char *path, int rw)
info = dict_lookup(dict, path);
if (info && info[0] == sizeof(entry->sysno)+sizeof(entry->mtime))
{
info = dict_lookup(dict, path);
if (info && info[0] == sizeof(entry->sysno)+sizeof(entry->mtime))
{
- strcpy(entry->path, path);
+ strcpy(entry->path, path);
entry->kind = dirs_file;
memcpy(&entry->sysno, info+1, sizeof(entry->sysno));
entry->kind = dirs_file;
memcpy(&entry->sysno, info+1, sizeof(entry->sysno));
- memcpy(&entry->mtime, info+1+sizeof(entry->sysno),
+ memcpy(&entry->mtime, info+1+sizeof(entry->sysno),
sizeof(entry->mtime));
p->no_cur++;
}
sizeof(entry->mtime));
p->no_cur++;
}
@@
-222,6
+225,7
@@
void dirs_free(struct dirs_info **pp)
/*
* Local variables:
* c-basic-offset: 4
/*
* Local variables:
* c-basic-offset: 4
+ * c-file-style: "Stroustrup"
* indent-tabs-mode: nil
* End:
* vim: shiftwidth=4 tabstop=8 expandtab
* indent-tabs-mode: nil
* End:
* vim: shiftwidth=4 tabstop=8 expandtab