diff options
| author | Mattias Andrée <maandree@kth.se> | 2016-04-27 00:39:31 +0200 |
|---|---|---|
| committer | Mattias Andrée <maandree@kth.se> | 2016-04-27 00:39:31 +0200 |
| commit | eb13267f82e848d9a9b38a2791e5c7008bf8d157 (patch) | |
| tree | 78291e85edd590b0d429a0dab611b85c621d97d7 /man/zstr.3 | |
| parent | zstr_length.3: add missing blank space (diff) | |
| download | libzahl-eb13267f82e848d9a9b38a2791e5c7008bf8d157.tar.gz libzahl-eb13267f82e848d9a9b38a2791e5c7008bf8d157.tar.bz2 libzahl-eb13267f82e848d9a9b38a2791e5c7008bf8d157.tar.xz | |
zstr: add new parameter, n: the known limit out the length of the output
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'man/zstr.3')
| -rw-r--r-- | man/zstr.3 | 18 |
1 files changed, 17 insertions, 1 deletions
@@ -5,7 +5,7 @@ zstr - Create a string representation of a big integer .nf #include <zahl.h> -char *zstr(z_t \fIa\fP, char *\fIstr\fP); +char *zstr(z_t \fIa\fP, char *\fIstr\fP, size_t \fIn\fP); .fi .SH DESCRIPTION .B zstr @@ -19,6 +19,22 @@ is is .BR 0 , .B zstr create a new allocation. +.P +.I n +must be either be zero or a value at least +as great as the length of the resulting string. +If both +.I n +and +.I str +are nonzero, +.I n +must be at least the allocation size of +.I str +minus 1. Proper value for +.I n +can be calculated using +.BR zstr_length (3). .SH RETURN VALUE .I str is returned unless |
