diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-01-25 21:52:17 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-01-25 21:52:17 +0100 |
commit | 970f5d39f27717b1a529b7b250a8ed7c3f791949 (patch) | |
tree | eeffdb5265801c039fb9597b5545d17adcff7aba /src/xxd | |
parent | e295609be20c1b065d6b489214d70e171ae49234 (diff) | |
download | vim-git-970f5d39f27717b1a529b7b250a8ed7c3f791949.tar.gz |
patch 8.1.0821: xxd "usage" output and other arguments not testedv8.1.0821
Problem: Xxd "usage" output and other arguments not tested.
Solution: Add a test to trigger the usage output in various ways. Fix
uncovered problem.
Diffstat (limited to 'src/xxd')
-rw-r--r-- | src/xxd/xxd.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/xxd/xxd.c b/src/xxd/xxd.c index d102db451..d7a556a31 100644 --- a/src/xxd/xxd.c +++ b/src/xxd/xxd.c @@ -508,10 +508,10 @@ main(int argc, char *argv[]) } else if (!STRNCMP(pp, "-c", 2)) { - if (pp[2] && STRNCMP("ols", pp + 2, 3)) - cols = (int)strtol(pp + 2, NULL, 0); - else if (pp[2] && STRNCMP("apitalize", pp + 2, 9)) + if (pp[2] && !STRNCMP("apitalize", pp + 2, 9)) capitalize = 1; + else if (pp[2] && STRNCMP("ols", pp + 2, 3)) + cols = (int)strtol(pp + 2, NULL, 0); else { if (!argv[2]) @@ -523,7 +523,7 @@ main(int argc, char *argv[]) } else if (!STRNCMP(pp, "-g", 2)) { - if (pp[2] && STRNCMP("group", pp + 2, 5)) + if (pp[2] && STRNCMP("roup", pp + 2, 4)) octspergrp = (int)strtol(pp + 2, NULL, 0); else { |