Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Jul 2012 20:56:19 +0000 (UTC)
From:      Isabell Long <issyl0@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r238919 - head/lib/libc/locale
Message-ID:  <201207302056.q6UKuJ8Z042620@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: issyl0 (doc committer)
Date: Mon Jul 30 20:56:19 2012
New Revision: 238919
URL: http://svn.freebsd.org/changeset/base/238919

Log:
  Add more locale-specific functions to the relevant man pages and Makefile:
    - lib/libc/locale/islower.3
    - lib/libc/locale/ispunct.3
    - lib/libc/locale/nl_langinfo.3
    - lib/libc/locale/isgraph.3
    - lib/libc/locale/isspace.3
  
  Reviewed by:	bz
  Approved by:	theraven
  MFC after:	5 days

Modified:
  head/lib/libc/locale/Makefile.inc
  head/lib/libc/locale/isgraph.3
  head/lib/libc/locale/islower.3
  head/lib/libc/locale/ispunct.3
  head/lib/libc/locale/isspace.3
  head/lib/libc/locale/nl_langinfo.3

Modified: head/lib/libc/locale/Makefile.inc
==============================================================================
--- head/lib/libc/locale/Makefile.inc	Mon Jul 30 20:45:17 2012	(r238918)
+++ head/lib/libc/locale/Makefile.inc	Mon Jul 30 20:56:19 2012	(r238919)
@@ -47,6 +47,11 @@ MAN+=	big5.5 euc.5 gb18030.5 gb2312.5 gb
 
 MLINKS+=btowc.3 wctob.3
 MLINKS+=isdigit.3 isnumber.3
+MLINKS+=isgraph.3 isgraph_l.3
+MLINKS+=islower.3 islower_l.3
+MLINKS+=ispunct.3 ispunct_l.3
+MLINKS+=isspace.3 isspace_l.3
+MLINKS+=nl_langinfo.3 nl_langinfo_l.3
 MLINKS+=iswalnum.3 iswalpha.3 iswalnum.3 iswascii.3 iswalnum.3 iswblank.3 \
 	iswalnum.3 iswcntrl.3 iswalnum.3 iswdigit.3 iswalnum.3 iswgraph.3 \
 	iswalnum.3 iswhexnumber.3 \

Modified: head/lib/libc/locale/isgraph.3
==============================================================================
--- head/lib/libc/locale/isgraph.3	Mon Jul 30 20:45:17 2012	(r238918)
+++ head/lib/libc/locale/isgraph.3	Mon Jul 30 20:56:19 2012	(r238919)
@@ -32,7 +32,7 @@
 .\"     @(#)isgraph.3	8.2 (Berkeley) 12/11/93
 .\" $FreeBSD$
 .\"
-.Dd July 17, 2005
+.Dd July 30, 2012
 .Dt ISGRAPH 3
 .Os
 .Sh NAME
@@ -44,6 +44,8 @@
 .In ctype.h
 .Ft int
 .Fn isgraph "int c"
+.Ft int
+.Fn isgraph_l "int c" "locale_t loc"
 .Sh DESCRIPTION
 The
 .Fn isgraph
@@ -79,11 +81,19 @@ In the ASCII character set, this include
 .It "\&166\ ``v''" Ta "167\ ``w''" Ta "170\ ``x''" Ta "171\ ``y''" Ta "172\ ``z''"
 .It "\&173\ ``{''" Ta "174\ ``|''" Ta "175\ ``}''" Ta "176\ ``~''" Ta \&
 .El
+.Pp
+The
+.Fn isgraph_l
+function takes an explicit locale argument, whereas the
+.Fn isgraph
+function uses the current global or per-thread locale.
 .Sh RETURN VALUES
 The
 .Fn isgraph
-function returns zero if the character tests false and
-returns non-zero if the character tests true.
+and
+.Fn isgraph_l
+functions return zero if the character tests false and
+return non-zero if the character tests true.
 .Sh COMPATIBILITY
 The
 .Bx 4.4
@@ -103,3 +113,7 @@ The
 .Fn isgraph
 function conforms to
 .St -isoC .
+The
+.Fn isgraph_l
+function conforms to
+.St -p1003.1-2008 .

Modified: head/lib/libc/locale/islower.3
==============================================================================
--- head/lib/libc/locale/islower.3	Mon Jul 30 20:45:17 2012	(r238918)
+++ head/lib/libc/locale/islower.3	Mon Jul 30 20:56:19 2012	(r238919)
@@ -32,7 +32,7 @@
 .\"     @(#)islower.3	8.1 (Berkeley) 6/4/93
 .\" $FreeBSD$
 .\"
-.Dd July 17, 2005
+.Dd July 30, 2012
 .Dt ISLOWER 3
 .Os
 .Sh NAME
@@ -44,6 +44,8 @@
 .In ctype.h
 .Ft int
 .Fn islower "int c"
+.Ft int
+.Fn islower_l "int c" "locale_t loc"
 .Sh DESCRIPTION
 The
 .Fn islower
@@ -63,11 +65,18 @@ In the ASCII character set, this include
 .It "\&165\ ``u''" Ta "166\ ``v''" Ta "167\ ``w''" Ta "170\ ``x''" Ta "171\ ``y''"
 .It "\&172\ ``z''" Ta \& Ta \& Ta \& Ta \&
 .El
+The
+.Fn islower_l
+function takes an explicit locale argument, whereas the
+.Fn islower
+function uses the current global or per-thread locale. 
 .Sh RETURN VALUES
 The
 .Fn islower
-function returns zero if the character tests false and
-returns non-zero if the character tests true.
+and
+.Fn islower_l
+functions return zero if the character tests false and
+return non-zero if the character tests true.
 .Sh COMPATIBILITY
 The
 .Bx 4.4
@@ -88,3 +97,7 @@ The
 .Fn islower
 function conforms to
 .St -isoC .
+The
+.Fn islower_l
+function conforms to
+.St -p1003.1-2008 .

Modified: head/lib/libc/locale/ispunct.3
==============================================================================
--- head/lib/libc/locale/ispunct.3	Mon Jul 30 20:45:17 2012	(r238918)
+++ head/lib/libc/locale/ispunct.3	Mon Jul 30 20:56:19 2012	(r238919)
@@ -32,7 +32,7 @@
 .\"	@(#)ispunct.3	8.1 (Berkeley) 6/4/93
 .\" $FreeBSD$
 .\"
-.Dd July 17, 2005
+.Dd July 30, 2012
 .Dt ISPUNCT 3
 .Os
 .Sh NAME
@@ -44,6 +44,8 @@
 .In ctype.h
 .Ft int
 .Fn ispunct "int c"
+.Ft int
+.Fn ispunct_l "int c" "locale_t loc"
 .Sh DESCRIPTION
 The
 .Fn ispunct
@@ -69,11 +71,19 @@ In the ASCII character set, this include
 .It "\&136\ ``^''" Ta "137\ ``_''" Ta "140\ ```''" Ta "173\ ``{''" Ta "174\ ``|''"
 .It "\&175\ ``}''" Ta "176\ ``~''" Ta \& Ta \& Ta \&
 .El
+.Pp
+The
+.Fn ispunct_l
+function takes an explicit locale argument, whereas the
+.Fn ispunct
+function uses the current global or per-thread locale.
 .Sh RETURN VALUES
 The
 .Fn ispunct
-function returns zero if the character tests false and
-returns non-zero if the character tests true.
+and
+.Fn ispunct_l
+functions return zero if the character tests false and
+return non-zero if the character tests true.
 .Sh COMPATIBILITY
 The
 .Bx 4.4
@@ -93,3 +103,7 @@ The
 .Fn ispunct
 function conforms to
 .St -isoC .
+The
+.Fn ispunct_l
+function conforms to
+.St -p1003.1-2008 .

Modified: head/lib/libc/locale/isspace.3
==============================================================================
--- head/lib/libc/locale/isspace.3	Mon Jul 30 20:45:17 2012	(r238918)
+++ head/lib/libc/locale/isspace.3	Mon Jul 30 20:56:19 2012	(r238919)
@@ -32,7 +32,7 @@
 .\"     @(#)isspace.3	8.1 (Berkeley) 6/4/93
 .\" $FreeBSD$
 .\"
-.Dd July 17, 2005
+.Dd July 30, 2012
 .Dt ISSPACE 3
 .Os
 .Sh NAME
@@ -44,6 +44,8 @@
 .In ctype.h
 .Ft int
 .Fn isspace "int c"
+.Ft int
+.Fn isspace_l "int c" "locale_t loc"
 .Sh DESCRIPTION
 The
 .Fn isspace
@@ -60,11 +62,19 @@ The value of the argument must be repres
 .Vt "unsigned char"
 or the value of
 .Dv EOF .
+.Pp
+The
+.Fn isspace_l
+function takes an explicit locale argument, whereas the
+.Fn isspace
+function uses the current global or per-thread locale.
 .Sh RETURN VALUES
 The
 .Fn isspace
-function returns zero if the character tests false and
-returns non-zero if the character tests true.
+and
+.Fn isspace_l
+functions return zero if the character tests false and
+return non-zero if the character tests true.
 .Sh COMPATIBILITY
 The
 .Bx 4.4
@@ -85,3 +95,7 @@ The
 .Fn isspace
 function conforms to
 .St -isoC .
+The
+.Fn isspace_l
+function conforms to
+.St -p1003.1-2008 .

Modified: head/lib/libc/locale/nl_langinfo.3
==============================================================================
--- head/lib/libc/locale/nl_langinfo.3	Mon Jul 30 20:45:17 2012	(r238918)
+++ head/lib/libc/locale/nl_langinfo.3	Mon Jul 30 20:56:19 2012	(r238919)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd May 3, 2001
+.Dd July 30, 2012
 .Dt NL_LANGINFO 3
 .Os
 .Sh NAME
@@ -36,11 +36,16 @@
 .In langinfo.h
 .Ft char *
 .Fn nl_langinfo "nl_item item"
+.Ft char *
+.Fn nl_langinfo_l "nl_item item" "locale_t loc"
 .Sh DESCRIPTION
 The
 .Fn nl_langinfo
 function returns a pointer to a string containing information relevant to
-the particular language or cultural area defined in the program's locale.
+the particular language or cultural area defined in the program or thread's
+locale, or in the case of
+.Fn nl_langinfo_l ,
+the locale passed as the second argument.
 The manifest constant names and values of
 .Fa item
 are defined in
@@ -60,6 +65,9 @@ In a locale where langinfo data is not d
 returns a pointer to the corresponding string in the
 .Tn POSIX
 locale.
+.Fn nl_langinfo_l
+returns the same values as
+.Fn nl_langinfo .
 In all locales,
 .Fn nl_langinfo
 returns a pointer to an empty string if
@@ -83,6 +91,10 @@ The
 .Fn nl_langinfo
 function conforms to
 .St -susv2 .
+The
+.Fn nl_langinfo_l
+function conforms to
+.St -p1003.1-2008 .
 .Sh HISTORY
 The
 .Fn nl_langinfo



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