Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 15 Jul 2012 11:39:56 +0000 (UTC)
From:      Isabell Long <issyl0@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r238482 - in stable/9/lib/libc: stdlib stdtime
Message-ID:  <201207151139.q6FBduP0045411@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: issyl0 (doc committer)
Date: Sun Jul 15 11:39:56 2012
New Revision: 238482
URL: http://svn.freebsd.org/changeset/base/238482

Log:
  MFC r237573:
   Add more locale-specific functions to the relevant man pages and
   Makefiles:
     - libc/stdtime/strftime.3
     - libc/stdtime/strptime.3
     - libc/stdlib/strfmon.3
  
  Approved by:	gabor (mentor)
  Approved by:	re (kib)

Modified:
  stable/9/lib/libc/stdlib/Makefile.inc
  stable/9/lib/libc/stdlib/strfmon.3
  stable/9/lib/libc/stdtime/Makefile.inc
  stable/9/lib/libc/stdtime/strftime.3
  stable/9/lib/libc/stdtime/strptime.3
Directory Properties:
  stable/9/lib/libc/   (props changed)
  stable/9/lib/libc/stdtime/   (props changed)

Modified: stable/9/lib/libc/stdlib/Makefile.inc
==============================================================================
--- stable/9/lib/libc/stdlib/Makefile.inc	Sun Jul 15 11:39:35 2012	(r238481)
+++ stable/9/lib/libc/stdlib/Makefile.inc	Sun Jul 15 11:39:56 2012	(r238482)
@@ -42,6 +42,7 @@ MLINKS+=rand.3 rand_r.3 rand.3 srand.3 r
 MLINKS+=random.3 initstate.3 random.3 setstate.3 random.3 srandom.3 \
 	random.3 srandomdev.3
 MLINKS+=radixsort.3 sradixsort.3
+MLINKS+=strfmon.3 strfmon_l.3
 MLINKS+=strtod.3 strtof.3 strtod.3 strtold.3
 MLINKS+=strtol.3 strtoll.3 strtol.3 strtoq.3 strtol.3 strtoimax.3
 MLINKS+=strtoul.3 strtoull.3 strtoul.3 strtouq.3 strtoul.3 strtoumax.3

Modified: stable/9/lib/libc/stdlib/strfmon.3
==============================================================================
--- stable/9/lib/libc/stdlib/strfmon.3	Sun Jul 15 11:39:35 2012	(r238481)
+++ stable/9/lib/libc/stdlib/strfmon.3	Sun Jul 15 11:39:56 2012	(r238482)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd October 12, 2002
+.Dd June 25, 2012
 .Dt STRFMON 3
 .Os
 .Sh NAME
@@ -36,6 +36,8 @@
 .In monetary.h
 .Ft ssize_t
 .Fn strfmon "char * restrict s" "size_t maxsize" "const char * restrict format" "..."
+.Ft ssize_t
+.Fn strfmon_l "char * restrict s" "size_t maxsize" "locale_t loc" "const char * restrict format" "..."
 .Sh DESCRIPTION
 The
 .Fn strfmon
@@ -47,6 +49,12 @@ No more than
 .Fa maxsize
 bytes are placed into the array.
 .Pp
+The
+.Fn strfmon_l
+function does the same as
+.Fn strfmon
+but takes an explicit locale rather than using the current locale. 
+.Pp
 The format string is composed of zero or more directives:
 ordinary characters (not
 .Cm % ) ,
@@ -129,6 +137,11 @@ the contents of the array are indetermin
 and
 .Va errno
 is set to indicate the error.
+.Pp
+The
+.Fn strfmon_l
+function returns the same values as
+.Fn strfmon .
 .Sh ERRORS
 The
 .Fn strfmon
@@ -149,6 +162,10 @@ The
 function
 conforms to
 .St -p1003.1-2001 .
+The
+.Fn strfmon_l
+function conforms to
+.St -p1003.1-2008 .
 .Sh AUTHORS
 .An -nosplit
 The

Modified: stable/9/lib/libc/stdtime/Makefile.inc
==============================================================================
--- stable/9/lib/libc/stdtime/Makefile.inc	Sun Jul 15 11:39:35 2012	(r238481)
+++ stable/9/lib/libc/stdtime/Makefile.inc	Sun Jul 15 11:39:56 2012	(r238482)
@@ -18,4 +18,6 @@ MLINKS+=ctime.3 asctime.3 ctime.3 diffti
 	ctime.3 localtime.3 ctime.3 mktime.3 ctime.3 timegm.3 \
 	ctime.3 ctime_r.3 ctime.3 localtime_r.3 ctime.3 gmtime_r.3 \
 	ctime.3 asctime_r.3
+MLINKS+=strftime.3 strftime_l.3
+MLINKS+=strptime.3 strptime_l.3
 MLINKS+=time2posix.3 posix2time.3

Modified: stable/9/lib/libc/stdtime/strftime.3
==============================================================================
--- stable/9/lib/libc/stdtime/strftime.3	Sun Jul 15 11:39:35 2012	(r238481)
+++ stable/9/lib/libc/stdtime/strftime.3	Sun Jul 15 11:39:56 2012	(r238482)
@@ -32,7 +32,7 @@
 .\"     @(#)strftime.3	8.1 (Berkeley) 6/4/93
 .\" $FreeBSD$
 .\"
-.Dd November 4, 2004
+.Dd June 25, 2012
 .Dt STRFTIME 3
 .Os
 .Sh NAME
@@ -49,6 +49,8 @@
 .Fa "const char * restrict format"
 .Fa "const struct tm * restrict timeptr"
 .Fc
+.Ft size_t
+.Fn strftime_l "char *restrict buf" "size_t maxsize" "const char * restrict format" "const struct tm *restrict timeptr" "locale_t loc"
 .Sh DESCRIPTION
 The
 .Fn strftime
@@ -58,6 +60,11 @@ into the buffer
 .Fa buf
 according to the string pointed to by
 .Fa format .
+The function
+.Fn strftime_l
+does the same as
+.Fn strftime
+but takes an explicit locale rather than using the current locale.
 .Pp
 The
 .Fa format
@@ -268,6 +275,10 @@ The peculiar week number and year in the
 and
 .Ql \&%V
 are defined in ISO 8601: 1988.
+The
+.Fn strftime_l
+function conforms to
+.St -p1003.1-2008 .
 .Sh BUGS
 There is no conversion specification for the phase of the moon.
 .Pp

Modified: stable/9/lib/libc/stdtime/strptime.3
==============================================================================
--- stable/9/lib/libc/stdtime/strptime.3	Sun Jul 15 11:39:35 2012	(r238481)
+++ stable/9/lib/libc/stdtime/strptime.3	Sun Jul 15 11:39:56 2012	(r238482)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\" "
-.Dd January 4, 2003
+.Dd June 25, 2012
 .Dt STRPTIME 3
 .Os
 .Sh NAME
@@ -41,6 +41,10 @@
 .Fa "const char * restrict format"
 .Fa "struct tm * restrict timeptr"
 .Fc
+.In time.h
+.In xlocale.h
+.Ft char *
+.Fn strptime_l "const char * restrict buf" "const char * restrict format" "struct tm * restrict timeptr" "locale_t loc"
 .Sh DESCRIPTION
 The
 .Fn strptime
@@ -53,6 +57,11 @@ and fills in the elements of the structu
 The resulting values will be relative to the local time zone.
 Thus, it can be considered the reverse operation of
 .Xr strftime 3 .
+The
+.Fn strptime_l
+function does the same as
+.Fn strptime ,
+but takes an explicit locale rather than using the current locale.
 .Pp
 The
 .Fa format
@@ -104,6 +113,9 @@ that has not been required to satisfy th
 It returns
 .Dv NULL
 if one of the conversions failed.
+.Fn strptime_l
+returns the same values as
+.Fn strptime .
 .Sh SEE ALSO
 .Xr date 1 ,
 .Xr scanf 3 ,



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201207151139.q6FBduP0045411>