~brenns10/sc-argparse

e73b09c8b78cf908edac174317379b338f27f406 — Stephen Brennan 2 years ago e263556 v0.2.0
Correct docs, release 0.2.0
3 files changed, 11 insertions(+), 14 deletions(-)

M CHANGELOG
M include/sc-argparse.h
M meson.build
M CHANGELOG => CHANGELOG +6 -0
@@ 10,6 10,12 @@ This project uses the following versioning scheme:
  - Minor version is incremented for new features, or major bug fixes
  - Major version is incremented on any API change which would break programs

0.2.0 (2020-05-07)
------------------

* Add unit testing and corrected API docs
* Fixed several bugs via unit tests

0.1.0 (2020-05-07)
------------------


M include/sc-argparse.h => include/sc-argparse.h +4 -13
@@ 105,23 105,14 @@ struct sc_arg {
 * Given a specification of arguments (@a argspec), and the command line
 * argument list (@a argc and @a argv) -- excluding the program name -- parse
 * all arguments and fill out the "output" fields of the argument spec. Return
 * the number of command line arguments parsed. The remaining arguments are
 * positional.
 *
 * The argument spec explicitly defines every possible argument which uses
 * "short" and "long" flags, e.g. -f and --foo. Positional args are not yet
 * handled.
 *
 * This function is in the early stages of its implementation, and has several
 * limitations. First, in the current implementation, a short flag may not have
 * an argument. Second, in the current implementation, positional arguments
 * must all occur after the short/long flags. Third, this implementation does
 * not check whether required arguments have all been seen.
 * the number of positional arguments which were found. Positional arguments are
 * moved to the beginning of the @a argv array, and their order is the same as
 * they originally appeared.
 *
 * @param argspec An array of sc_arg structures describing arguments
 * @param argc The count of arguments (should not include program name)
 * @param argv Array of arguments (should not include program name)
 * @returns The number of arguments processed
 * @returns The number of positional arguments (in the array @a argv)
 */
int sc_argparse(struct sc_arg argspec[], int argc, char **argv);


M meson.build => meson.build +1 -1
@@ 1,6 1,6 @@
project(
  'sc-argparse', 'c',
  version : '0.1.0',
  version : '0.2.0',
)

sources = [