X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=dict%2Fdicttest.c;h=181f14a71406f2003b6fb1d3dc77a6c1af27d248;hb=062978fe7432da086bd0cb468149d88d1b6414cf;hp=07e19f1d4755d746838d903c4ee9e5145f97b1ed;hpb=6c820cde24f590dcb4d88842af0f4a246a9e7c71;p=idzebra-moved-to-github.git diff --git a/dict/dicttest.c b/dict/dicttest.c index 07e19f1..181f14a 100644 --- a/dict/dicttest.c +++ b/dict/dicttest.c @@ -4,7 +4,16 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: dicttest.c,v $ - * Revision 1.17 1995-12-06 17:48:30 adam + * Revision 1.19 1996-02-02 13:43:50 adam + * The public functions simply use char instead of Dict_char to represent + * search strings. Dict_char is used internally only. + * + * Revision 1.18 1996/02/01 20:39:52 adam + * Bug fix: insert didn't work on 8-bit characters due to unsigned char + * compares in dict_strcmp (strcmp) and signed Dict_char. Dict_char is + * unsigned now. + * + * Revision 1.17 1995/12/06 17:48:30 adam * Bug fix: delete didn't work. * * Revision 1.16 1995/10/09 16:18:31 adam @@ -74,7 +83,7 @@ static Dict dict; static int look_hits; -static int grep_handle (Dict_char *name, const char *info, void *client) +static int grep_handle (char *name, const char *info, void *client) { look_hits++; printf ("%s\n", name); @@ -105,8 +114,17 @@ int main (int argc, char **argv) { fprintf (stderr, "usage:\n " " %s [-d] [-r n] [-u] [-g pat] [-s n] [-v n] [-i f] [-w]" - " [-c n] base file\n", + " [-c n] base file\n\n", prog); + fprintf (stderr, " -d delete instead of insert\n"); + fprintf (stderr, " -r n set regular match range\n"); + fprintf (stderr, " -u report if keys change during insert\n"); + fprintf (stderr, " -g p try pattern n (see -r)\n"); + fprintf (stderr, " -s n set info size to n (instead of 4)\n"); + fprintf (stderr, " -v n set logging level\n"); + fprintf (stderr, " -i f read file with words\n"); + fprintf (stderr, " -w insert/delete instead of lookup\n"); + fprintf (stderr, " -c n cache size (number of pages)\n"); exit (1); } while ((ret = options ("dr:ug:s:v:i:wc:", argv, argc, &arg)) != -2)