summaryrefslogtreecommitdiff
path: root/net/omnitty/files/patch-main.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/omnitty/files/patch-main.c')
-rw-r--r--net/omnitty/files/patch-main.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/net/omnitty/files/patch-main.c b/net/omnitty/files/patch-main.c
index 5505e23d4ad6..eb93bfa2ccb7 100644
--- a/net/omnitty/files/patch-main.c
+++ b/net/omnitty/files/patch-main.c
@@ -1,5 +1,13 @@
--- main.c.orig 2005-10-26 06:08:25.000000000 +0800
+++ main.c 2011-04-22 23:14:33.000000000 +0800
+@@ -36,6 +36,7 @@
+ /* minimum terminal dimensions to run program */
+ #define MIN_REQUIRED_WIDTH 80
+ #define MIN_REQUIRED_HEIGHT 25
++#define MAX_HOSTNAME_LENGTH 64
+
+ #define REMINDER_LINE "OmNiTTY-R v" OMNITTY_VERSION \
+ " \007F1\007:menu \006F2/3\007:sel \003F4\007:tag" \
@@ -88,6 +88,12 @@
define_key("\e[15~", KEY_F(5)); define_key("\e[17~", KEY_F(6));
define_key("\e[18~", KEY_F(7)); define_key("\e[19~", KEY_F(8));
@@ -13,6 +21,19 @@
getmaxyx(stdscr, h, w);
if (h < MIN_REQUIRED_HEIGHT || w < MIN_REQUIRED_WIDTH) {
+@@ -288,10 +289,10 @@
+ }
+
+ static void add_machine() {
+- static char buf[32];
++ static char buf[MAX_HOSTNAME_LENGTH];
+
+ *buf = 0;
+- if (minibuf_prompt(minibuf, "Add: ", 0xE0, buf, 32)) {
++ if (minibuf_prompt(minibuf, "Add: ", 0xE0, buf, sizeof(buf))) {
+ if (*buf == '@') add_machines_from_file(buf+1);
+ else machmgr_add(buf);
+ }
@@ -335,9 +341,10 @@
while (!quit) {