OSDN Git Service

000d43b97342052f1f7e1ff9ead67c07e841cfca
[linuxjm/LDP_man-pages.git] / po4a / regexp / po / regexp.pot
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: 2012-04-25 05:36+0900\n"
11 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13 "Language-Team: LANGUAGE <LL@li.org>\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 #: build/C/man3/fnmatch.3:26
21 #, no-wrap
22 msgid "FNMATCH"
23 msgstr ""
24
25 #. type: TH
26 #: build/C/man3/fnmatch.3:26
27 #, no-wrap
28 msgid "2000-10-15"
29 msgstr ""
30
31 #. type: TH
32 #: build/C/man3/fnmatch.3:26 build/C/man3/glob.3:32 build/C/man3/re_comp.3:25 build/C/man3/regex.3:32
33 #, no-wrap
34 msgid "GNU"
35 msgstr ""
36
37 #. type: TH
38 #: build/C/man3/fnmatch.3:26 build/C/man3/glob.3:32 build/C/man7/glob.7:25 build/C/man3/re_comp.3:25 build/C/man3/regex.3:32 build/C/man7/regex.7:35 build/C/man3/wordexp.3:23
39 #, no-wrap
40 msgid "Linux Programmer's Manual"
41 msgstr ""
42
43 #. type: SH
44 #: build/C/man3/fnmatch.3:27 build/C/man3/glob.3:33 build/C/man7/glob.7:26 build/C/man3/re_comp.3:26 build/C/man3/regex.3:33 build/C/man7/regex.7:36 build/C/man3/wordexp.3:24
45 #, no-wrap
46 msgid "NAME"
47 msgstr ""
48
49 #. type: Plain text
50 #: build/C/man3/fnmatch.3:29
51 msgid "fnmatch - match filename or pathname"
52 msgstr ""
53
54 #. type: SH
55 #: build/C/man3/fnmatch.3:29 build/C/man3/glob.3:35 build/C/man3/re_comp.3:28 build/C/man3/regex.3:35 build/C/man3/wordexp.3:26
56 #, no-wrap
57 msgid "SYNOPSIS"
58 msgstr ""
59
60 #. type: Plain text
61 #: build/C/man3/fnmatch.3:32
62 #, no-wrap
63 msgid "B<#include E<lt>fnmatch.hE<gt>>\n"
64 msgstr ""
65
66 #. type: Plain text
67 #: build/C/man3/fnmatch.3:34
68 #, no-wrap
69 msgid ""
70 "B<int fnmatch(const char *>I<pattern>B<, const char *>I<string>B<, int "
71 ">I<flags>B<);>\n"
72 msgstr ""
73
74 #. type: SH
75 #: build/C/man3/fnmatch.3:35 build/C/man3/glob.3:47 build/C/man7/glob.7:28 build/C/man3/re_comp.3:38 build/C/man3/regex.3:51 build/C/man7/regex.7:38 build/C/man3/wordexp.3:41
76 #, no-wrap
77 msgid "DESCRIPTION"
78 msgstr ""
79
80 #. type: Plain text
81 #: build/C/man3/fnmatch.3:43
82 msgid ""
83 "The B<fnmatch>()  function checks whether the I<string> argument matches the "
84 "I<pattern> argument, which is a shell wildcard pattern."
85 msgstr ""
86
87 #. type: Plain text
88 #: build/C/man3/fnmatch.3:48
89 msgid ""
90 "The I<flags> argument modifies the behavior; it is the bitwise OR of zero or "
91 "more of the following flags:"
92 msgstr ""
93
94 #. type: TP
95 #: build/C/man3/fnmatch.3:48
96 #, no-wrap
97 msgid "B<FNM_NOESCAPE>"
98 msgstr ""
99
100 #. type: Plain text
101 #: build/C/man3/fnmatch.3:52
102 msgid ""
103 "If this flag is set, treat backslash as an ordinary character, instead of an "
104 "escape character."
105 msgstr ""
106
107 #. type: TP
108 #: build/C/man3/fnmatch.3:52
109 #, no-wrap
110 msgid "B<FNM_PATHNAME>"
111 msgstr ""
112
113 #. type: Plain text
114 #: build/C/man3/fnmatch.3:60
115 msgid ""
116 "If this flag is set, match a slash in I<string> only with a slash in "
117 "I<pattern> and not by an asterisk (*) or a question mark (?) metacharacter, "
118 "nor by a bracket expression ([]) containing a slash."
119 msgstr ""
120
121 #. type: TP
122 #: build/C/man3/fnmatch.3:60
123 #, no-wrap
124 msgid "B<FNM_PERIOD>"
125 msgstr ""
126
127 #. type: Plain text
128 #: build/C/man3/fnmatch.3:71
129 msgid ""
130 "If this flag is set, a leading period in I<string> has to be matched exactly "
131 "by a period in I<pattern>.  A period is considered to be leading if it is "
132 "the first character in I<string>, or if both B<FNM_PATHNAME> is set and the "
133 "period immediately follows a slash."
134 msgstr ""
135
136 #. type: TP
137 #: build/C/man3/fnmatch.3:71
138 #, no-wrap
139 msgid "B<FNM_FILE_NAME>"
140 msgstr ""
141
142 #. type: Plain text
143 #: build/C/man3/fnmatch.3:74
144 msgid "This is a GNU synonym for B<FNM_PATHNAME>."
145 msgstr ""
146
147 #. type: TP
148 #: build/C/man3/fnmatch.3:74
149 #, no-wrap
150 msgid "B<FNM_LEADING_DIR>"
151 msgstr ""
152
153 #. type: Plain text
154 #: build/C/man3/fnmatch.3:82
155 msgid ""
156 "If this flag (a GNU extension) is set, the pattern is considered to be "
157 "matched if it matches an initial segment of I<string> which is followed by a "
158 "slash.  This flag is mainly for the internal use of glibc and is only "
159 "implemented in certain cases."
160 msgstr ""
161
162 #. type: TP
163 #: build/C/man3/fnmatch.3:82
164 #, no-wrap
165 msgid "B<FNM_CASEFOLD>"
166 msgstr ""
167
168 #. type: Plain text
169 #: build/C/man3/fnmatch.3:86
170 msgid ""
171 "If this flag (a GNU extension) is set, the pattern is matched "
172 "case-insensitively."
173 msgstr ""
174
175 #. type: SH
176 #: build/C/man3/fnmatch.3:86 build/C/man3/glob.3:257 build/C/man3/re_comp.3:56 build/C/man3/regex.3:237 build/C/man3/wordexp.3:156
177 #, no-wrap
178 msgid "RETURN VALUE"
179 msgstr ""
180
181 #. type: Plain text
182 #: build/C/man3/fnmatch.3:93
183 msgid ""
184 "Zero if I<string> matches I<pattern>, B<FNM_NOMATCH> if there is no match or "
185 "another nonzero value if there is an error."
186 msgstr ""
187
188 #. type: SH
189 #: build/C/man3/fnmatch.3:93 build/C/man3/glob.3:271 build/C/man3/re_comp.3:64 build/C/man3/regex.3:294 build/C/man3/wordexp.3:186
190 #, no-wrap
191 msgid "CONFORMING TO"
192 msgstr ""
193
194 #. type: Plain text
195 #: build/C/man3/fnmatch.3:98
196 msgid ""
197 "POSIX.2.  The B<FNM_FILE_NAME>, B<FNM_LEADING_DIR>, and B<FNM_CASEFOLD> "
198 "flags are GNU extensions."
199 msgstr ""
200
201 #. type: SH
202 #: build/C/man3/fnmatch.3:98 build/C/man3/glob.3:314 build/C/man7/glob.7:204 build/C/man3/re_comp.3:70 build/C/man3/regex.3:296 build/C/man7/regex.7:284 build/C/man3/wordexp.3:212
203 #, no-wrap
204 msgid "SEE ALSO"
205 msgstr ""
206
207 #. type: Plain text
208 #: build/C/man3/fnmatch.3:103
209 msgid "B<sh>(1), B<glob>(3), B<scandir>(3), B<wordexp>(3), B<glob>(7)"
210 msgstr ""
211
212 #. type: TH
213 #: build/C/man3/glob.3:32 build/C/man7/glob.7:25
214 #, no-wrap
215 msgid "GLOB"
216 msgstr ""
217
218 #. type: TH
219 #: build/C/man3/glob.3:32
220 #, no-wrap
221 msgid "2007-10-10"
222 msgstr ""
223
224 #. type: Plain text
225 #: build/C/man3/glob.3:35
226 msgid "glob, globfree - find pathnames matching a pattern, free memory from glob()"
227 msgstr ""
228
229 #. type: Plain text
230 #: build/C/man3/glob.3:38
231 #, no-wrap
232 msgid "B<#include E<lt>glob.hE<gt>>\n"
233 msgstr ""
234
235 #. type: Plain text
236 #: build/C/man3/glob.3:40
237 #, no-wrap
238 msgid "B<int glob(const char *>I<pattern>B<, int >I<flags>B<,>\n"
239 msgstr ""
240
241 #. type: Plain text
242 #: build/C/man3/glob.3:42
243 #, no-wrap
244 msgid ""
245 "B<         int (*>I<errfunc>B<) (const char *>I<epath>B<, int "
246 ">I<eerrno>B<),>\n"
247 msgstr ""
248
249 #. type: Plain text
250 #: build/C/man3/glob.3:44
251 #, no-wrap
252 msgid "B<         glob_t *>I<pglob>B<);>\n"
253 msgstr ""
254
255 #. type: Plain text
256 #: build/C/man3/glob.3:46
257 #, no-wrap
258 msgid "B<void globfree(glob_t *>I<pglob>B<);>\n"
259 msgstr ""
260
261 #. type: Plain text
262 #: build/C/man3/glob.3:57
263 msgid ""
264 "The B<glob>()  function searches for all the pathnames matching I<pattern> "
265 "according to the rules used by the shell (see B<glob>(7)).  No tilde "
266 "expansion or parameter substitution is done; if you want these, use "
267 "B<wordexp>(3)."
268 msgstr ""
269
270 #. type: Plain text
271 #: build/C/man3/glob.3:63
272 msgid ""
273 "The B<globfree>()  function frees the dynamically allocated storage from an "
274 "earlier call to B<glob>()."
275 msgstr ""
276
277 #. type: Plain text
278 #: build/C/man3/glob.3:74
279 msgid ""
280 "The results of a B<glob>()  call are stored in the structure pointed to by "
281 "I<pglob>.  This structure is of type I<glob_t> (declared in "
282 "I<E<lt>glob.hE<gt>>)  and includes the following elements defined by POSIX.2 "
283 "(more may be present as an extension):"
284 msgstr ""
285
286 #. type: Plain text
287 #: build/C/man3/glob.3:83
288 #, no-wrap
289 msgid ""
290 "typedef struct {\n"
291 "    size_t   gl_pathc;    /* Count of paths matched so far  */\n"
292 "    char   **gl_pathv;    /* List of matched pathnames.  */\n"
293 "    size_t   gl_offs;     /* Slots to reserve in I<gl_pathv>.  */\n"
294 "} glob_t;\n"
295 msgstr ""
296
297 #. type: Plain text
298 #: build/C/man3/glob.3:87
299 msgid "Results are stored in dynamically allocated storage."
300 msgstr ""
301
302 #. type: Plain text
303 #: build/C/man3/glob.3:93
304 msgid ""
305 "The argument I<flags> is made up of the bitwise OR of zero or more the "
306 "following symbolic constants, which modify the behavior of B<glob>():"
307 msgstr ""
308
309 #. type: TP
310 #: build/C/man3/glob.3:93
311 #, no-wrap
312 msgid "B<GLOB_ERR>"
313 msgstr ""
314
315 #. type: Plain text
316 #: build/C/man3/glob.3:101
317 msgid ""
318 "Return upon a read error (because a directory does not have read permission, "
319 "for example).  By default, B<glob>()  attempts carry on despite errors, "
320 "reading all of the directories that it can."
321 msgstr ""
322
323 #. type: TP
324 #: build/C/man3/glob.3:101
325 #, no-wrap
326 msgid "B<GLOB_MARK>"
327 msgstr ""
328
329 #. type: Plain text
330 #: build/C/man3/glob.3:104
331 msgid "Append a slash to each path which corresponds to a directory."
332 msgstr ""
333
334 #. type: TP
335 #: build/C/man3/glob.3:104
336 #, no-wrap
337 msgid "B<GLOB_NOSORT>"
338 msgstr ""
339
340 #. type: Plain text
341 #: build/C/man3/glob.3:109
342 msgid ""
343 "Don't sort the returned pathnames.  The only reason to do this is to save "
344 "processing time.  By default, the returned pathnames are sorted."
345 msgstr ""
346
347 #. type: TP
348 #: build/C/man3/glob.3:109
349 #, no-wrap
350 msgid "B<GLOB_DOOFFS>"
351 msgstr ""
352
353 #. type: Plain text
354 #: build/C/man3/glob.3:116
355 msgid ""
356 "Reserve I<pglob-E<gt>gl_offs> slots at the beginning of the list of strings "
357 "in I<pglob-E<gt>pathv>.  The reserved slots contain NULL pointers."
358 msgstr ""
359
360 #. type: TP
361 #: build/C/man3/glob.3:116
362 #, no-wrap
363 msgid "B<GLOB_NOCHECK>"
364 msgstr ""
365
366 #. type: Plain text
367 #: build/C/man3/glob.3:124
368 msgid ""
369 "If no pattern matches, return the original pattern.  By default, B<glob>()  "
370 "returns B<GLOB_NOMATCH> if there are no matches."
371 msgstr ""
372
373 #. type: TP
374 #: build/C/man3/glob.3:124
375 #, no-wrap
376 msgid "B<GLOB_APPEND>"
377 msgstr ""
378
379 #. type: Plain text
380 #: build/C/man3/glob.3:131
381 msgid ""
382 "Append the results of this call to the vector of results returned by a "
383 "previous call to B<glob>().  Do not set this flag on the first invocation of "
384 "B<glob>()."
385 msgstr ""
386
387 #. type: TP
388 #: build/C/man3/glob.3:131
389 #, no-wrap
390 msgid "B<GLOB_NOESCAPE>"
391 msgstr ""
392
393 #. type: Plain text
394 #: build/C/man3/glob.3:138
395 msgid ""
396 "Don't allow backslash (\\(aq\\e\\(aq) to be used as an escape character.  "
397 "Normally, a backslash can be used to quote the following character, "
398 "providing a mechanism to turn off the special meaning metacharacters."
399 msgstr ""
400
401 #. type: Plain text
402 #: build/C/man3/glob.3:142
403 msgid ""
404 "I<flags> may also include any of the following, which are GNU extensions and "
405 "not defined by POSIX.2:"
406 msgstr ""
407
408 #. type: TP
409 #: build/C/man3/glob.3:142
410 #, no-wrap
411 msgid "B<GLOB_PERIOD>"
412 msgstr ""
413
414 #. type: Plain text
415 #: build/C/man3/glob.3:146
416 msgid ""
417 "Allow a leading period to be matched by metacharacters.  By default, "
418 "metacharacters can't match a leading period."
419 msgstr ""
420
421 #. type: TP
422 #: build/C/man3/glob.3:146
423 #, no-wrap
424 msgid "B<GLOB_ALTDIRFUNC>"
425 msgstr ""
426
427 #. type: Plain text
428 #: build/C/man3/glob.3:156
429 msgid ""
430 "Use alternative functions I<pglob-E<gt>gl_closedir>, "
431 "I<pglob-E<gt>gl_readdir>, I<pglob-E<gt>gl_opendir>, I<pglob-E<gt>gl_lstat>, "
432 "and I<pglob-E<gt>gl_stat> for file system access instead of the normal "
433 "library functions."
434 msgstr ""
435
436 #. type: TP
437 #: build/C/man3/glob.3:156
438 #, no-wrap
439 msgid "B<GLOB_BRACE>"
440 msgstr ""
441
442 #. type: Plain text
443 #: build/C/man3/glob.3:171
444 msgid ""
445 "Expand B<csh>(1)  style brace expressions of the form B<{a,b}>.  Brace "
446 "expressions can be nested.  Thus, for example, specifying the pattern "
447 "\"{foo/{,cat,dog},bar}\" would return the same results as four separate "
448 "B<glob>()  calls using the strings: \"foo/\", \"foo/cat\", \"foo/dog\", and "
449 "\"bar\"."
450 msgstr ""
451
452 #. type: TP
453 #: build/C/man3/glob.3:171
454 #, no-wrap
455 msgid "B<GLOB_NOMAGIC>"
456 msgstr ""
457
458 #. type: Plain text
459 #: build/C/man3/glob.3:176
460 msgid ""
461 "If the pattern contains no metacharacters then it should be returned as the "
462 "sole matching word, even if there is no file with that name."
463 msgstr ""
464
465 #. type: TP
466 #: build/C/man3/glob.3:176
467 #, no-wrap
468 msgid "B<GLOB_TILDE>"
469 msgstr ""
470
471 #. type: Plain text
472 #: build/C/man3/glob.3:188
473 msgid ""
474 "Carry out tilde expansion.  If a tilde (\\(aq~\\(aq) is the only character "
475 "in the pattern, or an initial tilde is followed immediately by a slash "
476 "(\\(aq/\\(aq), then the home directory of the caller is substituted for the "
477 "tilde.  If an initial tilde is followed by a username (e.g., "
478 "\"~andrea/bin\"), then the tilde and username are substituted by the home "
479 "directory of that user.  If the username is invalid, or the home directory "
480 "cannot be determined, then no substitution is performed."
481 msgstr ""
482
483 #. type: TP
484 #: build/C/man3/glob.3:188
485 #, no-wrap
486 msgid "B<GLOB_TILDE_CHECK>"
487 msgstr ""
488
489 #. type: Plain text
490 #: build/C/man3/glob.3:199
491 msgid ""
492 "This provides behavior similar to that of B<GLOB_TILDE>.  The difference is "
493 "that if the username is invalid, or the home directory cannot be determined, "
494 "then instead of using the pattern itself as the name, B<glob>()  returns "
495 "B<GLOB_NOMATCH> to indicate an error."
496 msgstr ""
497
498 #. type: TP
499 #: build/C/man3/glob.3:199
500 #, no-wrap
501 msgid "B<GLOB_ONLYDIR>"
502 msgstr ""
503
504 #. type: Plain text
505 #: build/C/man3/glob.3:212
506 msgid ""
507 "This is a I<hint> to B<glob>()  that the caller is interested only in "
508 "directories that match the pattern.  If the implementation can easily "
509 "determine file-type information, then nondirectory files are not returned to "
510 "the caller.  However, the caller must still check that returned files are "
511 "directories.  (The purpose of this flag is merely to optimize performance "
512 "when the caller is interested only in directories.)"
513 msgstr ""
514
515 #. type: Plain text
516 #: build/C/man3/glob.3:235
517 msgid ""
518 "If I<errfunc> is not NULL, it will be called in case of an error with the "
519 "arguments I<epath>, a pointer to the path which failed, and I<eerrno>, the "
520 "value of I<errno> as returned from one of the calls to B<opendir>(3), "
521 "B<readdir>(3), or B<stat>(2).  If I<errfunc> returns nonzero, or if "
522 "B<GLOB_ERR> is set, B<glob>()  will terminate after the call to I<errfunc>."
523 msgstr ""
524
525 #. type: Plain text
526 #: build/C/man3/glob.3:242
527 msgid ""
528 "Upon successful return, I<pglob-E<gt>gl_pathc> contains the number of "
529 "matched pathnames and I<pglob-E<gt>gl_pathv> contains a pointer to the list "
530 "of pointers to matched pathnames.  The list of pointers is terminated by a "
531 "NULL pointer."
532 msgstr ""
533
534 #. type: Plain text
535 #: build/C/man3/glob.3:251
536 msgid ""
537 "It is possible to call B<glob>()  several times.  In that case, the "
538 "B<GLOB_APPEND> flag has to be set in I<flags> on the second and later "
539 "invocations."
540 msgstr ""
541
542 #. type: Plain text
543 #: build/C/man3/glob.3:257
544 msgid ""
545 "As a GNU extension, I<pglob-E<gt>gl_flags> is set to the flags specified, "
546 "B<or>ed with B<GLOB_MAGCHAR> if any metacharacters were found."
547 msgstr ""
548
549 #. type: Plain text
550 #: build/C/man3/glob.3:262
551 msgid ""
552 "On successful completion, B<glob>()  returns zero.  Other possible returns "
553 "are:"
554 msgstr ""
555
556 #. type: TP
557 #: build/C/man3/glob.3:262
558 #, no-wrap
559 msgid "B<GLOB_NOSPACE>"
560 msgstr ""
561
562 #. type: Plain text
563 #: build/C/man3/glob.3:265
564 msgid "for running out of memory,"
565 msgstr ""
566
567 #. type: TP
568 #: build/C/man3/glob.3:265
569 #, no-wrap
570 msgid "B<GLOB_ABORTED>"
571 msgstr ""
572
573 #. type: Plain text
574 #: build/C/man3/glob.3:268
575 msgid "for a read error, and"
576 msgstr ""
577
578 #. type: TP
579 #: build/C/man3/glob.3:268
580 #, no-wrap
581 msgid "B<GLOB_NOMATCH>"
582 msgstr ""
583
584 #. type: Plain text
585 #: build/C/man3/glob.3:271
586 msgid "for no found matches."
587 msgstr ""
588
589 #. type: Plain text
590 #: build/C/man3/glob.3:273
591 msgid "POSIX.2, POSIX.1-2001."
592 msgstr ""
593
594 #. type: SH
595 #: build/C/man3/glob.3:273 build/C/man7/glob.7:136 build/C/man3/re_comp.3:66
596 #, no-wrap
597 msgid "NOTES"
598 msgstr ""
599
600 #. type: Plain text
601 #: build/C/man3/glob.3:284
602 msgid ""
603 "The structure elements I<gl_pathc> and I<gl_offs> are declared as I<size_t> "
604 "in glibc 2.1, as they should be according to POSIX.2, but are declared as "
605 "I<int> in libc4, libc5 and glibc 2.0."
606 msgstr ""
607
608 #. type: SH
609 #: build/C/man3/glob.3:284 build/C/man7/regex.7:257
610 #, no-wrap
611 msgid "BUGS"
612 msgstr ""
613
614 #. type: Plain text
615 #: build/C/man3/glob.3:293
616 msgid ""
617 "The B<glob>()  function may fail due to failure of underlying function "
618 "calls, such as B<malloc>(3)  or B<opendir>(3).  These will store their error "
619 "code in I<errno>."
620 msgstr ""
621
622 #. type: SH
623 #: build/C/man3/glob.3:293 build/C/man3/wordexp.3:188
624 #, no-wrap
625 msgid "EXAMPLE"
626 msgstr ""
627
628 #. type: Plain text
629 #: build/C/man3/glob.3:295
630 msgid "One example of use is the following code, which simulates typing"
631 msgstr ""
632
633 #. type: Plain text
634 #: build/C/man3/glob.3:298
635 msgid "ls -l *.c ../*.c"
636 msgstr ""
637
638 #. type: Plain text
639 #: build/C/man3/glob.3:301
640 msgid "in the shell:"
641 msgstr ""
642
643 #. type: Plain text
644 #: build/C/man3/glob.3:305
645 #, no-wrap
646 msgid "glob_t globbuf;\n"
647 msgstr ""
648
649 #. type: Plain text
650 #: build/C/man3/glob.3:312
651 #, no-wrap
652 msgid ""
653 "globbuf.gl_offs = 2;\n"
654 "glob(\"*.c\", GLOB_DOOFFS, NULL, &globbuf);\n"
655 "glob(\"../*.c\", GLOB_DOOFFS | GLOB_APPEND, NULL, &globbuf);\n"
656 "globbuf.gl_pathv[0] = \"ls\";\n"
657 "globbuf.gl_pathv[1] = \"-l\";\n"
658 "execvp(\"ls\", &globbuf.gl_pathv[0]);\n"
659 msgstr ""
660
661 #. type: Plain text
662 #: build/C/man3/glob.3:324
663 msgid ""
664 "B<ls>(1), B<sh>(1), B<stat>(2), B<exec>(3), B<fnmatch>(3), B<malloc>(3), "
665 "B<opendir>(3), B<readdir>(3), B<wordexp>(3), B<glob>(7)"
666 msgstr ""
667
668 #. type: TH
669 #: build/C/man7/glob.7:25
670 #, no-wrap
671 msgid "2003-08-24"
672 msgstr ""
673
674 #. type: TH
675 #: build/C/man7/glob.7:25
676 #, no-wrap
677 msgid "Linux"
678 msgstr ""
679
680 #. type: Plain text
681 #: build/C/man7/glob.7:28
682 msgid "glob - Globbing pathnames"
683 msgstr ""
684
685 #. type: Plain text
686 #: build/C/man7/glob.7:33
687 msgid ""
688 "Long ago, in UNIX V6, there was a program I</etc/glob> that would expand "
689 "wildcard patterns.  Soon afterward this became a shell built-in."
690 msgstr ""
691
692 #. type: Plain text
693 #: build/C/man7/glob.7:37
694 msgid ""
695 "These days there is also a library routine B<glob>(3)  that will perform "
696 "this function for a user program."
697 msgstr ""
698
699 #. type: Plain text
700 #: build/C/man7/glob.7:39
701 msgid "The rules are as follows (POSIX.2, 3.13)."
702 msgstr ""
703
704 #. type: SS
705 #: build/C/man7/glob.7:39
706 #, no-wrap
707 msgid "Wildcard Matching"
708 msgstr ""
709
710 #. type: Plain text
711 #: build/C/man7/glob.7:46
712 msgid ""
713 "A string is a wildcard pattern if it contains one of the characters "
714 "\\(aq?\\(aq, \\(aq*\\(aq or \\(aq[\\(aq.  Globbing is the operation that "
715 "expands a wildcard pattern into the list of pathnames matching the pattern.  "
716 "Matching is defined by:"
717 msgstr ""
718
719 #. type: Plain text
720 #: build/C/man7/glob.7:48
721 msgid "A \\(aq?\\(aq (not between brackets) matches any single character."
722 msgstr ""
723
724 #. type: Plain text
725 #: build/C/man7/glob.7:51
726 msgid ""
727 "A \\(aq*\\(aq (not between brackets) matches any string, including the empty "
728 "string."
729 msgstr ""
730
731 #. type: Plain text
732 #: build/C/man7/glob.7:53
733 msgid "B<Character classes>"
734 msgstr ""
735
736 #. type: Plain text
737 #: build/C/man7/glob.7:62
738 msgid ""
739 "An expression \"I<[...]>\" where the first character after the leading "
740 "\\(aq[\\(aq is not an \\(aq!\\(aq matches a single character, namely any of "
741 "the characters enclosed by the brackets.  The string enclosed by the "
742 "brackets cannot be empty; therefore \\(aq]\\(aq can be allowed between the "
743 "brackets, provided that it is the first character.  (Thus, \"I<[][!]>\" "
744 "matches the three characters \\(aq[\\(aq, \\(aq]\\(aq and \\(aq!\\(aq.)"
745 msgstr ""
746
747 #. type: Plain text
748 #: build/C/man7/glob.7:64
749 msgid "B<Ranges>"
750 msgstr ""
751
752 #. type: Plain text
753 #: build/C/man7/glob.7:75
754 msgid ""
755 "There is one special convention: two characters separated by \\(aq-\\(aq "
756 "denote a range.  (Thus, \"I<[A-Fa-f0-9]>\" is equivalent to "
757 "\"I<[ABCDEFabcdef0123456789]>\".)  One may include \\(aq-\\(aq in its "
758 "literal meaning by making it the first or last character between the "
759 "brackets.  (Thus, \"I<[]-]>\" matches just the two characters \\(aq]\\(aq "
760 "and \\(aq-\\(aq, and \"I<[--0]>\" matches the three characters \\(aq-\\(aq, "
761 "\\(aq.\\(aq, \\(aq0\\(aq, since \\(aq/\\(aq cannot be matched.)"
762 msgstr ""
763
764 #. type: Plain text
765 #: build/C/man7/glob.7:77
766 msgid "B<Complementation>"
767 msgstr ""
768
769 #. type: Plain text
770 #: build/C/man7/glob.7:83
771 msgid ""
772 "An expression \"I<[!...]>\" matches a single character, namely any character "
773 "that is not matched by the expression obtained by removing the first "
774 "\\(aq!\\(aq from it.  (Thus, \"I<[!]a-]>\" matches any single character "
775 "except \\(aq]\\(aq, \\(aqa\\(aq and \\(aq-\\(aq.)"
776 msgstr ""
777
778 #. type: Plain text
779 #: build/C/man7/glob.7:90
780 msgid ""
781 "One can remove the special meaning of \\(aq?\\(aq, \\(aq*\\(aq and "
782 "\\(aq[\\(aq by preceding them by a backslash, or, in case this is part of a "
783 "shell command line, enclosing them in quotes.  Between brackets these "
784 "characters stand for themselves.  Thus, \"I<[[?*\\e]>\" matches the four "
785 "characters \\(aq[\\(aq, \\(aq?\\(aq, \\(aq*\\(aq and \\(aq\\e\\(aq."
786 msgstr ""
787
788 #. type: SS
789 #: build/C/man7/glob.7:90
790 #, no-wrap
791 msgid "Pathnames"
792 msgstr ""
793
794 #. type: Plain text
795 #: build/C/man7/glob.7:97
796 msgid ""
797 "Globbing is applied on each of the components of a pathname separately.  A "
798 "\\(aq/\\(aq in a pathname cannot be matched by a \\(aq?\\(aq or \\(aq*\\(aq "
799 "wildcard, or by a range like \"I<[.-0]>\".  A range cannot contain an "
800 "explicit \\(aq/\\(aq character; this would lead to a syntax error."
801 msgstr ""
802
803 #. type: Plain text
804 #: build/C/man7/glob.7:102
805 msgid ""
806 "If a filename starts with a \\(aq.\\(aq, this character must be matched "
807 "explicitly.  (Thus, I<rm\\ *> will not remove .profile, and I<tar\\ c\\ *> "
808 "will not archive all your files; I<tar\\ c\\ .> is better.)"
809 msgstr ""
810
811 #. type: SS
812 #: build/C/man7/glob.7:102
813 #, no-wrap
814 msgid "Empty Lists"
815 msgstr ""
816
817 #. type: Plain text
818 #: build/C/man7/glob.7:108
819 msgid ""
820 "The nice and simple rule given above: \"expand a wildcard pattern into the "
821 "list of matching pathnames\" was the original UNIX definition.  It allowed "
822 "one to have patterns that expand into an empty list, as in"
823 msgstr ""
824
825 #. type: Plain text
826 #: build/C/man7/glob.7:111
827 #, no-wrap
828 msgid "    xv -wait 0 *.gif *.jpg\n"
829 msgstr ""
830
831 #. type: Plain text
832 #: build/C/man7/glob.7:121
833 msgid ""
834 "where perhaps no *.gif files are present (and this is not an error).  "
835 "However, POSIX requires that a wildcard pattern is left unchanged when it is "
836 "syntactically incorrect, or the list of matching pathnames is empty.  With "
837 "I<bash> one can force the classical behavior by setting "
838 "I<allow_null_glob_expansion=true>."
839 msgstr ""
840
841 #. type: Plain text
842 #: build/C/man7/glob.7:124
843 msgid "(Similar problems occur elsewhere.  E.g., where old scripts have"
844 msgstr ""
845
846 #. type: Plain text
847 #: build/C/man7/glob.7:127
848 #, no-wrap
849 msgid "    rm \\`find . -name \"*~\"\\`\n"
850 msgstr ""
851
852 #. type: Plain text
853 #: build/C/man7/glob.7:129
854 msgid "new scripts require"
855 msgstr ""
856
857 #. type: Plain text
858 #: build/C/man7/glob.7:132
859 #, no-wrap
860 msgid "    rm -f nosuchfile \\`find . -name \"*~\"\\`\n"
861 msgstr ""
862
863 #. type: Plain text
864 #: build/C/man7/glob.7:136
865 msgid "to avoid error messages from I<rm> called with an empty argument list.)"
866 msgstr ""
867
868 #. type: SS
869 #: build/C/man7/glob.7:137
870 #, no-wrap
871 msgid "Regular expressions"
872 msgstr ""
873
874 #. type: Plain text
875 #: build/C/man7/glob.7:144
876 msgid ""
877 "Note that wildcard patterns are not regular expressions, although they are a "
878 "bit similar.  First of all, they match filenames, rather than text, and "
879 "secondly, the conventions are not the same: for example, in a regular "
880 "expression \\(aq*\\(aq means zero or more copies of the preceding thing."
881 msgstr ""
882
883 #. type: Plain text
884 #: build/C/man7/glob.7:148
885 msgid ""
886 "Now that regular expressions have bracket expressions where the negation is "
887 "indicated by a \\(aq^\\(aq, POSIX has declared the effect of a wildcard "
888 "pattern \"I<[^...]>\" to be undefined."
889 msgstr ""
890
891 #. type: SS
892 #: build/C/man7/glob.7:148
893 #, no-wrap
894 msgid "Character classes and Internationalization"
895 msgstr ""
896
897 #. type: Plain text
898 #: build/C/man7/glob.7:166
899 msgid ""
900 "Of course ranges were originally meant to be ASCII ranges, so that \"I<[\\ "
901 "-%]>\" stands for \"I<[\\ !\"#$%]>\" and \"I<[a-z]>\" stands for \"any "
902 "lowercase letter\".  Some UNIX implementations generalized this so that a "
903 "range X-Y stands for the set of characters with code between the codes for X "
904 "and for Y.  However, this requires the user to know the character coding in "
905 "use on the local system, and moreover, is not convenient if the collating "
906 "sequence for the local alphabet differs from the ordering of the character "
907 "codes.  Therefore, POSIX extended the bracket notation greatly, both for "
908 "wildcard patterns and for regular expressions.  In the above we saw three "
909 "types of items that can occur in a bracket expression: namely (i) the "
910 "negation, (ii) explicit single characters, and (iii) ranges.  POSIX "
911 "specifies ranges in an internationally more useful way and adds three more "
912 "types:"
913 msgstr ""
914
915 #. type: Plain text
916 #: build/C/man7/glob.7:172
917 msgid ""
918 "(iii) Ranges X-Y comprise all characters that fall between X and Y "
919 "(inclusive) in the current collating sequence as defined by the "
920 "B<LC_COLLATE> category in the current locale."
921 msgstr ""
922
923 #. type: Plain text
924 #: build/C/man7/glob.7:174
925 msgid "(iv) Named character classes, like"
926 msgstr ""
927
928 #. type: Plain text
929 #: build/C/man7/glob.7:179
930 #, no-wrap
931 msgid ""
932 "[:alnum:]  [:alpha:]  [:blank:]  [:cntrl:]\n"
933 "[:digit:]  [:graph:]  [:lower:]  [:print:]\n"
934 "[:punct:]  [:space:]  [:upper:]  [:xdigit:]\n"
935 msgstr ""
936
937 #. type: Plain text
938 #: build/C/man7/glob.7:188
939 msgid ""
940 "so that one can say \"I<[[:lower:]]>\" instead of \"I<[a-z]>\", and have "
941 "things work in Denmark, too, where there are three letters past \\(aqz\\(aq "
942 "in the alphabet.  These character classes are defined by the B<LC_CTYPE> "
943 "category in the current locale."
944 msgstr ""
945
946 #. type: Plain text
947 #: build/C/man7/glob.7:194
948 msgid ""
949 "(v) Collating symbols, like \"I<[.ch.]>\" or \"I<[.a-acute.]>\", where the "
950 "string between \"I<[.>\" and \"I<.]>\" is a collating element defined for "
951 "the current locale.  Note that this may be a multicharacter element."
952 msgstr ""
953
954 #.  FIXME . the accented 'a' characters are not rendering properly
955 #.  mtk May 2007
956 #. type: Plain text
957 #: build/C/man7/glob.7:204
958 msgid ""
959 "(vi) Equivalence class expressions, like \"I<[=a=]>\", where the string "
960 "between \"I<[=>\" and \"I<=]>\" is any collating element from its "
961 "equivalence class, as defined for the current locale.  For example, "
962 "\"I<[[=a=]]>\" might be equivalent to \"I<[aáàäâ]>\" (warning: Latin-1 "
963 "here), that is, to "
964 "\"I<[a[.a-acute.][.a-grave.][.a-umlaut.][.a-circumflex.]]>\"."
965 msgstr ""
966
967 #. type: Plain text
968 #: build/C/man7/glob.7:209
969 msgid "B<sh>(1), B<fnmatch>(3), B<glob>(3), B<locale>(7), B<regex>(7)"
970 msgstr ""
971
972 #. type: TH
973 #: build/C/man3/re_comp.3:25
974 #, no-wrap
975 msgid "RE_COMP"
976 msgstr ""
977
978 #. type: TH
979 #: build/C/man3/re_comp.3:25
980 #, no-wrap
981 msgid "1995-07-14"
982 msgstr ""
983
984 #. type: Plain text
985 #: build/C/man3/re_comp.3:28
986 msgid "re_comp, re_exec - BSD regex functions"
987 msgstr ""
988
989 #. type: Plain text
990 #: build/C/man3/re_comp.3:30
991 msgid "B<#define _REGEX_RE_COMP>"
992 msgstr ""
993
994 #. type: Plain text
995 #: build/C/man3/re_comp.3:32
996 msgid "B<#include E<lt>sys/types.hE<gt>>"
997 msgstr ""
998
999 #. type: Plain text
1000 #: build/C/man3/re_comp.3:34
1001 msgid "B<#include E<lt>regex.hE<gt>>"
1002 msgstr ""
1003
1004 #. type: Plain text
1005 #: build/C/man3/re_comp.3:36
1006 msgid "B<char *re_comp(char *>I<regex>B<);>"
1007 msgstr ""
1008
1009 #. type: Plain text
1010 #: build/C/man3/re_comp.3:38
1011 msgid "B<int re_exec(char *>I<string>B<);>"
1012 msgstr ""
1013
1014 #. type: Plain text
1015 #: build/C/man3/re_comp.3:50
1016 msgid ""
1017 "B<re_comp>()  is used to compile the null-terminated regular expression "
1018 "pointed to by I<regex>.  The compiled pattern occupies a static area, the "
1019 "pattern buffer, which is overwritten by subsequent use of B<re_comp>().  If "
1020 "I<regex> is NULL, no operation is performed and the pattern buffer's "
1021 "contents are not altered."
1022 msgstr ""
1023
1024 #. type: Plain text
1025 #: build/C/man3/re_comp.3:56
1026 msgid ""
1027 "B<re_exec>()  is used to assess whether the null-terminated string pointed "
1028 "to by I<string> matches the previously compiled I<regex>."
1029 msgstr ""
1030
1031 #. type: Plain text
1032 #: build/C/man3/re_comp.3:61
1033 msgid ""
1034 "B<re_comp>()  returns NULL on successful compilation of I<regex> otherwise "
1035 "it returns a pointer to an appropriate error message."
1036 msgstr ""
1037
1038 #. type: Plain text
1039 #: build/C/man3/re_comp.3:64
1040 msgid "B<re_exec>()  returns 1 for a successful match, zero for failure."
1041 msgstr ""
1042
1043 #. type: Plain text
1044 #: build/C/man3/re_comp.3:66
1045 msgid "4.3BSD."
1046 msgstr ""
1047
1048 #. type: Plain text
1049 #: build/C/man3/re_comp.3:70
1050 msgid ""
1051 "These functions are obsolete; the functions documented in B<regcomp>(3)  "
1052 "should be used instead."
1053 msgstr ""
1054
1055 #. type: Plain text
1056 #: build/C/man3/re_comp.3:73
1057 msgid "B<regcomp>(3), B<regex>(7), GNU regex manual"
1058 msgstr ""
1059
1060 #. type: TH
1061 #: build/C/man3/regex.3:32 build/C/man7/regex.7:35
1062 #, no-wrap
1063 msgid "REGEX"
1064 msgstr ""
1065
1066 #. type: TH
1067 #: build/C/man3/regex.3:32
1068 #, no-wrap
1069 msgid "2011-09-27"
1070 msgstr ""
1071
1072 #. type: Plain text
1073 #: build/C/man3/regex.3:35
1074 msgid "regcomp, regexec, regerror, regfree - POSIX regex functions"
1075 msgstr ""
1076
1077 #. type: Plain text
1078 #: build/C/man3/regex.3:39
1079 #, no-wrap
1080 msgid ""
1081 "B<#include E<lt>sys/types.hE<gt>>\n"
1082 "B<#include E<lt>regex.hE<gt>>\n"
1083 msgstr ""
1084
1085 #. type: Plain text
1086 #: build/C/man3/regex.3:41
1087 #, no-wrap
1088 msgid ""
1089 "B<int regcomp(regex_t *>I<preg>B<, const char *>I<regex>B<, int "
1090 ">I<cflags>B<);>\n"
1091 msgstr ""
1092
1093 #. type: Plain text
1094 #: build/C/man3/regex.3:45
1095 #, no-wrap
1096 msgid ""
1097 "B<int regexec(const regex_t *>I<preg>B<, const char *>I<string>B<, size_t "
1098 ">I<nmatch>B<,>\n"
1099 "B<            regmatch_t >I<pmatch[]>B<, int >I<eflags>B<);>\n"
1100 msgstr ""
1101
1102 #. type: Plain text
1103 #: build/C/man3/regex.3:48
1104 #, no-wrap
1105 msgid ""
1106 "B<size_t regerror(int >I<errcode>B<, const regex_t *>I<preg>B<, char "
1107 "*>I<errbuf>B<,>\n"
1108 "B<                size_t >I<errbuf_size>B<);>\n"
1109 msgstr ""
1110
1111 #. type: Plain text
1112 #: build/C/man3/regex.3:50
1113 #, no-wrap
1114 msgid "B<void regfree(regex_t *>I<preg>B<);>\n"
1115 msgstr ""
1116
1117 #. type: SS
1118 #: build/C/man3/regex.3:52
1119 #, no-wrap
1120 msgid "POSIX Regex Compiling"
1121 msgstr ""
1122
1123 #. type: Plain text
1124 #: build/C/man3/regex.3:58
1125 msgid ""
1126 "B<regcomp>()  is used to compile a regular expression into a form that is "
1127 "suitable for subsequent B<regexec>()  searches."
1128 msgstr ""
1129
1130 #. type: Plain text
1131 #: build/C/man3/regex.3:67
1132 msgid ""
1133 "B<regcomp>()  is supplied with I<preg>, a pointer to a pattern buffer "
1134 "storage area; I<regex>, a pointer to the null-terminated string and "
1135 "I<cflags>, flags used to determine the type of compilation."
1136 msgstr ""
1137
1138 #. type: Plain text
1139 #: build/C/man3/regex.3:74
1140 msgid ""
1141 "All regular expression searching must be done via a compiled pattern buffer, "
1142 "thus B<regexec>()  must always be supplied with the address of a "
1143 "B<regcomp>()  initialized pattern buffer."
1144 msgstr ""
1145
1146 #. type: Plain text
1147 #: build/C/man3/regex.3:79
1148 msgid "I<cflags> may be the bitwise-B<or> of one or more of the following:"
1149 msgstr ""
1150
1151 #. type: TP
1152 #: build/C/man3/regex.3:79
1153 #, no-wrap
1154 msgid "B<REG_EXTENDED>"
1155 msgstr ""
1156
1157 #. type: Plain text
1158 #: build/C/man3/regex.3:88
1159 msgid ""
1160 "Use B<POSIX> Extended Regular Expression syntax when interpreting I<regex>.  "
1161 "If not set, B<POSIX> Basic Regular Expression syntax is used."
1162 msgstr ""
1163
1164 #. type: TP
1165 #: build/C/man3/regex.3:88
1166 #, no-wrap
1167 msgid "B<REG_ICASE>"
1168 msgstr ""
1169
1170 #. type: Plain text
1171 #: build/C/man3/regex.3:94
1172 msgid ""
1173 "Do not differentiate case.  Subsequent B<regexec>()  searches using this "
1174 "pattern buffer will be case insensitive."
1175 msgstr ""
1176
1177 #. type: TP
1178 #: build/C/man3/regex.3:94
1179 #, no-wrap
1180 msgid "B<REG_NOSUB>"
1181 msgstr ""
1182
1183 #. type: Plain text
1184 #: build/C/man3/regex.3:104
1185 msgid ""
1186 "Support for substring addressing of matches is not required.  The I<nmatch> "
1187 "and I<pmatch> arguments to B<regexec>()  are ignored if the pattern buffer "
1188 "supplied was compiled with this flag set."
1189 msgstr ""
1190
1191 #. type: TP
1192 #: build/C/man3/regex.3:104
1193 #, no-wrap
1194 msgid "B<REG_NEWLINE>"
1195 msgstr ""
1196
1197 #. type: Plain text
1198 #: build/C/man3/regex.3:107
1199 msgid "Match-any-character operators don't match a newline."
1200 msgstr ""
1201
1202 #. type: Plain text
1203 #: build/C/man3/regex.3:111
1204 msgid ""
1205 "A nonmatching list (B<[^...]>)  not containing a newline does not match a "
1206 "newline."
1207 msgstr ""
1208
1209 #. type: Plain text
1210 #: build/C/man3/regex.3:121
1211 msgid ""
1212 "Match-beginning-of-line operator (B<^>)  matches the empty string "
1213 "immediately after a newline, regardless of whether I<eflags>, the execution "
1214 "flags of B<regexec>(), contains B<REG_NOTBOL>."
1215 msgstr ""
1216
1217 #. type: Plain text
1218 #: build/C/man3/regex.3:129
1219 msgid ""
1220 "Match-end-of-line operator (B<$>)  matches the empty string immediately "
1221 "before a newline, regardless of whether I<eflags> contains B<REG_NOTEOL>."
1222 msgstr ""
1223
1224 #. type: SS
1225 #: build/C/man3/regex.3:129
1226 #, no-wrap
1227 msgid "POSIX Regex Matching"
1228 msgstr ""
1229
1230 #. type: Plain text
1231 #: build/C/man3/regex.3:146
1232 msgid ""
1233 "B<regexec>()  is used to match a null-terminated string against the "
1234 "precompiled pattern buffer, I<preg>.  I<nmatch> and I<pmatch> are used to "
1235 "provide information regarding the location of any matches.  I<eflags> may be "
1236 "the bitwise-B<or> of one or both of B<REG_NOTBOL> and B<REG_NOTEOL> which "
1237 "cause changes in matching behavior described below."
1238 msgstr ""
1239
1240 #. type: TP
1241 #: build/C/man3/regex.3:146
1242 #, no-wrap
1243 msgid "B<REG_NOTBOL>"
1244 msgstr ""
1245
1246 #. type: Plain text
1247 #: build/C/man3/regex.3:156
1248 msgid ""
1249 "The match-beginning-of-line operator always fails to match (but see the "
1250 "compilation flag B<REG_NEWLINE> above)  This flag may be used when different "
1251 "portions of a string are passed to B<regexec>()  and the beginning of the "
1252 "string should not be interpreted as the beginning of the line."
1253 msgstr ""
1254
1255 #. type: TP
1256 #: build/C/man3/regex.3:156
1257 #, no-wrap
1258 msgid "B<REG_NOTEOL>"
1259 msgstr ""
1260
1261 #. type: Plain text
1262 #: build/C/man3/regex.3:162
1263 msgid ""
1264 "The match-end-of-line operator always fails to match (but see the "
1265 "compilation flag B<REG_NEWLINE> above)"
1266 msgstr ""
1267
1268 #. type: SS
1269 #: build/C/man3/regex.3:162
1270 #, no-wrap
1271 msgid "Byte Offsets"
1272 msgstr ""
1273
1274 #. type: Plain text
1275 #: build/C/man3/regex.3:175
1276 msgid ""
1277 "Unless B<REG_NOSUB> was set for the compilation of the pattern buffer, it is "
1278 "possible to obtain substring match addressing information.  I<pmatch> must "
1279 "be dimensioned to have at least I<nmatch> elements.  These are filled in by "
1280 "B<regexec>()  with substring match addresses.  Any unused structure elements "
1281 "will contain the value -1."
1282 msgstr ""
1283
1284 #. type: Plain text
1285 #: build/C/man3/regex.3:182
1286 msgid ""
1287 "The I<regmatch_t> structure which is the type of I<pmatch> is defined in "
1288 "I<E<lt>regex.hE<gt>>."
1289 msgstr ""
1290
1291 #. type: Plain text
1292 #: build/C/man3/regex.3:189
1293 #, no-wrap
1294 msgid ""
1295 "typedef struct {\n"
1296 "    regoff_t rm_so;\n"
1297 "    regoff_t rm_eo;\n"
1298 "} regmatch_t;\n"
1299 msgstr ""
1300
1301 #. type: Plain text
1302 #: build/C/man3/regex.3:200
1303 msgid ""
1304 "Each I<rm_so> element that is not -1 indicates the start offset of the next "
1305 "largest substring match within the string.  The relative I<rm_eo> element "
1306 "indicates the end offset of the match, which is the offset of the first "
1307 "character after the matching text."
1308 msgstr ""
1309
1310 #. type: SS
1311 #: build/C/man3/regex.3:200
1312 #, no-wrap
1313 msgid "Posix Error Reporting"
1314 msgstr ""
1315
1316 #. type: Plain text
1317 #: build/C/man3/regex.3:207
1318 msgid ""
1319 "B<regerror>()  is used to turn the error codes that can be returned by both "
1320 "B<regcomp>()  and B<regexec>()  into error message strings."
1321 msgstr ""
1322
1323 #. type: Plain text
1324 #: build/C/man3/regex.3:229
1325 msgid ""
1326 "B<regerror>()  is passed the error code, I<errcode>, the pattern buffer, "
1327 "I<preg>, a pointer to a character string buffer, I<errbuf>, and the size of "
1328 "the string buffer, I<errbuf_size>.  It returns the size of the I<errbuf> "
1329 "required to contain the null-terminated error message string.  If both "
1330 "I<errbuf> and I<errbuf_size> are nonzero, I<errbuf> is filled in with the "
1331 "first I<errbuf_size - 1> characters of the error message and a terminating "
1332 "null byte (\\(aq\\e0\\(aq)."
1333 msgstr ""
1334
1335 #. type: SS
1336 #: build/C/man3/regex.3:229
1337 #, no-wrap
1338 msgid "POSIX Pattern Buffer Freeing"
1339 msgstr ""
1340
1341 #. type: Plain text
1342 #: build/C/man3/regex.3:237
1343 msgid ""
1344 "Supplying B<regfree>()  with a precompiled pattern buffer, I<preg> will free "
1345 "the memory allocated to the pattern buffer by the compiling process, "
1346 "B<regcomp>()."
1347 msgstr ""
1348
1349 #. type: Plain text
1350 #: build/C/man3/regex.3:240
1351 msgid ""
1352 "B<regcomp>()  returns zero for a successful compilation or an error code for "
1353 "failure."
1354 msgstr ""
1355
1356 #. type: Plain text
1357 #: build/C/man3/regex.3:245
1358 msgid ""
1359 "B<regexec>()  returns zero for a successful match or B<REG_NOMATCH> for "
1360 "failure."
1361 msgstr ""
1362
1363 #. type: SH
1364 #: build/C/man3/regex.3:245
1365 #, no-wrap
1366 msgid "ERRORS"
1367 msgstr ""
1368
1369 #. type: Plain text
1370 #: build/C/man3/regex.3:248
1371 msgid "The following errors can be returned by B<regcomp>():"
1372 msgstr ""
1373
1374 #. type: TP
1375 #: build/C/man3/regex.3:248
1376 #, no-wrap
1377 msgid "B<REG_BADBR>"
1378 msgstr ""
1379
1380 #. type: Plain text
1381 #: build/C/man3/regex.3:251
1382 msgid "Invalid use of back reference operator."
1383 msgstr ""
1384
1385 #. type: TP
1386 #: build/C/man3/regex.3:251
1387 #, no-wrap
1388 msgid "B<REG_BADPAT>"
1389 msgstr ""
1390
1391 #. type: Plain text
1392 #: build/C/man3/regex.3:254
1393 msgid "Invalid use of pattern operators such as group or list."
1394 msgstr ""
1395
1396 #. type: TP
1397 #: build/C/man3/regex.3:254
1398 #, no-wrap
1399 msgid "B<REG_BADRPT>"
1400 msgstr ""
1401
1402 #. type: Plain text
1403 #: build/C/man3/regex.3:258
1404 msgid ""
1405 "Invalid use of repetition operators such as using \\(aq*\\(aq as the first "
1406 "character."
1407 msgstr ""
1408
1409 #. type: TP
1410 #: build/C/man3/regex.3:258
1411 #, no-wrap
1412 msgid "B<REG_EBRACE>"
1413 msgstr ""
1414
1415 #. type: Plain text
1416 #: build/C/man3/regex.3:261
1417 msgid "Un-matched brace interval operators."
1418 msgstr ""
1419
1420 #. type: TP
1421 #: build/C/man3/regex.3:261
1422 #, no-wrap
1423 msgid "B<REG_EBRACK>"
1424 msgstr ""
1425
1426 #. type: Plain text
1427 #: build/C/man3/regex.3:264
1428 msgid "Un-matched bracket list operators."
1429 msgstr ""
1430
1431 #. type: TP
1432 #: build/C/man3/regex.3:264
1433 #, no-wrap
1434 msgid "B<REG_ECOLLATE>"
1435 msgstr ""
1436
1437 #. type: Plain text
1438 #: build/C/man3/regex.3:267
1439 msgid "Invalid collating element."
1440 msgstr ""
1441
1442 #. type: TP
1443 #: build/C/man3/regex.3:267
1444 #, no-wrap
1445 msgid "B<REG_ECTYPE>"
1446 msgstr ""
1447
1448 #. type: Plain text
1449 #: build/C/man3/regex.3:270
1450 msgid "Unknown character class name."
1451 msgstr ""
1452
1453 #. type: TP
1454 #: build/C/man3/regex.3:270
1455 #, no-wrap
1456 msgid "B<REG_EEND>"
1457 msgstr ""
1458
1459 #. type: Plain text
1460 #: build/C/man3/regex.3:274
1461 msgid "Non specific error.  This is not defined by POSIX.2."
1462 msgstr ""
1463
1464 #. type: TP
1465 #: build/C/man3/regex.3:274
1466 #, no-wrap
1467 msgid "B<REG_EESCAPE>"
1468 msgstr ""
1469
1470 #. type: Plain text
1471 #: build/C/man3/regex.3:277
1472 msgid "Trailing backslash."
1473 msgstr ""
1474
1475 #. type: TP
1476 #: build/C/man3/regex.3:277
1477 #, no-wrap
1478 msgid "B<REG_EPAREN>"
1479 msgstr ""
1480
1481 #. type: Plain text
1482 #: build/C/man3/regex.3:280
1483 msgid "Un-matched parenthesis group operators."
1484 msgstr ""
1485
1486 #. type: TP
1487 #: build/C/man3/regex.3:280
1488 #, no-wrap
1489 msgid "B<REG_ERANGE>"
1490 msgstr ""
1491
1492 #. type: Plain text
1493 #: build/C/man3/regex.3:284
1494 msgid ""
1495 "Invalid use of the range operator, e.g., the ending point of the range "
1496 "occurs prior to the starting point."
1497 msgstr ""
1498
1499 #. type: TP
1500 #: build/C/man3/regex.3:284
1501 #, no-wrap
1502 msgid "B<REG_ESIZE>"
1503 msgstr ""
1504
1505 #. type: Plain text
1506 #: build/C/man3/regex.3:288
1507 msgid ""
1508 "Compiled regular expression requires a pattern buffer larger than 64Kb.  "
1509 "This is not defined by POSIX.2."
1510 msgstr ""
1511
1512 #. type: TP
1513 #: build/C/man3/regex.3:288
1514 #, no-wrap
1515 msgid "B<REG_ESPACE>"
1516 msgstr ""
1517
1518 #. type: Plain text
1519 #: build/C/man3/regex.3:291
1520 msgid "The regex routines ran out of memory."
1521 msgstr ""
1522
1523 #. type: TP
1524 #: build/C/man3/regex.3:291
1525 #, no-wrap
1526 msgid "B<REG_ESUBREG>"
1527 msgstr ""
1528
1529 #. type: Plain text
1530 #: build/C/man3/regex.3:294
1531 msgid "Invalid back reference to a subexpression."
1532 msgstr ""
1533
1534 #. type: Plain text
1535 #: build/C/man3/regex.3:296 build/C/man3/wordexp.3:188
1536 msgid "POSIX.1-2001."
1537 msgstr ""
1538
1539 #. type: Plain text
1540 #: build/C/man3/regex.3:299
1541 msgid "B<grep>(1), B<regex>(7), GNU regex manual"
1542 msgstr ""
1543
1544 #. type: TH
1545 #: build/C/man7/regex.7:35
1546 #, no-wrap
1547 msgid "2009-01-12"
1548 msgstr ""
1549
1550 #. type: Plain text
1551 #: build/C/man7/regex.7:38
1552 msgid "regex - POSIX.2 regular expressions"
1553 msgstr ""
1554
1555 #. type: Plain text
1556 #: build/C/man7/regex.7:52
1557 msgid ""
1558 "Regular expressions (\"RE\"s), as defined in POSIX.2, come in two forms: "
1559 "modern REs (roughly those of I<egrep>; POSIX.2 calls these \"extended\" REs)  "
1560 "and obsolete REs (roughly those of B<ed>(1); POSIX.2 \"basic\" REs).  "
1561 "Obsolete REs mostly exist for backward compatibility in some old programs; "
1562 "they will be discussed at the end.  POSIX.2 leaves some aspects of RE syntax "
1563 "and semantics open; \"\\*(dg\" marks decisions on these aspects that may not "
1564 "be fully portable to other POSIX.2 implementations."
1565 msgstr ""
1566
1567 #. type: Plain text
1568 #: build/C/man7/regex.7:56
1569 msgid ""
1570 "A (modern) RE is one\\*(dg or more nonempty\\*(dg I<branches>, separated by "
1571 "\\(aq|\\(aq.  It matches anything that matches one of the branches."
1572 msgstr ""
1573
1574 #. type: Plain text
1575 #: build/C/man7/regex.7:59
1576 msgid ""
1577 "A branch is one\\*(dg or more I<pieces>, concatenated.  It matches a match "
1578 "for the first, followed by a match for the second, etc."
1579 msgstr ""
1580
1581 #. type: Plain text
1582 #: build/C/man7/regex.7:68
1583 msgid ""
1584 "A piece is an I<atom> possibly followed by a single\\*(dg \\(aq*\\(aq, "
1585 "\\(aq+\\(aq, \\(aq?\\(aq, or I<bound>.  An atom followed by \\(aq*\\(aq "
1586 "matches a sequence of 0 or more matches of the atom.  An atom followed by "
1587 "\\(aq+\\(aq matches a sequence of 1 or more matches of the atom.  An atom "
1588 "followed by \\(aq?\\(aq matches a sequence of 0 or 1 matches of the atom."
1589 msgstr ""
1590
1591 #. type: Plain text
1592 #: build/C/man7/regex.7:86
1593 msgid ""
1594 "A I<bound> is \\(aq{\\(aq followed by an unsigned decimal integer, possibly "
1595 "followed by \\(aq,\\(aq possibly followed by another unsigned decimal "
1596 "integer, always followed by \\(aq}\\(aq.  The integers must lie between 0 "
1597 "and B<RE_DUP_MAX> (255\\*(dg) inclusive, and if there are two of them, the "
1598 "first may not exceed the second.  An atom followed by a bound containing one "
1599 "integer I<i> and no comma matches a sequence of exactly I<i> matches of the "
1600 "atom.  An atom followed by a bound containing one integer I<i> and a comma "
1601 "matches a sequence of I<i> or more matches of the atom.  An atom followed by "
1602 "a bound containing two integers I<i> and I<j> matches a sequence of I<i> "
1603 "through I<j> (inclusive) matches of the atom."
1604 msgstr ""
1605
1606 #. type: Plain text
1607 #: build/C/man7/regex.7:103
1608 msgid ""
1609 "An atom is a regular expression enclosed in \"I<()>\" (matching a match for "
1610 "the regular expression), an empty set of \"I<()>\" (matching the null "
1611 "string)\\*(dg, a I<bracket expression> (see below), \\(aq.\\(aq (matching "
1612 "any single character), \\(aq^\\(aq (matching the null string at the "
1613 "beginning of a line), \\(aq$\\(aq (matching the null string at the end of a "
1614 "line), a \\(aq\\e\\(aq followed by one of the characters "
1615 "\"I<^.[$()|*+?{\\e>\" (matching that character taken as an ordinary "
1616 "character), a \\(aq\\e\\(aq followed by any other character\\*(dg (matching "
1617 "that character taken as an ordinary character, as if the \\(aq\\e\\(aq had "
1618 "not been present\\*(dg), or a single character with no other significance "
1619 "(matching that character).  A \\(aq{\\(aq followed by a character other than "
1620 "a digit is an ordinary character, not the beginning of a bound\\*(dg.  It is "
1621 "illegal to end an RE with \\(aq\\e\\(aq."
1622 msgstr ""
1623
1624 #. type: Plain text
1625 #: build/C/man7/regex.7:117
1626 msgid ""
1627 "A I<bracket expression> is a list of characters enclosed in \"I<[]>\".  It "
1628 "normally matches any single character from the list (but see below).  If the "
1629 "list begins with \\(aq^\\(aq, it matches any single character (but see "
1630 "below) I<not> from the rest of the list.  If two characters in the list are "
1631 "separated by \\(aq-\\(aq, this is shorthand for the full I<range> of "
1632 "characters between those two (inclusive) in the collating sequence, for "
1633 "example, \"I<[0-9]>\" in ASCII matches any decimal digit.  It is "
1634 "illegal\\*(dg for two ranges to share an endpoint, for example, "
1635 "\"I<a-c-e>\".  Ranges are very collating-sequence-dependent, and portable "
1636 "programs should avoid relying on them."
1637 msgstr ""
1638
1639 #. type: Plain text
1640 #: build/C/man7/regex.7:128
1641 msgid ""
1642 "To include a literal \\(aq]\\(aq in the list, make it the first character "
1643 "(following a possible \\(aq^\\(aq).  To include a literal \\(aq-\\(aq, make "
1644 "it the first or last character, or the second endpoint of a range.  To use a "
1645 "literal \\(aq-\\(aq as the first endpoint of a range, enclose it in "
1646 "\"I<[.>\" and \"I<.]>\" to make it a collating element (see below).  With "
1647 "the exception of these and some combinations using \\(aq[\\(aq (see next "
1648 "paragraphs), all other special characters, including \\(aq\\e\\(aq, lose "
1649 "their special significance within a bracket expression."
1650 msgstr ""
1651
1652 #. type: Plain text
1653 #: build/C/man7/regex.7:140
1654 msgid ""
1655 "Within a bracket expression, a collating element (a character, a "
1656 "multicharacter sequence that collates as if it were a single character, or a "
1657 "collating-sequence name for either)  enclosed in \"I<[.>\" and \"I<.]>\" "
1658 "stands for the sequence of characters of that collating element.  The "
1659 "sequence is a single element of the bracket expression's list.  A bracket "
1660 "expression containing a multicharacter collating element can thus match more "
1661 "than one character, for example, if the collating sequence includes a \"ch\" "
1662 "collating element, then the RE \"I<[[.ch.]]*c>\" matches the first five "
1663 "characters of \"chchcc\"."
1664 msgstr ""
1665
1666 #. type: Plain text
1667 #: build/C/man7/regex.7:152
1668 msgid ""
1669 "Within a bracket expression, a collating element enclosed in \"I<[=>\" and "
1670 "\"I<=]>\" is an equivalence class, standing for the sequences of characters "
1671 "of all collating elements equivalent to that one, including itself.  (If "
1672 "there are no other equivalent collating elements, the treatment is as if the "
1673 "enclosing delimiters were \"I<[.>\" and \"I<.]>\".)  For example, if o and "
1674 "\\o'o^' are the members of an equivalence class, then \"I<[[=o=]]>\", "
1675 "\"I<[[=\\o'o^'=]]>\", and \"I<[o\\o'o^']>\" are all synonymous.  An "
1676 "equivalence class may not\\*(dg be an endpoint of a range."
1677 msgstr ""
1678
1679 #. type: Plain text
1680 #: build/C/man7/regex.7:158
1681 msgid ""
1682 "Within a bracket expression, the name of a I<character class> enclosed in "
1683 "\"I<[:>\" and \"I<:]>\" stands for the list of all characters belonging to "
1684 "that class.  Standard character class names are:"
1685 msgstr ""
1686
1687 #. type: ta
1688 #: build/C/man7/regex.7:161
1689 #, no-wrap
1690 msgid "3c 6c 9c"
1691 msgstr ""
1692
1693 #. type: Plain text
1694 #: build/C/man7/regex.7:166
1695 #, no-wrap
1696 msgid ""
1697 "alnum\tdigit\tpunct\n"
1698 "alpha\tgraph\tspace\n"
1699 "blank\tlower\tupper\n"
1700 "cntrl\tprint\txdigit\n"
1701 msgstr ""
1702
1703 #.  As per http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=295666
1704 #.  The following does not seem to apply in the glibc implementation
1705 #.  .PP
1706 #.  There are two special cases\*(dg of bracket expressions:
1707 #.  the bracket expressions "\fI[[:<:]]\fP" and "\fI[[:>:]]\fP" match
1708 #.  the null string at the beginning and end of a word respectively.
1709 #.  A word is defined as a sequence of
1710 #.  word characters
1711 #.  which is neither preceded nor followed by
1712 #.  word characters.
1713 #.  A word character is an
1714 #.  .I alnum
1715 #.  character (as defined by
1716 #.  .BR wctype (3))
1717 #.  or an underscore.
1718 #.  This is an extension,
1719 #.  compatible with but not specified by POSIX.2,
1720 #.  and should be used with
1721 #.  caution in software intended to be portable to other systems.
1722 #. type: Plain text
1723 #: build/C/man7/regex.7:192
1724 msgid ""
1725 "These stand for the character classes defined in B<wctype>(3).  A locale may "
1726 "provide others.  A character class may not be used as an endpoint of a "
1727 "range."
1728 msgstr ""
1729
1730 #. type: Plain text
1731 #: build/C/man7/regex.7:204
1732 msgid ""
1733 "In the event that an RE could match more than one substring of a given "
1734 "string, the RE matches the one starting earliest in the string.  If the RE "
1735 "could match more than one substring starting at that point, it matches the "
1736 "longest.  Subexpressions also match the longest possible substrings, subject "
1737 "to the constraint that the whole match be as long as possible, with "
1738 "subexpressions starting earlier in the RE taking priority over ones starting "
1739 "later.  Note that higher-level subexpressions thus take priority over their "
1740 "lower-level component subexpressions."
1741 msgstr ""
1742
1743 #. type: Plain text
1744 #: build/C/man7/regex.7:216
1745 msgid ""
1746 "Match lengths are measured in characters, not collating elements.  A null "
1747 "string is considered longer than no match at all.  For example, \"I<bb*>\" "
1748 "matches the three middle characters of \"abbbc\", "
1749 "\"I<(wee|week)(knights|nights)>\" matches all ten characters of "
1750 "\"weeknights\", when \"I<(.*).*>\" is matched against \"abc\" the "
1751 "parenthesized subexpression matches all three characters, and when "
1752 "\"I<(a*)*>\" is matched against \"bc\" both the whole RE and the "
1753 "parenthesized subexpression match the null string."
1754 msgstr ""
1755
1756 #. type: Plain text
1757 #: build/C/man7/regex.7:227
1758 msgid ""
1759 "If case-independent matching is specified, the effect is much as if all case "
1760 "distinctions had vanished from the alphabet.  When an alphabetic that exists "
1761 "in multiple cases appears as an ordinary character outside a bracket "
1762 "expression, it is effectively transformed into a bracket expression "
1763 "containing both cases, for example, \\(aqx\\(aq becomes \"I<[xX]>\".  When "
1764 "it appears inside a bracket expression, all case counterparts of it are "
1765 "added to the bracket expression, so that, for example, \"I<[x]>\" becomes "
1766 "\"I<[xX]>\" and \"I<[^x]>\" becomes \"I<[^xX]>\"."
1767 msgstr ""
1768
1769 #. type: Plain text
1770 #: build/C/man7/regex.7:233
1771 msgid ""
1772 "No particular limit is imposed on the length of REs\\*(dg.  Programs "
1773 "intended to be portable should not employ REs longer than 256 bytes, as an "
1774 "implementation can refuse to accept such REs and remain POSIX-compliant."
1775 msgstr ""
1776
1777 #. type: Plain text
1778 #: build/C/man7/regex.7:249
1779 msgid ""
1780 "Obsolete (\"basic\") regular expressions differ in several respects.  "
1781 "\\(aq|\\(aq, \\(aq+\\(aq, and \\(aq?\\(aq are ordinary characters and there "
1782 "is no equivalent for their functionality.  The delimiters for bounds are "
1783 "\"I<\\e{>\" and \"I<\\e}>\", with \\(aq{\\(aq and \\(aq}\\(aq by themselves "
1784 "ordinary characters.  The parentheses for nested subexpressions are "
1785 "\"I<\\e(>\" and \"I<\\e)>\", with \\(aq(\\(aq and \\(aq)\\(aq by themselves "
1786 "ordinary characters.  \\(aq^\\(aq is an ordinary character except at the "
1787 "beginning of the RE or\\*(dg the beginning of a parenthesized subexpression, "
1788 "\\(aq$\\(aq is an ordinary character except at the end of the RE or\\*(dg "
1789 "the end of a parenthesized subexpression, and \\(aq*\\(aq is an ordinary "
1790 "character if it appears at the beginning of the RE or the beginning of a "
1791 "parenthesized subexpression (after a possible leading \\(aq^\\(aq)."
1792 msgstr ""
1793
1794 #. type: Plain text
1795 #: build/C/man7/regex.7:257
1796 msgid ""
1797 "Finally, there is one new type of atom, a I<back reference>: \\(aq\\e\\(aq "
1798 "followed by a nonzero decimal digit I<d> matches the same sequence of "
1799 "characters matched by the I<d>th parenthesized subexpression (numbering "
1800 "subexpressions by the positions of their opening parentheses, left to "
1801 "right), so that, for example, \"I<\\e([bc]\\e)\\e1>\" matches \"bb\" or "
1802 "\"cc\" but not \"bc\"."
1803 msgstr ""
1804
1805 #. type: Plain text
1806 #: build/C/man7/regex.7:259
1807 msgid "Having two kinds of REs is a botch."
1808 msgstr ""
1809
1810 #. type: Plain text
1811 #: build/C/man7/regex.7:265
1812 msgid ""
1813 "The current POSIX.2 spec says that \\(aq)\\(aq is an ordinary character in "
1814 "the absence of an unmatched \\(aq(\\(aq; this was an unintentional result of "
1815 "a wording error, and change is likely.  Avoid relying on it."
1816 msgstr ""
1817
1818 #. type: Plain text
1819 #: build/C/man7/regex.7:272
1820 msgid ""
1821 "Back references are a dreadful botch, posing major problems for efficient "
1822 "implementations.  They are also somewhat vaguely defined (does "
1823 "\"I<a\\e(\\e(b\\e)*\\e2\\e)*d>\" match \"abbbd\"?).  Avoid using them."
1824 msgstr ""
1825
1826 #.  As per http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=295666
1827 #.  The following does not seem to apply in the glibc implementation
1828 #.  .PP
1829 #.  The syntax for word boundaries is incredibly ugly.
1830 #. type: Plain text
1831 #: build/C/man7/regex.7:280
1832 msgid ""
1833 "POSIX.2's specification of case-independent matching is vague.  The \"one "
1834 "case implies all cases\" definition given above is current consensus among "
1835 "implementors as to the right interpretation."
1836 msgstr ""
1837
1838 #. type: SH
1839 #: build/C/man7/regex.7:280
1840 #, no-wrap
1841 msgid "AUTHOR"
1842 msgstr ""
1843
1844 #.  Sigh... The page license means we must have the author's name
1845 #.  in the formatted output.
1846 #. type: Plain text
1847 #: build/C/man7/regex.7:284
1848 msgid "This page was taken from Henry Spencer's regex package."
1849 msgstr ""
1850
1851 #. type: Plain text
1852 #: build/C/man7/regex.7:287
1853 msgid "B<grep>(1), B<regex>(3)"
1854 msgstr ""
1855
1856 #. type: Plain text
1857 #: build/C/man7/regex.7:288
1858 msgid "POSIX.2, section 2.8 (Regular Expression Notation)."
1859 msgstr ""
1860
1861 #. type: TH
1862 #: build/C/man3/wordexp.3:23
1863 #, no-wrap
1864 msgid "WORDEXP"
1865 msgstr ""
1866
1867 #. type: TH
1868 #: build/C/man3/wordexp.3:23
1869 #, no-wrap
1870 msgid "2008-07-14"
1871 msgstr ""
1872
1873 #. type: Plain text
1874 #: build/C/man3/wordexp.3:26
1875 msgid "wordexp, wordfree - perform word expansion like a posix-shell"
1876 msgstr ""
1877
1878 #. type: Plain text
1879 #: build/C/man3/wordexp.3:28
1880 msgid "B<#include E<lt>wordexp.hE<gt>>"
1881 msgstr ""
1882
1883 #. type: Plain text
1884 #: build/C/man3/wordexp.3:30
1885 msgid "B<int wordexp(const char *>I<s>B<, wordexp_t *>I<p>B<, int >I<flags>B<);>"
1886 msgstr ""
1887
1888 #. type: Plain text
1889 #: build/C/man3/wordexp.3:32
1890 msgid "B<void wordfree(wordexp_t *>I<p>B<);>"
1891 msgstr ""
1892
1893 #. type: Plain text
1894 #: build/C/man3/wordexp.3:36
1895 msgid "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
1896 msgstr ""
1897
1898 #. type: Plain text
1899 #: build/C/man3/wordexp.3:41
1900 msgid "B<wordexp>(), B<wordfree>(): _XOPEN_SOURCE"
1901 msgstr ""
1902
1903 #. type: Plain text
1904 #: build/C/man3/wordexp.3:75
1905 msgid ""
1906 "The function B<wordexp>()  performs a shell-like expansion of the string "
1907 "I<s> and returns the result in the structure pointed to by I<p>.  The data "
1908 "type I<wordexp_t> is a structure that at least has the fields I<we_wordc>, "
1909 "I<we_wordv>, and I<we_offs>.  The field I<we_wordc> is a I<size_t> that "
1910 "gives the number of words in the expansion of I<s>.  The field I<we_wordv> "
1911 "is a I<char **> that points to the array of words found.  The field "
1912 "I<we_offs> of type I<size_t> is sometimes (depending on I<flags>, see below) "
1913 "used to indicate the number of initial elements in the I<we_wordv> array "
1914 "that should be filled with NULLs."
1915 msgstr ""
1916
1917 #. type: Plain text
1918 #: build/C/man3/wordexp.3:83
1919 msgid ""
1920 "The function B<wordfree>()  frees the allocated memory again.  More "
1921 "precisely, it does not free its argument, but it frees the array I<we_wordv> "
1922 "and the strings that points to."
1923 msgstr ""
1924
1925 #. type: SS
1926 #: build/C/man3/wordexp.3:83
1927 #, no-wrap
1928 msgid "The string argument"
1929 msgstr ""
1930
1931 #. type: Plain text
1932 #: build/C/man3/wordexp.3:93
1933 msgid ""
1934 "Since the expansion is the same as the expansion by the shell (see B<sh>(1))  "
1935 "of the parameters to a command, the string I<s> must not contain characters "
1936 "that would be illegal in shell command parameters.  In particular, there "
1937 "must not be any unescaped newline or |, &, ;, E<lt>, E<gt>, (, ), {, } "
1938 "characters outside a command substitution or parameter substitution context."
1939 msgstr ""
1940
1941 #. type: Plain text
1942 #: build/C/man3/wordexp.3:99
1943 msgid ""
1944 "If the argument I<s> contains a word that starts with an unquoted comment "
1945 "character #, then it is unspecified whether that word and all following "
1946 "words are ignored, or the # is treated as a non-comment character."
1947 msgstr ""
1948
1949 #. type: SS
1950 #: build/C/man3/wordexp.3:99
1951 #, no-wrap
1952 msgid "The expansion"
1953 msgstr ""
1954
1955 #. type: Plain text
1956 #: build/C/man3/wordexp.3:106
1957 msgid ""
1958 "The expansion done consists of the following stages: tilde expansion "
1959 "(replacing ~user by user's home directory), variable substitution (replacing "
1960 "$FOO by the value of the environment variable FOO), command substitution "
1961 "(replacing $(command) or \\`command\\` by the output of command), arithmetic "
1962 "expansion, field splitting, wildcard expansion, quote removal."
1963 msgstr ""
1964
1965 #. type: Plain text
1966 #: build/C/man3/wordexp.3:109
1967 msgid ""
1968 "The result of expansion of special parameters ($@, $*, $#, $?, $-, $$, $!, "
1969 "$0) is unspecified."
1970 msgstr ""
1971
1972 #. type: Plain text
1973 #: build/C/man3/wordexp.3:112
1974 msgid ""
1975 "Field splitting is done using the environment variable $IFS.  If it is not "
1976 "set, the field separators are space, tab and newline."
1977 msgstr ""
1978
1979 #. type: SS
1980 #: build/C/man3/wordexp.3:112
1981 #, no-wrap
1982 msgid "The output array"
1983 msgstr ""
1984
1985 #. type: Plain text
1986 #: build/C/man3/wordexp.3:116
1987 msgid "The array I<we_wordv> contains the words found, followed by a NULL."
1988 msgstr ""
1989
1990 #. type: SS
1991 #: build/C/man3/wordexp.3:116
1992 #, no-wrap
1993 msgid "The flags argument"
1994 msgstr ""
1995
1996 #. type: Plain text
1997 #: build/C/man3/wordexp.3:120
1998 msgid "The I<flag> argument is a bitwise inclusive OR of the following values:"
1999 msgstr ""
2000
2001 #. type: TP
2002 #: build/C/man3/wordexp.3:120
2003 #, no-wrap
2004 msgid "B<WRDE_APPEND>"
2005 msgstr ""
2006
2007 #. type: Plain text
2008 #: build/C/man3/wordexp.3:123
2009 msgid "Append the words found to the array resulting from a previous call."
2010 msgstr ""
2011
2012 #. type: TP
2013 #: build/C/man3/wordexp.3:123
2014 #, no-wrap
2015 msgid "B<WRDE_DOOFFS>"
2016 msgstr ""
2017
2018 #. type: Plain text
2019 #: build/C/man3/wordexp.3:131
2020 msgid ""
2021 "Insert I<we_offs> initial NULLs in the array I<we_wordv>.  (These are not "
2022 "counted in the returned I<we_wordc>.)"
2023 msgstr ""
2024
2025 #. type: TP
2026 #: build/C/man3/wordexp.3:131
2027 #, no-wrap
2028 msgid "B<WRDE_NOCMD>"
2029 msgstr ""
2030
2031 #. type: Plain text
2032 #: build/C/man3/wordexp.3:134
2033 msgid "Don't do command substitution."
2034 msgstr ""
2035
2036 #. type: TP
2037 #: build/C/man3/wordexp.3:134
2038 #, no-wrap
2039 msgid "B<WRDE_REUSE>"
2040 msgstr ""
2041
2042 #. type: Plain text
2043 #: build/C/man3/wordexp.3:144
2044 msgid ""
2045 "The argument I<p> resulted from a previous call to B<wordexp>(), and "
2046 "B<wordfree>()  was not called.  Reuse the allocated storage."
2047 msgstr ""
2048
2049 #. type: TP
2050 #: build/C/man3/wordexp.3:144
2051 #, no-wrap
2052 msgid "B<WRDE_SHOWERR>"
2053 msgstr ""
2054
2055 #. type: Plain text
2056 #: build/C/man3/wordexp.3:153
2057 msgid ""
2058 "Normally during command substitution I<stderr> is redirected to "
2059 "I</dev/null>.  This flag specifies that I<stderr> is not to be redirected."
2060 msgstr ""
2061
2062 #. type: TP
2063 #: build/C/man3/wordexp.3:153
2064 #, no-wrap
2065 msgid "B<WRDE_UNDEF>"
2066 msgstr ""
2067
2068 #. type: Plain text
2069 #: build/C/man3/wordexp.3:156
2070 msgid "Consider it an error if an undefined shell variable is expanded."
2071 msgstr ""
2072
2073 #. type: Plain text
2074 #: build/C/man3/wordexp.3:160
2075 msgid ""
2076 "In case of success 0 is returned.  In case of error one of the following "
2077 "five values is returned."
2078 msgstr ""
2079
2080 #. type: TP
2081 #: build/C/man3/wordexp.3:160
2082 #, no-wrap
2083 msgid "B<WRDE_BADCHAR>"
2084 msgstr ""
2085
2086 #. type: Plain text
2087 #: build/C/man3/wordexp.3:163
2088 msgid "Illegal occurrence of newline or one of |, &, ;, E<lt>, E<gt>, (, ), {, }."
2089 msgstr ""
2090
2091 #. type: TP
2092 #: build/C/man3/wordexp.3:163
2093 #, no-wrap
2094 msgid "B<WRDE_BADVAL>"
2095 msgstr ""
2096
2097 #. type: Plain text
2098 #: build/C/man3/wordexp.3:169
2099 msgid ""
2100 "An undefined shell variable was referenced, and the B<WRDE_UNDEF> flag told "
2101 "us to consider this an error."
2102 msgstr ""
2103
2104 #. type: TP
2105 #: build/C/man3/wordexp.3:169
2106 #, no-wrap
2107 msgid "B<WRDE_CMDSUB>"
2108 msgstr ""
2109
2110 #. type: Plain text
2111 #: build/C/man3/wordexp.3:174
2112 msgid ""
2113 "Command substitution occurred, and the B<WRDE_NOCMD> flag told us to "
2114 "consider this an error."
2115 msgstr ""
2116
2117 #. type: TP
2118 #: build/C/man3/wordexp.3:174
2119 #, no-wrap
2120 msgid "B<WRDE_NOSPACE>"
2121 msgstr ""
2122
2123 #. type: Plain text
2124 #: build/C/man3/wordexp.3:177
2125 msgid "Out of memory."
2126 msgstr ""
2127
2128 #. type: TP
2129 #: build/C/man3/wordexp.3:177
2130 #, no-wrap
2131 msgid "B<WRDE_SYNTAX>"
2132 msgstr ""
2133
2134 #. type: Plain text
2135 #: build/C/man3/wordexp.3:181
2136 msgid "Shell syntax error, such as unbalanced parentheses or unmatched quotes."
2137 msgstr ""
2138
2139 #. type: SH
2140 #: build/C/man3/wordexp.3:181
2141 #, no-wrap
2142 msgid "VERSIONS"
2143 msgstr ""
2144
2145 #. type: Plain text
2146 #: build/C/man3/wordexp.3:186
2147 msgid "B<wordexp>()  and B<wordfree>()  are provided in glibc since version 2.1."
2148 msgstr ""
2149
2150 #. type: Plain text
2151 #: build/C/man3/wordexp.3:191
2152 msgid ""
2153 "The output of the following example program is approximately that of \"ls "
2154 "[a-c]*.c\"."
2155 msgstr ""
2156
2157 #. type: Plain text
2158 #: build/C/man3/wordexp.3:196
2159 #, no-wrap
2160 msgid ""
2161 "#include E<lt>stdio.hE<gt>\n"
2162 "#include E<lt>stdlib.hE<gt>\n"
2163 "#include E<lt>wordexp.hE<gt>\n"
2164 msgstr ""
2165
2166 #. type: Plain text
2167 #: build/C/man3/wordexp.3:203
2168 #, no-wrap
2169 msgid ""
2170 "int\n"
2171 "main(int argc, char **argv)\n"
2172 "{\n"
2173 "    wordexp_t p;\n"
2174 "    char **w;\n"
2175 "    int i;\n"
2176 msgstr ""
2177
2178 #. type: Plain text
2179 #: build/C/man3/wordexp.3:211
2180 #, no-wrap
2181 msgid ""
2182 "    wordexp(\"[a-c]*.c\", &p, 0);\n"
2183 "    w = p.we_wordv;\n"
2184 "    for (i = 0; i E<lt> p.we_wordc; i++)\n"
2185 "        printf(\"%s\\en\", w[i]);\n"
2186 "    wordfree(&p);\n"
2187 "    exit(EXIT_SUCCESS);\n"
2188 "}\n"
2189 msgstr ""
2190
2191 #. type: Plain text
2192 #: build/C/man3/wordexp.3:214
2193 msgid "B<fnmatch>(3), B<glob>(3)"
2194 msgstr ""