diff options
author | Fumitoshi UKAI <ukai@debian.or.jp> | 2002-01-31 03:55:35 +0000 |
---|---|---|
committer | Fumitoshi UKAI <ukai@debian.or.jp> | 2002-01-31 03:55:35 +0000 |
commit | 225487bf41cca8b946169135f2e29f20f8f1f590 (patch) | |
tree | aca07bf6fbef1bc0ee53fd9ea6faad34ad1f0398 /search.c | |
parent | [w3m-dev 02942] Digest qop=auth support (diff) | |
download | w3m-225487bf41cca8b946169135f2e29f20f8f1f590.tar.gz w3m-225487bf41cca8b946169135f2e29f20f8f1f590.zip |
[w3m-dev 02946] toggle migemo
* fm.h (migemo_active): added
* proto.h (inputLineHistSearch): add arg `prop' to incrfunc()
* linein.c (inputLineHistSearch): ditto
* main.c (isrch): ditto
* main.c (dispincsrch): ditto
C-\ toggle migemo
underline when migemo is active
* search.c (migemo_active): deleted
* search.c (migemo_running): added
* search.c (init_migemo): migemo_running
* search.c (migemostr): ditto
* search.c (forwardSearch): migemo_active > 0
* search.c (backwardSearch): ditto
From: Fumitoshi UKAI <ukai@debian.or.jp>
Diffstat (limited to '')
-rw-r--r-- | search.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -1,4 +1,4 @@ -/* $Id: search.c,v 1.17 2002/01/21 17:57:28 ukai Exp $ */ +/* $Id: search.c,v 1.18 2002/01/31 03:55:35 ukai Exp $ */ #include "fm.h" #include "regex.h" #include <signal.h> @@ -15,13 +15,13 @@ set_mark(Line *l, int pos, int epos) #ifdef USE_MIGEMO /* Migemo: romaji --> kana+kanji in regexp */ static FILE *migemor, *migemow; -static int migemo_active; +static int migemo_running; static int migemo_pid; void init_migemo() { - migemo_active = use_migemo; + migemo_active = migemo_running = use_migemo; if (migemor != NULL) fclose(migemor); if (migemow != NULL) @@ -75,7 +75,7 @@ open_migemo(char *migemo_command) close(fdr[0]); close(fdr[1]); err0: - migemo_active = 0; + migemo_active = migemo_running = 0; return 0; } @@ -104,7 +104,7 @@ migemostr(char *str) err: /* XXX: backend migemo is not working? */ init_migemo(); - migemo_active = 0; + migemo_active = migemo_running = 0; return str; } #endif /* USE_MIGEMO */ @@ -118,7 +118,7 @@ forwardSearch(Buffer *buf, char *str) int pos; #ifdef USE_MIGEMO - if (migemo_active) { + if (migemo_active > 0) { if (((p = regexCompile(migemostr(str), IgnoreCase)) != NULL) && ((p = regexCompile(str, IgnoreCase)) != NULL)) { message(p, 0, 0); @@ -196,7 +196,7 @@ backwardSearch(Buffer *buf, char *str) int pos; #ifdef USE_MIGEMO - if (migemo_active) { + if (migemo_active > 0) { if (((p = regexCompile(migemostr(str), IgnoreCase)) != NULL) && ((p = regexCompile(str, IgnoreCase)) != NULL)) { message(p, 0, 0); |