X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Fopt%2Fopt.h;h=f891002fa53890be40251b3e2557c4af3d2cd15e;hb=b989e06c093fb7a2befae277f684fa75b64b9ef5;hp=3dd4edc640b268fd4ad8fa76eff578d6f941807b;hpb=79715b8c08446fe5e74d2ab9e9db00175169eab3;p=ccan diff --git a/ccan/opt/opt.h b/ccan/opt/opt.h index 3dd4edc6..f891002f 100644 --- a/ccan/opt/opt.h +++ b/ccan/opt/opt.h @@ -409,6 +409,12 @@ void opt_show_longval(char buf[OPT_SHOW_LEN], const long *l); char *opt_set_ulongval(const char *arg, unsigned long *ul); void opt_show_ulongval(char buf[OPT_SHOW_LEN], const unsigned long *ul); +/* Set an floating point value, various forms. */ +char *opt_set_floatval(const char *arg, float *f); +void opt_show_floatval(char buf[OPT_SHOW_LEN], const float *f); +char *opt_set_doubleval(const char *arg, double *d); +void opt_show_doubleval(char buf[OPT_SHOW_LEN], const double *d); + /* the following setting functions accept k, M, G, T, P, or E suffixes, which multiplies the numeric value by the corresponding power of 1000 or 1024 (for the _si and _bi versions, respectively).