Commit | Line | Data |
---|---|---|
18756bee | 1 | .\" nroff |
2 | .ie t \{\ | |
3 | . ds ss \s8\u | |
4 | . ds se \d\s0 | |
5 | .\} | |
6 | .el \{\ | |
7 | . ds ss ^ | |
8 | . ds se | |
9 | .\} | |
10 | .TH unihash-mkstatic 1 "14 December 2003" "Straylight/Edgeware" "mLib utilities library" | |
11 | .SH NAME | |
12 | unihash-mkstatic \- construct tables for universal hashing | |
13 | .SH SYNOPSIS | |
14 | .B unihash-mkstatic | |
3e7267bf | 15 | .RB [ \-Cc ] |
18756bee | 16 | .RB [ \-s |
17 | .IR symbol ] | |
18 | .RB [ \-i | |
19 | .IR header ] | |
20 | .RB [ \-g | |
21 | .IR macro ] | |
22 | .br | |
23 | \c | |
24 | .RB [ \-k | |
25 | .IR key ] | |
26 | .RB [ \-o | |
27 | .IR filename ] | |
28 | .SH DESCRIPTION | |
29 | The | |
30 | .B unihash-mkstatic | |
31 | program constructs tables for efficient universal hashing (see | |
32 | .BR unihash (3)). | |
33 | It will produce the table as either an array defined in a C source file | |
34 | or as an initializer macro defined in a C header file. | |
35 | .SS "Options" | |
36 | The program accepts no non-option arguments. The options are as | |
37 | follows. | |
38 | .TP | |
39 | .B "\-h, \-\-help" | |
40 | Print a help message to standard output and exit successfully. | |
41 | .TP | |
42 | .B "\-v, \-\-version" | |
43 | Print the program's version number to standard output and exit | |
44 | successfully. | |
45 | .TP | |
46 | .B "\-u, \-\-usage" | |
47 | Print a one-line usage summary to standard output and exit successfully. | |
48 | .TP | |
3e7267bf MW |
49 | .B "\-C, \-\-const" |
50 | When producing C source (the | |
51 | .B \-c | |
52 | option), rather than a header, define the table to be | |
53 | .BR const . | |
54 | .TP | |
18756bee | 55 | .B "\-c, \-\-c-source" |
56 | Produce a C source file which exports a symbol naming the array, instead | |
57 | of a C header file. | |
58 | .TP | |
59 | .BI "\-s, \-\-symbol=" symbol | |
60 | Name the table | |
61 | .IR symbol . | |
62 | This is the name of the macro defined by a header file, or the array | |
63 | exported by a C source. The default macro name is | |
64 | .BR UHI_INIT ; | |
65 | the default array name is | |
66 | .BR uhi . | |
67 | .TP | |
68 | .BI "\-i, \-\-include=" header | |
d4efbcd9 | 69 | Request that generated C source include the named |
18756bee | 70 | .I header |
71 | file. Inserts a | |
72 | line of the form | |
73 | .PP | |
74 | .nf | |
75 | .BI " #include """ header """" | |
76 | .fi | |
77 | .IP | |
78 | at the top of the generated C source. The default is not to include | |
79 | .BR <mLib/unihash.h> , | |
80 | which is necessary to declare the | |
81 | .B unihash_info | |
82 | type. This option does nothing without the | |
83 | .B \-c | |
84 | option. | |
85 | .TP | |
86 | .BI "\-g, \-\-guard=" macro | |
87 | Use the named | |
88 | .I macro | |
89 | as a guard against multiple inclusion of the generated header file. | |
90 | Inserts a pair of lines of the form | |
91 | .PP | |
92 | .nf | |
93 | .BI " #ifndef " macro | |
94 | .BI " #define " macro | |
95 | .fi | |
96 | .IP | |
97 | at the top of the generated header, and a line | |
98 | .PP | |
99 | .nf | |
100 | .BI " #endif" | |
101 | .fi | |
102 | .IP | |
103 | at the end. The default guard macro name is built from the output file | |
104 | name specified with | |
105 | .B \-o | |
106 | by uppercasing all alphabetic characters in the name and replacing | |
d4efbcd9 | 107 | nonalphanumeric characters by underscores |
18756bee | 108 | .RB ` _ '. |
109 | This option does nothing with the | |
110 | .B \-c | |
111 | option. | |
112 | .TP | |
113 | .BI "\-k, \-\-key=" key | |
114 | Specifies the hashing key as an integer. Note that if you want to | |
115 | specify the key in hexadecimal, you must prefix it with | |
116 | .BR 0x . | |
117 | The default key is | |
118 | .BR 0xe07e5bd1 , | |
119 | which is, as far as the author knows, as good as any other fixed value. | |
120 | .TP | |
121 | .SH "SEE ALSO" | |
122 | .BR crc-mktab (1), | |
123 | .BR unihash (3). | |
124 | .SH "AUTHOR" | |
9b5ac6ff | 125 | Mark Wooding, <mdw@distorted.org.uk> |
18756bee | 126 |