aboutsummaryrefslogtreecommitdiff
path: root/manual/locale.texi
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1996-12-08 08:01:13 +0000
committerUlrich Drepper <drepper@redhat.com>1996-12-08 08:01:13 +0000
commitf65fd747b440ae2d8a7481ecc50e668c5e4d0cc9 (patch)
treef64c3eeda0e9acc58b96c28ca852a014c822047f /manual/locale.texi
parent42054ddb496798d9b936490cf0050f6619f86bc1 (diff)
downloadglibc-f65fd747b440ae2d8a7481ecc50e668c5e4d0cc9.tar
glibc-f65fd747b440ae2d8a7481ecc50e668c5e4d0cc9.tar.gz
glibc-f65fd747b440ae2d8a7481ecc50e668c5e4d0cc9.tar.bz2
glibc-f65fd747b440ae2d8a7481ecc50e668c5e4d0cc9.zip
update from main archive 961207cvs/libc-961208
Sun Dec 8 06:56:49 1996 Ulrich Drepper <drepper@cygnus.com> * io/getwd.c: Use PATH_MAX not LOCAL_PATH_MAX. Fix typo in comment. * stdlib/canonicalize.c: Correct bugs in last change. Patch by HJ Lu. * libio/Makefile (routines): Remove ioprims. (aux): Remove cleanup. Add IO_DEBUG option for .o files. * libio/cleanups.c: Removed. * libio/ioprims.c: Removed. * libio/filedoalloc.c: More updates from libg++-2.8b5. * libio/fileops.c: Likewise. * libio/genops.c: Likewise. * libio/iolibio.h: Likewise. * libio/iopopen.c: Likewise. * libio/iovsprintf.c: Likewise. * libio/iovsscanf.c: Likewise. * libio/libio.h: Likewise. * libio/libioP.h: Likewise. * libio/memstream.c: Likewise. * libio/strfile.h: Likewise. * libio/vasprintf.c: Likewise. * libio/vsnprintf.c: Likewise. * libio/stdio.h: Define P_tmpdir only is __USE_SVID. * manual/arith.texi: Change references to ANSI C to ISO C. * manual/conf.texi: Likewise. * manual/creature.texi: Likewise. * manual/ctype.texi: Likewise. * manual/errno.texi: Likewise. * manual/filesys.texi: Likewise. * manual/intro.texi. Likewise. * manual/io.texi: Likewise. * manual/lang.texi: Likewise. * manual/libc.texinfo: Likewise. * manual/locale.texi: Likewise. * manual/maint.texi: Likewise. * manual/mbyte.texi: Likewise. * manual/memory.texi: Likewise. * manual/process.texi: Likewise. * manual/process.texi: Likewise. * manual/search.texi: Likewise. * manual/setjmp.texi: Likewise. * manual/signal.texi: Likewise. * manual/startup.texi: Likewise. * manual/stdio.texi: Likewise. * manual/string.texi: Likewise. * manual/time.texi: Likewise. * manual/locale.texi: Remove description of LC_RESPONSE and add LC_MESSAGES. * Makefile (subdirs): Change malloc in $(malloc). * config.make.in: Add variable malloc which is initialized from @malloc@. * configure.in: Add new option --enable-new-malloc to use new malloc. This is the default on Linux. * sysdeps/unix/sysv/linux/configure.in: Define malloc to new-malloc by default. * new-malloc/Makefile: New file. Improved malloc implementation. * new-malloc/malloc.c: Likewise. * new-malloc/malloc.h: Likewise. * new-malloc/mallocbug.c: Likewise. * new-malloc/obstack.c: Likewise. * new-malloc/obstack.h: Likewise. * new-malloc/thread-m.h: Likewise. * time/Makefile: Compile ap.c with NO_MCHECK flag for now. * time/ap.c: Don't call mcheck if NO_MCHECK is defined. * resolv/Makefile: Add rule to rebuiild libresolv.so when libc.so changed. * stdio/feof.c: Update copyright. * stdio/stdio.h: Add field for lock to FILE structure. Add cast to *MAGIC constants to prevent warnings. * stdio-common/bug7.c: Correct test. Stream must not be closed twice. * stdlib/Makefile (routines): Add secure-getenv. * stdlib/secure-getenv.c: New file. __secure_getenv function moved to here from sysdeps/generic/getenv.c. Otherwise an application cannot replace the getenv function in the libc. * sysdeps/generic/getenv.c: Remove __secure_getenv function. * sysdeps/stub/getenv.c: Remove __secure_getenv alias. * sysdeps/mach/libc-lock.h: Define__libc_mutex_lock to __mutex_lock. * sysdeps/posix/fdopen.c: Update copyright. Don't use EXFUN. * time/test-tz.c: Comment fifth test out. PROBLEM. * time/tzset.c: De-ANSI-declfy. (__tzset): Don't increment pointer tz when no DST information is given. Sat Dec 7 23:47:54 1996 Ulrich Drepper <drepper@cygnus.com> * sysdeps/mach/libc-lock.h [_LIBC]: Add definition of __libc_mutex_lock. Patch by Thomas Bushnell. * sysdeps/unix/sysv/linux/timebits.h: Load <asm/param.h> only if __USE_MISC. * sysdeps/unix/sysv/linux/Dist: Add llseek.c. Sat Dec 7 12:18:56 1996 Ulrich Drepper <drepper@cygnus.com> * time/strftime (%c format): Remove %Z from default string. Reported by Paul Eggert * io/getwd.c: Don't apply getcwd on user supplied buffer.
Diffstat (limited to 'manual/locale.texi')
-rw-r--r--manual/locale.texi81
1 files changed, 38 insertions, 43 deletions
diff --git a/manual/locale.texi b/manual/locale.texi
index d2d7557ea9..cfe6b7e94b 100644
--- a/manual/locale.texi
+++ b/manual/locale.texi
@@ -9,7 +9,7 @@ the language spoken.
@cindex internationalization
@cindex locales
@dfn{Internationalization} of software means programming it to be able
-to adapt to the user's favorite conventions. In ANSI C,
+to adapt to the user's favorite conventions. In @w{ISO C},
internationalization works by means of @dfn{locales}. Each locale
specifies a collection of conventions, one convention for each purpose.
The user chooses a set of conventions by specifying a locale (via
@@ -21,15 +21,15 @@ will follow the conventions preferred by the user.
@menu
* Effects of Locale:: Actions affected by the choice of
- locale.
+ locale.
* Choosing Locale:: How the user specifies a locale.
* Locale Categories:: Different purposes for which you can
- select a locale.
+ select a locale.
* Setting the Locale:: How a program specifies the locale
- with library functions.
+ with library functions.
* Standard Locales:: Locale names available on all systems.
* Numeric Formatting:: How to format numbers according to the
- chosen locale.
+ chosen locale.
@end menu
@node Effects of Locale, Choosing Locale, , Locales
@@ -128,14 +128,14 @@ use as an argument to @code{setlocale}.
@table @code
@comment locale.h
-@comment ANSI
+@comment ISO
@item LC_COLLATE
@vindex LC_COLLATE
This category applies to collation of strings (functions @code{strcoll}
and @code{strxfrm}); see @ref{Collation Functions}.
@comment locale.h
-@comment ANSI
+@comment ISO
@item LC_CTYPE
@vindex LC_CTYPE
This category applies to classification and conversion of characters,
@@ -143,48 +143,44 @@ and to multibyte and wide characters;
see @ref{Character Handling} and @ref{Extended Characters}.
@comment locale.h
-@comment ANSI
+@comment ISO
@item LC_MONETARY
@vindex LC_MONETARY
This category applies to formatting monetary values; see @ref{Numeric
Formatting}.
@comment locale.h
-@comment ANSI
+@comment ISO
@item LC_NUMERIC
@vindex LC_NUMERIC
This category applies to formatting numeric values that are not
monetary; see @ref{Numeric Formatting}.
@comment locale.h
-@comment ANSI
+@comment ISO
@item LC_TIME
@vindex LC_TIME
This category applies to formatting date and time values; see
@ref{Formatting Date and Time}.
-@ignore This is apparently a feature that was in some early
-draft of the POSIX.2 standard, but it's not listed in draft 11. Do we
-still support this anyway? Is there a corresponding environment
-variable?
-
@comment locale.h
-@comment GNU
-@item LC_RESPONSE
-@vindex LC_RESPONSE
-This category applies to recognizing ``yes'' or ``no'' responses to
-questions.
+@comment XOPEN
+@item LC_MESSAGES
+@vindex LC_MESSAGES
+This category applies to selecting the language used in the user interface
+for message translation.
+@ignore see @ref{gettext} and @ref{catgets}
@end ignore
@comment locale.h
-@comment ANSI
+@comment ISO
@item LC_ALL
@vindex LC_ALL
This is not an environment variable; it is only a macro that you can use
with @code{setlocale} to set a single locale for all purposes.
@comment locale.h
-@comment ANSI
+@comment ISO
@item LANG
@vindex LANG
If this environment variable is defined, its value specifies the locale
@@ -197,7 +193,7 @@ to use for all purposes except as overridden by the variables above.
A C program inherits its locale environment variables when it starts up.
This happens automatically. However, these variables do not
automatically control the locale used by the library functions, because
-ANSI C says that all programs start by default in the standard @samp{C}
+@w{ISO C} says that all programs start by default in the standard @samp{C}
locale. To use the locales specified by the environment, you must call
@code{setlocale}. Call it as follows:
@@ -217,9 +213,9 @@ general use or for a specific category.
The symbols in this section are defined in the header file @file{locale.h}.
@comment locale.h
-@comment ANSI
+@comment ISO
@deftypefun {char *} setlocale (int @var{category}, const char *@var{locale})
-The function @code{setlocale} sets the current locale for
+The function @code{setlocale} sets the current locale for
category @var{category} to @var{locale}.
If @var{category} is @code{LC_ALL}, this specifies the locale for all
@@ -238,7 +234,7 @@ Concatenation}) if you want to save it past any further calls to
@code{setlocale} itself.)
You should not modify the string returned by @code{setlocale}.
-It might be the same string that was passed as an argument in a
+It might be the same string that was passed as an argument in a
previous call to @code{setlocale}.
When you read the current locale for category @code{LC_ALL}, the value
@@ -277,23 +273,23 @@ with_other_locale (char *new_locale,
/* @r{Get the name of the current locale.} */
old_locale = setlocale (LC_ALL, NULL);
-
+
/* @r{Copy the name so it won't be clobbered by @code{setlocale}.} */
saved_locale = strdup (old_locale);
if (old_locale == NULL)
fatal ("Out of memory");
-
+
/* @r{Now change the locale and do some stuff with it.} */
setlocale (LC_ALL, new_locale);
(*subroutine) (argument);
-
+
/* @r{Restore the original locale.} */
setlocale (LC_ALL, saved_locale);
free (saved_locale);
@}
@end smallexample
-@strong{Portability Note:} Some ANSI C systems may define additional
+@strong{Portability Note:} Some @w{ISO C} systems may define additional
locale categories. For portability, assume that any symbol beginning
with @samp{LC_} might be defined in @file{locale.h}.
@@ -306,7 +302,7 @@ are these three standard ones:
@table @code
@item "C"
This is the standard C locale. The attributes and behavior it provides
-are specified in the ANSI C standard. When your program starts up, it
+are specified in the @w{ISO C} standard. When your program starts up, it
initially uses this locale by default.
@item "POSIX"
@@ -343,7 +339,7 @@ conventions of the current locale, you can use the function
@cindex numeric value formatting
@comment locale.h
-@comment ANSI
+@comment ISO
@deftypefun {struct lconv *} localeconv (void)
The @code{localeconv} function returns a pointer to a structure whose
components contain information about how numeric and monetary values
@@ -356,7 +352,7 @@ value.
@end deftypefun
@comment locale.h
-@comment ANSI
+@comment ISO
@deftp {Data Type} {struct lconv}
This is the data type of the value returned by @code{localeconv}.
@end deftp
@@ -436,7 +432,7 @@ international and local formats, respectively. (Most often, both
members have the same value.)
In the standard @samp{C} locale, both of these members have the value
-@code{CHAR_MAX}, meaning ``unspecified''. The ANSI standard doesn't say
+@code{CHAR_MAX}, meaning ``unspecified''. The ISO standard doesn't say
what to do when you find this the value; we recommend printing no
fractional digits. (This locale also specifies the empty string for
@code{mon_decimal_point}, so printing any fractional digits would be
@@ -469,7 +465,7 @@ assumed to be in Canadian dollars.
The local currency symbol for the selected locale.
In the standard @samp{C} locale, this member has a value of @code{""}
-(the empty string), meaning ``unspecified''. The ANSI standard doesn't
+(the empty string), meaning ``unspecified''. The ISO standard doesn't
say what to do when you find this value; we recommend you simply print
the empty string as you would print any other string found in the
appropriate member.
@@ -496,13 +492,13 @@ amounts (or zero), and the @code{n_cs_precedes} member applies to
negative amounts.
In the standard @samp{C} locale, both of these members have a value of
-@code{CHAR_MAX}, meaning ``unspecified''. The ANSI standard doesn't say
+@code{CHAR_MAX}, meaning ``unspecified''. The ISO standard doesn't say
what to do when you find this value, but we recommend printing the
currency symbol before the amount. That's right for most countries.
In other words, treat all nonzero values alike in these members.
The POSIX standard says that these two members apply to the
-@code{int_curr_symbol} as well as the @code{currency_symbol}. The ANSI
+@code{int_curr_symbol} as well as the @code{currency_symbol}. The ISO
C standard seems to imply that they should apply only to the
@code{currency_symbol}---so the @code{int_curr_symbol} should always
precede the amount.
@@ -521,7 +517,7 @@ amounts (or zero), and the @code{n_sep_by_space} member applies to
negative amounts.
In the standard @samp{C} locale, both of these members have a value of
-@code{CHAR_MAX}, meaning ``unspecified''. The ANSI standard doesn't say
+@code{CHAR_MAX}, meaning ``unspecified''. The ISO standard doesn't say
what you should do when you find this value; we suggest you treat it as
one (print a space). In other words, treat all nonzero values alike in
these members.
@@ -532,7 +528,7 @@ These members apply only to @code{currency_symbol}. When you use
The POSIX standard says that these two members apply to the
@code{int_curr_symbol} as well as the @code{currency_symbol}. But an
-example in the ANSI C standard clearly implies that they should apply
+example in the @w{ISO C} standard clearly implies that they should apply
only to the @code{currency_symbol}---that the @code{int_curr_symbol}
contains any appropriate separator, so you should never print an
additional space.
@@ -556,7 +552,7 @@ These are strings used to indicate positive (or zero) and negative
In the standard @samp{C} locale, both of these members have a value of
@code{""} (the empty string), meaning ``unspecified''.
-The ANSI standard doesn't say what to do when you find this value; we
+The ISO standard doesn't say what to do when you find this value; we
recommend printing @code{positive_sign} as you find it, even if it is
empty. For a negative value, print @code{negative_sign} as you find it
unless both it and @code{positive_sign} are empty, in which case print
@@ -592,14 +588,13 @@ Print the sign string right after the currency symbol.
@samp{C} locale.
@end table
-The ANSI standard doesn't say what you should do when the value is
+The ISO standard doesn't say what you should do when the value is
@code{CHAR_MAX}. We recommend you print the sign after the currency
symbol.
@end table
It is not clear whether you should let these members apply to the
international currency format or not. POSIX says you should, but
-intuition plus the examples in the ANSI C standard suggest you should
+intuition plus the examples in the @w{ISO C} standard suggest you should
not. We hope that someone who knows well the conventions for formatting
monetary quantities will tell us what we should recommend.
-