~mdw
/
anag
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Debianization.
[anag]
/
anag.c
diff --git
a/anag.c
b/anag.c
index
56aa565
..
e15fb6d
100644
(file)
--- a/
anag.c
+++ b/
anag.c
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-c-*-
*
- * $Id: anag.c,v 1.
6 2003/09/15 02:48:54
mdw Exp $
+ * $Id: anag.c,v 1.
7 2003/11/29 23:38:37
mdw Exp $
*
* Main driver for anag
*
*
* Main driver for anag
*
@@
-29,6
+29,9
@@
/*----- Revision history --------------------------------------------------*
*
* $Log: anag.c,v $
/*----- Revision history --------------------------------------------------*
*
* $Log: anag.c,v $
+ * Revision 1.7 2003/11/29 23:38:37 mdw
+ * Debianization.
+ *
* Revision 1.6 2003/09/15 02:48:54 mdw
* Monoalphabetic match filter.
*
* Revision 1.6 2003/09/15 02:48:54 mdw
* Monoalphabetic match filter.
*
@@
-99,12
+102,17
@@
The basic tests in the expression are:\n\
-regexp REGEXP matches with an (extended) regular expression\n\
"
#endif
-regexp REGEXP matches with an (extended) regular expression\n\
"
#endif
+#ifdef HAVE_PCRE
+"\
+-pcre REGEXP matches with a Perl-like regular expression\n\
+"
+#endif
"\
\n\
These simple tests can be combined using the operators `-a', `-o' and `-n'\n\
(for `and', `or' and `not'; they may also be written `&', `|' and `!' if\n\
you like), and grouped using parentheses `(' and `)'.\n\
"\
\n\
These simple tests can be combined using the operators `-a', `-o' and `-n'\n\
(for `and', `or' and `not'; they may also be written `&', `|' and `!' if\n\
you like), and grouped using parentheses `(' and `)'.\n\
-", fp);
+", fp);
/*"*/
}
/*----- The options parser ------------------------------------------------*/
}
/*----- The options parser ------------------------------------------------*/
@@
-122,7
+130,7
@@
enum {
O_HELP, O_VERSION, O_USAGE,
O_FILE,
O_AND, O_OR, O_NOT, O_LPAREN, O_RPAREN,
O_HELP, O_VERSION, O_USAGE,
O_FILE,
O_AND, O_OR, O_NOT, O_LPAREN, O_RPAREN,
- O_ANAG, O_SUBG, O_WILD, O_TRACK, O_REGEXP, O_MONO,
+ O_ANAG, O_SUBG, O_WILD, O_TRACK, O_REGEXP, O_
PCRE, O_
MONO,
O_EOF
};
O_EOF
};
@@
-156,6
+164,9
@@
static const struct opt opttab[] = {
#ifdef HAVE_REGCOMP
{ "regexp", 1, 0, O_REGEXP },
#endif
#ifdef HAVE_REGCOMP
{ "regexp", 1, 0, O_REGEXP },
#endif
+#ifdef HAVE_PCRE
+ { "pcre", 1, 0, O_PCRE },
+#endif
/* --- End marker --- */
/* --- End marker --- */
@@
-359,6
+370,9
@@
static void p_factor(p_ctx *p, node **nn)
#ifdef HAVE_REGCOMP
case O_REGEXP: *nn = regexp(p->a + 1); break;
#endif
#ifdef HAVE_REGCOMP
case O_REGEXP: *nn = regexp(p->a + 1); break;
#endif
+#ifdef HAVE_PCRE
+ case O_PCRE: *nn = pcrenode(p->a + 1); break;
+#endif
case O_MONO: *nn = mono(p->a + 1); break;
default: die("syntax error near `%s': unexpected token", *p->a);
}
case O_MONO: *nn = mono(p->a + 1); break;
default: die("syntax error near `%s': unexpected token", *p->a);
}