X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/anag/blobdiff_plain/94ed9b3061c85d2dcee290c0e207a5c7fc7c8371..refs/heads/master:/anag.c?ds=sidebyside diff --git a/anag.c b/anag.c index d4413bd..80da3c3 100644 --- a/anag.c +++ b/anag.c @@ -1,13 +1,11 @@ /* -*-c-*- - * - * $Id$ * * Main driver for anag * * (c) 2001 Mark Wooding */ -/*----- Licensing notice --------------------------------------------------* +/*----- Licensing notice --------------------------------------------------* * * This file is part of Anag: a simple wordgame helper. * @@ -15,12 +13,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * Anag 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. - * + * * You should have received a copy of the GNU General Public License * along with Anag; if not, write to the Free Software Foundation, * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. @@ -74,7 +72,7 @@ The basic tests in the expression are:\n\ -regexp REGEXP matches with an (extended) regular expression\n\ " #endif -#ifdef HAVE_PCRE +#if defined(HAVE_PCRE) || defined(HAVE_PCRE2) "\ -pcre REGEXP matches with a Perl-like regular expression\n\ " @@ -140,12 +138,12 @@ static const struct opt opttab[] = { #ifdef HAVE_REGCOMP { "regexp", 1, 0, O_REGEXP }, #endif -#ifdef HAVE_PCRE +#if defined(HAVE_PCRE) || defined(HAVE_PCRE2) { "pcre", 1, 0, O_PCRE }, #endif - { "length", 1, 0, O_LENGTH }, - { "longest", 0, 0, O_LONGEST }, - { "shortest", 0, 0, O_SHORTEST }, + { "length", 1, 0, O_LENGTH }, + { "longest", 0, 0, O_LONGEST }, + { "shortest", 0, 0, O_SHORTEST }, /* --- End marker --- */ @@ -402,7 +400,7 @@ static void p_factor(p_ctx *p, node **nn) #ifdef HAVE_REGCOMP case O_REGEXP: *nn = regexp(p->a + 1); break; #endif -#ifdef HAVE_PCRE +#if defined(HAVE_PCRE) || defined(HAVE_PCRE2) case O_PCRE: *nn = pcrenode(p->a + 1); break; #endif case O_MONO: *nn = mono(p->a + 1); break;