From ea2d6c93d28a9c5af94035057c52c36f0618ba2c Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Wed, 2 Mar 2016 09:11:48 +0100 Subject: zstr_length_positive is safe for non-positive, hence rename to zstr_length; and add zstr_length MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- man/zstr.3 | 2 +- man/zstr_length.3 | 24 ++++++++++++++++++++++++ man/zstr_length_positive.3 | 28 ---------------------------- 3 files changed, 25 insertions(+), 29 deletions(-) create mode 100644 man/zstr_length.3 delete mode 100644 man/zstr_length_positive.3 (limited to 'man') diff --git a/man/zstr.3 b/man/zstr.3 index 9fef75b..04cacd9 100644 --- a/man/zstr.3 +++ b/man/zstr.3 @@ -31,6 +31,6 @@ is .BR 0 , the string allocated by the function is returned. .SH SEE ALSO -.BR zstr_length_positive (3), +.BR zstr_length (3), .BR zsets (3), .BR zload (3) diff --git a/man/zstr_length.3 b/man/zstr_length.3 new file mode 100644 index 0000000..cd1014a --- /dev/null +++ b/man/zstr_length.3 @@ -0,0 +1,24 @@ +.TH ZSTR_LENGTH 3 libzahl +.SH NAME +zstr_length - Predict the length of a string +.SH SYNOPSIS +.nf +#include + +size_t zstr_length(z_t \fIa\fP, unsigned long long int\fIradix\fP); +.fi +.SH DESCRIPTION +.B zstr_length +calculates the number of digits required to +to represent the absolute value of +.I a +in the selected +.IR radix . +.SH RETURN VALUE +The number of digits requires to represent +.I a +i the selected +.I radix +is returned. +.SH SEE ALSO +.BR zstr (3) diff --git a/man/zstr_length_positive.3 b/man/zstr_length_positive.3 deleted file mode 100644 index 3696378..0000000 --- a/man/zstr_length_positive.3 +++ /dev/null @@ -1,28 +0,0 @@ -.TH ZSTR_LENGTH_POSITIVE 3 libzahl -.SH NAME -zstr_length_positive - Predict the length of a string -.SH SYNOPSIS -.nf -#include - -size_t zstr_length_positive(z_t \fIa\fP, unsigned long long int\fIradix\fP); -.fi -.SH DESCRIPTION -.B zstr_length_positive -calculates the number of digits required to -to represent -.I a -in the selected -.IR radix . -.P -.I a -must be a positive integer. If it is zero or negative, -undefined behaviour is invoked. -.SH RETURN VALUE -The number of digits requires to represent -.I a -i the selected -.I radix -is returned. -.SH SEE ALSO -.BR zstr (3) -- cgit v1.2.3-70-g09d2