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
6c2f73b
..
b51704b
100644
(file)
--- a/
index/dirs.c
+++ b/
index/dirs.c
@@
-1,8
+1,5
@@
-/* $Id: dirs.c,v 1.28 2007-10-29 09:25:40 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
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
@@
-21,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>
@@
-62,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);
@@
-120,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++;
}
@@
-225,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