diff options
author | m-holger <m-holger@kubitscheck.org> | 2022-02-07 14:07:09 +0100 |
---|---|---|
committer | Jay Berkenbilt <jberkenbilt@users.noreply.github.com> | 2022-02-07 18:49:24 +0100 |
commit | 3e98fe46a24d8231ed5f962f5b874032e4994f08 (patch) | |
tree | 724d540b2c7f1b0d5dcdb184b6a7dd01f3b2f319 /examples/pdf-bookmarks.cc | |
parent | 4fd619818c30fb55b144675d3e5d2c83728e6976 (diff) | |
download | qpdf-3e98fe46a24d8231ed5f962f5b874032e4994f08.tar.zst |
Tidy example CLI usage
Change "-" to "--" for named parameters.
Remove spaces inside "[ option ]" for optional parameters.
Fix "pdf-mod-info --dump file" to match usage message.
Diffstat (limited to 'examples/pdf-bookmarks.cc')
-rw-r--r-- | examples/pdf-bookmarks.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/examples/pdf-bookmarks.cc b/examples/pdf-bookmarks.cc index 20a93078..d4501728 100644 --- a/examples/pdf-bookmarks.cc +++ b/examples/pdf-bookmarks.cc @@ -22,13 +22,13 @@ void usage() std::cerr << "Usage: " << whoami << " [options] file.pdf [password]" << std::endl << "Options:" << std::endl - << " -numbers give bookmarks outline-style numbers" + << " --numbers give bookmarks outline-style numbers" << std::endl - << " -lines draw lines to show bookmark hierarchy" + << " --lines draw lines to show bookmark hierarchy" << std::endl - << " -show-open indicate whether a bookmark is initially open" + << " --show-open indicate whether a bookmark is initially open" << std::endl - << " -show-targets show target if possible" + << " --show-targets show target if possible" << std::endl; exit(2); } @@ -177,19 +177,19 @@ int main(int argc, char* argv[]) { if (argv[arg][0] == '-') { - if (strcmp(argv[arg], "-numbers") == 0) + if (strcmp(argv[arg], "--numbers") == 0) { style = st_numbers; } - else if (strcmp(argv[arg], "-lines") == 0) + else if (strcmp(argv[arg], "--lines") == 0) { style = st_lines; } - else if (strcmp(argv[arg], "-show-open") == 0) + else if (strcmp(argv[arg], "--show-open") == 0) { show_open = true; } - else if (strcmp(argv[arg], "-show-targets") == 0) + else if (strcmp(argv[arg], "--show-targets") == 0) { show_targets = true; } |