From e20efcc5ab3cd7310d1bcd478ba464e37c398c00 Mon Sep 17 00:00:00 2001 From: Owen Shepherd Date: Wed, 20 Feb 2013 01:58:08 +0000 Subject: [PATCH] Add manpage for setlocale --- man3/setlocale.3 | 83 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 man3/setlocale.3 diff --git a/man3/setlocale.3 b/man3/setlocale.3 new file mode 100644 index 0000000..f0f35bf --- /dev/null +++ b/man3/setlocale.3 @@ -0,0 +1,83 @@ +.\" This file is part of the Public Domain C Library (PDCLib). +.\" Permission is granted to use, modify, and / or redistribute at will. +.\" +.Dd +.Dt setlocale 3 +.Os +.\" +.Sh NAME +.Nm setlocale +.Nd Set the application global locale +.\" +.Sh SYNOPSIS +.In locale.h +.Fn "char *setlocale" "int category" "const char * locale" +.\" +.Sh DESCRIPTION +The ISO C standards define an application global locale, which all +locale-dependent functions implicitly use. +.Fn setlocale +may be used to change this locale. +.Pp +The locale is defined to be comprised of several categories; the category +parameter specifies which category of the global locale to change, and takes one +of the following values: +.Bl -tag +.It Dv LC_ALL +Modifies all categories +.It Dv LC_COLLATE +Changes the string collation order; affects +.Fn strcoll +and +.Fn strxfrm . +.It Dv LC_CTYPE +Affects the behaviour of the character handling functions defined in +.In ctype.h , +excluding +.Fn isdigit +and +.Fn isxdigit . +.It Dv LC_MONETARY +Controls the currency-related information returned by +.Fn localeconv . +.It Dv LC_NUMERIC +Controls the decimal point character used by the number formatting functions, +plus the nonmonetary information returned by +.Fn localeconv . +.It Dv LC_TIME +Controls the formatting used by the +.Fn strftime +and +.Fn wcsftime +functions. +.El +.Pp +.St -p1003.1-2008 +defines the +.Fn uselocale +function which controls the locale of the present thread. If the thread locale +has been modified using the +.Fn uselocale +function, and has not been reset to the global locale by invoking +.Fn uselocale +with +.Dv LC_GLOBAL_LOCALE +as its parameter, then the +.Fn setlocale +function will not affect the result of functions invoked on the current thread. +.\" +.Sh IMPLEMENTATION NOTES +None +.\" +.Sh SEE ALSO +.Xr lconv 3 +.Xr uselocale 3 +.Xr duplocale 3 +.Xr freelocale 3 +.\" +.Sh STANDARDS +Conforming to +.St -isoC-amd1 , +.St -isoC-99 , +-St -isoC-2011 , +.St -p1003.1-2008 . \ No newline at end of file -- 2.40.0