Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1368869

[PATCH] leftpad.2: Document new syscall

From Richard Weinberger <richard@nod.at>
Newsgroups linux.kernel
Subject [PATCH] leftpad.2: Document new syscall
Date 2016-04-01 00:40 +0200
Message-ID <riTpU-3gZ-15@gated-at.bofh.it> (permalink)
References <riTpT-3gZ-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Daniel Walter <dwalter@sigma-star.at>

Signed-off-by: Daniel Walter <dwalter@sigma-star.at>
Signed-off-by: Richard Weinberger <richard@nod.at>
---
 man2/leftpad.2 | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)
 create mode 100644 man2/leftpad.2

diff --git a/man2/leftpad.2 b/man2/leftpad.2
new file mode 100644
index 0000000..ff5f401
--- /dev/null
+++ b/man2/leftpad.2
@@ -0,0 +1,55 @@
+.\" Copyright (c) 2016 sigma-star gmbh
+.\" (office@sigma-star.at)
+.\"
+.\" %%%LICENSE_START(GPLv2+_DOC_FULL)
+.\" This is free documentation; you can redistribute it and/or
+.\" modify it under the terms of the GNU General Public License as
+.\" published by the Free Software Foundation; either version 2 of
+.\" the License, or (at your option) any later version.
+.\"
+.\" The GNU General Public License's references to "object code"
+.\" and "executables" are to be interpreted as the output of any
+.\" document formatting or typesetting system, including
+.\" intermediate and printed output.
+.\"
+.\" This manual is distributed in the hope that it will be useful,
+.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
+.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+.\" GNU General Public License for more details.
+.\"
+.\" You should have received a copy of the GNU General Public
+.\" License along with this manual; if not, see
+.\" <http://www.gnu.org/licenses/>.
+.\" %%%LICENSE_END
+.\"
+.TH LEFTPAD 2 2016-04-01 "Linux" "Linux Programmer's Manual"
+.SH NAME
+leftpad
+.SH SYNOPSIS
+.nf
+.B #include <sys/types.h>
+
+.BI "int leftpad(char *src, char pad, char *dst, size_t dst_len);
+.fi
+.SH DESCRIPTION
+This function provides left padding for strings.
+.LP
+The string in
+.I src
+will be left padded with the chosen padding character
+.I pad
+and stored in
+.I dst
+ .
+.SH RETURN VALUE
+On success, returns the number of padding characters added.
+.SH ERRORS
+.TP
+.B EINVAL
+The size of the destination buffer
+.I dst
+is shorter than the source string
+.I src
+ . Or the destination string is longer than 4096 bytes.
+.SH SEE ALSO
+.BR snprintf (3)
-- 
2.7.3

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

New syscall: leftpad() Richard Weinberger <richard@nod.at> - 2016-04-01 00:40 +0200
  [PATCH] Implement leftpad syscall Richard Weinberger <richard@nod.at> - 2016-04-01 00:40 +0200
    Re: [PATCH] Implement leftpad syscall "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com> - 2016-04-01 00:50 +0200
    Re: [PATCH] Implement leftpad syscall Greg KH <gregkh@linuxfoundation.org> - 2016-04-01 01:10 +0200
    Re: [PATCH] Implement leftpad syscall Frederic Weisbecker <fweisbec@gmail.com> - 2016-04-01 03:40 +0200
    Re: [PATCH] Implement leftpad syscall kbuild test robot <lkp@intel.com> - 2016-04-01 05:30 +0200
    Re: [PATCH] Implement leftpad syscall Richard Cochran <richardcochran@gmail.com> - 2016-04-01 09:00 +0200
    Re: [PATCH] Implement leftpad syscall Scotty Bauer <sbauer@eng.utah.edu> - 2016-04-01 09:20 +0200
  [PATCH] leftpad.2: Document new syscall Richard Weinberger <richard@nod.at> - 2016-04-01 00:40 +0200
  Re: New syscall: leftpad() Randy Dunlap <rdunlap@infradead.org> - 2016-04-01 01:40 +0200
    Re: New syscall: leftpad() Richard Weinberger <richard@nod.at> - 2016-04-01 10:10 +0200

csiph-web