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
Reformat: delete trailing whitespace
[idzebra-moved-to-github.git]
/
dict
/
dcompact.c
diff --git
a/dict/dcompact.c
b/dict/dcompact.c
index
4c7e832
..
13b4396
100644
(file)
--- a/
dict/dcompact.c
+++ b/
dict/dcompact.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) 1994-2011 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
@@
-19,6
+19,9
@@
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <stdlib.h>
#include <string.h>
@@
-31,7
+34,7
@@
static void dict_copy_page(Dict dict, char *to_p, char *from_p, int *map)
int i, slen, no = 0;
short *from_indxp, *to_indxp;
char *from_info, *to_info;
int i, slen, no = 0;
short *from_indxp, *to_indxp;
char *from_info, *to_info;
-
+
from_indxp = (short*) ((char*) from_p+DICT_bsize(from_p));
to_indxp = (short*) ((char*) to_p+DICT_bsize(to_p));
to_info = (char*) to_p + DICT_infoffset;
from_indxp = (short*) ((char*) from_p+DICT_bsize(from_p));
to_indxp = (short*) ((char*) to_p+DICT_bsize(to_p));
to_info = (char*) to_p + DICT_infoffset;
@@
-67,7
+70,7
@@
static void dict_copy_page(Dict dict, char *to_p, char *from_p, int *map)
from_info += sizeof(Dict_ptr);
memcpy(&subchar, from_info, sizeof(subchar));
from_info += sizeof(Dict_char);
from_info += sizeof(Dict_ptr);
memcpy(&subchar, from_info, sizeof(subchar));
from_info += sizeof(Dict_char);
-
+
memcpy(to_info, &subptr, sizeof(Dict_ptr));
to_info += sizeof(Dict_ptr);
memcpy(to_info, &subchar, sizeof(Dict_char));
memcpy(to_info, &subptr, sizeof(Dict_ptr));
to_info += sizeof(Dict_ptr);
memcpy(to_info, &subchar, sizeof(Dict_char));
@@
-100,7
+103,7
@@
int dict_copy_compact(BFiles bfs, const char *from_name, const char *to_name)
return -1;
map[0] = 0;
map[1] = dict_from->head.page_size;
return -1;
map[0] = 0;
map[1] = dict_from->head.page_size;
-
+
for (i = 1; i < (int) (dict_from->head.last); i++)
{
void *buf;
for (i = 1; i < (int) (dict_from->head.last); i++)
{
void *buf;