Main Page | Data Structures | Directories | File List | Data Fields | Globals

ds-sample.c

Go to the documentation of this file.
00001 #include <stdio.h>
00002 #include <stdlib.h>
00003 #include <string.h>
00004 #include <cupl.h>
00005 
00006 #define TBL_SIZE 2048
00007 
00008 int main(int argc, char **argv) {
00009     int h = -1;
00010 
00011         if (argc < 2) {
00012                 fprintf(stderr, "Usage: %s string\n", argv[0]);
00013                 return 0;
00014         }
00015 
00016     h = cupl_hash_get(argv[1], strlen(argv[1]), TBL_SIZE);
00017 
00018     printf("hash: %d.\n", h);
00019     
00020     return 1;
00021 }
00022 
00023 

Generated on Sat Aug 26 12:34:54 2006 for CUPL (Common UNIX Programming Library) by  doxygen 1.3.9.1