# SOME DESCRIPTIVE TITLE # Copyright (C) YEAR Free Software Foundation, Inc. # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "POT-Creation-Date: 2026-06-05 06:25+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \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-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed #, no-wrap msgid "getopt_long" msgstr "" #. type: TH #: archlinux debian-unstable opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "2026-02-14" msgstr "" #. type: TH #: archlinux debian-unstable #, no-wrap msgid "Linux man-pages 6.18" msgstr "" #. type: SH #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed #, no-wrap msgid "NAME" msgstr "" #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed msgid "getopt_long - parse command-line options" msgstr "" #. type: SH #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed #, no-wrap msgid "LIBRARY" msgstr "" #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed msgid "Standard C library (I,\\ I<-lc>)" msgstr "" #. type: SH #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed #, no-wrap msgid "SYNOPSIS" msgstr "" #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed #, no-wrap msgid "" "B<#define _GNU_SOURCE>\n" "B<#include Egetopt.hE>\n" msgstr "" #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed #, no-wrap msgid "" "BIB<, char *>IB<[],>\n" "B< const char *>IB<,>\n" "B< const struct option *>IB<, int *>IB<);>\n" msgstr "" #. type: SH #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed #, no-wrap msgid "DESCRIPTION" msgstr "" #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed msgid "" "The B() function works like B(3) except that it also " "accepts long options, started with two dashes. (If the program accepts only " "long options, then I should be specified as an empty string " "(\"\"), not NULL.) Long option names may be abbreviated if the abbreviation " "is unique or is an exact match for some defined option. A long option may " "take a parameter, of the form B<--arg=param> or B<--arg param>." msgstr "" #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed msgid "" "I is a pointer to the first element of an array of I declared in Igetopt.hE> as" msgstr "" #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed #, no-wrap msgid "" "struct option {\n" " const char *name;\n" " int has_arg;\n" " int *flag;\n" " int val;\n" "};\n" msgstr "" #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed msgid "The meanings of the different fields are:" msgstr "" #. type: TP #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed #, no-wrap msgid "I" msgstr "" #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed msgid "is the name of the long option." msgstr "" #. type: TP #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed #, no-wrap msgid "I" msgstr "" #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed msgid "" "is: B (or 0) if the option does not take an argument; " "B (or 1) if the option requires an argument; or " "B (or 2) if the option takes an optional argument." msgstr "" #. type: TP #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed #, no-wrap msgid "I" msgstr "" #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed msgid "" "specifies how results are returned for a long option. If I is NULL, " "then B() returns I. (For example, the calling program " "may set I to the equivalent short option character.) Otherwise, " "B() returns 0, and I points to a variable which is set " "to I if the option is found, but left unchanged if the option is not " "found." msgstr "" #. type: TP #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed #, no-wrap msgid "I" msgstr "" #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed msgid "" "is the value to return, or to load into the variable pointed to by I." msgstr "" #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed msgid "The last element of the array has to be filled with zeros." msgstr "" #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed msgid "" "If I is not NULL, it points to a variable which is set to the " "index of the long option relative to I." msgstr "" #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed msgid "" "Its analogue to B(3)'s I is \\[lq]I\\" "[rq]." msgstr "" #. type: SH #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed #, no-wrap msgid "RETURN VALUE" msgstr "" #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed msgid "See B(3)." msgstr "" #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed msgid "" "B() also returns the option character when a short option is " "recognized. For a long option, it returns I if I is NULL, and 0 " "otherwise. Error and -1 returns are the same as for B(3), plus \\" "[aq]?\\[aq] for an ambiguous match or an extraneous parameter." msgstr "" #. type: SH #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed #, no-wrap msgid "ENVIRONMENT" msgstr "" #. type: SH #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed #, no-wrap msgid "ATTRIBUTES" msgstr "" #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed msgid "" "For an explanation of the terms used in this section, see B(7)." msgstr "" #. type: tbl table #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed #, no-wrap msgid "Interface" msgstr "" #. type: tbl table #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed #, no-wrap msgid "Attribute" msgstr "" #. type: tbl table #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed #, no-wrap msgid "Value" msgstr "" #. type: tbl table #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed #, no-wrap msgid ".na\n" msgstr "" #. type: tbl table #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed #, no-wrap msgid ".nh\n" msgstr "" #. type: tbl table #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed #, no-wrap msgid "B()" msgstr "" #. type: tbl table #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed #, no-wrap msgid "Thread safety" msgstr "" #. type: tbl table #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed #, no-wrap msgid "MT-Unsafe race:getopt env" msgstr "" #. type: SH #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed #, no-wrap msgid "STANDARDS" msgstr "" #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed msgid "GNU." msgstr "" #. type: SH #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed #, no-wrap msgid "EXAMPLES" msgstr "" #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed msgid "" "The following example program illustrates the use of B() with " "most of its features." msgstr "" #. type: Plain text #: archlinux debian-unstable opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "" "#include Egetopt.hE\n" "#include Estdio.hE\n" "#include Estdlib.hE\n" "#include Eunistd.hE\n" "\\&\n" "int\n" "main(int argc, char *argv[])\n" "{\n" " int c;\n" " int digit_optind = 0;\n" "\\&\n" " for (;;) {\n" " int this_option_optind = optind ? optind : 1;\n" " int option_index = 0;\n" " static struct option long_options[] = {\n" " {\"add\", required_argument, 0, 0 },\n" " {\"append\", no_argument, 0, 0 },\n" " {\"delete\", required_argument, 0, 0 },\n" " {\"verbose\", no_argument, 0, 0 },\n" " {\"create\", required_argument, 0, \\[aq]c\\[aq]},\n" " {\"file\", required_argument, 0, 0 },\n" " {0, 0, 0, 0 }\n" " };\n" "\\&\n" " c = getopt_long(argc, argv, \"abc:d:012\",\n" " long_options, &option_index);\n" " if (c == -1)\n" " break;\n" "\\&\n" " switch (c) {\n" " case 0:\n" " printf(\"option %s\", long_options[option_index].name);\n" " if (optarg)\n" " printf(\" with arg %s\", optarg);\n" " printf(\"\\[rs]n\");\n" " break;\n" "\\&\n" " case \\[aq]0\\[aq]:\n" " case \\[aq]1\\[aq]:\n" " case \\[aq]2\\[aq]:\n" " if (digit_optind != 0 && digit_optind != this_option_optind)\n" " printf(\"digits occur in two different argv-elements.\\[rs]n\");\n" " digit_optind = this_option_optind;\n" " printf(\"option %c\\[rs]n\", c);\n" " break;\n" "\\&\n" " case \\[aq]a\\[aq]:\n" " printf(\"option a\\[rs]n\");\n" " break;\n" "\\&\n" " case \\[aq]b\\[aq]:\n" " printf(\"option b\\[rs]n\");\n" " break;\n" "\\&\n" " case \\[aq]c\\[aq]:\n" " printf(\"option c with value \\[aq]%s\\[aq]\\[rs]n\", optarg);\n" " break;\n" "\\&\n" " case \\[aq]d\\[aq]:\n" " printf(\"option d with value \\[aq]%s\\[aq]\\[rs]n\", optarg);\n" " break;\n" "\\&\n" " case \\[aq]?\\[aq]:\n" " break;\n" "\\&\n" " default:\n" " printf(\"?? getopt returned character code 0%o ??\\[rs]n\", c);\n" " }\n" " }\n" "\\&\n" " if (optind E argc) {\n" " printf(\"non-option ARGV-elements: \");\n" " while (optind E argc)\n" " printf(\"%s \", argv[optind++]);\n" " printf(\"\\[rs]n\");\n" " }\n" "\\&\n" " exit(EXIT_SUCCESS);\n" "}\n" msgstr "" #. SRC END #. type: SH #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed #, no-wrap msgid "SEE ALSO" msgstr "" #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed msgid "B(1), B(3), B(3), B(3)" msgstr "" #. type: TH #: mageia-cauldron #, no-wrap msgid "2025-12-25" msgstr "" #. type: TH #: mageia-cauldron #, no-wrap msgid "Linux man-pages 6.17" msgstr "" #. type: Plain text #: mageia-cauldron #, no-wrap msgid "" "#include Egetopt.hE\n" "#include Estdio.hE\n" "#include Estdlib.hE\n" "#include Eunistd.hE\n" "\\&\n" "int\n" "main(int argc, char *argv[])\n" "{\n" " int c;\n" " int digit_optind = 0;\n" "\\&\n" " while (1) {\n" " int this_option_optind = optind ? optind : 1;\n" " int option_index = 0;\n" " static struct option long_options[] = {\n" " {\"add\", required_argument, 0, 0 },\n" " {\"append\", no_argument, 0, 0 },\n" " {\"delete\", required_argument, 0, 0 },\n" " {\"verbose\", no_argument, 0, 0 },\n" " {\"create\", required_argument, 0, \\[aq]c\\[aq]},\n" " {\"file\", required_argument, 0, 0 },\n" " {0, 0, 0, 0 }\n" " };\n" "\\&\n" " c = getopt_long(argc, argv, \"abc:d:012\",\n" " long_options, &option_index);\n" " if (c == -1)\n" " break;\n" "\\&\n" " switch (c) {\n" " case 0:\n" " printf(\"option %s\", long_options[option_index].name);\n" " if (optarg)\n" " printf(\" with arg %s\", optarg);\n" " printf(\"\\[rs]n\");\n" " break;\n" "\\&\n" " case \\[aq]0\\[aq]:\n" " case \\[aq]1\\[aq]:\n" " case \\[aq]2\\[aq]:\n" " if (digit_optind != 0 && digit_optind != this_option_optind)\n" " printf(\"digits occur in two different argv-elements.\\[rs]n\");\n" " digit_optind = this_option_optind;\n" " printf(\"option %c\\[rs]n\", c);\n" " break;\n" "\\&\n" " case \\[aq]a\\[aq]:\n" " printf(\"option a\\[rs]n\");\n" " break;\n" "\\&\n" " case \\[aq]b\\[aq]:\n" " printf(\"option b\\[rs]n\");\n" " break;\n" "\\&\n" " case \\[aq]c\\[aq]:\n" " printf(\"option c with value \\[aq]%s\\[aq]\\[rs]n\", optarg);\n" " break;\n" "\\&\n" " case \\[aq]d\\[aq]:\n" " printf(\"option d with value \\[aq]%s\\[aq]\\[rs]n\", optarg);\n" " break;\n" "\\&\n" " case \\[aq]?\\[aq]:\n" " break;\n" "\\&\n" " default:\n" " printf(\"?? getopt returned character code 0%o ??\\[rs]n\", c);\n" " }\n" " }\n" "\\&\n" " if (optind E argc) {\n" " printf(\"non-option ARGV-elements: \");\n" " while (optind E argc)\n" " printf(\"%s \", argv[optind++]);\n" " printf(\"\\[rs]n\");\n" " }\n" "\\&\n" " exit(EXIT_SUCCESS);\n" "}\n" msgstr "" #. type: TH #: opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "Linux man-pages (unreleased)" msgstr ""