diff options
| author | Stefan Eßer <se@FreeBSD.org> | 2022-08-30 18:35:22 +0000 |
|---|---|---|
| committer | Stefan Eßer <se@FreeBSD.org> | 2022-08-30 18:37:36 +0000 |
| commit | 161a37cc712bae177402d7143cb21b7d085c69c7 (patch) | |
| tree | 8eabf221dc1a31abf6f88dd6fcdb0b4e2a78fc82 /include/args.h | |
| parent | 1576f66712876ee8b0fcc8b35fb062e1813b4fc0 (diff) | |
Diffstat (limited to 'include/args.h')
| -rw-r--r-- | include/args.h | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/include/args.h b/include/args.h index cf6bcbef621c..515e53b1e891 100644 --- a/include/args.h +++ b/include/args.h @@ -46,10 +46,37 @@ * @param argv The array of arguments. * @param exit_exprs True if bc/dc should exit when there are expressions, * false otherwise. - * @param scale The current scale. + * @param scale A pointer to return the scale that the arguments set, if + * any. + * @param ibase A pointer to return the ibase that the arguments set, if + * any. + * @param obase A pointer to return the obase that the arguments set, if + * any. */ void -bc_args(int argc, char* argv[], bool exit_exprs, BcBigDig scale); +bc_args(int argc, char* argv[], bool exit_exprs, BcBigDig* scale, + BcBigDig* ibase, BcBigDig* obase); + +#if BC_ENABLED + +#if DC_ENABLED + +/// Returns true if the banner should be quieted. +#define BC_ARGS_SHOULD_BE_QUIET (BC_IS_DC || vm->exprs.len > 1) + +#else // DC_ENABLED + +/// Returns true if the banner should be quieted. +#define BC_ARGS_SHOULD_BE_QUIET (vm->exprs.len > 1) + +#endif // DC_ENABLED + +#else // BC_ENABLED + +/// Returns true if the banner should be quieted. +#define BC_ARGS_SHOULD_BE_QUIET (BC_IS_DC) + +#endif // BC_ENABLED // A reference to the list of long options. extern const BcOptLong bc_args_lopt[]; |
