summaryrefslogtreecommitdiff
path: root/regex.h
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2012-03-16 15:25:40 +0200
committerArnold D. Robbins <arnold@skeeve.com>2012-03-16 15:25:40 +0200
commita19298ed002eb20d91c37fd5067de18466211f83 (patch)
tree054a08cd961bff2b6a5e01973f194e1e6b6a236f /regex.h
parent58b5aa30bc83d715b1d0708e686eed50ccf11f15 (diff)
downloadgawk-a19298ed002eb20d91c37fd5067de18466211f83.tar.gz
Sync from GLIBC.
Diffstat (limited to 'regex.h')
-rw-r--r--regex.h18
1 files changed, 11 insertions, 7 deletions
diff --git a/regex.h b/regex.h
index 6bc503b2..ca619ae5 100644
--- a/regex.h
+++ b/regex.h
@@ -15,9 +15,8 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301 USA. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#ifndef _REGEX_H
#define _REGEX_H 1
@@ -349,9 +348,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 *
@@ -476,7 +475,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);