diff options
| author | Stefan Eßer <se@FreeBSD.org> | 2024-08-23 16:45:58 +0000 |
|---|---|---|
| committer | Stefan Eßer <se@FreeBSD.org> | 2024-08-23 16:45:58 +0000 |
| commit | 54d20d67e2af28d948ce2df13feb039fa10900fc (patch) | |
| tree | 1d3407ade6c6c7443abb8f27fc271de76f06819d /include/opt.h | |
| parent | 898b46e930119f988aa96b8946e4937edbdc1982 (diff) | |
vendor/bc: upgrade to version 7.0.0vendor/bc/7.0.0
This is a production release to fix three bugs, none of which
affects well formed scripts on FreeBSD:
The first bug is that bc/dc will exit on macOS when the terminal
is resized.
The second bug is that an array, which should only be a function
parameter, was accepted as part of larger expressions.
The third bug is that the value stack for dc was cleared on any error.
However, this is not how other dc behave. To bring dc more in line
with other implementations, this behavior was changed. This change is
why this version is a new major version.
Diffstat (limited to 'include/opt.h')
| -rw-r--r-- | include/opt.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/opt.h b/include/opt.h index e60328994d8c..41058cb4e29c 100644 --- a/include/opt.h +++ b/include/opt.h @@ -47,7 +47,7 @@ typedef struct BcOpt { /// The array of arguments. - char** argv; + const char** argv; /// The index of the current argument. size_t optind; @@ -59,7 +59,7 @@ typedef struct BcOpt int subopt; /// The option argument. - char* optarg; + const char* optarg; } BcOpt; @@ -103,7 +103,7 @@ typedef struct BcOptLong * @param argv The array of arguments. */ void -bc_opt_init(BcOpt* o, char** argv); +bc_opt_init(BcOpt* o, const char** argv); /** * Parse an option. This returns a value the same way getopt() and getopt_long() |
