X-Git-Url: http://git.indexdata.com/?p=idzebra-moved-to-github.git;a=blobdiff_plain;f=dict%2Flookupec.c;h=975e8347ebf771b856875764e09dc300815233db;hp=70e28a636daecbf0d3feb932eb19b85c53de3b79;hb=ef696645cc3b7e0f4027008d1dc589c0f0f90c1f;hpb=084ad8d210469872bda11c201267a361ca295435 diff --git a/dict/lookupec.c b/dict/lookupec.c index 70e28a6..975e834 100644 --- a/dict/lookupec.c +++ b/dict/lookupec.c @@ -4,7 +4,10 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: lookupec.c,v $ - * Revision 1.8 1999-05-15 14:36:37 adam + * Revision 1.9 1999-05-26 07:49:13 adam + * C++ compilation. + * + * Revision 1.8 1999/05/15 14:36:37 adam * Updated dictionary. Implemented "compression" of dictionary. * * Revision 1.7 1999/02/02 14:50:26 adam @@ -149,9 +152,9 @@ static MatchInfo *prepare_match (Dict_char *pattern) MatchWord *s; MatchInfo *mi; - mi = xmalloc (sizeof(*mi)); + mi = (MatchInfo *) xmalloc (sizeof(*mi)); mi->m = dict_strlen (pattern); - mi->s = s = xmalloc (sizeof(*s)*256); /* 256 !!! */ + mi->s = s = (MatchWord *) xmalloc (sizeof(*s)*256); /* 256 !!! */ for (i=0; i<256; i++) s[i] = 0; for (i=0; pattern[i]; i++) @@ -172,8 +175,8 @@ int dict_lookup_ec (Dict dict, char *pattern, int range, mi = prepare_match ((Dict_char*) pattern); - ri = xmalloc ((dict_strlen((Dict_char*) pattern)+range+2) - * (range+1)*sizeof(*ri)); + ri = (MatchWord *) xmalloc ((dict_strlen((Dict_char*) pattern)+range+2) + * (range+1)*sizeof(*ri)); for (i=0; i<=range; i++) ri[i] = (2<