summaryrefslogtreecommitdiffstats
path: root/regex.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2009-11-23 15:46:24 -0800
committerKaz Kylheku <kaz@kylheku.com>2009-11-23 15:46:24 -0800
commitb6f5aadfccea8bccadd6c56b57fe6f6b80cfc213 (patch)
treecd71b8fefd57c2c1d4d6e9f7f3a633575f26b03b /regex.h
parent4a1556a848c5bfb527cecb2b823a750ba63e6f80 (diff)
downloadtxr-b6f5aadfccea8bccadd6c56b57fe6f6b80cfc213.tar.gz
txr-b6f5aadfccea8bccadd6c56b57fe6f6b80cfc213.tar.bz2
txr-b6f5aadfccea8bccadd6c56b57fe6f6b80cfc213.zip
Improving portability. It is no longer assumed that pointers
can be converted to a type long and vice versa. The configure script tries to detect the appropriate type to use. Also, some run-time checking is performed in the streams module to detect which conversions specifier strings to use for printing numbers.
Diffstat (limited to 'regex.h')
-rw-r--r--regex.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/regex.h b/regex.h
index accb0386..d33f5c84 100644
--- a/regex.h
+++ b/regex.h
@@ -145,22 +145,22 @@ typedef enum nfam_result {
} nfam_result_t;
typedef struct nfa_machine {
- long last_accept_pos;
+ cnum last_accept_pos;
unsigned visited;
nfa_state_t **move, **clos, **stack;
int nmove, nclos;
- long count;
+ cnum count;
nfa_t nfa;
} nfa_machine_t;
nfa_t nfa_compile_regex(val regex);
void nfa_free(nfa_t);
-long nfa_run(nfa_t nfa, const wchar_t *str);
+cnum nfa_run(nfa_t nfa, const wchar_t *str);
void nfa_machine_reset(nfa_machine_t *);
void nfa_machine_init(nfa_machine_t *, nfa_t);
void nfa_machine_cleanup(nfa_machine_t *);
nfam_result_t nfa_machine_feed(nfa_machine_t *, wchar_t ch);
-long nfa_machine_match_span(nfa_machine_t *);
+cnum nfa_machine_match_span(nfa_machine_t *);
val regex_compile(val regex_sexp);
val regexp(val);
nfa_t *regex_nfa(val);