projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
.
[gnulib.git]
/
lib
/
rx.c
diff --git
a/lib/rx.c
b/lib/rx.c
index
1b94dbf
..
453aeed
100644
(file)
--- a/
lib/rx.c
+++ b/
lib/rx.c
@@
-33,9
+33,8
@@
write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA
#if HAVE_CONFIG_H
#include <config.h>
#endif
#if HAVE_CONFIG_H
#include <config.h>
#endif
-
\f
\f
-c
har rx_version_string[] = "GNU Rx version 0.07.1
";
+c
onst char *rx_version_string = "GNU Rx version 0.07.2
";
/* ``Too hard!''
* -- anon.
/* ``Too hard!''
* -- anon.
@@
-119,9
+118,9
@@
char *alloca ();
#ifndef emacs
#ifndef emacs
-#if
def SYNTAX_TABLE
-extern char *re_syntax_table;
-#else /* not SYNTAX_TABLE */
+#if
ndef SYNTAX
+
+RX_DECL char re_syntax_table[CHAR_SET_SIZE];
#ifdef __STDC__
static void
#ifdef __STDC__
static void
@@
-152,7
+151,7
@@
init_syntax_once ()
done = 1;
}
done = 1;
}
-#endif /* not SYNTAX
_TABLE
*/
+#endif /* not SYNTAX */
#endif /* not emacs */
\f
/* Compile with `-DRX_DEBUG' and use the following flags.
#endif /* not emacs */
\f
/* Compile with `-DRX_DEBUG' and use the following flags.
@@
-3672,7
+3671,8
@@
compute_super_edge (rx, dfout, csetout, superstate, chr)
{
struct rx_distinct_future * df;
df = saved;
{
struct rx_distinct_future * df;
df = saved;
- df->next_same_super_edge[1]->next_same_super_edge[0] = 0;
+ if (df)
+ df->next_same_super_edge[1]->next_same_super_edge[0] = 0;
while (df)
{
struct rx_distinct_future *dft;
while (df)
{
struct rx_distinct_future *dft;
@@
-4967,7
+4967,7
@@
rx_compile (pattern, size, syntax, rxb)
*/
rxb->re_nsub = 0;
*/
rxb->re_nsub = 0;
-#if !defined (emacs) && !defined (SYNTAX
_TABLE
)
+#if !defined (emacs) && !defined (SYNTAX)
/* Initialize the syntax table. */
init_syntax_once ();
#endif
/* Initialize the syntax table. */
init_syntax_once ();
#endif
@@
-6250,9
+6250,9
@@
rx_blow_up_fastmap (rxb)
struct re_search_2_closure
{
struct re_search_2_closure
{
- __const__ char * string1;
+ __const__
unsigned
char * string1;
int size1;
int size1;
- __const__ char * string2;
+ __const__
unsigned
char * string2;
int size2;
};
int size2;
};
@@
-6395,7
+6395,7
@@
re_search_2_fetch_char (pos, offset, app_closure, stop)
return *pos->pos;
else
{
return *pos->pos;
else
{
- if ( (pos->string ==
(__const__ unsigned char *)
closure->string2)
+ if ( (pos->string == closure->string2)
&& (closure->string1)
&& (closure->size1))
return closure->string1[closure->size1 - 1];
&& (closure->string1)
&& (closure->size1))
return closure->string1[closure->size1 - 1];
@@
-6435,9
+6435,9
@@
RE_SEARCH_2_FN (rxb,
{
int answer;
struct re_search_2_closure closure;
{
int answer;
struct re_search_2_closure closure;
- closure.string1 = string1;
+ closure.string1 =
(__const__ unsigned char *)
string1;
closure.size1 = size1;
closure.size1 = size1;
- closure.string2 = string2;
+ closure.string2 =
(__const__ unsigned char *)
string2;
closure.size2 = size2;
answer = rx_search (rxb, startpos, range, stop, size1 + size2,
re_search_2_get_burst,
closure.size2 = size2;
answer = rx_search (rxb, startpos, range, stop, size1 + size2,
re_search_2_get_burst,
@@
-6882,6
+6882,7
@@
re_comp (s)
/* Match anchors at newlines. */
rx_comp_buf.newline_anchor = 1;
/* Match anchors at newlines. */
rx_comp_buf.newline_anchor = 1;
+ rx_comp_buf.fastmap_accurate = 0;
rx_comp_buf.re_nsub = 0;
rx_comp_buf.start = 0;
rx_comp_buf.se_params = 0;
rx_comp_buf.re_nsub = 0;
rx_comp_buf.start = 0;
rx_comp_buf.se_params = 0;
@@
-6891,6
+6892,7
@@
re_comp (s)
rx_comp_buf.rx.nfa_states = 0;
rx_comp_buf.rx.start = 0;
rx_comp_buf.rx.se_list_cmp = posix_se_list_order;
rx_comp_buf.rx.nfa_states = 0;
rx_comp_buf.rx.start = 0;
rx_comp_buf.rx.se_list_cmp = posix_se_list_order;
+ rx_comp_buf.rx.start_set = 0;
rx_comp_buf.rx.local_cset_size = 256;
ret = rx_compile (s, strlen (s), re_syntax_options, &rx_comp_buf);
rx_comp_buf.rx.local_cset_size = 256;
ret = rx_compile (s, strlen (s), re_syntax_options, &rx_comp_buf);