On 3 August 2010 23:21, Bruno Haible <br...@clisp.org> wrote: > Feel free to submit a patch that Eric or Karl or I can apply.
In the end I found very little to change on a first look. The attached patch: 1. Removes mentions of regex.c. 2. Adds documentation of not_eol. The other questions which I asked are mostly addressed. re_set_registers is not documented; there's a note about this. I'd be happy to write some documentation for that. There's also the technique of re-using a registers data structure by NOT re_compile_fastmap, but using the fastmap member of the struct directly. Finally, there's the problem of the non-thread-safety of RE_NO_SUB which Paolo mentioned; again, I can document that if we're not going to solve it immediately. -- http://rrt.sc3d.org
From e23170df82bbe6f1ce077e62d1cbe72a884a47e1 Mon Sep 17 00:00:00 2001 From: Reuben Thomas <r...@sc3d.org> Date: Sat, 14 Aug 2010 16:40:16 +0100 Subject: [PATCH] Document not_eol and remove mention of regex.c. --- doc/regex.texi | 16 +++++++++------- 1 files changed, 9 insertions(+), 7 deletions(-) diff --git a/doc/regex.texi b/doc/regex.texi index 3fd748a..2206ac4 100644 --- a/doc/regex.texi +++ b/doc/regex.texi @@ -36,10 +36,8 @@ converted to the internal format used by the library functions. Once you've compiled a pattern, you can use it for matching or searching any number of times. -The Regex library consists of two source files: @file{regex.h} and -...@file{regex.c}. +The Regex library is used by including @file{regex.h}. @pindex regex.h -...@pindex regex.c Regex provides three groups of functions with which you can operate on regular expressions. One group---the @sc{gnu} group---is more powerful but not completely compatible with the other two, namely the @sc{posix} @@ -1199,6 +1197,11 @@ If the @code{not_bol} field is set in the pattern buffer (@pxref{GNU Pattern Buffers}), then @samp{^} fails to match at the beginning of the string. @xref{POSIX Matching}, for when you might find this useful. +...@vindex not_eol @r{field in pattern buffer} +If the @code{not_eol} field is set in the pattern buffer (@pxref{GNU +Pattern Buffers}), then @samp{$} fails to match at the end of the +string. @xref{POSIX Matching}, for when you might find this useful. + @vindex newline_anchor @r{field in pattern buffer} If the @code{newline_anchor} field is set in the pattern buffer, then @samp{^} fails to match after a newline. This is useful when you do not @@ -1568,10 +1571,9 @@ expression. To do either, you must first compile it in a pattern buffer @vindex re_syntax_options @r{initialization} Regular expressions match according to the syntax with which they were compiled; with @sc{gnu}, you indicate what syntax you want by setting -the variable @code{re_syntax_options} (declared in @file{regex.h} and -defined in @file{regex.c}) before calling the compiling function, -...@code{re_compile_pattern} (see below). @xref{Syntax Bits}, and -...@ref{predefined Syntaxes}. +the variable @code{re_syntax_options} (declared in @file{regex.h}) +before calling the compiling function, @code{re_compile_pattern} (see +below). @xref{Syntax Bits}, and @ref{Predefined Syntaxes}. You can change the value of @code{re_syntax_options} at any time. Usually, however, you set its value once and then never change it. -- 1.7.0.4