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
Version 2.0.45
[idzebra-moved-to-github.git]
/
dict
/
lookupec.c
diff --git
a/dict/lookupec.c
b/dict/lookupec.c
index
92a348c
..
24f4e00
100644
(file)
--- a/
dict/lookupec.c
+++ b/
dict/lookupec.c
@@
-1,8
+1,5
@@
-/* $Id: lookupec.c,v 1.16 2007-01-15 15:10:15 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) 1994-2010 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
@@
-47,7
+44,7
@@
static int lookup_ec(Dict dict, Dict_ptr ptr,
char *info;
MatchWord match_mask = 1<<(mi->m-1);
char *info;
MatchWord match_mask = 1<<(mi->m-1);
- dict_bf_readp (dict->dbf, ptr, &p);
+ dict_bf_readp(dict->dbf, ptr, &p);
lo = 0;
hi = DICT_nodir(p)-1;
indxp = (short*) ((char*) p+DICT_bsize(p)-sizeof(short));
lo = 0;
hi = DICT_nodir(p)-1;
indxp = (short*) ((char*) p+DICT_bsize(p)-sizeof(short));
@@
-96,7
+93,7
@@
static int lookup_ec(Dict dict, Dict_ptr ptr,
/* unsigned char length of information */
/* char * information */
info = (char*)p - indxp[-lo];
/* unsigned char length of information */
/* char * information */
info = (char*)p - indxp[-lo];
- memcpy (&ch, info+sizeof(Dict_ptr), sizeof(Dict_char));
+ memcpy(&ch, info+sizeof(Dict_ptr), sizeof(Dict_char));
prefix[pos] = ch;
sc = mi->s[ch & 255];
prefix[pos] = ch;
sc = mi->s[ch & 255];
@@
-137,7
+134,7
@@
static MatchInfo *prepare_match(Dict_char *pattern)
MatchInfo *mi;
mi = (MatchInfo *) xmalloc(sizeof(*mi));
MatchInfo *mi;
mi = (MatchInfo *) xmalloc(sizeof(*mi));
- mi->m = dict_strlen (pattern);
+ mi->m = dict_strlen(pattern);
mi->s = s = (MatchWord *) xmalloc(sizeof(*s)*256); /* 256 !!! */
for (i = 0; i < 256; i++)
s[i] = 0;
mi->s = s = (MatchWord *) xmalloc(sizeof(*s)*256); /* 256 !!! */
for (i = 0; i < 256; i++)
s[i] = 0;
@@
-173,6
+170,7
@@
int dict_lookup_ec(Dict dict, char *pattern, int range,
/*
* 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