summaryrefslogtreecommitdiff
path: root/examples/enough.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/enough.c')
-rw-r--r--examples/enough.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/examples/enough.c b/examples/enough.c
index b570707..c40410b 100644
--- a/examples/enough.c
+++ b/examples/enough.c
@@ -141,7 +141,7 @@ struct tab { /* type for been here check */
For the deflate example of 286 symbols limited to 15-bit codes, the array
has 284,284 entries, taking up 2.17 MB for an 8-byte big_t. More than
half of the space allocated for saved results is actually used -- not all
- possible triplets are reached in the generation of valid Huffman codes.
+ possible triplets are reached in the generation of valid Huffman codes.
*/
/* The array for tracking visited states, done[], is itself indexed identically
@@ -466,19 +466,19 @@ int main(int argc, char **argv)
/* get arguments -- default to the deflate literal/length code */
syms = 286;
- root = 9;
+ root = 9;
max = 15;
if (argc > 1) {
syms = atoi(argv[1]);
if (argc > 2) {
root = atoi(argv[2]);
- if (argc > 3)
- max = atoi(argv[3]);
- }
+ if (argc > 3)
+ max = atoi(argv[3]);
+ }
}
if (argc > 4 || syms < 2 || root < 1 || max < 1) {
fputs("invalid arguments, need: [sym >= 2 [root >= 1 [max >= 1]]]\n",
- stderr);
+ stderr);
return 1;
}
@@ -556,8 +556,8 @@ int main(int argc, char **argv)
}
/* find and show maximum inflate table usage */
- if (root > max) /* reduce root to max length */
- root = max;
+ if (root > max) /* reduce root to max length */
+ root = max;
if (syms < ((code_t)1 << (root + 1)))
enough(syms);
else