X-Git-Url: http://git.indexdata.com/?p=idzebra-moved-to-github.git;a=blobdiff_plain;f=dict%2Flookupec.c;h=24f4e004d7fe6aa31997dee7cdc30e9e0c22d57a;hp=48d8350fe5fb3b2ae2560b9620eb49d0cca2583c;hb=a66b7d79383ae700f3358731eecfe2aafed0e90d;hpb=97a7adeb9e5059463f039495cc01cfa448463a27 diff --git a/dict/lookupec.c b/dict/lookupec.c index 48d8350..24f4e00 100644 --- a/dict/lookupec.c +++ b/dict/lookupec.c @@ -1,5 +1,5 @@ /* This file is part of the Zebra server. - Copyright (C) 1995-2008 Index Data + 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 @@ -44,7 +44,7 @@ static int lookup_ec(Dict dict, Dict_ptr ptr, 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)); @@ -93,7 +93,7 @@ static int lookup_ec(Dict dict, Dict_ptr ptr, /* 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]; @@ -134,7 +134,7 @@ static MatchInfo *prepare_match(Dict_char *pattern) 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; @@ -170,6 +170,7 @@ int dict_lookup_ec(Dict dict, char *pattern, int range, /* * Local variables: * c-basic-offset: 4 + * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab