X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/mLib/blobdiff_plain/0335afec2c33fefcd6d3cb2c39d014ab2519b2c2..13ee740655965453b2f3fcd7093d2d8b13839903:/test/tvec.h diff --git a/test/tvec.h b/test/tvec.h index b2ae674..d16df58 100644 --- a/test/tvec.h +++ b/test/tvec.h @@ -1994,6 +1994,23 @@ extern const struct tvec_floatinfo tvflt_finite, tvflt_nonneg; extern const struct tvec_regty tvty_duration; +/* --- @tvec_parsedurunit@ --- * + * + * Arguments: @double *scale_out@ = where to leave the scale + * @const char **p_inout@ = input unit string, updated + * + * Returns: Zero on success, %$-1$% on error. + * + * Use: If @*p_inout@ begins with a unit string followed by the end + * of the string or some non-alphanumeric character, then store + * the corresponding scale factor in @*scale_out@, advance + * @*p_inout@ past the unit string, and return zero. Otherwise, + * return %$-1$%. + */ + +extern int tvec_parsedurunit(double */*scale_out*/, + const char **/*p_inout*/); + /*----- Enumerated types --------------------------------------------------*/ /* An enumeration describes a set of values of some underlying type, each of