aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/QPDFArgParser.cc
AgeCommit message (Collapse)Author
2022-07-26Code tidy : replace 0 with nullptr or truem-holger
2022-06-18Use the default logger for other writes to stdout/stderrJay Berkenbilt
When there is no context for writing output or error messages, use the default logger.
2022-04-30Code clean up: use range-style for loops wherever possibleJay Berkenbilt
Where not possible, use "auto" to get the iterator type. Editorial note: I have avoid this change for a long time because of not wanting to make gratuitous changes to version history, which can obscure when certain changes were made, but with having recently touched every single file to apply automatic code formatting and with making several broad changes to the API, I decided it was time to take the plunge and get rid of the older (pre-C++11) verbose iterator syntax. The new code is just easier to read and understand, and in many cases, it will be more effecient as fewer temporary copies are being made. m-holger, if you're reading, you can see that I've finally come around. :-)
2022-04-30Formatting: remove space in range-style for loopsJay Berkenbilt
Change .clang-format and commit automated changes from a fresh run of format-code
2022-04-04Programmatically apply new formatting to codeJay Berkenbilt
Run this: for i in **/*.cc **/*.c **/*.h **/*.hh; do clang-format < $i >| $i.new && mv $i.new $i done
2022-03-19Remove "lt-" workaroundsJay Berkenbilt
The executables that libtool built invoked the underlying binary with an "lt-" prefix. The code contained numerous workarounds for testing, which can now be removed.
2022-02-15Ignore -- at the top level arg parser (fixes #652)Jay Berkenbilt
This was unintended behavior that was added back for backward compatibility. It is intentionally undocumented.
2022-02-08WHITESPACE ONLY -- expand tabs in source codeJay Berkenbilt
This comment expands all tabs using an 8-character tab-width. You should ignore this commit when using git blame or use git blame -w. In the early days, I used to use tabs where possible for indentation, since emacs did this automatically. In recent years, I have switched to only using spaces, which means qpdf source code has been a mixture of spaces and tabs. I have avoided cleaning this up because of not wanting gratuitous whitespaces change to cloud the output of git blame, but I changed my mind after discussing with users who view qpdf source code in editors/IDEs that have other tab widths by default and in light of the fact that I am planning to start applying automatic code formatting soon.
2022-02-07Add QUtil::make_shared_array to help with PointerHolder transitionJay Berkenbilt
2022-02-05Improve use of std::unique_ptrJay Berkenbilt
* Use unique_ptr in place of shared_ptr in some cases * unique_ptr for arrays does not require a custom deleter * use std::make_unique (c++14) where possible
2022-02-04Add a blank line after the first header included in each sourceJay Berkenbilt
2022-02-01Make QPDFArgParser accept const argvJay Berkenbilt
This makes it much more convention to use the initializeFromArgv functions since you can use string literals.
2022-01-30Improve top-level help informationJay Berkenbilt
2022-01-30Use QPDFUsage exception for cli, json, and QPDFJob errorsJay Berkenbilt
2022-01-30QPDFArgParser: remove unused copyFromOtherTableJay Berkenbilt
This was used, but it no longer is, so let's not keep the extra complexity around.
2022-01-30QPDFJob: use std::shared_ptr over PointerHolder where possibleJay Berkenbilt
Also fix QPDFArgParser
2022-01-30Generate help content from manualJay Berkenbilt
This is a massive rewrite of the help text and cli.rst section of the manual. All command-line flags now have their own help and are specifically index. qpdf --help is completely redone.
2022-01-30QPDFArgParser: support adding/printing help informationJay Berkenbilt
2022-01-30QPDFArgParser: handle optional choices including helpJay Berkenbilt
Handle optional choices in addition to required choices. Refactor the way help options are added to completion to make it work with optional help choices.
2022-01-30Add QPDFArgParser::copyFromOtherTableJay Berkenbilt
2022-01-30QPDFJob increment: move arg parsing into QPDFJobJay Berkenbilt
Move ArgParser from qpdf.cc into QPDFJob.cc. It still works with millions of public member variables, but now qpdf.cc is minimal and just calls stable library functions.
2022-01-30QPDFJob increment: basic QPDFJob structureJay Berkenbilt
Move most of the methods called from qpdf.cc after argument parsing into QPDFJob. In this increment, enough QPDFJob API has been added to handle the branch of QPDFJob::run() that creates output with an appropriate division between qpdf.cc and QPDFJob. There are temporary bits of code to enable everything to compile and pass the test suite, including some duplication and hard-coded values.
2022-01-30Implement QPDFArgParser based on ArgParser from qpdf.ccJay Berkenbilt