author | Olivier Brunel
<jjk@jjacky.com> 2023-05-17 07:37:44 UTC |
committer | Olivier Brunel
<jjk@jjacky.com> 2023-07-05 07:37:02 UTC |
parent | a9960d9d9003c089c598eefbfcb28f77225dfed8 |
src/doc/parseopt.h.0.md | +1 | -1 |
src/doc/parseopt.h/parseopt.3.md | +1 | -1 |
src/liblimb/include/limb/parseopt.h | +1 | -1 |
diff --git a/src/doc/parseopt.h.0.md b/src/doc/parseopt.h.0.md index 977ccaf..696d6c7 100644 --- a/src/doc/parseopt.h.0.md +++ b/src/doc/parseopt.h.0.md @@ -51,7 +51,7 @@ The following structure are defined : The following macros are defined : -: *PARSEOPT_INIT* +: *PARSEOPT_ZERO* :: Value to initialize a *struct parseopt*. : *PO_ARG(`ctx`)* diff --git a/src/doc/parseopt.h/parseopt.3.md b/src/doc/parseopt.h/parseopt.3.md index 652e489..56db5e6 100644 --- a/src/doc/parseopt.h/parseopt.3.md +++ b/src/doc/parseopt.h/parseopt.3.md @@ -30,7 +30,7 @@ all possible options. See [[Options]] below for more. The `flags` argument allows to enable certain options, see [[FLAGS]] below. The last argument `ctx` is pointer to an opaque structure, that should be -initialized to *PARSEOPT_INIT*. +initialized to *PARSEOPT_ZERO*. When `parseopt`() returns a positive value, i.e. an option was successfully found, the `PO_ARG`() macro will return a pointer to the option's argument if diff --git a/src/liblimb/include/limb/parseopt.h b/src/liblimb/include/limb/parseopt.h index ad214a4..405a63a 100644 --- a/src/liblimb/include/limb/parseopt.h +++ b/src/liblimb/include/limb/parseopt.h @@ -51,7 +51,7 @@ struct parseopt { u16 off; }; -#define PARSEOPT_INIT { NULL, 0, 0, 0 } +#define PARSEOPT_ZERO { NULL, 0, 0, 0 } #define PO_ARG(ctx) (ctx)->arg #define PO_IDX(ctx) (ctx)->idx