aboutsummaryrefslogtreecommitdiff
path: root/posix
diff options
context:
space:
mode:
authorReuben Thomas <rrt@sc3d.org>2011-05-20 09:14:03 -0400
committerUlrich Drepper <drepper@gmail.com>2011-05-20 09:14:03 -0400
commit78e64fdcaa44277fcab6ec60aa2d9b8b7742cf58 (patch)
tree5a8f8186d47d911ccca73496d5cc13d81e9ad3a3 /posix
parent457bddfc2a8aa8a65b176afb408f0d068a590316 (diff)
downloadglibc-78e64fdcaa44277fcab6ec60aa2d9b8b7742cf58.tar
glibc-78e64fdcaa44277fcab6ec60aa2d9b8b7742cf58.tar.gz
glibc-78e64fdcaa44277fcab6ec60aa2d9b8b7742cf58.tar.bz2
glibc-78e64fdcaa44277fcab6ec60aa2d9b8b7742cf58.zip
Update documentation in regex.h
Diffstat (limited to 'posix')
-rw-r--r--posix/regex.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/posix/regex.h b/posix/regex.h
index 21fa3cf1ce..32804b9b82 100644
--- a/posix/regex.h
+++ b/posix/regex.h
@@ -339,9 +339,9 @@ typedef enum
/* This data structure represents a compiled pattern. Before calling
the pattern compiler, the fields `buffer', `allocated', `fastmap',
- `translate', and `no_sub' can be set. After the pattern has been
- compiled, the `re_nsub' field is available. All other fields are
- private to the regex routines. */
+ and `translate' can be set. After the pattern has been compiled,
+ the fields `re_nsub', `not_bol' and `not_eol' are available. All
+ other fields are private to the regex routines. */
#ifndef RE_TRANSLATE_TYPE
# define __RE_TRANSLATE_TYPE unsigned char *
@@ -466,7 +466,12 @@ extern reg_syntax_t re_set_syntax (reg_syntax_t __syntax);
/* Compile the regular expression PATTERN, with length LENGTH
and syntax given by the global `re_syntax_options', into the buffer
- BUFFER. Return NULL if successful, and an error string if not. */
+ BUFFER. Return NULL if successful, and an error string if not.
+
+ To free the allocated storage, you must call `regfree' on BUFFER.
+ Note that the translate table must either have been initialised by
+ `regcomp', with a malloc'ed value, or set to NULL before calling
+ `regfree'. */
extern const char *re_compile_pattern (const char *__pattern, size_t __length,
struct re_pattern_buffer *__buffer);