Debian Codegraph @

templates/man3/getopt_long.3.pot

raw
1 # SOME DESCRIPTIVE TITLE
2 # Copyright (C) YEAR Free Software Foundation, Inc.
3 # This file is distributed under the same license as the PACKAGE package.
4 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5 #
6 #, fuzzy
7 msgid ""
8 msgstr ""
9 "Project-Id-Version: PACKAGE VERSION\n"
10 "POT-Creation-Date: 2026-06-05 06:25+0200\n"
11 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13 "Language-Team: LANGUAGE <[email protected]>\n"
14 "Language: \n"
15 "MIME-Version: 1.0\n"
16 "Content-Type: text/plain; charset=UTF-8\n"
17 "Content-Transfer-Encoding: 8bit\n"
18
19 #. type: TH
20 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
21 #: opensuse-tumbleweed
22 #, no-wrap
23 msgid "getopt_long"
24 msgstr ""
25
26 #. type: TH
27 #: archlinux debian-unstable opensuse-leap-16-1 opensuse-tumbleweed
28 #, no-wrap
29 msgid "2026-02-14"
30 msgstr ""
31
32 #. type: TH
33 #: archlinux debian-unstable
34 #, no-wrap
35 msgid "Linux man-pages 6.18"
36 msgstr ""
37
38 #. type: SH
39 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
40 #: opensuse-tumbleweed
41 #, no-wrap
42 msgid "NAME"
43 msgstr ""
44
45 #. type: Plain text
46 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
47 #: opensuse-tumbleweed
48 msgid "getopt_long - parse command-line options"
49 msgstr ""
50
51 #. type: SH
52 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
53 #: opensuse-tumbleweed
54 #, no-wrap
55 msgid "LIBRARY"
56 msgstr ""
57
58 #. type: Plain text
59 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
60 #: opensuse-tumbleweed
61 msgid "Standard C library (I<libc>,\\ I<-lc>)"
62 msgstr ""
63
64 #. type: SH
65 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
66 #: opensuse-tumbleweed
67 #, no-wrap
68 msgid "SYNOPSIS"
69 msgstr ""
70
71 #. type: Plain text
72 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
73 #: opensuse-tumbleweed
74 #, no-wrap
75 msgid ""
76 "B<#define _GNU_SOURCE>\n"
77 "B<#include E<lt>getopt.hE<gt>>\n"
78 msgstr ""
79
80 #. type: Plain text
81 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
82 #: opensuse-tumbleweed
83 #, no-wrap
84 msgid ""
85 "B<int getopt_long(int >I<argc>B<, char *>I<argv>B<[],>\n"
86 "B< const char *>I<optstring>B<,>\n"
87 "B< const struct option *>I<longopts>B<, int *>I<longindex>B<);>\n"
88 msgstr ""
89
90 #. type: SH
91 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
92 #: opensuse-tumbleweed
93 #, no-wrap
94 msgid "DESCRIPTION"
95 msgstr ""
96
97 #. type: Plain text
98 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
99 #: opensuse-tumbleweed
100 msgid ""
101 "The B<getopt_long>() function works like B<getopt>(3) except that it also "
102 "accepts long options, started with two dashes. (If the program accepts only "
103 "long options, then I<optstring> should be specified as an empty string "
104 "(\"\"), not NULL.) Long option names may be abbreviated if the abbreviation "
105 "is unique or is an exact match for some defined option. A long option may "
106 "take a parameter, of the form B<--arg=param> or B<--arg param>."
107 msgstr ""
108
109 #. type: Plain text
110 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
111 #: opensuse-tumbleweed
112 msgid ""
113 "I<longopts> is a pointer to the first element of an array of I<struct "
114 "option> declared in I<E<lt>getopt.hE<gt>> as"
115 msgstr ""
116
117 #. type: Plain text
118 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
119 #: opensuse-tumbleweed
120 #, no-wrap
121 msgid ""
122 "struct option {\n"
123 " const char *name;\n"
124 " int has_arg;\n"
125 " int *flag;\n"
126 " int val;\n"
127 "};\n"
128 msgstr ""
129
130 #. type: Plain text
131 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
132 #: opensuse-tumbleweed
133 msgid "The meanings of the different fields are:"
134 msgstr ""
135
136 #. type: TP
137 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
138 #: opensuse-tumbleweed
139 #, no-wrap
140 msgid "I<name>"
141 msgstr ""
142
143 #. type: Plain text
144 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
145 #: opensuse-tumbleweed
146 msgid "is the name of the long option."
147 msgstr ""
148
149 #. type: TP
150 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
151 #: opensuse-tumbleweed
152 #, no-wrap
153 msgid "I<has_arg>"
154 msgstr ""
155
156 #. type: Plain text
157 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
158 #: opensuse-tumbleweed
159 msgid ""
160 "is: B<no_argument> (or 0) if the option does not take an argument; "
161 "B<required_argument> (or 1) if the option requires an argument; or "
162 "B<optional_argument> (or 2) if the option takes an optional argument."
163 msgstr ""
164
165 #. type: TP
166 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
167 #: opensuse-tumbleweed
168 #, no-wrap
169 msgid "I<flag>"
170 msgstr ""
171
172 #. type: Plain text
173 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
174 #: opensuse-tumbleweed
175 msgid ""
176 "specifies how results are returned for a long option. If I<flag> is NULL, "
177 "then B<getopt_long>() returns I<val>. (For example, the calling program "
178 "may set I<val> to the equivalent short option character.) Otherwise, "
179 "B<getopt_long>() returns 0, and I<flag> points to a variable which is set "
180 "to I<val> if the option is found, but left unchanged if the option is not "
181 "found."
182 msgstr ""
183
184 #. type: TP
185 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
186 #: opensuse-tumbleweed
187 #, no-wrap
188 msgid "I<val>"
189 msgstr ""
190
191 #. type: Plain text
192 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
193 #: opensuse-tumbleweed
194 msgid ""
195 "is the value to return, or to load into the variable pointed to by I<flag>."
196 msgstr ""
197
198 #. type: Plain text
199 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
200 #: opensuse-tumbleweed
201 msgid "The last element of the array has to be filled with zeros."
202 msgstr ""
203
204 #. type: Plain text
205 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
206 #: opensuse-tumbleweed
207 msgid ""
208 "If I<longindex> is not NULL, it points to a variable which is set to the "
209 "index of the long option relative to I<longopts>."
210 msgstr ""
211
212 #. type: Plain text
213 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
214 #: opensuse-tumbleweed
215 msgid ""
216 "Its analogue to B<getopt>(3)'s I<optopt> is \\[lq]I<argv[(optind - 1)]>\\"
217 "[rq]."
218 msgstr ""
219
220 #. type: SH
221 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
222 #: opensuse-tumbleweed
223 #, no-wrap
224 msgid "RETURN VALUE"
225 msgstr ""
226
227 #. type: Plain text
228 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
229 #: opensuse-tumbleweed
230 msgid "See B<getopt>(3)."
231 msgstr ""
232
233 #. type: Plain text
234 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
235 #: opensuse-tumbleweed
236 msgid ""
237 "B<getopt_long>() also returns the option character when a short option is "
238 "recognized. For a long option, it returns I<val> if I<flag> is NULL, and 0 "
239 "otherwise. Error and -1 returns are the same as for B<getopt>(3), plus \\"
240 "[aq]?\\[aq] for an ambiguous match or an extraneous parameter."
241 msgstr ""
242
243 #. type: SH
244 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
245 #: opensuse-tumbleweed
246 #, no-wrap
247 msgid "ENVIRONMENT"
248 msgstr ""
249
250 #. type: SH
251 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
252 #: opensuse-tumbleweed
253 #, no-wrap
254 msgid "ATTRIBUTES"
255 msgstr ""
256
257 #. type: Plain text
258 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
259 #: opensuse-tumbleweed
260 msgid ""
261 "For an explanation of the terms used in this section, see B<attributes>(7)."
262 msgstr ""
263
264 #. type: tbl table
265 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
266 #: opensuse-tumbleweed
267 #, no-wrap
268 msgid "Interface"
269 msgstr ""
270
271 #. type: tbl table
272 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
273 #: opensuse-tumbleweed
274 #, no-wrap
275 msgid "Attribute"
276 msgstr ""
277
278 #. type: tbl table
279 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
280 #: opensuse-tumbleweed
281 #, no-wrap
282 msgid "Value"
283 msgstr ""
284
285 #. type: tbl table
286 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
287 #: opensuse-tumbleweed
288 #, no-wrap
289 msgid ".na\n"
290 msgstr ""
291
292 #. type: tbl table
293 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
294 #: opensuse-tumbleweed
295 #, no-wrap
296 msgid ".nh\n"
297 msgstr ""
298
299 #. type: tbl table
300 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
301 #: opensuse-tumbleweed
302 #, no-wrap
303 msgid "B<getopt_long>()"
304 msgstr ""
305
306 #. type: tbl table
307 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
308 #: opensuse-tumbleweed
309 #, no-wrap
310 msgid "Thread safety"
311 msgstr ""
312
313 #. type: tbl table
314 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
315 #: opensuse-tumbleweed
316 #, no-wrap
317 msgid "MT-Unsafe race:getopt env"
318 msgstr ""
319
320 #. type: SH
321 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
322 #: opensuse-tumbleweed
323 #, no-wrap
324 msgid "STANDARDS"
325 msgstr ""
326
327 #. type: Plain text
328 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
329 #: opensuse-tumbleweed
330 msgid "GNU."
331 msgstr ""
332
333 #. type: SH
334 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
335 #: opensuse-tumbleweed
336 #, no-wrap
337 msgid "EXAMPLES"
338 msgstr ""
339
340 #. type: Plain text
341 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
342 #: opensuse-tumbleweed
343 msgid ""
344 "The following example program illustrates the use of B<getopt_long>() with "
345 "most of its features."
346 msgstr ""
347
348 #. type: Plain text
349 #: archlinux debian-unstable opensuse-leap-16-1 opensuse-tumbleweed
350 #, no-wrap
351 msgid ""
352 "#include E<lt>getopt.hE<gt>\n"
353 "#include E<lt>stdio.hE<gt>\n"
354 "#include E<lt>stdlib.hE<gt>\n"
355 "#include E<lt>unistd.hE<gt>\n"
356 "\\&\n"
357 "int\n"
358 "main(int argc, char *argv[])\n"
359 "{\n"
360 " int c;\n"
361 " int digit_optind = 0;\n"
362 "\\&\n"
363 " for (;;) {\n"
364 " int this_option_optind = optind ? optind : 1;\n"
365 " int option_index = 0;\n"
366 " static struct option long_options[] = {\n"
367 " {\"add\", required_argument, 0, 0 },\n"
368 " {\"append\", no_argument, 0, 0 },\n"
369 " {\"delete\", required_argument, 0, 0 },\n"
370 " {\"verbose\", no_argument, 0, 0 },\n"
371 " {\"create\", required_argument, 0, \\[aq]c\\[aq]},\n"
372 " {\"file\", required_argument, 0, 0 },\n"
373 " {0, 0, 0, 0 }\n"
374 " };\n"
375 "\\&\n"
376 " c = getopt_long(argc, argv, \"abc:d:012\",\n"
377 " long_options, &option_index);\n"
378 " if (c == -1)\n"
379 " break;\n"
380 "\\&\n"
381 " switch (c) {\n"
382 " case 0:\n"
383 " printf(\"option %s\", long_options[option_index].name);\n"
384 " if (optarg)\n"
385 " printf(\" with arg %s\", optarg);\n"
386 " printf(\"\\[rs]n\");\n"
387 " break;\n"
388 "\\&\n"
389 " case \\[aq]0\\[aq]:\n"
390 " case \\[aq]1\\[aq]:\n"
391 " case \\[aq]2\\[aq]:\n"
392 " if (digit_optind != 0 && digit_optind != this_option_optind)\n"
393 " printf(\"digits occur in two different argv-elements.\\[rs]n\");\n"
394 " digit_optind = this_option_optind;\n"
395 " printf(\"option %c\\[rs]n\", c);\n"
396 " break;\n"
397 "\\&\n"
398 " case \\[aq]a\\[aq]:\n"
399 " printf(\"option a\\[rs]n\");\n"
400 " break;\n"
401 "\\&\n"
402 " case \\[aq]b\\[aq]:\n"
403 " printf(\"option b\\[rs]n\");\n"
404 " break;\n"
405 "\\&\n"
406 " case \\[aq]c\\[aq]:\n"
407 " printf(\"option c with value \\[aq]%s\\[aq]\\[rs]n\", optarg);\n"
408 " break;\n"
409 "\\&\n"
410 " case \\[aq]d\\[aq]:\n"
411 " printf(\"option d with value \\[aq]%s\\[aq]\\[rs]n\", optarg);\n"
412 " break;\n"
413 "\\&\n"
414 " case \\[aq]?\\[aq]:\n"
415 " break;\n"
416 "\\&\n"
417 " default:\n"
418 " printf(\"?? getopt returned character code 0%o ??\\[rs]n\", c);\n"
419 " }\n"
420 " }\n"
421 "\\&\n"
422 " if (optind E<lt> argc) {\n"
423 " printf(\"non-option ARGV-elements: \");\n"
424 " while (optind E<lt> argc)\n"
425 " printf(\"%s \", argv[optind++]);\n"
426 " printf(\"\\[rs]n\");\n"
427 " }\n"
428 "\\&\n"
429 " exit(EXIT_SUCCESS);\n"
430 "}\n"
431 msgstr ""
432
433 #. SRC END
434 #. type: SH
435 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
436 #: opensuse-tumbleweed
437 #, no-wrap
438 msgid "SEE ALSO"
439 msgstr ""
440
441 #. type: Plain text
442 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
443 #: opensuse-tumbleweed
444 msgid "B<getopt>(1), B<getopt>(3), B<getopt_long_only>(3), B<getsubopt>(3)"
445 msgstr ""
446
447 #. type: TH
448 #: mageia-cauldron
449 #, no-wrap
450 msgid "2025-12-25"
451 msgstr ""
452
453 #. type: TH
454 #: mageia-cauldron
455 #, no-wrap
456 msgid "Linux man-pages 6.17"
457 msgstr ""
458
459 #. type: Plain text
460 #: mageia-cauldron
461 #, no-wrap
462 msgid ""
463 "#include E<lt>getopt.hE<gt>\n"
464 "#include E<lt>stdio.hE<gt>\n"
465 "#include E<lt>stdlib.hE<gt>\n"
466 "#include E<lt>unistd.hE<gt>\n"
467 "\\&\n"
468 "int\n"
469 "main(int argc, char *argv[])\n"
470 "{\n"
471 " int c;\n"
472 " int digit_optind = 0;\n"
473 "\\&\n"
474 " while (1) {\n"
475 " int this_option_optind = optind ? optind : 1;\n"
476 " int option_index = 0;\n"
477 " static struct option long_options[] = {\n"
478 " {\"add\", required_argument, 0, 0 },\n"
479 " {\"append\", no_argument, 0, 0 },\n"
480 " {\"delete\", required_argument, 0, 0 },\n"
481 " {\"verbose\", no_argument, 0, 0 },\n"
482 " {\"create\", required_argument, 0, \\[aq]c\\[aq]},\n"
483 " {\"file\", required_argument, 0, 0 },\n"
484 " {0, 0, 0, 0 }\n"
485 " };\n"
486 "\\&\n"
487 " c = getopt_long(argc, argv, \"abc:d:012\",\n"
488 " long_options, &option_index);\n"
489 " if (c == -1)\n"
490 " break;\n"
491 "\\&\n"
492 " switch (c) {\n"
493 " case 0:\n"
494 " printf(\"option %s\", long_options[option_index].name);\n"
495 " if (optarg)\n"
496 " printf(\" with arg %s\", optarg);\n"
497 " printf(\"\\[rs]n\");\n"
498 " break;\n"
499 "\\&\n"
500 " case \\[aq]0\\[aq]:\n"
501 " case \\[aq]1\\[aq]:\n"
502 " case \\[aq]2\\[aq]:\n"
503 " if (digit_optind != 0 && digit_optind != this_option_optind)\n"
504 " printf(\"digits occur in two different argv-elements.\\[rs]n\");\n"
505 " digit_optind = this_option_optind;\n"
506 " printf(\"option %c\\[rs]n\", c);\n"
507 " break;\n"
508 "\\&\n"
509 " case \\[aq]a\\[aq]:\n"
510 " printf(\"option a\\[rs]n\");\n"
511 " break;\n"
512 "\\&\n"
513 " case \\[aq]b\\[aq]:\n"
514 " printf(\"option b\\[rs]n\");\n"
515 " break;\n"
516 "\\&\n"
517 " case \\[aq]c\\[aq]:\n"
518 " printf(\"option c with value \\[aq]%s\\[aq]\\[rs]n\", optarg);\n"
519 " break;\n"
520 "\\&\n"
521 " case \\[aq]d\\[aq]:\n"
522 " printf(\"option d with value \\[aq]%s\\[aq]\\[rs]n\", optarg);\n"
523 " break;\n"
524 "\\&\n"
525 " case \\[aq]?\\[aq]:\n"
526 " break;\n"
527 "\\&\n"
528 " default:\n"
529 " printf(\"?? getopt returned character code 0%o ??\\[rs]n\", c);\n"
530 " }\n"
531 " }\n"
532 "\\&\n"
533 " if (optind E<lt> argc) {\n"
534 " printf(\"non-option ARGV-elements: \");\n"
535 " while (optind E<lt> argc)\n"
536 " printf(\"%s \", argv[optind++]);\n"
537 " printf(\"\\[rs]n\");\n"
538 " }\n"
539 "\\&\n"
540 " exit(EXIT_SUCCESS);\n"
541 "}\n"
542 msgstr ""
543
544 #. type: TH
545 #: opensuse-leap-16-1 opensuse-tumbleweed
546 #, no-wrap
547 msgid "Linux man-pages (unreleased)"
548 msgstr ""