commit 8101744233282370bd6384d8e85203b2cdd0100d
parent 75b9c440d35f4208e5f6f8fa94c5ccb84fd5f563
Author: ukai <ukai>
Date: Thu, 27 Dec 2001 17:43:22 +0000
[w3m-dev 02760]
From: Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
Diffstat:
3 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -1,5 +1,12 @@
2001-12-28 Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
+ * [w3m-dev 02760]
+ * file.c (getshell): check buf == NULL
+ * main.c (execdict): check buf == NULL
+ buf->type == NULL, then buf->type is set as "text/plain"
+
+2001-12-28 Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
+
* [w3m-dev 02759] fold textarea
* fm.h (FoldTextarea): added
* form.c (formUpdateBuffer): check FoldTextarea
diff --git a/file.c b/file.c
@@ -5437,6 +5437,8 @@ getshell(char *cmd)
Buffer *buf;
buf = loadcmdout(cmd, loadBuffer, NULL);
+ if (buf == NULL)
+ return NULL;
buf->filename = cmd;
buf->buffername = Sprintf("%s %s", SHELLBUFFERNAME,
conv_from_system(cmd))->ptr;
diff --git a/main.c b/main.c
@@ -4616,8 +4616,6 @@ execdict(char *word)
prevtrap = signal(SIGINT, intTrap);
crmode();
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();
if (buf == NULL) {
@@ -4628,7 +4626,11 @@ execdict(char *word)
disp_message(Sprintf("Word \"%s\" Not Found", word)->ptr, FALSE);
}
else {
+ buf->filename = w;
+ buf->buffername = Sprintf("%s %s", DICTBUFFERNAME, word)->ptr;
buf->bufferprop |= (BP_INTERNAL | BP_NO_URL);
+ if (buf->type == NULL)
+ buf->type = "text/plain";
pushBuffer(buf);
}
displayBuffer(Currentbuf, B_FORCE_REDRAW);