Removed trailing whitespace.
Removed trailing whitespace.
* Makefile.am: Removed trailing white space.
* NEWS, build-aux/check-testfiles.sh, build-aux/src-sniff.py,
doc/Makefile.am, doc/find-maint.texi, doc/find.texi, find/Makefile.am,
find/defs.h, find/find.1, find/find.c, find/finddata.c, find/fstype.c,
find/ftsfind.c, find/parser.c, find/pred.c, find/tree.c, find/util.c,
import-gnulib.sh, lib/Makefile.am, lib/buildcmd.c, lib/buildcmd.h,
lib/dircallback.c, lib/dircallback.h, lib/extendbuf.c,
lib/extendbuf.h, lib/findutils-version.c, lib/findutils-version.h,
lib/forcefindlib.c, lib/gnulib-version.h, lib/listfile.c,
lib/modetype.h, lib/nextelem.c, lib/nextelem.h, lib/printquoted.c,
lib/printquoted.h, lib/qmark.c, lib/regexprops.c, lib/regextype.c,
lib/savedirinfo.c, lib/savedirinfo.h, lib/strspn.c, lib/wait.h,
lib/waitpid.c, locate/bigram.c, locate/code.c, locate/locate.1,
locate/locate.c, locate/locatedb.5, locate/locatedb.h,
locate/updatedb.1, locate/updatedb.sh, locate/word_io.c,
m4/findlib.m4, m4/nullsort.m4, m4/withfts.m4, xargs/xargs.1: Likewise.
Signed-off-by: James Youngman <jay@gnu.org>
2009-03-04 10:49:59 +00:00
/* regexprops.c -- document the properties of the regular expressions
2010-04-01 00:06:23 +01:00
understood by gnulib .
2005-07-14 22:13:02 +00:00
2025-01-04 11:43:53 +01:00
Copyright ( C ) 2005 - 2025 Free Software Foundation , Inc .
2005-07-14 22:13:02 +00:00
2007-07-02 08:25:45 +00:00
This program is free software : you can redistribute it and / or modify
2005-07-14 22:13:02 +00:00
it under the terms of the GNU General Public License as published by
2007-07-02 08:25:45 +00:00
the Free Software Foundation , either version 3 of the License , or
( at your option ) any later version .
Removed trailing whitespace.
Removed trailing whitespace.
* Makefile.am: Removed trailing white space.
* NEWS, build-aux/check-testfiles.sh, build-aux/src-sniff.py,
doc/Makefile.am, doc/find-maint.texi, doc/find.texi, find/Makefile.am,
find/defs.h, find/find.1, find/find.c, find/finddata.c, find/fstype.c,
find/ftsfind.c, find/parser.c, find/pred.c, find/tree.c, find/util.c,
import-gnulib.sh, lib/Makefile.am, lib/buildcmd.c, lib/buildcmd.h,
lib/dircallback.c, lib/dircallback.h, lib/extendbuf.c,
lib/extendbuf.h, lib/findutils-version.c, lib/findutils-version.h,
lib/forcefindlib.c, lib/gnulib-version.h, lib/listfile.c,
lib/modetype.h, lib/nextelem.c, lib/nextelem.h, lib/printquoted.c,
lib/printquoted.h, lib/qmark.c, lib/regexprops.c, lib/regextype.c,
lib/savedirinfo.c, lib/savedirinfo.h, lib/strspn.c, lib/wait.h,
lib/waitpid.c, locate/bigram.c, locate/code.c, locate/locate.1,
locate/locate.c, locate/locatedb.5, locate/locatedb.h,
locate/updatedb.1, locate/updatedb.sh, locate/word_io.c,
m4/findlib.m4, m4/nullsort.m4, m4/withfts.m4, xargs/xargs.1: Likewise.
Signed-off-by: James Youngman <jay@gnu.org>
2009-03-04 10:49:59 +00:00
2005-07-14 22:13:02 +00:00
This program is distributed in the hope that it will be useful ,
but WITHOUT ANY WARRANTY ; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the
GNU General Public License for more details .
Removed trailing whitespace.
Removed trailing whitespace.
* Makefile.am: Removed trailing white space.
* NEWS, build-aux/check-testfiles.sh, build-aux/src-sniff.py,
doc/Makefile.am, doc/find-maint.texi, doc/find.texi, find/Makefile.am,
find/defs.h, find/find.1, find/find.c, find/finddata.c, find/fstype.c,
find/ftsfind.c, find/parser.c, find/pred.c, find/tree.c, find/util.c,
import-gnulib.sh, lib/Makefile.am, lib/buildcmd.c, lib/buildcmd.h,
lib/dircallback.c, lib/dircallback.h, lib/extendbuf.c,
lib/extendbuf.h, lib/findutils-version.c, lib/findutils-version.h,
lib/forcefindlib.c, lib/gnulib-version.h, lib/listfile.c,
lib/modetype.h, lib/nextelem.c, lib/nextelem.h, lib/printquoted.c,
lib/printquoted.h, lib/qmark.c, lib/regexprops.c, lib/regextype.c,
lib/savedirinfo.c, lib/savedirinfo.h, lib/strspn.c, lib/wait.h,
lib/waitpid.c, locate/bigram.c, locate/code.c, locate/locate.1,
locate/locate.c, locate/locatedb.5, locate/locatedb.h,
locate/updatedb.1, locate/updatedb.sh, locate/word_io.c,
m4/findlib.m4, m4/nullsort.m4, m4/withfts.m4, xargs/xargs.1: Likewise.
Signed-off-by: James Youngman <jay@gnu.org>
2009-03-04 10:49:59 +00:00
2005-07-14 22:13:02 +00:00
You should have received a copy of the GNU General Public License
all: prefer https:// URLs where possible
Change from http:// to https:// URLs for the following:
www.gnu.org, gnu.org, savannah.gnu.org, git.sv.gnu.org, lists.gnu.org,
translationproject.org, cve.mitre.org, cwe.mitre.org, xkcd.com,
standards.ieee.org, and gcc.gnu.org.
* COPYING: Do the above replacement.
* ChangeLog-2013: Likewise.
* NEWS: Likewise.
* README: Likewise.
* README-hacking: Likewise.
* build-aux/Makefile.am: Likewise.
* build-aux/check-testfiles.sh: Likewise.
* build-aux/gen-changelog.sh: Likewise.
* build-aux/man-lint.sh: Likewise.
* build-aux/src-sniff.py: Likewise.
* cfg.mk: Likewise.
* configure.ac: Likewise.
* doc/Makefile.am: Likewise.
* doc/find-maint.texi: Likewise.
* doc/find.texi: Likewise.
* find/defs.h: Likewise.
* find/exec.c: Likewise.
* find/find.1: Likewise.
* find/finddata.c: Likewise.
* find/fstype.c: Likewise.
* find/ftsfind.c: Likewise.
* find/oldfind.c: Likewise.
* find/parser.c: Likewise.
* find/pred.c: Likewise.
* find/print.c: Likewise.
* find/print.h: Likewise.
* find/sharefile.c: Likewise.
* find/sharefile.h: Likewise.
* find/testsuite/Makefile.am: Likewise.
* find/testsuite/binary_locations.sh: Likewise.
* find/testsuite/checklists.py: Likewise.
* find/testsuite/config/unix.exp: Likewise.
* find/testsuite/find.gnu/name-period.exp: Likewise.
* find/testsuite/find.posix/depth1.exp: Likewise.
* find/testsuite/sv-34079.sh: Likewise.
* find/testsuite/sv-34976-execdir-fd-leak.sh: Likewise.
* find/testsuite/sv-48030-exec-plus-bug.sh: Likewise.
* find/testsuite/sv-48180-refuse-noop.sh: Likewise.
* find/testsuite/sv-52220.sh: Likewise.
* find/testsuite/sv-bug-32043.sh: Likewise.
* find/testsuite/test_escape_c.sh: Likewise.
* find/testsuite/test_escapechars.sh: Likewise.
* find/testsuite/test_inode.sh: Likewise.
* find/testsuite/test_type-list.sh: Likewise.
* find/tree.c: Likewise.
* find/util.c: Likewise.
* gnulib-local/lib/gcc-function-attributes.h: Likewise.
* lib/bugreports.c: Likewise.
* lib/bugreports.h: Likewise.
* lib/buildcmd.c: Likewise.
* lib/buildcmd.h: Likewise.
* lib/check-regexprops.sh: Likewise.
* lib/dircallback.c: Likewise.
* lib/dircallback.h: Likewise.
* lib/extendbuf.c: Likewise.
* lib/extendbuf.h: Likewise.
* lib/fdleak.c: Likewise.
* lib/fdleak.h: Likewise.
* lib/findutils-version.c: Likewise.
* lib/findutils-version.h: Likewise.
* lib/listfile.c: Likewise.
* lib/listfile.h: Likewise.
* lib/printquoted.c: Likewise.
* lib/printquoted.h: Likewise.
* lib/qmark.c: Likewise.
* lib/regexprops.c: Likewise.
* lib/regextype.c: Likewise.
* lib/regextype.h: Likewise.
* lib/safe-atoi.c: Likewise.
* lib/safe-atoi.h: Likewise.
* lib/splitstring.c: Likewise.
* lib/splitstring.h: Likewise.
* lib/test_splitstring.c: Likewise.
* lib/unused-result.h: Likewise.
* locate/frcode.c: Likewise.
* locate/locate.1: Likewise.
* locate/locate.c: Likewise.
* locate/locatedb.5: Likewise.
* locate/locatedb.h: Likewise.
* locate/testsuite/Makefile.am: Likewise.
* locate/testsuite/config/unix.exp: Likewise.
* locate/updatedb.1: Likewise.
* locate/updatedb.sh: Likewise.
* locate/word_io.c: Likewise.
* po/fetch-po-files: Likewise.
* xargs/testsuite/Makefile.am: Likewise.
* xargs/testsuite/config/unix.exp: Likewise.
* xargs/xargs.1: Likewise.
* xargs/xargs.c: Likewise.
2017-10-23 00:19:34 +02:00
along with this program . If not , see < https : //www.gnu.org/licenses/>.
2007-07-02 08:25:45 +00:00
*/
2005-07-14 22:13:02 +00:00
2007-11-29 11:17:14 +00:00
/*
2010-04-01 00:06:23 +01:00
The output of this program is included in the GNU findutils source
distribution . The copying conditions for that file are generated
by the copying ( ) function below .
2007-11-29 11:17:14 +00:00
*/
2005-07-14 22:13:02 +00:00
/* Written by James Youngman, <jay@gnu.org>. */
2011-06-20 01:30:22 +01:00
/* config.h must be included first. */
2007-06-21 23:41:08 +00:00
# include <config.h>
2011-06-20 01:30:22 +01:00
/* system headers */
# include <errno.h>
# include <regex.h>
2005-07-14 22:13:02 +00:00
# include <stdio.h>
2007-11-29 11:17:14 +00:00
# include <string.h>
2005-07-14 22:13:02 +00:00
# include <unistd.h>
2011-06-20 01:30:22 +01:00
/* gnulib headers */
2010-04-05 14:34:57 +01:00
# include "progname.h"
2005-07-14 22:13:02 +00:00
2011-06-20 01:30:22 +01:00
/* find headers */
# include "regextype.h"
2005-07-14 22:13:02 +00:00
2010-04-05 14:34:57 +01:00
static void
output ( const char * s , int escape )
2005-07-14 22:13:02 +00:00
{
2005-12-23 18:24:20 +00:00
( void ) escape ;
Removed trailing whitespace.
Removed trailing whitespace.
* Makefile.am: Removed trailing white space.
* NEWS, build-aux/check-testfiles.sh, build-aux/src-sniff.py,
doc/Makefile.am, doc/find-maint.texi, doc/find.texi, find/Makefile.am,
find/defs.h, find/find.1, find/find.c, find/finddata.c, find/fstype.c,
find/ftsfind.c, find/parser.c, find/pred.c, find/tree.c, find/util.c,
import-gnulib.sh, lib/Makefile.am, lib/buildcmd.c, lib/buildcmd.h,
lib/dircallback.c, lib/dircallback.h, lib/extendbuf.c,
lib/extendbuf.h, lib/findutils-version.c, lib/findutils-version.h,
lib/forcefindlib.c, lib/gnulib-version.h, lib/listfile.c,
lib/modetype.h, lib/nextelem.c, lib/nextelem.h, lib/printquoted.c,
lib/printquoted.h, lib/qmark.c, lib/regexprops.c, lib/regextype.c,
lib/savedirinfo.c, lib/savedirinfo.h, lib/strspn.c, lib/wait.h,
lib/waitpid.c, locate/bigram.c, locate/code.c, locate/locate.1,
locate/locate.c, locate/locatedb.5, locate/locatedb.h,
locate/updatedb.1, locate/updatedb.sh, locate/word_io.c,
m4/findlib.m4, m4/nullsort.m4, m4/withfts.m4, xargs/xargs.1: Likewise.
Signed-off-by: James Youngman <jay@gnu.org>
2009-03-04 10:49:59 +00:00
2010-04-01 00:06:23 +01:00
fputs ( s , stdout ) ;
2005-07-14 22:13:02 +00:00
}
2010-04-05 14:34:57 +01:00
static void
newline ( void )
2005-07-14 22:13:02 +00:00
{
2010-04-01 00:06:23 +01:00
output ( " \n " , 0 ) ;
2005-07-14 22:13:02 +00:00
}
2010-04-05 14:34:57 +01:00
static void
content ( const char * s )
2005-07-14 22:13:02 +00:00
{
2010-04-01 00:06:23 +01:00
output ( s , 1 ) ;
2005-07-14 22:13:02 +00:00
}
2010-04-05 14:34:57 +01:00
static void
literal ( const char * s )
2005-07-24 21:02:56 +00:00
{
2010-04-01 00:06:23 +01:00
output ( s , 0 ) ;
2005-07-24 21:02:56 +00:00
}
2010-04-05 14:34:57 +01:00
static void
directive ( const char * s )
2005-07-14 22:13:02 +00:00
{
2010-04-01 00:06:23 +01:00
output ( s , 0 ) ;
2005-07-14 22:13:02 +00:00
}
2010-04-05 14:34:57 +01:00
static void
comment ( const char * s )
2007-11-29 11:17:14 +00:00
{
2017-11-13 22:37:55 +00:00
directive ( " @c " ) ;
if ( s [ 0 ] )
{
literal ( " " ) ;
literal ( s ) ;
}
2010-04-01 00:06:23 +01:00
newline ( ) ;
2007-11-29 11:17:14 +00:00
}
2010-04-05 14:34:57 +01:00
static void
enum_item ( const char * s )
2005-07-14 22:13:02 +00:00
{
2010-04-01 00:06:23 +01:00
newline ( ) ;
directive ( " @item " ) ;
literal ( s ) ;
newline ( ) ;
2005-07-14 22:13:02 +00:00
}
2010-04-05 14:34:57 +01:00
static void
begin_subsection ( const char * name ,
2024-05-26 11:12:59 +01:00
const char * next ,
const char * prev ,
const char * up )
2005-07-14 22:13:02 +00:00
{
2005-12-23 18:24:20 +00:00
( void ) next ;
( void ) prev ;
( void ) up ;
Removed trailing whitespace.
Removed trailing whitespace.
* Makefile.am: Removed trailing white space.
* NEWS, build-aux/check-testfiles.sh, build-aux/src-sniff.py,
doc/Makefile.am, doc/find-maint.texi, doc/find.texi, find/Makefile.am,
find/defs.h, find/find.1, find/find.c, find/finddata.c, find/fstype.c,
find/ftsfind.c, find/parser.c, find/pred.c, find/tree.c, find/util.c,
import-gnulib.sh, lib/Makefile.am, lib/buildcmd.c, lib/buildcmd.h,
lib/dircallback.c, lib/dircallback.h, lib/extendbuf.c,
lib/extendbuf.h, lib/findutils-version.c, lib/findutils-version.h,
lib/forcefindlib.c, lib/gnulib-version.h, lib/listfile.c,
lib/modetype.h, lib/nextelem.c, lib/nextelem.h, lib/printquoted.c,
lib/printquoted.h, lib/qmark.c, lib/regexprops.c, lib/regextype.c,
lib/savedirinfo.c, lib/savedirinfo.h, lib/strspn.c, lib/wait.h,
lib/waitpid.c, locate/bigram.c, locate/code.c, locate/locate.1,
locate/locate.c, locate/locatedb.5, locate/locatedb.h,
locate/updatedb.1, locate/updatedb.sh, locate/word_io.c,
m4/findlib.m4, m4/nullsort.m4, m4/withfts.m4, xargs/xargs.1: Likewise.
Signed-off-by: James Youngman <jay@gnu.org>
2009-03-04 10:49:59 +00:00
2010-04-01 00:06:23 +01:00
newline ( ) ;
Removed trailing whitespace.
Removed trailing whitespace.
* Makefile.am: Removed trailing white space.
* NEWS, build-aux/check-testfiles.sh, build-aux/src-sniff.py,
doc/Makefile.am, doc/find-maint.texi, doc/find.texi, find/Makefile.am,
find/defs.h, find/find.1, find/find.c, find/finddata.c, find/fstype.c,
find/ftsfind.c, find/parser.c, find/pred.c, find/tree.c, find/util.c,
import-gnulib.sh, lib/Makefile.am, lib/buildcmd.c, lib/buildcmd.h,
lib/dircallback.c, lib/dircallback.h, lib/extendbuf.c,
lib/extendbuf.h, lib/findutils-version.c, lib/findutils-version.h,
lib/forcefindlib.c, lib/gnulib-version.h, lib/listfile.c,
lib/modetype.h, lib/nextelem.c, lib/nextelem.h, lib/printquoted.c,
lib/printquoted.h, lib/qmark.c, lib/regexprops.c, lib/regextype.c,
lib/savedirinfo.c, lib/savedirinfo.h, lib/strspn.c, lib/wait.h,
lib/waitpid.c, locate/bigram.c, locate/code.c, locate/locate.1,
locate/locate.c, locate/locatedb.5, locate/locatedb.h,
locate/updatedb.1, locate/updatedb.sh, locate/word_io.c,
m4/findlib.m4, m4/nullsort.m4, m4/withfts.m4, xargs/xargs.1: Likewise.
Signed-off-by: James Youngman <jay@gnu.org>
2009-03-04 10:49:59 +00:00
2010-04-01 00:06:23 +01:00
directive ( " @node " ) ;
content ( name ) ;
content ( " regular expression syntax " ) ;
newline ( ) ;
Removed trailing whitespace.
Removed trailing whitespace.
* Makefile.am: Removed trailing white space.
* NEWS, build-aux/check-testfiles.sh, build-aux/src-sniff.py,
doc/Makefile.am, doc/find-maint.texi, doc/find.texi, find/Makefile.am,
find/defs.h, find/find.1, find/find.c, find/finddata.c, find/fstype.c,
find/ftsfind.c, find/parser.c, find/pred.c, find/tree.c, find/util.c,
import-gnulib.sh, lib/Makefile.am, lib/buildcmd.c, lib/buildcmd.h,
lib/dircallback.c, lib/dircallback.h, lib/extendbuf.c,
lib/extendbuf.h, lib/findutils-version.c, lib/findutils-version.h,
lib/forcefindlib.c, lib/gnulib-version.h, lib/listfile.c,
lib/modetype.h, lib/nextelem.c, lib/nextelem.h, lib/printquoted.c,
lib/printquoted.h, lib/qmark.c, lib/regexprops.c, lib/regextype.c,
lib/savedirinfo.c, lib/savedirinfo.h, lib/strspn.c, lib/wait.h,
lib/waitpid.c, locate/bigram.c, locate/code.c, locate/locate.1,
locate/locate.c, locate/locatedb.5, locate/locatedb.h,
locate/updatedb.1, locate/updatedb.sh, locate/word_io.c,
m4/findlib.m4, m4/nullsort.m4, m4/withfts.m4, xargs/xargs.1: Likewise.
Signed-off-by: James Youngman <jay@gnu.org>
2009-03-04 10:49:59 +00:00
2010-04-01 00:06:23 +01:00
directive ( " @subsection " ) ;
output ( " @samp{ " , 0 ) ;
content ( name ) ;
output ( " } " , 0 ) ;
content ( " regular expression syntax " ) ;
newline ( ) ;
2005-07-14 22:13:02 +00:00
}
2010-04-05 14:34:57 +01:00
static void
begintable_markup ( char const * markup )
2005-07-24 21:02:56 +00:00
{
2010-04-01 00:06:23 +01:00
newline ( ) ;
directive ( " @table " ) ;
literal ( markup ) ;
newline ( ) ;
2005-07-24 21:02:56 +00:00
}
2010-04-05 14:34:57 +01:00
static void
2016-01-03 23:20:54 +00:00
endtable ( void )
2005-07-14 22:13:02 +00:00
{
2010-04-01 00:06:23 +01:00
newline ( ) ;
directive ( " @end table " ) ;
newline ( ) ;
2005-07-14 22:13:02 +00:00
}
2010-04-05 14:34:57 +01:00
static void
2016-01-03 23:20:54 +00:00
beginenum ( void )
2005-07-14 22:13:02 +00:00
{
2010-04-01 00:06:23 +01:00
newline ( ) ;
directive ( " @enumerate " ) ;
newline ( ) ;
2005-07-14 22:13:02 +00:00
}
2010-04-05 14:34:57 +01:00
static void
2016-01-03 23:20:54 +00:00
endenum ( void )
2005-07-14 22:13:02 +00:00
{
2010-04-01 00:06:23 +01:00
newline ( ) ;
directive ( " @end enumerate " ) ;
newline ( ) ;
2005-07-14 22:13:02 +00:00
}
2010-04-05 14:34:57 +01:00
static void
2016-01-03 23:20:54 +00:00
newpara ( void )
2005-07-14 22:13:02 +00:00
{
2010-04-01 00:06:23 +01:00
content ( " \n \n " ) ;
2005-07-14 22:13:02 +00:00
}
2005-12-23 18:24:20 +00:00
static void
2010-04-01 00:06:23 +01:00
describe_regex_syntax ( int options )
2005-07-14 22:13:02 +00:00
{
2010-04-01 00:06:23 +01:00
newpara ( ) ;
content ( " The character @samp{.} matches any single character " ) ;
2005-07-26 09:03:27 +00:00
if ( ( options & RE_DOT_NEWLINE ) = = 0 )
2005-07-14 22:13:02 +00:00
{
2010-04-01 00:06:23 +01:00
content ( " except newline " ) ;
2005-07-14 22:13:02 +00:00
}
2005-07-26 09:03:27 +00:00
if ( options & RE_DOT_NOT_NULL )
2005-07-14 22:13:02 +00:00
{
2005-07-26 09:03:27 +00:00
if ( ( options & RE_DOT_NEWLINE ) = = 0 )
2024-05-26 11:12:59 +01:00
content ( " and " ) ;
2005-07-14 22:13:02 +00:00
else
2024-05-26 11:12:59 +01:00
content ( " except " ) ;
2005-07-14 22:13:02 +00:00
2010-04-01 00:06:23 +01:00
content ( " the null character " ) ;
2005-07-14 22:13:02 +00:00
}
2017-11-13 22:37:55 +00:00
content ( " . " ) ;
2010-04-01 00:06:23 +01:00
newpara ( ) ;
Removed trailing whitespace.
Removed trailing whitespace.
* Makefile.am: Removed trailing white space.
* NEWS, build-aux/check-testfiles.sh, build-aux/src-sniff.py,
doc/Makefile.am, doc/find-maint.texi, doc/find.texi, find/Makefile.am,
find/defs.h, find/find.1, find/find.c, find/finddata.c, find/fstype.c,
find/ftsfind.c, find/parser.c, find/pred.c, find/tree.c, find/util.c,
import-gnulib.sh, lib/Makefile.am, lib/buildcmd.c, lib/buildcmd.h,
lib/dircallback.c, lib/dircallback.h, lib/extendbuf.c,
lib/extendbuf.h, lib/findutils-version.c, lib/findutils-version.h,
lib/forcefindlib.c, lib/gnulib-version.h, lib/listfile.c,
lib/modetype.h, lib/nextelem.c, lib/nextelem.h, lib/printquoted.c,
lib/printquoted.h, lib/qmark.c, lib/regexprops.c, lib/regextype.c,
lib/savedirinfo.c, lib/savedirinfo.h, lib/strspn.c, lib/wait.h,
lib/waitpid.c, locate/bigram.c, locate/code.c, locate/locate.1,
locate/locate.c, locate/locatedb.5, locate/locatedb.h,
locate/updatedb.1, locate/updatedb.sh, locate/word_io.c,
m4/findlib.m4, m4/nullsort.m4, m4/withfts.m4, xargs/xargs.1: Likewise.
Signed-off-by: James Youngman <jay@gnu.org>
2009-03-04 10:49:59 +00:00
2005-07-14 22:13:02 +00:00
if ( ! ( options & RE_LIMITED_OPS ) )
{
2010-04-01 00:06:23 +01:00
begintable_markup ( " @samp " ) ;
2005-07-14 22:13:02 +00:00
if ( options & RE_BK_PLUS_QM )
2024-05-26 11:12:59 +01:00
{
enum_item ( " \\ + " ) ;
content ( " indicates that the regular expression should match one "
" or more occurrences of the previous atom or regexp. " ) ;
enum_item ( " \\ ? " ) ;
content ( " indicates that the regular expression should match zero "
" or one occurrence of the previous atom or regexp. " ) ;
enum_item ( " + and ? " ) ;
content ( " match themselves. \n " ) ;
}
2005-07-14 22:13:02 +00:00
else
2024-05-26 11:12:59 +01:00
{
enum_item ( " + " ) ;
content ( " indicates that the regular expression should match one "
" or more occurrences of the previous atom or regexp. " ) ;
enum_item ( " ? " ) ;
content ( " indicates that the regular expression should match zero "
" or one occurrence of the previous atom or regexp. " ) ;
enum_item ( " \\ + " ) ;
literal ( " matches a @samp{+} " ) ;
enum_item ( " \\ ? " ) ;
literal ( " matches a @samp{?}. " ) ;
}
2010-04-01 00:06:23 +01:00
endtable ( ) ;
2005-07-14 22:13:02 +00:00
}
Removed trailing whitespace.
Removed trailing whitespace.
* Makefile.am: Removed trailing white space.
* NEWS, build-aux/check-testfiles.sh, build-aux/src-sniff.py,
doc/Makefile.am, doc/find-maint.texi, doc/find.texi, find/Makefile.am,
find/defs.h, find/find.1, find/find.c, find/finddata.c, find/fstype.c,
find/ftsfind.c, find/parser.c, find/pred.c, find/tree.c, find/util.c,
import-gnulib.sh, lib/Makefile.am, lib/buildcmd.c, lib/buildcmd.h,
lib/dircallback.c, lib/dircallback.h, lib/extendbuf.c,
lib/extendbuf.h, lib/findutils-version.c, lib/findutils-version.h,
lib/forcefindlib.c, lib/gnulib-version.h, lib/listfile.c,
lib/modetype.h, lib/nextelem.c, lib/nextelem.h, lib/printquoted.c,
lib/printquoted.h, lib/qmark.c, lib/regexprops.c, lib/regextype.c,
lib/savedirinfo.c, lib/savedirinfo.h, lib/strspn.c, lib/wait.h,
lib/waitpid.c, locate/bigram.c, locate/code.c, locate/locate.1,
locate/locate.c, locate/locatedb.5, locate/locatedb.h,
locate/updatedb.1, locate/updatedb.sh, locate/word_io.c,
m4/findlib.m4, m4/nullsort.m4, m4/withfts.m4, xargs/xargs.1: Likewise.
Signed-off-by: James Youngman <jay@gnu.org>
2009-03-04 10:49:59 +00:00
2010-04-01 00:06:23 +01:00
newpara ( ) ;
2005-07-26 09:03:27 +00:00
2010-04-01 00:06:23 +01:00
content ( " Bracket expressions are used to match ranges of characters. " ) ;
literal ( " Bracket expressions where the range is backward, for example @samp{[z-a]}, are " ) ;
2005-07-26 09:03:27 +00:00
if ( options & RE_NO_EMPTY_RANGES )
2010-04-01 00:06:23 +01:00
content ( " invalid " ) ;
2005-07-26 09:03:27 +00:00
else
2010-04-01 00:06:23 +01:00
content ( " ignored " ) ;
content ( " . " ) ;
Removed trailing whitespace.
Removed trailing whitespace.
* Makefile.am: Removed trailing white space.
* NEWS, build-aux/check-testfiles.sh, build-aux/src-sniff.py,
doc/Makefile.am, doc/find-maint.texi, doc/find.texi, find/Makefile.am,
find/defs.h, find/find.1, find/find.c, find/finddata.c, find/fstype.c,
find/ftsfind.c, find/parser.c, find/pred.c, find/tree.c, find/util.c,
import-gnulib.sh, lib/Makefile.am, lib/buildcmd.c, lib/buildcmd.h,
lib/dircallback.c, lib/dircallback.h, lib/extendbuf.c,
lib/extendbuf.h, lib/findutils-version.c, lib/findutils-version.h,
lib/forcefindlib.c, lib/gnulib-version.h, lib/listfile.c,
lib/modetype.h, lib/nextelem.c, lib/nextelem.h, lib/printquoted.c,
lib/printquoted.h, lib/qmark.c, lib/regexprops.c, lib/regextype.c,
lib/savedirinfo.c, lib/savedirinfo.h, lib/strspn.c, lib/wait.h,
lib/waitpid.c, locate/bigram.c, locate/code.c, locate/locate.1,
locate/locate.c, locate/locatedb.5, locate/locatedb.h,
locate/updatedb.1, locate/updatedb.sh, locate/word_io.c,
m4/findlib.m4, m4/nullsort.m4, m4/withfts.m4, xargs/xargs.1: Likewise.
Signed-off-by: James Youngman <jay@gnu.org>
2009-03-04 10:49:59 +00:00
2005-07-26 09:03:27 +00:00
if ( options & RE_BACKSLASH_ESCAPE_IN_LISTS )
2010-04-01 00:06:23 +01:00
literal ( " Within square brackets, @samp{ \\ } can be used to quote "
2024-05-26 11:12:59 +01:00
" the following character. " ) ;
2005-07-26 09:03:27 +00:00
else
2010-04-01 00:06:23 +01:00
literal ( " Within square brackets, @samp{ \\ } is taken literally. " ) ;
2005-07-26 09:03:27 +00:00
2005-07-14 22:13:02 +00:00
if ( options & RE_CHAR_CLASSES )
2010-04-01 00:06:23 +01:00
content ( " Character classes are supported; for example "
2024-05-26 11:12:59 +01:00
" @samp{[[:digit:]]} will match a single decimal digit. \n " ) ;
2005-07-14 22:13:02 +00:00
else
2010-04-01 00:06:23 +01:00
literal ( " Character classes are not supported, so for example "
2024-05-26 11:12:59 +01:00
" you would need to use @samp{[0-9]} "
" instead of @samp{[[:digit:]]}. \n " ) ;
2005-07-14 22:13:02 +00:00
2005-07-26 09:03:27 +00:00
if ( options & RE_HAT_LISTS_NOT_NEWLINE )
{
2017-11-13 22:37:55 +00:00
literal ( " Non-matching lists @samp{[^@dots{}]} do not ever match newline. \n " ) ;
2005-07-26 09:03:27 +00:00
}
2010-04-01 00:06:23 +01:00
newpara ( ) ;
2005-07-26 09:03:27 +00:00
if ( options & RE_NO_GNU_OPS )
{
2010-04-01 00:06:23 +01:00
content ( " GNU extensions are not supported and so "
2024-05-26 11:12:59 +01:00
" @samp{ \\ w}, @samp{ \\ W}, @samp{ \\ <}, @samp{ \\ >}, @samp{ \\ b}, @samp{ \\ B}, @samp{ \\ `}, and @samp{ \\ '} "
" match "
" @samp{w}, @samp{W}, @samp{<}, @samp{>}, @samp{b}, @samp{B}, @samp{`}, and @samp{'} respectively. \n " ) ;
2005-07-26 09:03:27 +00:00
}
else
{
2010-04-01 00:06:23 +01:00
content ( " GNU extensions are supported: " ) ;
beginenum ( ) ;
enum_item ( " @samp{ \\ w} matches a character within a word " ) ;
enum_item ( " @samp{ \\ W} matches a character which is not within a word " ) ;
enum_item ( " @samp{ \\ <} matches the beginning of a word " ) ;
enum_item ( " @samp{ \\ >} matches the end of a word " ) ;
enum_item ( " @samp{ \\ b} matches a word boundary " ) ;
enum_item ( " @samp{ \\ B} matches characters which are not a word boundary " ) ;
enum_item ( " @samp{ \\ `} matches the beginning of the whole input " ) ;
enum_item ( " @samp{ \\ '} matches the end of the whole input " ) ;
endenum ( ) ;
2005-07-26 09:03:27 +00:00
}
2010-04-01 00:06:23 +01:00
newpara ( ) ;
2005-07-26 09:03:27 +00:00
if ( options & RE_NO_BK_PARENS )
{
2010-04-01 00:06:23 +01:00
literal ( " Grouping is performed with parentheses @samp{()}. " ) ;
Removed trailing whitespace.
Removed trailing whitespace.
* Makefile.am: Removed trailing white space.
* NEWS, build-aux/check-testfiles.sh, build-aux/src-sniff.py,
doc/Makefile.am, doc/find-maint.texi, doc/find.texi, find/Makefile.am,
find/defs.h, find/find.1, find/find.c, find/finddata.c, find/fstype.c,
find/ftsfind.c, find/parser.c, find/pred.c, find/tree.c, find/util.c,
import-gnulib.sh, lib/Makefile.am, lib/buildcmd.c, lib/buildcmd.h,
lib/dircallback.c, lib/dircallback.h, lib/extendbuf.c,
lib/extendbuf.h, lib/findutils-version.c, lib/findutils-version.h,
lib/forcefindlib.c, lib/gnulib-version.h, lib/listfile.c,
lib/modetype.h, lib/nextelem.c, lib/nextelem.h, lib/printquoted.c,
lib/printquoted.h, lib/qmark.c, lib/regexprops.c, lib/regextype.c,
lib/savedirinfo.c, lib/savedirinfo.h, lib/strspn.c, lib/wait.h,
lib/waitpid.c, locate/bigram.c, locate/code.c, locate/locate.1,
locate/locate.c, locate/locatedb.5, locate/locatedb.h,
locate/updatedb.1, locate/updatedb.sh, locate/word_io.c,
m4/findlib.m4, m4/nullsort.m4, m4/withfts.m4, xargs/xargs.1: Likewise.
Signed-off-by: James Youngman <jay@gnu.org>
2009-03-04 10:49:59 +00:00
2005-07-26 09:03:27 +00:00
if ( options & RE_UNMATCHED_RIGHT_PAREN_ORD )
2024-05-26 11:12:59 +01:00
literal ( " An unmatched @samp{)} matches just itself. " ) ;
2005-07-26 09:03:27 +00:00
}
else
{
2010-04-01 00:06:23 +01:00
literal ( " Grouping is performed with backslashes followed by parentheses @samp{ \\ (}, @samp{ \\ )}. " ) ;
2005-07-26 09:03:27 +00:00
}
Removed trailing whitespace.
Removed trailing whitespace.
* Makefile.am: Removed trailing white space.
* NEWS, build-aux/check-testfiles.sh, build-aux/src-sniff.py,
doc/Makefile.am, doc/find-maint.texi, doc/find.texi, find/Makefile.am,
find/defs.h, find/find.1, find/find.c, find/finddata.c, find/fstype.c,
find/ftsfind.c, find/parser.c, find/pred.c, find/tree.c, find/util.c,
import-gnulib.sh, lib/Makefile.am, lib/buildcmd.c, lib/buildcmd.h,
lib/dircallback.c, lib/dircallback.h, lib/extendbuf.c,
lib/extendbuf.h, lib/findutils-version.c, lib/findutils-version.h,
lib/forcefindlib.c, lib/gnulib-version.h, lib/listfile.c,
lib/modetype.h, lib/nextelem.c, lib/nextelem.h, lib/printquoted.c,
lib/printquoted.h, lib/qmark.c, lib/regexprops.c, lib/regextype.c,
lib/savedirinfo.c, lib/savedirinfo.h, lib/strspn.c, lib/wait.h,
lib/waitpid.c, locate/bigram.c, locate/code.c, locate/locate.1,
locate/locate.c, locate/locatedb.5, locate/locatedb.h,
locate/updatedb.1, locate/updatedb.sh, locate/word_io.c,
m4/findlib.m4, m4/nullsort.m4, m4/withfts.m4, xargs/xargs.1: Likewise.
Signed-off-by: James Youngman <jay@gnu.org>
2009-03-04 10:49:59 +00:00
2005-07-26 09:03:27 +00:00
if ( options & RE_NO_BK_REFS )
{
2017-11-13 22:37:55 +00:00
content ( " A backslash followed by a digit matches that digit. " ) ;
2005-07-26 09:03:27 +00:00
}
else
{
2010-04-01 00:06:23 +01:00
literal ( " A backslash followed by a digit acts as a back-reference and matches the same thing as the previous grouped expression indicated by that number. For example @samp{ \\ 2} matches the second group expression. The order of group expressions is determined by the position of their opening parenthesis " ) ;
2005-07-26 09:03:27 +00:00
if ( options & RE_NO_BK_PARENS )
2024-05-26 11:12:59 +01:00
literal ( " @samp{(} " ) ;
2005-07-26 09:03:27 +00:00
else
2024-05-26 11:12:59 +01:00
literal ( " @samp{ \\ (} " ) ;
2017-11-13 22:37:55 +00:00
content ( " . " ) ;
2005-07-26 09:03:27 +00:00
}
Removed trailing whitespace.
Removed trailing whitespace.
* Makefile.am: Removed trailing white space.
* NEWS, build-aux/check-testfiles.sh, build-aux/src-sniff.py,
doc/Makefile.am, doc/find-maint.texi, doc/find.texi, find/Makefile.am,
find/defs.h, find/find.1, find/find.c, find/finddata.c, find/fstype.c,
find/ftsfind.c, find/parser.c, find/pred.c, find/tree.c, find/util.c,
import-gnulib.sh, lib/Makefile.am, lib/buildcmd.c, lib/buildcmd.h,
lib/dircallback.c, lib/dircallback.h, lib/extendbuf.c,
lib/extendbuf.h, lib/findutils-version.c, lib/findutils-version.h,
lib/forcefindlib.c, lib/gnulib-version.h, lib/listfile.c,
lib/modetype.h, lib/nextelem.c, lib/nextelem.h, lib/printquoted.c,
lib/printquoted.h, lib/qmark.c, lib/regexprops.c, lib/regextype.c,
lib/savedirinfo.c, lib/savedirinfo.h, lib/strspn.c, lib/wait.h,
lib/waitpid.c, locate/bigram.c, locate/code.c, locate/locate.1,
locate/locate.c, locate/locatedb.5, locate/locatedb.h,
locate/updatedb.1, locate/updatedb.sh, locate/word_io.c,
m4/findlib.m4, m4/nullsort.m4, m4/withfts.m4, xargs/xargs.1: Likewise.
Signed-off-by: James Youngman <jay@gnu.org>
2009-03-04 10:49:59 +00:00
2005-07-14 22:13:02 +00:00
2010-04-01 00:06:23 +01:00
newpara ( ) ;
2005-07-26 09:03:27 +00:00
if ( ! ( options & RE_LIMITED_OPS ) )
{
if ( options & RE_NO_BK_VBAR )
2024-05-26 11:12:59 +01:00
literal ( " The alternation operator is @samp{|}. " ) ;
2005-07-26 09:03:27 +00:00
else
2024-05-26 11:12:59 +01:00
literal ( " The alternation operator is @samp{ \\ |}. " ) ;
2005-07-26 09:03:27 +00:00
}
2010-04-01 00:06:23 +01:00
newpara ( ) ;
2005-07-26 09:03:27 +00:00
2005-07-14 22:13:02 +00:00
if ( options & RE_CONTEXT_INDEP_ANCHORS )
{
2017-11-13 22:37:55 +00:00
literal ( " The characters @samp{^} and @samp{$} always represent the beginning and end of a string respectively, except within square brackets. Within brackets, @samp{^} can be used to invert the membership of the character class being specified. \n " ) ;
2005-07-14 22:13:02 +00:00
}
else
{
2010-04-01 00:06:23 +01:00
literal ( " The character @samp{^} only represents the beginning of a string when it appears: " ) ;
beginenum ( ) ;
2017-11-13 22:37:55 +00:00
enum_item ( " At the beginning of a regular expression " ) ;
2005-07-14 22:13:02 +00:00
if ( options & RE_NO_BK_PARENS )
2024-05-26 11:12:59 +01:00
{
enum_item ( " After an open-group, signified by @samp{(} " ) ;
}
2005-07-14 22:13:02 +00:00
else
2024-05-26 11:12:59 +01:00
{
enum_item ( " After an open-group, signified by @samp{ \\ (} " ) ;
}
2010-04-01 00:06:23 +01:00
newline ( ) ;
2005-07-14 22:13:02 +00:00
if ( ! ( options & RE_LIMITED_OPS ) )
2024-05-26 11:12:59 +01:00
{
if ( options & RE_NEWLINE_ALT )
enum_item ( " After a newline " ) ;
if ( options & RE_NO_BK_VBAR )
enum_item ( " After the alternation operator @samp{|} " ) ;
else
enum_item ( " After the alternation operator @samp{ \\ |} " ) ;
}
2010-04-01 00:06:23 +01:00
endenum ( ) ;
2005-07-14 22:13:02 +00:00
2010-04-01 00:06:23 +01:00
newpara ( ) ;
literal ( " The character @samp{$} only represents the end of a string when it appears: " ) ;
beginenum ( ) ;
enum_item ( " At the end of a regular expression " ) ;
2005-07-14 22:13:02 +00:00
if ( options & RE_NO_BK_PARENS )
2024-05-26 11:12:59 +01:00
{
enum_item ( " Before a close-group, signified by @samp{)} " ) ;
}
2005-07-14 22:13:02 +00:00
else
2024-05-26 11:12:59 +01:00
{
enum_item ( " Before a close-group, signified by @samp{ \\ )} " ) ;
}
2005-07-14 22:13:02 +00:00
if ( ! ( options & RE_LIMITED_OPS ) )
2024-05-26 11:12:59 +01:00
{
if ( options & RE_NEWLINE_ALT )
enum_item ( " Before a newline " ) ;
if ( options & RE_NO_BK_VBAR )
enum_item ( " Before the alternation operator @samp{|} " ) ;
else
enum_item ( " Before the alternation operator @samp{ \\ |} " ) ;
}
2010-04-01 00:06:23 +01:00
endenum ( ) ;
2005-07-14 22:13:02 +00:00
}
2010-04-01 00:06:23 +01:00
newpara ( ) ;
2005-07-14 22:13:02 +00:00
if ( ! ( options & RE_LIMITED_OPS ) )
{
if ( ( options & RE_CONTEXT_INDEP_OPS )
2024-05-26 11:12:59 +01:00
& & ! ( options & RE_CONTEXT_INVALID_OPS ) )
{
literal ( " The characters @samp{*}, @samp{+} and @samp{?} are special anywhere in a regular expression. \n " ) ;
}
2005-07-14 22:13:02 +00:00
else
2024-05-26 11:12:59 +01:00
{
if ( options & RE_BK_PLUS_QM )
literal ( " @samp{ \\ *}, @samp{ \\ +} and @samp{ \\ ?} " ) ;
else
literal ( " @samp{*}, @samp{+} and @samp{?} " ) ;
if ( options & RE_CONTEXT_INVALID_OPS )
{
content ( " are special at any point in a regular expression except the following places, where they are not allowed: " ) ;
}
else
{
content ( " are special at any point in a regular expression except: " ) ;
}
beginenum ( ) ;
enum_item ( " At the beginning of a regular expression " ) ;
if ( options & RE_NO_BK_PARENS )
{
enum_item ( " After an open-group, signified by @samp{(} " ) ;
}
else
{
enum_item ( " After an open-group, signified by @samp{ \\ (} " ) ;
}
if ( ! ( options & RE_LIMITED_OPS ) )
{
if ( options & RE_NEWLINE_ALT )
enum_item ( " After a newline " ) ;
if ( options & RE_NO_BK_VBAR )
enum_item ( " After the alternation operator @samp{|} " ) ;
else
enum_item ( " After the alternation operator @samp{ \\ |} " ) ;
}
endenum ( ) ;
}
2005-07-14 22:13:02 +00:00
}
Removed trailing whitespace.
Removed trailing whitespace.
* Makefile.am: Removed trailing white space.
* NEWS, build-aux/check-testfiles.sh, build-aux/src-sniff.py,
doc/Makefile.am, doc/find-maint.texi, doc/find.texi, find/Makefile.am,
find/defs.h, find/find.1, find/find.c, find/finddata.c, find/fstype.c,
find/ftsfind.c, find/parser.c, find/pred.c, find/tree.c, find/util.c,
import-gnulib.sh, lib/Makefile.am, lib/buildcmd.c, lib/buildcmd.h,
lib/dircallback.c, lib/dircallback.h, lib/extendbuf.c,
lib/extendbuf.h, lib/findutils-version.c, lib/findutils-version.h,
lib/forcefindlib.c, lib/gnulib-version.h, lib/listfile.c,
lib/modetype.h, lib/nextelem.c, lib/nextelem.h, lib/printquoted.c,
lib/printquoted.h, lib/qmark.c, lib/regexprops.c, lib/regextype.c,
lib/savedirinfo.c, lib/savedirinfo.h, lib/strspn.c, lib/wait.h,
lib/waitpid.c, locate/bigram.c, locate/code.c, locate/locate.1,
locate/locate.c, locate/locatedb.5, locate/locatedb.h,
locate/updatedb.1, locate/updatedb.sh, locate/word_io.c,
m4/findlib.m4, m4/nullsort.m4, m4/withfts.m4, xargs/xargs.1: Likewise.
Signed-off-by: James Youngman <jay@gnu.org>
2009-03-04 10:49:59 +00:00
2005-07-14 22:13:02 +00:00
2010-04-01 00:06:23 +01:00
newpara ( ) ;
Removed trailing whitespace.
Removed trailing whitespace.
* Makefile.am: Removed trailing white space.
* NEWS, build-aux/check-testfiles.sh, build-aux/src-sniff.py,
doc/Makefile.am, doc/find-maint.texi, doc/find.texi, find/Makefile.am,
find/defs.h, find/find.1, find/find.c, find/finddata.c, find/fstype.c,
find/ftsfind.c, find/parser.c, find/pred.c, find/tree.c, find/util.c,
import-gnulib.sh, lib/Makefile.am, lib/buildcmd.c, lib/buildcmd.h,
lib/dircallback.c, lib/dircallback.h, lib/extendbuf.c,
lib/extendbuf.h, lib/findutils-version.c, lib/findutils-version.h,
lib/forcefindlib.c, lib/gnulib-version.h, lib/listfile.c,
lib/modetype.h, lib/nextelem.c, lib/nextelem.h, lib/printquoted.c,
lib/printquoted.h, lib/qmark.c, lib/regexprops.c, lib/regextype.c,
lib/savedirinfo.c, lib/savedirinfo.h, lib/strspn.c, lib/wait.h,
lib/waitpid.c, locate/bigram.c, locate/code.c, locate/locate.1,
locate/locate.c, locate/locatedb.5, locate/locatedb.h,
locate/updatedb.1, locate/updatedb.sh, locate/word_io.c,
m4/findlib.m4, m4/nullsort.m4, m4/withfts.m4, xargs/xargs.1: Likewise.
Signed-off-by: James Youngman <jay@gnu.org>
2009-03-04 10:49:59 +00:00
if ( options & RE_INTERVALS )
2005-07-14 22:13:02 +00:00
{
if ( options & RE_NO_BK_BRACES )
2024-05-26 11:12:59 +01:00
{
literal ( " Intervals are specified by @samp{@{} and @samp{@}}. \n " ) ;
if ( options & RE_INVALID_INTERVAL_ORD )
{
literal ( " Invalid intervals are treated as literals, for example @samp{a@{1} is treated as @samp{a \\ @{1} " ) ;
}
else
{
literal ( " Invalid intervals such as @samp{a@{1z} are not accepted. \n " ) ;
}
}
2005-07-14 22:13:02 +00:00
else
2024-05-26 11:12:59 +01:00
{
literal ( " Intervals are specified by @samp{ \\ @{} and @samp{ \\ @}}. \n " ) ;
if ( options & RE_INVALID_INTERVAL_ORD )
{
literal ( " Invalid intervals are treated as literals, for example @samp{a \\ @{1} is treated as @samp{a@{1} " ) ;
}
else
{
literal ( " Invalid intervals such as @samp{a \\ @{1z} are not accepted. \n " ) ;
}
}
2005-07-14 22:13:02 +00:00
}
2010-04-01 00:06:23 +01:00
newpara ( ) ;
2005-07-14 22:13:02 +00:00
if ( options & RE_NO_POSIX_BACKTRACKING )
{
2017-11-13 22:37:55 +00:00
content ( " Matching succeeds as soon as the whole pattern is matched, meaning that the result may not be the longest possible match. " ) ;
2005-07-14 22:13:02 +00:00
}
else
{
2017-11-13 22:37:55 +00:00
content ( " The longest possible match is returned; this applies to the regular expression as a whole and (subject to this constraint) to subexpressions within groups. " ) ;
2005-07-14 22:13:02 +00:00
}
2010-04-01 00:06:23 +01:00
newpara ( ) ;
2005-07-14 22:13:02 +00:00
}
2010-04-05 14:34:57 +01:00
static void
copying ( void )
2007-11-29 11:17:14 +00:00
{
static const char * copy_para [ ] =
{
2021-01-01 19:46:59 +01:00
/* The copyright year number range is with "--" in Texinfo files. */
2025-01-04 11:43:53 +01:00
" Copyright (C) 1994--2025 Free Software Foundation, Inc. "
2007-11-29 11:17:14 +00:00
, " "
, " Permission is granted to copy, distribute and/or modify this document "
2010-04-02 00:24:34 +01:00
, " under the terms of the GNU Free Documentation License, Version 1.3 or "
2007-11-29 11:17:14 +00:00
, " any later version published by the Free Software Foundation; with no "
2015-12-27 15:43:53 +00:00
, " Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. "
, " A copy of the license is included in the ``GNU Free "
2007-11-29 11:17:14 +00:00
, " Documentation License'' file as part of this distribution. "
" "
, NULL
} ;
const char * * s = copy_para ;
while ( * s )
2010-04-01 00:06:23 +01:00
comment ( * s + + ) ;
2007-11-29 11:17:14 +00:00
}
static int
2010-04-01 00:06:23 +01:00
ignore ( int ix , const unsigned int context )
2007-11-29 11:17:14 +00:00
{
2010-04-01 00:06:23 +01:00
return 0 = = ( get_regex_type_context ( ix ) & context ) ;
2007-11-29 11:17:14 +00:00
}
2005-07-14 22:13:02 +00:00
2005-12-23 18:24:20 +00:00
static void
2010-04-01 00:06:23 +01:00
menu ( unsigned int context )
2005-07-14 22:13:02 +00:00
{
2017-11-03 01:10:36 +01:00
int i ;
2005-07-14 22:13:02 +00:00
const char * name ;
Removed trailing whitespace.
Removed trailing whitespace.
* Makefile.am: Removed trailing white space.
* NEWS, build-aux/check-testfiles.sh, build-aux/src-sniff.py,
doc/Makefile.am, doc/find-maint.texi, doc/find.texi, find/Makefile.am,
find/defs.h, find/find.1, find/find.c, find/finddata.c, find/fstype.c,
find/ftsfind.c, find/parser.c, find/pred.c, find/tree.c, find/util.c,
import-gnulib.sh, lib/Makefile.am, lib/buildcmd.c, lib/buildcmd.h,
lib/dircallback.c, lib/dircallback.h, lib/extendbuf.c,
lib/extendbuf.h, lib/findutils-version.c, lib/findutils-version.h,
lib/forcefindlib.c, lib/gnulib-version.h, lib/listfile.c,
lib/modetype.h, lib/nextelem.c, lib/nextelem.h, lib/printquoted.c,
lib/printquoted.h, lib/qmark.c, lib/regexprops.c, lib/regextype.c,
lib/savedirinfo.c, lib/savedirinfo.h, lib/strspn.c, lib/wait.h,
lib/waitpid.c, locate/bigram.c, locate/code.c, locate/locate.1,
locate/locate.c, locate/locatedb.5, locate/locatedb.h,
locate/updatedb.1, locate/updatedb.sh, locate/word_io.c,
m4/findlib.m4, m4/nullsort.m4, m4/withfts.m4, xargs/xargs.1: Likewise.
Signed-off-by: James Youngman <jay@gnu.org>
2009-03-04 10:49:59 +00:00
2010-04-01 00:06:23 +01:00
output ( " @menu \n " , 0 ) ;
2005-07-14 22:13:02 +00:00
for ( i = 0 ;
2017-11-03 01:10:36 +01:00
get_regex_type_flags ( i ) ,
2024-05-26 11:12:59 +01:00
name = get_regex_type_name ( i ) ;
2005-07-14 22:13:02 +00:00
+ + i )
{
2010-04-01 00:06:23 +01:00
if ( ! ignore ( i , context ) )
2024-05-26 11:12:59 +01:00
{
output ( " * " , 0 ) ;
output ( name , 0 ) ;
content ( " regular expression syntax " ) ;
output ( " :: " , 0 ) ;
newline ( ) ;
}
2005-07-14 22:13:02 +00:00
}
2010-04-01 00:06:23 +01:00
output ( " @end menu \n " , 0 ) ;
2005-07-14 22:13:02 +00:00
}
2007-11-29 11:17:14 +00:00
static const char *
2010-04-01 00:06:23 +01:00
get_next ( unsigned int ix , unsigned int context )
2007-11-29 11:17:14 +00:00
{
const char * next ;
2010-04-01 00:06:23 +01:00
while ( get_regex_type_name ( ix ) )
2007-11-29 11:17:14 +00:00
{
2010-04-01 00:06:23 +01:00
if ( ! ignore ( ix , context ) )
2024-05-26 11:12:59 +01:00
{
next = get_regex_type_name ( ix ) ;
if ( NULL = = next )
return " " ;
else
return next ;
}
2007-11-29 11:17:14 +00:00
+ + ix ;
}
return " " ;
}
2005-12-23 18:24:20 +00:00
static void
2010-04-01 00:06:23 +01:00
describe_all ( const char * contextname ,
2024-05-26 11:12:59 +01:00
unsigned int context ,
const char * up )
2005-07-14 22:13:02 +00:00
{
const char * name , * next , * previous ;
2022-01-05 21:59:34 +01:00
int regopts ;
2005-07-24 21:02:56 +00:00
int i , parent ;
2005-07-14 22:13:02 +00:00
2010-04-01 00:06:23 +01:00
copying ( ) ;
newline ( ) ;
literal ( " @c this regular expression description is for: " ) ;
literal ( contextname ) ;
newline ( ) ;
newline ( ) ;
menu ( context ) ;
Removed trailing whitespace.
Removed trailing whitespace.
* Makefile.am: Removed trailing white space.
* NEWS, build-aux/check-testfiles.sh, build-aux/src-sniff.py,
doc/Makefile.am, doc/find-maint.texi, doc/find.texi, find/Makefile.am,
find/defs.h, find/find.1, find/find.c, find/finddata.c, find/fstype.c,
find/ftsfind.c, find/parser.c, find/pred.c, find/tree.c, find/util.c,
import-gnulib.sh, lib/Makefile.am, lib/buildcmd.c, lib/buildcmd.h,
lib/dircallback.c, lib/dircallback.h, lib/extendbuf.c,
lib/extendbuf.h, lib/findutils-version.c, lib/findutils-version.h,
lib/forcefindlib.c, lib/gnulib-version.h, lib/listfile.c,
lib/modetype.h, lib/nextelem.c, lib/nextelem.h, lib/printquoted.c,
lib/printquoted.h, lib/qmark.c, lib/regexprops.c, lib/regextype.c,
lib/savedirinfo.c, lib/savedirinfo.h, lib/strspn.c, lib/wait.h,
lib/waitpid.c, locate/bigram.c, locate/code.c, locate/locate.1,
locate/locate.c, locate/locatedb.5, locate/locatedb.h,
locate/updatedb.1, locate/updatedb.sh, locate/word_io.c,
m4/findlib.m4, m4/nullsort.m4, m4/withfts.m4, xargs/xargs.1: Likewise.
Signed-off-by: James Youngman <jay@gnu.org>
2009-03-04 10:49:59 +00:00
2005-07-14 22:13:02 +00:00
previous = " " ;
Removed trailing whitespace.
Removed trailing whitespace.
* Makefile.am: Removed trailing white space.
* NEWS, build-aux/check-testfiles.sh, build-aux/src-sniff.py,
doc/Makefile.am, doc/find-maint.texi, doc/find.texi, find/Makefile.am,
find/defs.h, find/find.1, find/find.c, find/finddata.c, find/fstype.c,
find/ftsfind.c, find/parser.c, find/pred.c, find/tree.c, find/util.c,
import-gnulib.sh, lib/Makefile.am, lib/buildcmd.c, lib/buildcmd.h,
lib/dircallback.c, lib/dircallback.h, lib/extendbuf.c,
lib/extendbuf.h, lib/findutils-version.c, lib/findutils-version.h,
lib/forcefindlib.c, lib/gnulib-version.h, lib/listfile.c,
lib/modetype.h, lib/nextelem.c, lib/nextelem.h, lib/printquoted.c,
lib/printquoted.h, lib/qmark.c, lib/regexprops.c, lib/regextype.c,
lib/savedirinfo.c, lib/savedirinfo.h, lib/strspn.c, lib/wait.h,
lib/waitpid.c, locate/bigram.c, locate/code.c, locate/locate.1,
locate/locate.c, locate/locatedb.5, locate/locatedb.h,
locate/updatedb.1, locate/updatedb.sh, locate/word_io.c,
m4/findlib.m4, m4/nullsort.m4, m4/withfts.m4, xargs/xargs.1: Likewise.
Signed-off-by: James Youngman <jay@gnu.org>
2009-03-04 10:49:59 +00:00
2005-07-14 22:13:02 +00:00
for ( i = 0 ;
2022-01-05 21:59:34 +01:00
regopts = get_regex_type_flags ( i ) ,
2024-05-26 11:12:59 +01:00
name = get_regex_type_name ( i ) ;
2005-07-14 22:13:02 +00:00
+ + i )
{
2010-04-01 00:06:23 +01:00
if ( ignore ( i , context ) )
2024-05-26 11:12:59 +01:00
{
fprintf ( stderr ,
" Skipping regexp type %s for context %s \n " ,
name , contextname ) ;
name = previous ;
continue ;
}
2007-11-29 11:17:14 +00:00
2010-04-01 00:06:23 +01:00
next = get_next ( i + 1 , context ) ;
2005-07-14 22:13:02 +00:00
if ( NULL = = next )
2024-05-26 11:12:59 +01:00
next = " " ;
2010-04-01 00:06:23 +01:00
begin_subsection ( name , next , previous , up ) ;
2017-11-14 22:21:49 +00:00
parent = get_regex_type_synonym ( i , context ) ;
2005-07-24 21:02:56 +00:00
if ( parent > = 0 )
2024-05-26 11:12:59 +01:00
{
content ( " This is a synonym for " ) ;
content ( get_regex_type_name ( parent ) ) ;
content ( " . " ) ;
}
2005-07-24 21:02:56 +00:00
else
2024-05-26 11:12:59 +01:00
{
describe_regex_syntax ( regopts ) ;
}
2005-07-14 22:13:02 +00:00
previous = name ;
}
}
2010-04-04 23:42:59 +01:00
int
main ( int argc , char * argv [ ] )
2005-07-14 22:13:02 +00:00
{
const char * up = " " ;
2007-11-29 11:17:14 +00:00
unsigned int context = CONTEXT_ALL ;
const char * contextname = " all " ;
2010-04-05 14:34:57 +01:00
if ( argc )
set_program_name ( argv [ 0 ] ) ;
else
set_program_name ( " regexprops " ) ;
Removed trailing whitespace.
Removed trailing whitespace.
* Makefile.am: Removed trailing white space.
* NEWS, build-aux/check-testfiles.sh, build-aux/src-sniff.py,
doc/Makefile.am, doc/find-maint.texi, doc/find.texi, find/Makefile.am,
find/defs.h, find/find.1, find/find.c, find/finddata.c, find/fstype.c,
find/ftsfind.c, find/parser.c, find/pred.c, find/tree.c, find/util.c,
import-gnulib.sh, lib/Makefile.am, lib/buildcmd.c, lib/buildcmd.h,
lib/dircallback.c, lib/dircallback.h, lib/extendbuf.c,
lib/extendbuf.h, lib/findutils-version.c, lib/findutils-version.h,
lib/forcefindlib.c, lib/gnulib-version.h, lib/listfile.c,
lib/modetype.h, lib/nextelem.c, lib/nextelem.h, lib/printquoted.c,
lib/printquoted.h, lib/qmark.c, lib/regexprops.c, lib/regextype.c,
lib/savedirinfo.c, lib/savedirinfo.h, lib/strspn.c, lib/wait.h,
lib/waitpid.c, locate/bigram.c, locate/code.c, locate/locate.1,
locate/locate.c, locate/locatedb.5, locate/locatedb.h,
locate/updatedb.1, locate/updatedb.sh, locate/word_io.c,
m4/findlib.m4, m4/nullsort.m4, m4/withfts.m4, xargs/xargs.1: Likewise.
Signed-off-by: James Youngman <jay@gnu.org>
2009-03-04 10:49:59 +00:00
2005-07-14 22:13:02 +00:00
if ( argc > 1 )
2007-11-29 11:17:14 +00:00
{
up = argv [ 1 ] ;
}
if ( argc > 2 )
{
contextname = argv [ 2 ] ;
2010-04-01 00:06:23 +01:00
if ( 0 = = strcmp ( contextname , " findutils " ) )
2024-05-26 11:12:59 +01:00
context = CONTEXT_FINDUTILS ;
2010-04-01 00:06:23 +01:00
else if ( 0 = = strcmp ( contextname , " generic " ) )
2024-05-26 11:12:59 +01:00
context = CONTEXT_GENERIC ;
2010-04-01 00:06:23 +01:00
else if ( 0 = = strcmp ( contextname , " all " ) )
2024-05-26 11:12:59 +01:00
context = CONTEXT_ALL ;
2007-11-29 11:17:14 +00:00
else
2024-05-26 11:12:59 +01:00
{
fprintf ( stderr , " Unexpected context %s " ,
contextname ) ;
return 1 ;
}
2007-11-29 11:17:14 +00:00
}
Removed trailing whitespace.
Removed trailing whitespace.
* Makefile.am: Removed trailing white space.
* NEWS, build-aux/check-testfiles.sh, build-aux/src-sniff.py,
doc/Makefile.am, doc/find-maint.texi, doc/find.texi, find/Makefile.am,
find/defs.h, find/find.1, find/find.c, find/finddata.c, find/fstype.c,
find/ftsfind.c, find/parser.c, find/pred.c, find/tree.c, find/util.c,
import-gnulib.sh, lib/Makefile.am, lib/buildcmd.c, lib/buildcmd.h,
lib/dircallback.c, lib/dircallback.h, lib/extendbuf.c,
lib/extendbuf.h, lib/findutils-version.c, lib/findutils-version.h,
lib/forcefindlib.c, lib/gnulib-version.h, lib/listfile.c,
lib/modetype.h, lib/nextelem.c, lib/nextelem.h, lib/printquoted.c,
lib/printquoted.h, lib/qmark.c, lib/regexprops.c, lib/regextype.c,
lib/savedirinfo.c, lib/savedirinfo.h, lib/strspn.c, lib/wait.h,
lib/waitpid.c, locate/bigram.c, locate/code.c, locate/locate.1,
locate/locate.c, locate/locatedb.5, locate/locatedb.h,
locate/updatedb.1, locate/updatedb.sh, locate/word_io.c,
m4/findlib.m4, m4/nullsort.m4, m4/withfts.m4, xargs/xargs.1: Likewise.
Signed-off-by: James Youngman <jay@gnu.org>
2009-03-04 10:49:59 +00:00
2010-04-01 00:06:23 +01:00
describe_all ( contextname , context , up ) ;
2005-07-14 22:13:02 +00:00
return 0 ;
}