OSDN Git Service

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