Secure: | ");
diff --git a/deflate.c b/deflate.c
new file mode 100644
index 0000000..0464cc6
--- /dev/null
+++ b/deflate.c
@@ -0,0 +1,58 @@
+
+#include
+#include
+#include
+
+#undef BUFSIZE
+#define BUFSIZE 4096
+
+int
+main(int argc, char **argv)
+{
+ z_stream s;
+ FILE *f;
+ char inbuf[BUFSIZE], outbuf[BUFSIZE];
+ int status, flush;
+
+ if (argc > 1) {
+ f = fopen(argv[1], "rb");
+ if (! f)
+ exit(1);
+ } else
+ f = stdin;
+
+ s.zalloc = Z_NULL;
+ s.zfree = Z_NULL;
+ s.opaque = Z_NULL;
+ status = deflateInit(&s, Z_DEFAULT_COMPRESSION);
+ if (status != Z_OK)
+ exit(1);
+ s.avail_in = 0;
+ s.next_out = outbuf;
+ s.avail_out = sizeof(outbuf);
+ flush = Z_NO_FLUSH;
+ while (1) {
+ if (s.avail_in == 0) {
+ s.next_in = inbuf;
+ s.avail_in = fread(inbuf, 1, sizeof(inbuf), f);
+ if (s.avail_in < sizeof(inbuf))
+ flush = Z_FINISH;
+ }
+ status = deflate(&s, flush);
+ if (status == Z_STREAM_END) {
+ if (sizeof(outbuf) - s.avail_out)
+ fwrite(outbuf, 1, sizeof(outbuf) - s.avail_out, stdout);
+ break;
+ }
+ if (status != Z_OK)
+ exit(1);
+ if (s.avail_out == 0) {
+ fwrite(outbuf, 1, sizeof(outbuf), stdout);
+ s.next_out = outbuf;
+ s.avail_out = sizeof(outbuf);
+ }
+ }
+ deflateEnd(&s);
+ fclose(f);
+ return 0;
+}
diff --git a/dict.c b/dict.c
deleted file mode 100644
index 9191152..0000000
--- a/dict.c
+++ /dev/null
@@ -1,137 +0,0 @@
-
-/*
- * From g96p0935@mse.waseda.ac.jp Mon Jun 14 09:34:15 1999 Received: from
- * ei5sun.yz.yamagata-u.ac.jp (ei5sun.yz.yamagata-u.ac.jp [133.24.114.42])
- * by ei5nazha.yz.yamagata-u.ac.jp (8.9.3/8.9.3) with ESMTP id JAA20673 for
- * ; Mon, 14 Jun 1999 09:34:14 +0900
- * (JST) Received: from pandora.mse.waseda.ac.jp
- * (root@pandora.mse.waseda.ac.jp [133.9.5.9]) by
- * ei5sun.yz.yamagata-u.ac.jp (8.8.0/3.5Wbeta) with ESMTP id JAA23968 for
- * ; Mon, 14 Jun 1999 09:35:30 +0900 (JST)
- * Received: from localhost (root@[133.9.85.55]) by pandora.mse.waseda.ac.jp
- * (8.9.1+3.0W/3.7W) with ESMTP id JAA18473; Mon, 14 Jun 1999 09:30:31 +0900
- * (JST) Message-Id: <199906140030.JAA18473@pandora.mse.waseda.ac.jp> To:
- * aito@ei5sun.yz.yamagata-u.ac.jp Subject: w3m:$B1QOB<-E58!:w5!G=Ec:\(B
- * Cc: g96p0935@mse.waseda.ac.jp From: Takashi Nishimoto
- * X-Mailer: Mew version 1.93 on Emacs 19.34 /
- * Mule 2.3 (SUETSUMUHANA) Mime-Version: 1.0 Content-Type: Text/Plain;
- * charset=iso-2022-jp Content-Transfer-Encoding: 7bit Date: Mon, 14 Jun
- * 1999 09:29:56 +0900 X-Dispatcher: imput version 980506 Lines: 150
- *
- * $B@>K\(B@$BAaBg$G$9!#(B
- *
- * Quick Hack $B$G(B w3m
- * $B$K1QOB<-E58!:w5!G=$HC18lC10L$N%+!<%=%k0\F0$r
-
-#ifdef DICT
-
-#define DICTCMD "w3mdict "
-#define DICTBUFFERNAME "*dictionary*"
-/* char *DICTBUFFERNAME="*dictionary*"; */
-
-char *
-GetWord(char *word)
-{
- Line *l = Currentbuf->currentLine;
- char *lb = l->lineBuf;
- int i, b, e, pos = Currentbuf->pos;
-
- i = pos;
- while (!IS_ALPHA(lb[i]) && i >= 0)
- i--;
- pos = i;
- while (IS_ALPHA(lb[i]) && i >= 0)
- i--;
- i++;
- if (!IS_ALPHA(lb[i]))
- return NULL;
- b = i;
- i = pos;
- while (IS_ALPHA(lb[i]) && i <= l->len - 1)
- i++;
- e = i - 1;
- strncpy(word, &lb[b], e - b + 1);
- word[e - b + 1] = '\0';
- return word;
-}
-
-void
-execdict(char *word)
-{
- Buffer *buf;
- static char cmd[100], bufname[100];
- MySignalHandler(*prevtrap) ();
-
- if (word == NULL)
- return;
- strcpy(cmd, DICTCMD);
- strcat(cmd, word);
- buf = namedBuffer(Firstbuf, SHELLBUFFERNAME);
- if (buf != NULL)
- Firstbuf = deleteBuffer(Firstbuf, buf);
-
- if (cmd == NULL || *cmd == '\0') {
- displayBuffer(Currentbuf, B_NORMAL);
- return;
- }
- prevtrap = signal(SIGINT, intTrap);
- crmode();
- buf = getshell(cmd);
-/* sprintf(bufname,"*dictionary(%s)*",word); */
-/* buf->buffername = bufname; */
- buf->buffername = DICTBUFFERNAME;
- buf->filename = word;
- signal(SIGINT, prevtrap);
- term_raw();
- if (buf == NULL) {
- disp_message("Execution failed", FALSE);
- }
- else if (buf->firstLine == NULL) {
- /* if the dictionary doesn't describe the word. */
- char msg[100];
- sprintf(msg, "Word \"%s\" Not Found", word);
- disp_message(msg, FALSE);
-
- }
- else {
- buf->nextBuffer = Firstbuf;
- Currentbuf = Firstbuf = buf;
- }
- displayBuffer(Currentbuf, B_FORCE_REDRAW);
-}
-
-void
-dictword(void)
-{
- execdict(inputStr("(dictionary)!", ""));
-}
-
-void
-dictwordat(void)
-{
- static char word[100];
- execdict(GetWord(word));
-}
-#endif /* DICT */
diff --git a/display.c b/display.c
index 80c9a3f..57739c9 100644
--- a/display.c
+++ b/display.c
@@ -1,4 +1,4 @@
-/* $Id: display.c,v 1.1 2001/11/08 05:14:32 a-ito Exp $ */
+/* $Id: display.c,v 1.2 2001/11/09 04:59:17 a-ito Exp $ */
#include
#include "fm.h"
@@ -148,20 +148,6 @@ fmTerm(void)
}
}
-void
-deleteFiles()
-{
- Buffer *buf;
- char *f;
- while (Firstbuf && Firstbuf != NO_BUFFER) {
- buf = Firstbuf->nextBuffer;
- discardBuffer(Firstbuf);
- Firstbuf = buf;
- }
- while ((f = popText(fileToDelete)) != NULL)
- unlink(f);
-}
-
/*
* Initialize routine.
@@ -171,12 +157,11 @@ fmInit(void)
{
if (!fmInitialized) {
initscr();
+#if defined( __CYGWIN__ ) && defined( JP_CHARSET )
+ init_win32_console_handle();
+#endif
term_raw();
term_noecho();
-#ifdef MOUSE
- if (use_mouse)
- mouse_init();
-#endif /* MOUSE */
}
fmInitialized = TRUE;
}
@@ -201,7 +186,7 @@ static Linecolor color_mode = 0;
static Buffer *save_current_buf = NULL;
#endif
-static int in_check_url = FALSE;
+int in_check_url = FALSE;
void
displayBuffer(Buffer * buf, int mode)
@@ -237,6 +222,11 @@ displayBuffer(Buffer * buf, int mode)
scroll(n);
}
else if (n < 0 && n > -LASTLINE) {
+#if defined(CYGWIN) && LANG == JA
+ move(LASTLINE + n + 1, 0);
+ clrtoeolx();
+ refresh();
+#endif /* defined(CYGWIN) && LANG == JA */
rscroll(-n);
}
redrawNLine(buf, n);
@@ -771,7 +761,7 @@ message_list_panel(void)
"List of error messages\n");
if (message_list)
for (p = message_list->last ; p ; p = p->prev)
- Strcat_m_charp(tmp, "", htmlquote_str(p->ptr), " | \n", NULL);
+ Strcat_m_charp(tmp, "", html_quote(p->ptr), " | \n", NULL);
else
Strcat_charp(tmp, "(no message recorded) | \n");
Strcat_charp(tmp, " |