From e73b09c8b78cf908edac174317379b338f27f406 Mon Sep 17 00:00:00 2001 From: Stephen Brennan Date: Thu, 7 May 2020 21:23:08 -0700 Subject: [PATCH] Correct docs, release 0.2.0 --- CHANGELOG | 6 ++++++ include/sc-argparse.h | 17 ++++------------- meson.build | 2 +- 3 files changed, 11 insertions(+), 14 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index caa1f38..aee8afa 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -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) ------------------ diff --git a/include/sc-argparse.h b/include/sc-argparse.h index ce04a99..98da4cf 100644 --- a/include/sc-argparse.h +++ b/include/sc-argparse.h @@ -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); diff --git a/meson.build b/meson.build index ef4b6fa..bb0b796 100644 --- a/meson.build +++ b/meson.build @@ -1,6 +1,6 @@ project( 'sc-argparse', 'c', - version : '0.1.0', + version : '0.2.0', ) sources = [ -- 2.45.2