X-Git-Url: https://git.saurik.com/apple/libc.git/blobdiff_plain/9385eb3d10ebe5eb398c52040ec3dbfba9b0cdcf..7b00c0c43f52e9d27168e67a26aac19065cdb40c:/regex/FreeBSD/regex.3 diff --git a/regex/FreeBSD/regex.3 b/regex/FreeBSD/regex.3 index cf46cd4..f848d66 100644 --- a/regex/FreeBSD/regex.3 +++ b/regex/FreeBSD/regex.3 @@ -13,10 +13,6 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by the University of -.\" California, Berkeley and its contributors. .\" 4. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. @@ -34,9 +30,9 @@ .\" SUCH DAMAGE. .\" .\" @(#)regex.3 8.4 (Berkeley) 3/20/94 -.\" $FreeBSD: src/lib/libc/regex/regex.3,v 1.12 2002/12/19 09:40:23 ru Exp $ +.\" $FreeBSD: src/lib/libc/regex/regex.3,v 1.21 2007/01/09 00:28:04 imp Exp $ .\" -.Dd October 2, 2002 +.Dd August 17, 2005 .Dt REGEX 3 .Os .Sh NAME @@ -86,7 +82,7 @@ frees any dynamically-allocated storage used by the internal form of an RE. .Pp The header -.Aq Pa regex.h +.In regex.h declares two structure types, .Ft regex_t and @@ -436,7 +432,7 @@ places the NUL-terminated message into the buffer pointed to by limiting the length (including the NUL) to at most .Fa errbuf_size bytes. -If the whole message won't fit, +If the whole message will not fit, as much of it as will fit before the terminating NUL is supplied. In any case, the returned value is the size of buffer needed to hold the whole @@ -564,7 +560,7 @@ or .Ql |\& cannot appear first or last in a (sub)expression or after another .Ql |\& , -i.e. an operand of +i.e., an operand of .Ql |\& cannot be an empty subexpression. An empty parenthesized subexpression, @@ -588,14 +584,6 @@ and beginning and ending subexpressions in obsolete .Pq Dq basic REs are anchors, not ordinary characters. -.Sh SEE ALSO -.Xr grep 1 , -.Xr re_format 7 -.Pp -.St -p1003.2 , -sections 2.8 (Regular Expression Notation) -and -B.5 (C Binding for Regular Expression Matching). .Sh DIAGNOSTICS Non-zero error codes from .Fn regcomp @@ -649,10 +637,20 @@ operand invalid .It Dv REG_EMPTY empty (sub)expression .It Dv REG_ASSERT -can't happen - you found a bug +cannot happen - you found a bug .It Dv REG_INVARG -invalid argument, e.g. negative-length string +invalid argument, e.g.\& negative-length string +.It Dv REG_ILLSEQ +illegal byte sequence (bad multibyte character) .El +.Sh SEE ALSO +.Xr grep 1 , +.Xr re_format 7 +.Pp +.St -p1003.2 , +sections 2.8 (Regular Expression Notation) +and +B.5 (C Binding for Regular Expression Matching). .Sh HISTORY Originally written by .An Henry Spencer . @@ -713,7 +711,7 @@ are legal REs because is a special character only in the presence of a previous unmatched .Ql (\& . -This can't be fixed until the spec is fixed. +This cannot be fixed until the spec is fixed. .Pp The standard's definition of back references is vague. For example, does @@ -725,3 +723,5 @@ behavior in such cases should not be relied on. .Pp The implementation of word-boundary matching is a bit of a kludge, and bugs may lurk in combinations of word-boundary matching and anchoring. +.Pp +Word-boundary matching does not work properly in multibyte locales.