Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libc/stdio Add printf/scanf man pages from FreeBSD



details:   https://anonhg.NetBSD.org/src/rev/36882322577e
branches:  trunk
changeset: 342581:36882322577e
user:      christos <christos%NetBSD.org@localhost>
date:      Tue Dec 29 17:55:23 2015 +0000

description:
Add printf/scanf man pages from FreeBSD

diffstat:

 lib/libc/stdio/Makefile.inc |  13 +++++-
 lib/libc/stdio/printf_l.3   |  84 +++++++++++++++++++++++++++++++++++++++++++++
 lib/libc/stdio/scanf_l.3    |  74 +++++++++++++++++++++++++++++++++++++++
 3 files changed, 168 insertions(+), 3 deletions(-)

diffs (198 lines):

diff -r d6a4343ed344 -r 36882322577e lib/libc/stdio/Makefile.inc
--- a/lib/libc/stdio/Makefile.inc       Tue Dec 29 17:54:43 2015 +0000
+++ b/lib/libc/stdio/Makefile.inc       Tue Dec 29 17:55:23 2015 +0000
@@ -1,5 +1,5 @@
 #      from: @(#)Makefile.inc  5.7 (Berkeley) 6/27/91
-#      $NetBSD: Makefile.inc,v 1.46 2014/10/13 00:40:36 christos Exp $
+#      $NetBSD: Makefile.inc,v 1.47 2015/12/29 17:55:23 christos Exp $
 
 # stdio sources
 .PATH: ${.CURDIR}/stdio
@@ -30,8 +30,8 @@
 MAN+=  fclose.3 ferror.3 fflush.3 fgetln.3 fgets.3 fgetwln.3 fgetws.3 \
        flockfile.3 fmemopen.3 fopen.3 fparseln.3 fputs.3 fputws.3 fread.3 \
        fseek.3 funopen.3 fwide.3 getc.3 getdelim.3 getwc.3 mktemp.3 printf.3 \
-       putc.3 putwc.3 remove.3 scanf.3 setbuf.3 stdio.3 tmpnam.3 \
-       ungetc.3 ungetwc.3 wprintf.3 wscanf.3 open_memstream.3
+       printf_l.3 putc.3 putwc.3 remove.3 scanf.3 scanf_l.3 setbuf.3 stdio.3 \
+       tmpnam.3 ungetc.3 ungetwc.3 wprintf.3 wscanf.3 open_memstream.3
 
 MLINKS+=ferror.3 clearerr.3 ferror.3 feof.3 ferror.3 fileno.3
 MLINKS+=fflush.3 fpurge.3
@@ -67,3 +67,10 @@
 MLINKS+=wscanf.3 fwscanf.3 wscanf.3 swscanf.3 wscanf.3 vwscanf.3
 MLINKS+=wscanf.3 vswscanf.3 wscanf.3 vfwscanf.3
 MLINKS+=open_memstream.3 open_wmemstream.3
+MLINKS+=printf_l.3 asprintf_l.3 printf_l.3 fprintf_l.3 printf_l.3 snprintf_l.3 \
+        printf_l.3 sprintf_l.3 printf_l.3 vasprintf_l.3 printf_l.3  \
+       vfprintf_l.3 printf_l.3 vprintf_l.3 printf_l.3 vsnprintf_l.3 \
+       printf_l.3 vsprintf_l.3
+MLINKS+=scanf_l.3 fscanf_l.3 scanf_l.3 sscanf_l.3 scanf_l.3 vfscanf_l.3 \
+        scanf_l.3 vscanf_l.3 scanf_l.3 vsscanf_l.3
+
diff -r d6a4343ed344 -r 36882322577e lib/libc/stdio/printf_l.3
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/libc/stdio/printf_l.3 Tue Dec 29 17:55:23 2015 +0000
@@ -0,0 +1,84 @@
+.\"    $NetBSD: printf_l.3,v 1.1 2015/12/29 17:55:23 christos Exp $
+.\" Copyright (c) 2012 Isabell Long <issyl0%FreeBSD.org@localhost>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD: head/lib/libc/stdio/printf_l.3 258245 2013-11-17 02:03:45Z eadler $
+.\"
+.Dd December 29, 2015
+.Dt PRINTF_L 3
+.Os
+.Sh NAME
+.Nm printf_l ,
+.Nm asprintf_l ,
+.Nm fprintf_l ,
+.Nm snprintf_l ,
+.Nm sprintf_l ,
+.Nm vasprintf_l ,
+.Nm vfprintf_l ,
+.Nm vprintf_l ,
+.Nm vsnprintf_l ,
+.Nm vsprintf_l
+.Nd formatted output conversion
+.Sh LIBRARY
+.Lb libc
+.Sh SYNOPSIS
+.In stdio.h
+.In locale.h
+.Ft int
+.Fn printf_l "locale_t loc" "const char * restrict format" "..."
+.Ft int
+.Fn asprintf_l "char **ret" "locale_t loc" "const char * format" "..."
+.Ft int
+.Fn fprintf_l "FILE * restrict stream" "locale_t loc" "const char * restrict format" "..."
+.Ft int
+.Fn snprintf_l "char * restrict str" "size_t size" "locale_t loc" "const char * restrict format" "..."
+.Ft int
+.Fn sprintf_l "char * restrict str" "locale_t loc" "const char * restrict format" "..."
+.Ft int
+.Fn vasprintf_l "char **ret" "locale_t loc" "const char *format" "va_list ap"
+.Ft int
+.Fn vfprintf_l "FILE * restrict stream" "locale_t loc" "const char * restrict format" "va_list ap"
+.Ft int
+.Fn vprintf_l "locale_t loc" "const char * restrict format" "va_list ap"
+.Ft int
+.Fn vsnprintf_l "char * restrict str" "size_t size" "locale_t loc" "const char * restrict format" "va_list ap"
+.Ft int
+.Fn vsprintf_l "char * restrict str" "locale_t loc" "const char * restrict format" "va_list ap"
+.Sh DESCRIPTION
+The above functions are used to convert formatted output in the locale
+.Fa loc .
+They behave in the same way as the versions without the _l suffix, but use
+the specified locale rather than the global or per-thread locale.
+See the specific manual pages for more information.
+.Sh SEE ALSO
+.Xr printf 3 ,
+.Xr xlocale 3
+.Sh STANDARDS
+These functions do not conform to any specific standard so they should be
+considered as non-portable local extensions.
+.Sh HISTORY
+These functions first appeared in Darwin and were first implemented in
+.Fx 9.1 
+and
+.Nx 7 .
diff -r d6a4343ed344 -r 36882322577e lib/libc/stdio/scanf_l.3
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/libc/stdio/scanf_l.3  Tue Dec 29 17:55:23 2015 +0000
@@ -0,0 +1,74 @@
+.\"    $NetBSD: scanf_l.3,v 1.1 2015/12/29 17:55:23 christos Exp $
+.\" Copyright (c) 2012 Isabell Long <issyl0%FreeBSD.org@localhost>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD: head/lib/libc/stdio/scanf_l.3 258245 2013-11-17 02:03:45Z eadler $
+.\"
+.Dd December 29, 2015
+.Dt SCANF_L 3
+.Os
+.Sh NAME
+.Nm scanf_l ,
+.Nm fscanf_l ,
+.Nm sscanf_l ,
+.Nm vfscanf_l ,
+.Nm vscanf_l ,
+.Nm vsscanf_l
+.Nd input format conversion
+.Sh LIBRARY
+.Lb libc
+.Sh SYNOPSIS
+.In stdio.h
+.In locale.h
+.Ft int
+.Fn scanf_l "locale_t loc" "const char * restrict format" "..."
+.Ft int
+.Fn fscanf_l "FILE * restrict stream" "locale_t loc" "const char * restrict format" "..."
+.Ft int
+.Fn sscanf_l "const char * restrict str" "locale_t loc" "const char * restrict format" "..."
+.Ft int
+.Fn vfscanf_l "FILE * restrict stream" "locale_t loc" "const char * restrict format" "va_list ap"
+.Ft int
+.Fn vscanf_l "locale_t loc" "const char * restrict format" "va_list ap"
+.Ft int
+.Fn vsscanf_l "const char * restrict str" "locale_t loc" "const char * restrict format" "va_list ap"
+.Sh DESCRIPTION
+The above functions scan input according to a specified
+.Fa format
+in the locale
+.Fa loc .
+They behave in the same way as the versions without the _l suffix, but use
+the specific locale rather than the global or per-thread locale.
+See the specific manual pages for more information.
+.Sh SEE ALSO
+.Xr scanf 3 ,
+.Xr xlocale 3
+.Sh STANDARDS
+These functions do not conform to any specific standard so they should be
+considered as non-portable local extensions.
+.Sh HISTORY
+These functions first appeared in Darwin and were first implemented in
+.Fx 9.1 
+and
+.Nx 7 .



Home | Main Index | Thread Index | Old Index