diff options
Diffstat (limited to 'templates/man3/newlocale.3.pot')
-rw-r--r-- | templates/man3/newlocale.3.pot | 795 |
1 files changed, 795 insertions, 0 deletions
diff --git a/templates/man3/newlocale.3.pot b/templates/man3/newlocale.3.pot new file mode 100644 index 00000000..da027210 --- /dev/null +++ b/templates/man3/newlocale.3.pot @@ -0,0 +1,795 @@ +# SOME DESCRIPTIVE TITLE +# Copyright (C) YEAR Free Software Foundation, Inc. +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2024-03-01 17:02+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. type: TH +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "newlocale" +msgstr "" + +#. type: TH +#: archlinux fedora-40 fedora-rawhide mageia-cauldron +#, no-wrap +msgid "2023-10-31" +msgstr "" + +#. type: TH +#: archlinux fedora-40 fedora-rawhide mageia-cauldron +#, no-wrap +msgid "Linux man-pages 6.06" +msgstr "" + +#. type: SH +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "NAME" +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "newlocale, freelocale - create, modify, and free a locale object" +msgstr "" + +#. type: SH +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "LIBRARY" +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "Standard C library (I<libc>, I<-lc>)" +msgstr "" + +#. type: SH +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "SYNOPSIS" +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "B<#include E<lt>locale.hE<gt>>\n" +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "" +"B<locale_t newlocale(int >I<category_mask>B<, const char *>I<locale>B<,>\n" +"B< locale_t >I<base>B<);>\n" +"B<void freelocale(locale_t >I<locobj>B<);>\n" +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):" +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "B<newlocale>(), B<freelocale>():" +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "" +" Since glibc 2.10:\n" +" _XOPEN_SOURCE E<gt>= 700\n" +" Before glibc 2.10:\n" +" _GNU_SOURCE\n" +msgstr "" + +#. type: SH +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "DESCRIPTION" +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"The B<newlocale>() function creates a new locale object, or modifies an " +"existing object, returning a reference to the new or modified object as the " +"function result. Whether the call creates a new object or modifies an " +"existing object is determined by the value of I<base>:" +msgstr "" + +#. type: IP +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "\\[bu]" +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "If I<base> is I<(locale_t)\\ 0>, a new object is created." +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"If I<base> refers to valid existing locale object (i.e., an object returned " +"by a previous call to B<newlocale>() or B<duplocale>(3)), then that object " +"is modified by the call. If the call is successful, the contents of I<base> " +"are unspecified (in particular, the object referred to by I<base> may be " +"freed, and a new object created). Therefore, the caller should ensure that " +"it stops using I<base> before the call to B<newlocale>(), and should " +"subsequently refer to the modified object via the reference returned as the " +"function result. If the call fails, the contents of I<base> remain valid " +"and unchanged." +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"If I<base> is the special locale object B<LC_GLOBAL_LOCALE> (see " +"B<duplocale>(3)), or is not I<(locale_t)\\ 0> and is not a valid locale " +"object handle, the behavior is undefined." +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"The I<category_mask> argument is a bit mask that specifies the locale " +"categories that are to be set in a newly created locale object or modified " +"in an existing object. The mask is constructed by a bitwise OR of the " +"constants B<LC_ADDRESS_MASK>, B<LC_CTYPE_MASK>, B<LC_COLLATE_MASK>, " +"B<LC_IDENTIFICATION_MASK>, B<LC_MEASUREMENT_MASK>, B<LC_MESSAGES_MASK>, " +"B<LC_MONETARY_MASK>, B<LC_NUMERIC_MASK>, B<LC_NAME_MASK>, B<LC_PAPER_MASK>, " +"B<LC_TELEPHONE_MASK>, and B<LC_TIME_MASK>. Alternatively, the mask can be " +"specified as B<LC_ALL_MASK>, which is equivalent to ORing all of the " +"preceding constants." +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"For each category specified in I<category_mask>, the locale data from " +"I<locale> will be used in the object returned by B<newlocale>(). If a new " +"locale object is being created, data for all categories not specified in " +"I<category_mask> is taken from the default (\"POSIX\") locale." +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"The following preset values of I<locale> are defined for all categories that " +"can be specified in I<category_mask>:" +msgstr "" + +#. type: TP +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "POSIX" +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "A minimal locale environment for C language programs." +msgstr "" + +#. type: TP +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "C" +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "Equivalent to \"POSIX\"." +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"An implementation-defined native environment corresponding to the values of " +"the B<LC_*> and B<LANG> environment variables (see B<locale>(7))." +msgstr "" + +#. type: SS +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "freelocale()" +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"The B<freelocale>() function deallocates the resources associated with " +"I<locobj>, a locale object previously returned by a call to B<newlocale>() " +"or B<duplocale>(3). If I<locobj> is B<LC_GLOBAL_LOCALE> or is not valid " +"locale object handle, the results are undefined." +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"Once a locale object has been freed, the program should make no further use " +"of it." +msgstr "" + +#. type: SH +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "RETURN VALUE" +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"On success, B<newlocale>() returns a handle that can be used in calls to " +"B<duplocale>(3), B<freelocale>(), and other functions that take a " +"I<locale_t> argument. On error, B<newlocale>() returns I<(locale_t)\\ 0>, " +"and sets I<errno> to indicate the error." +msgstr "" + +#. type: SH +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "ERRORS" +msgstr "" + +#. type: TP +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "B<EINVAL>" +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"One or more bits in I<category_mask> do not correspond to a valid locale " +"category." +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "I<locale> is NULL." +msgstr "" + +#. type: TP +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "B<ENOENT>" +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "I<locale> is not a string pointer referring to a valid locale." +msgstr "" + +#. type: TP +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "B<ENOMEM>" +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "Insufficient memory to create a locale object." +msgstr "" + +#. type: SH +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "STANDARDS" +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "POSIX.1-2008." +msgstr "" + +#. type: SH +#: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron +#: opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "HISTORY" +msgstr "" + +#. type: Plain text +#: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron +#: opensuse-leap-15-6 opensuse-tumbleweed +msgid "glibc 2.3." +msgstr "" + +#. type: SH +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "NOTES" +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"Each locale object created by B<newlocale>() should be deallocated using " +"B<freelocale>()." +msgstr "" + +#. type: SH +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "EXAMPLES" +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"The program below takes up to two command-line arguments, which each " +"identify locales. The first argument is required, and is used to set the " +"B<LC_NUMERIC> category in a locale object created using B<newlocale>(). The " +"second command-line argument is optional; if it is present, it is used to " +"set the B<LC_TIME> category of the locale object." +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"Having created and initialized the locale object, the program then applies " +"it using B<uselocale>(3), and then tests the effect of the locale changes by:" +msgstr "" + +#. type: IP +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "(1)" +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"Displaying a floating-point number with a fractional part. This output will " +"be affected by the B<LC_NUMERIC> setting. In many European-language " +"locales, the fractional part of the number is separated from the integer " +"part using a comma, rather than a period." +msgstr "" + +#. type: IP +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "(2)" +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"Displaying the date. The format and language of the output will be affected " +"by the B<LC_TIME> setting." +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "The following shell sessions show some example runs of this program." +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "Set the B<LC_NUMERIC> category to I<fr_FR> (French):" +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "" +"$ B<./a.out fr_FR>\n" +"123456,789\n" +"Fri Mar 7 00:25:08 2014\n" +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"Set the B<LC_NUMERIC> category to I<fr_FR> (French), and the B<LC_TIME> " +"category to I<it_IT> (Italian):" +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "" +"$ B<./a.out fr_FR it_IT>\n" +"123456,789\n" +"ven 07 mar 2014 00:26:01 CET\n" +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"Specify the B<LC_TIME> setting as an empty string, which causes the value to " +"be taken from environment variable settings (which, here, specify I<mi_NZ>, " +"New Zealand Māori):" +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "" +"$ LC_ALL=mi_NZ ./a.out fr_FR \"\"\n" +"123456,789\n" +"Te Paraire, te 07 o Poutū-te-rangi, 2014 00:38:44 CET\n" +msgstr "" + +#. type: SS +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "Program source" +msgstr "" + +#. type: Plain text +#: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron +#: opensuse-tumbleweed +#, no-wrap +msgid "" +"#define _XOPEN_SOURCE 700\n" +"#include E<lt>locale.hE<gt>\n" +"#include E<lt>stdio.hE<gt>\n" +"#include E<lt>stdlib.hE<gt>\n" +"#include E<lt>time.hE<gt>\n" +"\\&\n" +"#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \\e\n" +" } while (0)\n" +"\\&\n" +"int\n" +"main(int argc, char *argv[])\n" +"{\n" +" char buf[100];\n" +" time_t t;\n" +" size_t s;\n" +" struct tm *tm;\n" +" locale_t loc, nloc;\n" +"\\&\n" +" if (argc E<lt> 2) {\n" +" fprintf(stderr, \"Usage: %s locale1 [locale2]\\en\", argv[0]);\n" +" exit(EXIT_FAILURE);\n" +" }\n" +"\\&\n" +" /* Create a new locale object, taking the LC_NUMERIC settings\n" +" from the locale specified in argv[1]. */\n" +"\\&\n" +" loc = newlocale(LC_NUMERIC_MASK, argv[1], (locale_t) 0);\n" +" if (loc == (locale_t) 0)\n" +" errExit(\"newlocale\");\n" +"\\&\n" +" /* If a second command-line argument was specified, modify the\n" +" locale object to take the LC_TIME settings from the locale\n" +" specified in argv[2]. We assign the result of this newlocale()\n" +" call to \\[aq]nloc\\[aq] rather than \\[aq]loc\\[aq], since in some cases, we might\n" +" want to preserve \\[aq]loc\\[aq] if this call fails. */\n" +"\\&\n" +" if (argc E<gt> 2) {\n" +" nloc = newlocale(LC_TIME_MASK, argv[2], loc);\n" +" if (nloc == (locale_t) 0)\n" +" errExit(\"newlocale\");\n" +" loc = nloc;\n" +" }\n" +"\\&\n" +" /* Apply the newly created locale to this thread. */\n" +"\\&\n" +" uselocale(loc);\n" +"\\&\n" +" /* Test effect of LC_NUMERIC. */\n" +"\\&\n" +" printf(\"%8.3f\\en\", 123456.789);\n" +"\\&\n" +" /* Test effect of LC_TIME. */\n" +"\\&\n" +" t = time(NULL);\n" +" tm = localtime(&t);\n" +" if (tm == NULL)\n" +" errExit(\"time\");\n" +"\\&\n" +" s = strftime(buf, sizeof(buf), \"%c\", tm);\n" +" if (s == 0)\n" +" errExit(\"strftime\");\n" +"\\&\n" +" printf(\"%s\\en\", buf);\n" +"\\&\n" +" /* Free the locale object. */\n" +"\\&\n" +" uselocale(LC_GLOBAL_LOCALE); /* So \\[aq]loc\\[aq] is no longer in use */\n" +" freelocale(loc);\n" +"\\&\n" +" exit(EXIT_SUCCESS);\n" +"}\n" +msgstr "" + +#. SRC END +#. type: SH +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "SEE ALSO" +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"B<locale>(1), B<duplocale>(3), B<setlocale>(3), B<uselocale>(3), " +"B<locale>(5), B<locale>(7)" +msgstr "" + +#. type: TH +#: debian-bookworm +#, no-wrap +msgid "2023-02-05" +msgstr "" + +#. type: TH +#: debian-bookworm +#, no-wrap +msgid "Linux man-pages 6.03" +msgstr "" + +#. type: SH +#: debian-bookworm +#, no-wrap +msgid "VERSIONS" +msgstr "" + +#. type: Plain text +#: debian-bookworm +msgid "" +"The B<newlocale>() and B<freelocale>() functions first appeared in glibc " +"2.3." +msgstr "" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +"#define _XOPEN_SOURCE 700\n" +"#include E<lt>locale.hE<gt>\n" +"#include E<lt>stdio.hE<gt>\n" +"#include E<lt>stdlib.hE<gt>\n" +"#include E<lt>time.hE<gt>\n" +msgstr "" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +"#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \\e\n" +" } while (0)\n" +msgstr "" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +"int\n" +"main(int argc, char *argv[])\n" +"{\n" +" char buf[100];\n" +" time_t t;\n" +" size_t s;\n" +" struct tm *tm;\n" +" locale_t loc, nloc;\n" +msgstr "" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +" if (argc E<lt> 2) {\n" +" fprintf(stderr, \"Usage: %s locale1 [locale2]\\en\", argv[0]);\n" +" exit(EXIT_FAILURE);\n" +" }\n" +msgstr "" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +" /* Create a new locale object, taking the LC_NUMERIC settings\n" +" from the locale specified in argv[1]. */\n" +msgstr "" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +" loc = newlocale(LC_NUMERIC_MASK, argv[1], (locale_t) 0);\n" +" if (loc == (locale_t) 0)\n" +" errExit(\"newlocale\");\n" +msgstr "" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +" /* If a second command-line argument was specified, modify the\n" +" locale object to take the LC_TIME settings from the locale\n" +" specified in argv[2]. We assign the result of this newlocale()\n" +" call to \\[aq]nloc\\[aq] rather than \\[aq]loc\\[aq], since in some cases, we might\n" +" want to preserve \\[aq]loc\\[aq] if this call fails. */\n" +msgstr "" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +" if (argc E<gt> 2) {\n" +" nloc = newlocale(LC_TIME_MASK, argv[2], loc);\n" +" if (nloc == (locale_t) 0)\n" +" errExit(\"newlocale\");\n" +" loc = nloc;\n" +" }\n" +msgstr "" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid " /* Apply the newly created locale to this thread. */\n" +msgstr "" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid " uselocale(loc);\n" +msgstr "" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid " /* Test effect of LC_NUMERIC. */\n" +msgstr "" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid " printf(\"%8.3f\\en\", 123456.789);\n" +msgstr "" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid " /* Test effect of LC_TIME. */\n" +msgstr "" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +" t = time(NULL);\n" +" tm = localtime(&t);\n" +" if (tm == NULL)\n" +" errExit(\"time\");\n" +msgstr "" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +" s = strftime(buf, sizeof(buf), \"%c\", tm);\n" +" if (s == 0)\n" +" errExit(\"strftime\");\n" +msgstr "" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid " printf(\"%s\\en\", buf);\n" +msgstr "" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid " /* Free the locale object. */\n" +msgstr "" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +" uselocale(LC_GLOBAL_LOCALE); /* So \\[aq]loc\\[aq] is no longer in use */\n" +" freelocale(loc);\n" +msgstr "" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +" exit(EXIT_SUCCESS);\n" +"}\n" +msgstr "" + +#. type: TH +#: debian-unstable opensuse-tumbleweed +#, no-wrap +msgid "2023-05-03" +msgstr "" + +#. type: TH +#: debian-unstable opensuse-tumbleweed +#, no-wrap +msgid "Linux man-pages 6.05.01" +msgstr "" + +#. type: TH +#: opensuse-leap-15-6 +#, no-wrap +msgid "2023-03-30" +msgstr "" + +#. type: TH +#: opensuse-leap-15-6 +#, no-wrap +msgid "Linux man-pages 6.04" +msgstr "" |