From 4838675c234f7488271037fc875762ad45e45491 Mon Sep 17 00:00:00 2001 From: Fumitoshi UKAI Date: Thu, 27 Dec 2001 17:23:06 +0000 Subject: [w3m-dev 02757] From: Hironori Sakamoto --- ChangeLog | 8 +++++++- main.c | 21 ++++++++++----------- 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index c192ca6..621917a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2001-12-28 Hironori Sakamoto + + * [w3m-dev 02757] + * main.c (execdict): w = conv_from_system(word) + * main.c (dictword): call execdict() only + 2001-12-27 Fumitoshi UKAI * url.c (openSSLHandle): accept_this_file is out of @@ -1697,4 +1703,4 @@ * release-0-2-1 * import w3m-0.2.1 -$Id: ChangeLog,v 1.187 2001/12/27 02:32:08 ukai Exp $ +$Id: ChangeLog,v 1.188 2001/12/27 17:23:06 ukai Exp $ diff --git a/main.c b/main.c index 5f603a6..5269e75 100644 --- a/main.c +++ b/main.c @@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.50 2001/12/26 18:29:33 ukai Exp $ */ +/* $Id: main.c,v 1.51 2001/12/27 17:23:07 ukai Exp $ */ #define MAINPROGRAM #include "fm.h" #include @@ -4600,6 +4600,7 @@ GetWord(Buffer *buf) static void execdict(char *word) { + char *w; Buffer *buf; MySignalHandler(*prevtrap) (); @@ -4607,11 +4608,15 @@ execdict(char *word) displayBuffer(Currentbuf, B_NORMAL); return; } + w = conv_to_system(word); + if (*w == '\0') { + displayBuffer(Currentbuf, B_NORMAL); + return; + } prevtrap = signal(SIGINT, intTrap); crmode(); - buf = getshell(myExtCommand(DICTCMD, shell_quote(word), FALSE)->ptr); - buf->filename = word; - word = conv_from_system(word); + buf = getshell(myExtCommand(DICTCMD, shell_quote(w), FALSE)->ptr); + buf->filename = w; buf->buffername = Sprintf("%s %s", DICTBUFFERNAME, word)->ptr; signal(SIGINT, prevtrap); term_raw(); @@ -4632,13 +4637,7 @@ execdict(char *word) void dictword(void) { - char *word = inputStr("(dictionary)!", ""); - - if (word != NULL) - word = conv_to_system(word); - if (word == NULL || *word == '\0') - return; - execdict(word); + execdict(inputStr("(dictionary)!", "")); } void -- cgit v1.2.3