diff options
author | Jay Berkenbilt <ejb@ql.org> | 2022-02-01 10:16:58 +0100 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2022-02-01 15:04:55 +0100 |
commit | 5a7bb3474eb10ec9dea8409466a14f72ead73e60 (patch) | |
tree | 481a833d9954eefaab4052957734f4766597e9bd /libqpdf/qpdf | |
parent | 5953116634660065510fa5892fcc42d0a3c5e725 (diff) | |
download | qpdf-5a7bb3474eb10ec9dea8409466a14f72ead73e60.tar.zst |
generate_auto_job: generate overloaded config decls for optional
For optional parameter/choices, generate an overloaded config method
that takes no arguments. This makes it possible to convert from a bare
argument to one that takes an optional parameter without breaking
binary compatibility.
Diffstat (limited to 'libqpdf/qpdf')
-rw-r--r-- | libqpdf/qpdf/auto_job_init.hh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libqpdf/qpdf/auto_job_init.hh b/libqpdf/qpdf/auto_job_init.hh index 28c47be4..17ab0848 100644 --- a/libqpdf/qpdf/auto_job_init.hh +++ b/libqpdf/qpdf/auto_job_init.hh @@ -79,8 +79,6 @@ this->ap.addBare("underlay", b(&ArgParser::argUnderlay)); this->ap.addBare("verbose", [this](){c_main->verbose();}); this->ap.addBare("warning-exit-0", [this](){c_main->warningExit0();}); this->ap.addBare("with-images", [this](){c_main->withImages();}); -this->ap.addOptionalParameter("collate", [this](char *x){c_main->collate(x);}); -this->ap.addOptionalParameter("split-pages", [this](char *x){c_main->splitPages(x);}); this->ap.addRequiredParameter("compression-level", [this](char *x){c_main->compressionLevel(x);}, "level"); this->ap.addRequiredParameter("copy-encryption", [this](char *x){c_main->copyEncryption(x);}, "file"); this->ap.addRequiredParameter("encryption-file-password", [this](char *x){c_main->encryptionFilePassword(x);}, "password"); @@ -100,6 +98,8 @@ this->ap.addRequiredParameter("remove-attachment", [this](char *x){c_main->remov this->ap.addRequiredParameter("rotate", [this](char *x){c_main->rotate(x);}, "[+|-]angle"); this->ap.addRequiredParameter("show-attachment", [this](char *x){c_main->showAttachment(x);}, "attachment"); this->ap.addRequiredParameter("show-object", [this](char *x){c_main->showObject(x);}, "trailer"); +this->ap.addOptionalParameter("collate", [this](char *x){c_main->collate(x);}); +this->ap.addOptionalParameter("split-pages", [this](char *x){c_main->splitPages(x);}); this->ap.addChoices("compress-streams", [this](char *x){c_main->compressStreams(x);}, true, yn_choices); this->ap.addChoices("decode-level", [this](char *x){c_main->decodeLevel(x);}, true, decode_level_choices); this->ap.addChoices("flatten-annotations", [this](char *x){c_main->flattenAnnotations(x);}, true, flatten_choices); |