mirror of /home/gitosis/repositories/libowfat.git

7 changed files with 65 additions and 14 deletions
@ -0,0 +1,22 @@
|
||||
.TH fmt_fill 3 |
||||
.SH NAME |
||||
fmt_fill \- append spaces to a string |
||||
.SH SYNTAX |
||||
.B #include <fmt.h> |
||||
|
||||
unsigned int \fBfmt_fill\fP(char *\fIdest\fR, |
||||
unsigned int \fIsrclen\fR, unsigned int \fIpadlen\fR, |
||||
unsigned int \fImaxlen\fR); |
||||
.SH DESCRIPTION |
||||
fmt_fill appends \fIpadlen\fR-\fIsrclen\fR spaces (if that number is |
||||
positive) to \fIdest\fR (which holds \fIsrclen\fR bytes). It truncates |
||||
the output only if the length would exceed \fImaxlen\fR. |
||||
|
||||
It returns the number of bytes it wrote. |
||||
|
||||
fmt_fill does not append \\0. |
||||
|
||||
If \fIdest\fR equals FMT_LEN (i.e. is zero), fmt_fill returns the number |
||||
of bytes it would have written. |
||||
.SH "SEE ALSO" |
||||
fmt_strn(3), fmt_pad(3) |
@ -0,0 +1,22 @@
|
||||
.TH fmt_pad 3 |
||||
.SH NAME |
||||
fmt_pad \- pad a string with spaces. |
||||
.SH SYNTAX |
||||
.B #include <fmt.h> |
||||
|
||||
unsigned int \fBfmt_pad\fP(char *\fIdest\fR, const char *\fIsource\fR, |
||||
unsigned int \fIsrclen\fR, unsigned int \fIpadlen\fR, |
||||
unsigned int \fImaxlen\fR); |
||||
.SH DESCRIPTION |
||||
fmt_pad writes \fIpadlen\fR-\fIsrclen\fR spaces (if that number is |
||||
positive) and then \fIsrclen\fR characters from \fIsource\fR. It |
||||
truncates the output only if the length would exceed \fImaxlen\fR. |
||||
|
||||
It returns the number of bytes it wrote. |
||||
|
||||
fmt_pad does not append \\0. |
||||
|
||||
If \fIdest\fR equals FMT_LEN (i.e. is zero), fmt_pad returns the number |
||||
of bytes it would have written. |
||||
.SH "SEE ALSO" |
||||
fmt_strn(3), fmt_fill(3) |
Loading…
Reference in new issue