From b6f5aadfccea8bccadd6c56b57fe6f6b80cfc213 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Mon, 23 Nov 2009 15:46:24 -0800 Subject: 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. --- regex.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'regex.h') 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); -- cgit v1.2.3