X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/tweak/blobdiff_plain/d274205f93a14fbeece572b09e97dc8ec0a4105d..a63728c704b14d40a3229f66dbf0088fbe5d95af:/tweak.h diff --git a/tweak.h b/tweak.h index d25130c..f9ea9eb 100644 --- a/tweak.h +++ b/tweak.h @@ -16,7 +16,7 @@ #define ABORT 7 /* character code for ^G */ #endif -#define VER "B2.99" /* version, must be 5 chars */ +#define VER "3.00" /* version */ #define SEARCH_BLK 65536 /* so can this */ #define SAVE_BLKSIZ 32768 /* and this too */ @@ -34,6 +34,11 @@ #define NULL256 NULL64,NULL64,NULL64,NULL64 typedef int (*DFA)[256]; +typedef struct { + int len; + DFA forward, reverse; +} Search; + typedef void (*keyact) (void); typedef struct buffer buffer; @@ -65,9 +70,8 @@ extern keyact parse_action (char *); extern void proc_key (void); extern void bind_key (char *, int, keyact); -extern DFA build_dfa (char *, int); -extern DFA last_dfa (void); -extern int last_len (void); +extern Search *build_search (char *, int); +void free_search(Search *s); extern int get_str (char *, char *, int); extern int parse_quoted (char *);