Package: minicom
Version: 2.4-2
Severity: normal
Tags: patch
I've tried configuring minicom to start with local echo enabled ("pu localecho
Yes" in the config file), but this doesn't work. Minicom's upper layer
recognizes this setting, but it isn't passed on to the vt100 layer. The
attached patch contains a fix.
-- System Information:
Debian Release: squeeze/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.35-rc6-amd64 (SMP w/2 CPU cores)
Locale: LANG=nl_BE.UTF-8, LC_CTYPE=nl_BE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages minicom depends on:
ii libc6 2.11.2-2 Embedded GNU C Library: Shared lib
ii libncurses5 5.7+20100313-2 shared libraries for terminal hand
Versions of packages minicom recommends:
ii lrzsz 0.12.21-5 Tools for zmodem/xmodem/ymodem fil
minicom suggests no packages.
-- no debconf information
diff --git a/src/main.c b/src/main.c
index e3f6e45..d445958 100644
--- a/src/main.c
+++ b/src/main.c
@@ -387,7 +387,7 @@ void init_emul(int type, int do_init)
/* Install and reset the terminal emulator. */
if (do_init) {
vt_install(do_output, kb_handler, us);
- vt_init(type, tfcolor, tbcolor, us->wrap, addlf);
+ vt_init(type, tfcolor, tbcolor, us->wrap, addlf, local_echo);
} else
vt_pinit(us, -1, -1);
diff --git a/src/vt100.c b/src/vt100.c
index 12fb21a..4a0263b 100644
--- a/src/vt100.c
+++ b/src/vt100.c
@@ -197,7 +197,7 @@ void vt_pinit(WIN *win, int fg, int bg)
}
/* Set characteristics of emulator. */
-void vt_init(int type, int fg, int bg, int wrap, int add)
+void vt_init(int type, int fg, int bg, int wrap, int add, int echo)
{
vt_type = type;
if (vt_type == ANSI) {
@@ -219,7 +219,7 @@ void vt_init(int type, int fg, int bg, int wrap, int add)
mc_wresetregion(vt_win);
vt_keypad = NORMAL;
vt_cursor = NORMAL;
- vt_echo = 0;
+ vt_echo = echo;
vt_tabs[0] = 0x01010100;
vt_tabs[1] =
vt_tabs[2] =
@@ -375,7 +375,7 @@ static void state1(int c)
if (vt_wrap != -1)
vt_win->wrap = vt_wrap;
vt_crlf = vt_insert = 0;
- vt_init(vt_type, vt_fg, vt_bg, vt_win->wrap, 0);
+ vt_init(vt_type, vt_fg, vt_bg, vt_win->wrap, 0, 0);
mc_wlocate(vt_win, 0, 0);
break;
case 'H': /* Set tab in current position */
diff --git a/src/vt100.h b/src/vt100.h
index c0f4207..f1944ef 100644
--- a/src/vt100.h
+++ b/src/vt100.h
@@ -31,7 +31,7 @@ extern int vt_nl_delay; /* Delay after CR key */
/* Prototypes from vt100.c */
void vt_install(void(*)(const char *, int), void (*)(int, int), WIN *);
-void vt_init(int, int, int, int, int);
+void vt_init(int, int, int, int, int, int);
void vt_pinit(WIN *, int, int);
void vt_set(int, int, int, int, int, int, int);
void vt_out(int);