diff options
Diffstat (limited to 'chat/i2cb/patches/patch-at')
-rw-r--r-- | chat/i2cb/patches/patch-at | 74 |
1 files changed, 71 insertions, 3 deletions
diff --git a/chat/i2cb/patches/patch-at b/chat/i2cb/patches/patch-at index e773297057a..389b9846228 100644 --- a/chat/i2cb/patches/patch-at +++ b/chat/i2cb/patches/patch-at @@ -1,16 +1,18 @@ -$NetBSD: patch-at,v 1.2 2010/03/04 21:40:29 spz Exp $ +$NetBSD: patch-at,v 1.3 2014/04/21 18:16:13 joerg Exp $ --- src/getline.c.orig 2000-03-15 22:13:28.000000000 +0000 +++ src/getline.c -@@ -5,7 +5,7 @@ +@@ -5,8 +5,8 @@ #include "icb.h" #include "externs.h" -char *getline (char *prompt, int expand); +-void handletab (int count, char c); +char *i2cb_getline (char *prompt, int expand); - void handletab (int count, char c); ++int handletab (int count, char c); /* get a line from the user, with input processing */ + /* returns chars in line, or 0 if user erased to beginning of line */ @@ -15,7 +15,7 @@ void handletab (int count, char c); static char *line_read = (char *)NULL; @@ -20,6 +22,33 @@ $NetBSD: patch-at,v 1.2 2010/03/04 21:40:29 spz Exp $ { linenumber = 0; /* If the buffer has already been allocated, return the memory +@@ -44,7 +44,7 @@ getline (char *prompt, int expand) + /* + * keystroke handler for tab key + */ +-void ++int + handletab (int count, char c) + { + char mpref[256]; +@@ -59,7 +59,7 @@ handletab (int count, char c) + /* make sure the history's not empty - punt if it is */ + if (histcount()==0) + { +- return; ++ return 0; + } + + /* remember cursor location */ +@@ -83,7 +83,7 @@ handletab (int count, char c) + } + else + printf("\007"); +- return; ++ return 0; + } + + /* starts with command character */ @@ -96,7 +96,7 @@ handletab (int count, char c) words++; for (i=0; i<rl_end; ++i) @@ -29,3 +58,42 @@ $NetBSD: patch-at,v 1.2 2010/03/04 21:40:29 spz Exp $ { term++; if (words==2) +@@ -126,7 +126,7 @@ handletab (int count, char c) + } + else + printf("\007"); +- return; ++ return 0; + } + + /* case 4 - nickname completion */ +@@ -135,7 +135,7 @@ handletab (int count, char c) + if (word2len > MAX_NICKLEN) + { + printf("\007"); +- return; ++ return 0; + } + + if (rl_line_buffer[word2]=='@') +@@ -162,7 +162,7 @@ handletab (int count, char c) + } + else + printf("\007"); +- return; ++ return 0; + } + + /* case 5 - replace nickname */ +@@ -189,9 +189,10 @@ handletab (int count, char c) + } + else + printf("\007"); +- return; ++ return 0; + } + + /* anything else */ + printf("\007"); ++ return 0; + } |