diff options
author | joerg <joerg> | 2014-04-21 18:16:13 +0000 |
---|---|---|
committer | joerg <joerg> | 2014-04-21 18:16:13 +0000 |
commit | 78b96fc276ff789dd5f360865d273aaed587f199 (patch) | |
tree | a1bcf2409fb9144362d1b937a55932a231dc00a0 /chat | |
parent | 5acdae70dfcd3e1e01a7eeb4c707912b370927b9 (diff) | |
download | pkgsrc-78b96fc276ff789dd5f360865d273aaed587f199.tar.gz |
Fix readline use.
Diffstat (limited to 'chat')
-rw-r--r-- | chat/i2cb/distinfo | 7 | ||||
-rw-r--r-- | chat/i2cb/patches/patch-ac | 12 | ||||
-rw-r--r-- | chat/i2cb/patches/patch-at | 74 | ||||
-rw-r--r-- | chat/i2cb/patches/patch-src_readlineinit.c | 17 |
4 files changed, 102 insertions, 8 deletions
diff --git a/chat/i2cb/distinfo b/chat/i2cb/distinfo index b76b748dc7d..70055df4f3a 100644 --- a/chat/i2cb/distinfo +++ b/chat/i2cb/distinfo @@ -1,11 +1,11 @@ -$NetBSD: distinfo,v 1.14 2013/08/31 14:45:43 joerg Exp $ +$NetBSD: distinfo,v 1.15 2014/04/21 18:16:13 joerg Exp $ SHA1 (i2cb-6.0_ALPHA.tar.gz) = 6d2ddd234403fe33426ece3fd4de4104cf1a6257 RMD160 (i2cb-6.0_ALPHA.tar.gz) = 2c0683c20939fe5709fa08b6e335cbee2574ecd8 Size (i2cb-6.0_ALPHA.tar.gz) = 73607 bytes SHA1 (patch-aa) = 4822a49729fe6e0a6a3d9554a0386c94fd099b39 SHA1 (patch-ab) = 358b366c16290d6d2326e72c281f977e49a8a98b -SHA1 (patch-ac) = 4af6dd69e6dd3757cb2ba35eebea8a3a9615a570 +SHA1 (patch-ac) = 9eba04f74fb94f555e5434885eda49be53b894d5 SHA1 (patch-ad) = 9dcb98fe3543d8e4a7b2af338606db8ffe271f56 SHA1 (patch-ae) = 0f8765883c2b7e77394556405ee7fee7a054ad56 SHA1 (patch-af) = 821de5d1a9a8a1e3dfb5de4ef92737f40f01e03e @@ -22,7 +22,7 @@ SHA1 (patch-ap) = f04fea14ab6a07095f6b2f95c693988563aa4f3a SHA1 (patch-aq) = f07edc14636f1321f8c0b5c98e4962f3bfb1eee5 SHA1 (patch-ar) = 9fea79c9d7f701962e40f1b311c38b538029e633 SHA1 (patch-as) = 04caba156b07ef94552227b434ed51b83123b078 -SHA1 (patch-at) = 2eeaa4dc6e8fd4e31f91b5b8a7004681465925f5 +SHA1 (patch-at) = 3f296af5201612777491b3c95d44a1840bc5c8e0 SHA1 (patch-au) = 591bae1fcfe43ba86ec29c5ca53322bad5b572e7 SHA1 (patch-av) = 3ebe9872953147e9694f36e76584482167d2f34a SHA1 (patch-aw) = 27e6c09d15f7f0ece6337c6c14d66de2424a4068 @@ -31,4 +31,5 @@ SHA1 (patch-ay) = 442fdc77dfe58676c17212d4343ffba42ce44b8b SHA1 (patch-az) = 7e0cd06b7085bbbf451bedf406564f30c82a5aaf SHA1 (patch-src_Makefile) = 1870de457bd29681313a72d6a977b69be5d42bd7 SHA1 (patch-src_oset.c) = db0d3dbf3bd062330e548dc3507a486677931f16 +SHA1 (patch-src_readlineinit.c) = 1a40db69bdea5d0d3cb96a817d502b0c08499721 SHA1 (patch-src_signals.c) = 9a9070a8c6f7350711e340cb6c18b59dfdf8f2ce diff --git a/chat/i2cb/patches/patch-ac b/chat/i2cb/patches/patch-ac index f79b57d710a..b6a6a843b16 100644 --- a/chat/i2cb/patches/patch-ac +++ b/chat/i2cb/patches/patch-ac @@ -1,4 +1,4 @@ -$NetBSD: patch-ac,v 1.5 2012/12/24 03:11:25 dholland Exp $ +$NetBSD: patch-ac,v 1.6 2014/04/21 18:16:13 joerg Exp $ - don't use "restrict" as an identifier, it's a keyword now - ...? (XXX) @@ -31,7 +31,7 @@ $NetBSD: patch-ac,v 1.5 2012/12/24 03:11:25 dholland Exp $ void copenmsg (char *pkt); void cpersonalmsg (char *pkt); void csendopen (char *txt); -@@ -79,7 +82,7 @@ void echo (void); +@@ -79,14 +82,14 @@ void echo (void); void errormsg (char *pkt); void exitmsg (void); char *findspace (char *s); @@ -40,6 +40,14 @@ $NetBSD: patch-ac,v 1.5 2012/12/24 03:11:25 dholland Exp $ char *getloginid (void); char *getswitch (int argc, char **argv, char **switchv); void getterm (void); + void gettime (void); + void getwinsize (void); + char *getword (char *s); +-void handletab (int count, char c); ++int handletab (int count, char c); + void histclear (void); + int histcount (void); + void histdel (char *name); @@ -115,7 +118,7 @@ void quoteify (char *a, char *b); void readlineinit (void); void regnick (char *password); 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; + } diff --git a/chat/i2cb/patches/patch-src_readlineinit.c b/chat/i2cb/patches/patch-src_readlineinit.c new file mode 100644 index 00000000000..44e9b13e622 --- /dev/null +++ b/chat/i2cb/patches/patch-src_readlineinit.c @@ -0,0 +1,17 @@ +$NetBSD: patch-src_readlineinit.c,v 1.1 2014/04/21 18:16:13 joerg Exp $ + +--- src/readlineinit.c.orig 2014-04-20 18:25:41.000000000 +0000 ++++ src/readlineinit.c +@@ -20,9 +20,9 @@ char *editor; + * bind the tab key + */ + +-rl_bind_key_in_map('\t', (Function *)handletab, vi_insertion_keymap); +-rl_bind_key_in_map('\t', (Function *)handletab, vi_movement_keymap); +-rl_bind_key_in_map('\t', (Function *)handletab, emacs_standard_keymap); ++rl_bind_key_in_map('\t', handletab, vi_insertion_keymap); ++rl_bind_key_in_map('\t', handletab, vi_movement_keymap); ++rl_bind_key_in_map('\t', handletab, emacs_standard_keymap); + + rl_vi_editing_mode(0, ' '); /* default to vi, dammit. */ + gv.editmode = "vi"; |