Fix build with clang by using more void and proper return values.
This commit is contained in:
parent
aadc3673e9
commit
84a8af1e40
21 changed files with 1448 additions and 82 deletions
|
@ -1,30 +1,30 @@
|
|||
$NetBSD: distinfo,v 1.14 2012/02/16 14:13:15 hans Exp $
|
||||
$NetBSD: distinfo,v 1.15 2013/01/11 13:24:32 joerg Exp $
|
||||
|
||||
SHA1 (icb-5.0.9.tar.gz) = 151430ad7fe3e9787627b31f6551bf1f398b1bd8
|
||||
RMD160 (icb-5.0.9.tar.gz) = 8184620d7abf71fa38315fa14aa5345b6981c9bf
|
||||
Size (icb-5.0.9.tar.gz) = 357565 bytes
|
||||
SHA1 (patch-aa) = b82fb642c79a200aaa47b0db397c82f19fb7f9ff
|
||||
SHA1 (patch-ab) = 636e02532dc3f3f5049e9806e102de580d136177
|
||||
SHA1 (patch-ac) = 9748f2edb74e208034873eff117bdff8b30a06ca
|
||||
SHA1 (patch-ac) = 99631dd1c526d5a07339205bad031003f6920495
|
||||
SHA1 (patch-ad) = b64e9ca73b5e56122cb82363ee9c765457bde5ca
|
||||
SHA1 (patch-ae) = c98d058cfe6177fb4807104695f96c774b11d177
|
||||
SHA1 (patch-af) = b16cdbbd6d4a5489b19bb3339b6cd8d95b5395d9
|
||||
SHA1 (patch-ag) = d9d1a36a381829b4a5593d666185f79722a33697
|
||||
SHA1 (patch-ah) = 464f3a3de74f049187d8e6702c6e060b4fe03146
|
||||
SHA1 (patch-ah) = f19c304314ee787cdf0a0123fbcfe869f6ded062
|
||||
SHA1 (patch-ai) = 11322bc2753dd6921272b2e64554349bb7aa6c5c
|
||||
SHA1 (patch-aj) = 1ba8c916513b449bede0330026b9f844d03d9a2f
|
||||
SHA1 (patch-aj) = ba804422123bbc61a2ff2edf7429cd06678bb189
|
||||
SHA1 (patch-ak) = 8e363cc6c5647c064d56ec75b8b627d7d9a07a72
|
||||
SHA1 (patch-al) = 2133e12939f26a875b6f3e74221767adf6451c58
|
||||
SHA1 (patch-am) = 58ce219463d2cdb0306a664b383015096938e6d6
|
||||
SHA1 (patch-an) = d66e16511fbfe4f51ba2f7f77a4a67087470342a
|
||||
SHA1 (patch-al) = a47617dd948fa972d0bab604514e4a47af117c55
|
||||
SHA1 (patch-am) = b389f93a4cdb105e5dbbc5e97f642c7fff328f0d
|
||||
SHA1 (patch-an) = 4213261b8bb5638a789371ba1eb12923453741a5
|
||||
SHA1 (patch-ao) = a798b898e3527f7a4458c6e278e86ef69bb38a53
|
||||
SHA1 (patch-ap) = 794d608ac548bc1b5c83b7bf967ed43e5cee65be
|
||||
SHA1 (patch-aq) = 78b772a2f6ec27a782b1681a61a2329992dcc741
|
||||
SHA1 (patch-ar) = 7fa954914f8c0fdad4f610f37dd81129ec57bc14
|
||||
SHA1 (patch-ar) = 739e982d907a5063ebd75ed080ffa5e32f9ef58a
|
||||
SHA1 (patch-as) = 5c42bfdc2e836fb86e814c396760040560864256
|
||||
SHA1 (patch-at) = 703abcc2415b92776241011fe893286de06da034
|
||||
SHA1 (patch-au) = 2052ef3b8c28150700e0ba287162b0c62d53a90f
|
||||
SHA1 (patch-av) = 2bef35b6868697c8b95a923e5ccf8ff900175b25
|
||||
SHA1 (patch-au) = c67a2640e96d9670e0e0f8d0381fb1ad139e15a4
|
||||
SHA1 (patch-av) = 65e914e11087953cdd9a9b681152ca108ba64323
|
||||
SHA1 (patch-aw) = 6dbc66a63f52244ac9b8b29346cb376b98442695
|
||||
SHA1 (patch-ax) = 6dc671de0abe01139fdaa193bd1c627b2d74cfb9
|
||||
SHA1 (patch-ay) = f8a787d5a6611890d65fa8b0411977fd5c0bc7e9
|
||||
|
@ -38,17 +38,24 @@ SHA1 (patch-bf) = 4e65811b06f100659c83a3c6a95fa0ba5732f991
|
|||
SHA1 (patch-bg) = 30c13a23de9e1e232e69011755e788d9a1df1f20
|
||||
SHA1 (patch-bh) = 5e24c606b9ee9656b15d66a4611d732b563cc831
|
||||
SHA1 (patch-bi) = cc92516799335123f6ac0d37380a428e9a88063d
|
||||
SHA1 (patch-bj) = 082e74059e3c2f91f5a56b5d100e4cdedd00340f
|
||||
SHA1 (patch-bj) = af62a5bef6a3bac7cdd22e3aca7f1eeb50b15b29
|
||||
SHA1 (patch-bk) = caab3a28f9e05f7e3321d5b56ad3dd47ee3e3b40
|
||||
SHA1 (patch-bl) = cef6d92a02bb6080a9121f2ecbd36c4b15777a68
|
||||
SHA1 (patch-bm) = 1171ce0885693b198d8d7ad8960c55dec4604aa0
|
||||
SHA1 (patch-bn) = 57972d7c9712755833dc97559edded528e38aa97
|
||||
SHA1 (patch-bo) = 03f940e1ebfcfa4c33e84852d9d4852f8c9da92a
|
||||
SHA1 (patch-bp) = f79cfc4a9bd18397611e3dd46b4b85675054da6c
|
||||
SHA1 (patch-bq) = bdb076f4aaed118baa893297aa98f10e9aa6cb28
|
||||
SHA1 (patch-br) = f0cc8e6fb3e83076a0160b455e64cfe82f297f44
|
||||
SHA1 (patch-bq) = df24d4eae25858bb5d0aa054f3d0bf2fd834714a
|
||||
SHA1 (patch-br) = b0670b6ad7e91d5502598f25f66fc7b5d0b5afb8
|
||||
SHA1 (patch-bs) = c0b5a045b02e9630d2dda713b5d54b780ed2d5de
|
||||
SHA1 (patch-bt) = a5eb739d19170e2af57cafc81e8adaf5e27b85a8
|
||||
SHA1 (patch-bt) = 1e16a2fd21f65fb1da680e2ea2e1efd891c40b27
|
||||
SHA1 (patch-icb_c__hush.c) = cdfe910a11d3ceace118d01edc4eb0d2f05c4058
|
||||
SHA1 (patch-icb_c__replay.c) = a1c6b9245202819e5ed79ec99df14abbc010fed0
|
||||
SHA1 (patch-icb_msgs.c) = 06619b7a260d8f761109f1b54fffa674b71c34d9
|
||||
SHA1 (patch-icb_parse.c) = 5ed95b8cbd409323683fdc6364b934e8ccaa7a23
|
||||
SHA1 (patch-icb_signals.c) = 1b648d7137ad361e43d4cd472fe811d16ec5cac7
|
||||
SHA1 (patch-murgil_contoport.c) = 2ee05addd21be0d906b5147efac1f48841d72298
|
||||
SHA1 (patch-murgil_makeport.c) = cacfa30605bcc688a8a48f6152527de82d04a9c8
|
||||
SHA1 (patch-readline_funmap.c) = 262d16194937918928963d1809f683f91419eff0
|
||||
SHA1 (patch-readline_keymaps.c) = 3f9534f18bbfbbdb11d66ca9db390524af252ac0
|
||||
SHA1 (patch-readline_vi__mode.c) = 48ed2f4a0070491014e940bcc9a6edffa986cb2a
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
$NetBSD: patch-ac,v 1.3 2012/02/16 14:13:15 hans Exp $
|
||||
$NetBSD: patch-ac,v 1.4 2013/01/11 13:24:32 joerg Exp $
|
||||
|
||||
--- icb/c_log.c.orig 1995-02-24 16:20:18.000000000 -0500
|
||||
+++ icb/c_log.c 2008-12-16 20:17:59.000000000 -0500
|
||||
--- icb/c_log.c.orig 1995-02-24 21:20:18.000000000 +0000
|
||||
+++ icb/c_log.c
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "icb.h"
|
||||
#include "externs.h"
|
||||
|
@ -58,6 +58,15 @@ $NetBSD: patch-ac,v 1.3 2012/02/16 14:13:15 hans Exp $
|
|||
putl(mbuf, PL_SCR | PL_LOG);
|
||||
|
||||
return(0);
|
||||
@@ -107,7 +98,7 @@ char *path;
|
||||
|
||||
/* close the logfile */
|
||||
|
||||
-closesessionlog()
|
||||
+void closesessionlog(void)
|
||||
{
|
||||
char *aptr, *ampm();
|
||||
time_t time();
|
||||
@@ -126,8 +117,8 @@ closesessionlog()
|
||||
aptr++;
|
||||
|
||||
|
|
|
@ -1,10 +1,14 @@
|
|||
$NetBSD: patch-ah,v 1.3 2008/12/17 02:19:59 christos Exp $
|
||||
$NetBSD: patch-ah,v 1.4 2013/01/11 13:24:32 joerg Exp $
|
||||
|
||||
--- icb/history.c.orig 1995-02-24 16:20:23.000000000 -0500
|
||||
+++ icb/history.c 2008-12-16 20:18:00.000000000 -0500
|
||||
@@ -19,7 +19,6 @@
|
||||
histput(nick)
|
||||
char *nick;
|
||||
--- icb/history.c.orig 1995-02-24 21:20:23.000000000 +0000
|
||||
+++ icb/history.c
|
||||
@@ -16,10 +16,8 @@ static STRLIST *hp = (STRLIST *) 0; /* u
|
||||
/* add a username to the list */
|
||||
/* called whenever a user sends a personal message to another */
|
||||
|
||||
-histput(nick)
|
||||
-char *nick;
|
||||
+void histput(char *nick)
|
||||
{
|
||||
- char *malloc();
|
||||
STRLIST *sp;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
$NetBSD: patch-aj,v 1.3 2008/12/17 02:19:59 christos Exp $
|
||||
$NetBSD: patch-aj,v 1.4 2013/01/11 13:24:32 joerg Exp $
|
||||
|
||||
--- icb/oset.c.orig 1995-02-24 16:20:24.000000000 -0500
|
||||
+++ icb/oset.c 2008-12-16 20:18:00.000000000 -0500
|
||||
@@ -39,6 +39,7 @@
|
||||
--- icb/oset.c.orig 1995-02-24 21:20:24.000000000 +0000
|
||||
+++ icb/oset.c
|
||||
@@ -39,6 +39,7 @@ VARIABLE vars[] = {
|
||||
{ "pagesize", V_INT, (char *)&gv.pagesize },
|
||||
{ "pauseonshell", V_BOOLEAN, (char *)&gv.pauseonshell },
|
||||
{ "personalto", V_STRING, (char *)&gv.personalto },
|
||||
|
@ -10,7 +10,16 @@ $NetBSD: patch-aj,v 1.3 2008/12/17 02:19:59 christos Exp $
|
|||
{ "restricted", V_BOOLEAN, (char *)&gv.restricted },
|
||||
{ "tabreply", V_BOOLEAN, (char *)&gv.tabreply },
|
||||
{ "timedisplay", V_STRING, (char *)&gv.timedisplay },
|
||||
@@ -140,7 +141,7 @@
|
||||
@@ -70,7 +71,7 @@ TARGDEFS
|
||||
if (gv.restricted)
|
||||
TRETURNERR("oset: restricted mode can't be reset")
|
||||
else {
|
||||
- restrict();
|
||||
+ restricted();
|
||||
return(TCL_OK);
|
||||
}
|
||||
}
|
||||
@@ -140,7 +141,7 @@ char *s;
|
||||
{
|
||||
int zero = 0, one = 1;
|
||||
int tmp;
|
||||
|
@ -19,3 +28,12 @@ $NetBSD: patch-aj,v 1.3 2008/12/17 02:19:59 christos Exp $
|
|||
|
||||
switch(type) {
|
||||
case V_CHAR:
|
||||
@@ -312,7 +313,7 @@ varsanity()
|
||||
|
||||
}
|
||||
|
||||
-restrict()
|
||||
+restricted()
|
||||
{
|
||||
gv.restricted = 1;
|
||||
tclrestrict();
|
||||
|
|
|
@ -1,8 +1,31 @@
|
|||
$NetBSD: patch-al,v 1.4 2012/02/16 14:13:15 hans Exp $
|
||||
$NetBSD: patch-al,v 1.5 2013/01/11 13:24:32 joerg Exp $
|
||||
|
||||
--- icb/protos.h.orig 1995-02-24 21:20:25.000000000 +0000
|
||||
+++ icb/protos.h
|
||||
@@ -49,7 +49,7 @@ int filtertext(char *s);
|
||||
@@ -19,7 +19,7 @@ char *strscat(int va_alist,...);
|
||||
char *tildexpand(char *s);
|
||||
int addusage(char *name, int type, char *args, char *usage);
|
||||
sighandler askquit();
|
||||
-int beep(char *pkt);
|
||||
+void beep(char *pkt);
|
||||
int bufferadd(char *text);
|
||||
int bufferlist(int lines);
|
||||
int c_help(char *clientData, Tcl_Interp *interp, int argc, char *argv[]);
|
||||
@@ -34,10 +34,10 @@ int c_usage(char *clientData, Tcl_Interp
|
||||
char *catargs(char **argv);
|
||||
int cimatch(char *s1, char *s2);
|
||||
int clearargs(int argc, char *argv[]);
|
||||
-int closesessionlog(void);
|
||||
+void closesessionlog(void);
|
||||
int cmdoutmsg(char *pkt);
|
||||
-int copenmsg(char *pkt);
|
||||
-int cpersonalmsg(char *pkt);
|
||||
+void copenmsg(char *pkt);
|
||||
+void cpersonalmsg(char *pkt);
|
||||
int csendopen(char *txt);
|
||||
int deleteusage(char *name);
|
||||
int dispatch(char *pkt);
|
||||
@@ -49,22 +49,23 @@ int filtertext(char *s);
|
||||
int fnexit(void);
|
||||
int fnterm(void);
|
||||
int oset(char *clientData, Tcl_Interp *interp, int argc, char *argv[]);
|
||||
|
@ -11,7 +34,18 @@ $NetBSD: patch-al,v 1.4 2012/02/16 14:13:15 hans Exp $
|
|||
int getterm(void);
|
||||
int getwinsize(void);
|
||||
int gunlink(USAGE *u, USAGE **first, USAGE **last);
|
||||
@@ -64,7 +64,7 @@ int importantmsg(char *pkt);
|
||||
int helpme(char *subject);
|
||||
int helptoc(void);
|
||||
int histcount(void);
|
||||
-int histput(char *nick);
|
||||
+void histput(char *nick);
|
||||
int hushadd(Tcl_Interp *interp, char *nick);
|
||||
int hushdelete(Tcl_Interp *interp, char *nick);
|
||||
-int hushlist(void);
|
||||
-int importantmsg(char *pkt);
|
||||
+void hushlist(void);
|
||||
+void importantmsg(char *pkt);
|
||||
+void icbterm(void);
|
||||
int inserttab(void);
|
||||
int ishushed(char *nick);
|
||||
int lcaseit(char *s);
|
||||
|
@ -20,25 +54,49 @@ $NetBSD: patch-al,v 1.4 2012/02/16 14:13:15 hans Exp $
|
|||
int linebuffer(FILE *fp);
|
||||
#else
|
||||
int linebuffer(struct _iobuf *fp);
|
||||
@@ -78,7 +78,7 @@ int mbreakprint(int per, char *from, cha
|
||||
@@ -77,18 +78,18 @@ int main(int argc, char **argv);
|
||||
int mbreakprint(int per, char *from, char *s);
|
||||
int mprint(int per, char *from, char *s);
|
||||
int numeric(char *txt);
|
||||
int parse(char *s);
|
||||
-int parse(char *s);
|
||||
-int pauseprompt(char *prompt, int erase, int c, int unget, int except);
|
||||
+void parse(char *s);
|
||||
+int pauseprompt(char *prompt, int erase, int c, int unget, char *except);
|
||||
int printcutetime(void);
|
||||
int printmilitarytime(void);
|
||||
int printnormaltime(void);
|
||||
@@ -107,7 +107,7 @@ int specialchar(register int c, char *s,
|
||||
int printvar(char *name, int type, char *address);
|
||||
-int protomsg(char *pkt);
|
||||
+void protomsg(char *pkt);
|
||||
int pushback(int c);
|
||||
int putl(char *s, int flags);
|
||||
int quoteify(char *a, char *b);
|
||||
-int restoreterm(void);
|
||||
-int restrict(void);
|
||||
+void restoreterm(void);
|
||||
+int restricted(void);
|
||||
int s_admin(char *clientData, Tcl_Interp *interp, int argc, char *argv[]);
|
||||
int s_beep(char *clientData, Tcl_Interp *interp, int argc, char *argv[]);
|
||||
int s_group(char *clientData, Tcl_Interp *interp, int argc, char *argv[]);
|
||||
@@ -100,14 +101,14 @@ int s_who(char *clientData, Tcl_Interp *
|
||||
int saysomething(void);
|
||||
int sendcmd(char *cmd, char *args);
|
||||
int sendlogin(char *id, char *nick, char *group, char *command, char *passwd);
|
||||
-int sendpersonal(char *nick, char *text, int echoflag);
|
||||
+void sendpersonal(char *nick, char *text, int echoflag);
|
||||
int sendpong(void);
|
||||
int setvar(Tcl_Interp *interp, int type, char *address, char *s);
|
||||
int specialchar(register int c, char *s, char *prompt, int expand);
|
||||
int split(char *s);
|
||||
int startsessionlog(Tcl_Interp *interp, char *path);
|
||||
int statusmsg(char *pkt);
|
||||
-int statusmsg(char *pkt);
|
||||
-int strcasecmp(char *s1, char *s2);
|
||||
+void statusmsg(char *pkt);
|
||||
+int strcasecmp(const char *s1, const char *s2);
|
||||
int strcicmp(char *s1, char *s2);
|
||||
int strcincmp(char *s1, char *s2, int n);
|
||||
int strlinkafter(STRLIST *s, STRLIST *i, STRLIST **head, STRLIST **tail);
|
||||
@@ -115,7 +115,7 @@ int strlinkalpha(STRLIST *s, STRLIST **h
|
||||
@@ -115,11 +116,11 @@ int strlinkalpha(STRLIST *s, STRLIST **h
|
||||
int strlinkbefore(STRLIST *s, STRLIST *i, STRLIST **head, STRLIST **tail);
|
||||
int strlinkhead(STRLIST *s, STRLIST **head, STRLIST **tail);
|
||||
int strlinktail(STRLIST *s, STRLIST **head, STRLIST **tail);
|
||||
|
@ -47,7 +105,12 @@ $NetBSD: patch-al,v 1.4 2012/02/16 14:13:15 hans Exp $
|
|||
int strunlink(STRLIST *s, STRLIST **head, STRLIST **tail);
|
||||
sighandler suspend();
|
||||
int tclinit(void);
|
||||
@@ -140,3 +140,4 @@ struct server *getserver(void);
|
||||
-int tclreadicbrc(void);
|
||||
+void tclreadicbrc(void);
|
||||
int tclrestrict(void);
|
||||
int trapsignals(void);
|
||||
int uline(USAGE *u);
|
||||
@@ -140,3 +141,4 @@ struct server *getserver(void);
|
||||
struct server *getservbyname(char *name);
|
||||
void listservers(void);
|
||||
sighandler icbexit();
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
$NetBSD: patch-am,v 1.3 2008/12/17 02:19:59 christos Exp $
|
||||
$NetBSD: patch-am,v 1.4 2013/01/11 13:24:32 joerg Exp $
|
||||
|
||||
--- icb/readlineinit.c.orig 1995-02-24 16:20:25.000000000 -0500
|
||||
+++ icb/readlineinit.c 2008-12-16 20:18:01.000000000 -0500
|
||||
--- icb/readlineinit.c.orig 1995-02-24 21:20:25.000000000 +0000
|
||||
+++ icb/readlineinit.c
|
||||
@@ -1,4 +1,6 @@
|
||||
#include <readline.h>
|
||||
+#include <stdlib.h>
|
||||
|
@ -9,7 +9,16 @@ $NetBSD: patch-am,v 1.3 2008/12/17 02:19:59 christos Exp $
|
|||
#include "icb.h"
|
||||
#include "externs.h"
|
||||
|
||||
@@ -21,12 +23,12 @@
|
||||
@@ -9,7 +11,7 @@
|
||||
readlineinit()
|
||||
{
|
||||
char *editor;
|
||||
-int handletab();
|
||||
+int handletab(int, int);
|
||||
|
||||
/*
|
||||
* bind the tab key
|
||||
@@ -21,12 +23,12 @@ rl_bind_key_in_map('\t', handletab, emac
|
||||
rl_vi_editing_mode(); /* default to vi, dammit. */
|
||||
gv.editmode = "vi";
|
||||
|
||||
|
|
|
@ -1,10 +1,15 @@
|
|||
$NetBSD: patch-an,v 1.4 2008/12/17 02:19:59 christos Exp $
|
||||
$NetBSD: patch-an,v 1.5 2013/01/11 13:24:32 joerg Exp $
|
||||
|
||||
$NetBSD: patch-an,v 1.4 2008/12/17 02:19:59 christos Exp $
|
||||
--- readline/readline.c.orig 1995-02-24 21:20:03.000000000 +0000
|
||||
+++ readline/readline.c
|
||||
@@ -38,17 +38,25 @@ static char *xmalloc (), *xrealloc ();
|
||||
# endif
|
||||
#endif
|
||||
|
||||
--- readline/readline.c.orig 1995-02-24 16:20:03.000000000 -0500
|
||||
+++ readline/readline.c 2006-05-15 10:41:51.000000000 -0400
|
||||
@@ -43,12 +43,18 @@
|
||||
+#include <unistd.h>
|
||||
+#include <termcap.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/file.h>
|
||||
#include <signal.h>
|
||||
|
@ -23,7 +28,7 @@ $NetBSD: patch-an,v 1.4 2008/12/17 02:19:59 christos Exp $
|
|||
#define HAVE_BSD_SIGNALS
|
||||
/* #define USE_XON_XOFF */
|
||||
|
||||
@@ -80,6 +86,10 @@
|
||||
@@ -80,6 +88,10 @@ static char *xmalloc (), *xrealloc ();
|
||||
# if !defined (O_NDELAY)
|
||||
# define O_NDELAY O_NONBLOCK /* Posix-style non-blocking i/o */
|
||||
# endif /* O_NDELAY */
|
||||
|
@ -34,7 +39,7 @@ $NetBSD: patch-an,v 1.4 2008/12/17 02:19:59 christos Exp $
|
|||
#endif /* _POSIX_VERSION */
|
||||
|
||||
/* Other (BSD) machines use sgtty. */
|
||||
@@ -104,7 +114,6 @@
|
||||
@@ -104,7 +116,6 @@ static char *xmalloc (), *xrealloc ();
|
||||
#endif /* !NEW_TTY_DRIVER && !_POSIX_VDISABLE */
|
||||
|
||||
#include <errno.h>
|
||||
|
@ -42,7 +47,7 @@ $NetBSD: patch-an,v 1.4 2008/12/17 02:19:59 christos Exp $
|
|||
|
||||
#include <setjmp.h>
|
||||
#if defined (SHELL)
|
||||
@@ -133,7 +142,7 @@
|
||||
@@ -133,7 +144,7 @@ struct passwd *getpwuid (), *getpwent ()
|
||||
# endif /* USGr3 */
|
||||
#endif /* USG && hpux */
|
||||
|
||||
|
@ -51,7 +56,23 @@ $NetBSD: patch-an,v 1.4 2008/12/17 02:19:59 christos Exp $
|
|||
# include <dirent.h>
|
||||
# define direct dirent
|
||||
# if defined (_POSIX_VERSION)
|
||||
@@ -280,7 +289,7 @@
|
||||
@@ -204,10 +215,13 @@ extern char *index ();
|
||||
extern char *getenv ();
|
||||
extern char *tilde_expand ();
|
||||
|
||||
-static update_line ();
|
||||
+static void update_line (char *, char *, int);
|
||||
static void output_character_function ();
|
||||
-static delete_chars ();
|
||||
+static void delete_chars (int);
|
||||
static insert_some_chars ();
|
||||
+static void move_vert (int to);
|
||||
+static void rl_digit_loop (void);
|
||||
+static void free_history_entry(HIST_ENTRY *entry);
|
||||
|
||||
#if defined (VOID_SIGHANDLER)
|
||||
# define sighandler void
|
||||
@@ -280,7 +294,7 @@ static jmp_buf readline_top_level;
|
||||
static FILE *in_stream, *out_stream;
|
||||
|
||||
/* The names of the streams that we do input and output to. */
|
||||
|
@ -60,7 +81,74 @@ $NetBSD: patch-an,v 1.4 2008/12/17 02:19:59 christos Exp $
|
|||
|
||||
/* Non-zero means echo characters as they are read. */
|
||||
int readline_echoing_p = 1;
|
||||
@@ -1152,6 +1161,8 @@
|
||||
@@ -335,6 +349,8 @@ static int stricmp (), strnicmp ();
|
||||
/* Non-zero means to save keys that we dispatch on in a kbd macro. */
|
||||
static int defining_kbd_macro = 0;
|
||||
|
||||
+static void init_terminal_io (char *terminal_name);
|
||||
+
|
||||
|
||||
/* **************************************************************** */
|
||||
/* */
|
||||
@@ -744,7 +760,7 @@ rl_unget_char (key)
|
||||
|
||||
/* If a character is available to be read, then read it
|
||||
and stuff it into IBUFFER. Otherwise, just return. */
|
||||
-rl_gather_tyi ()
|
||||
+static void rl_gather_tyi (void)
|
||||
{
|
||||
int tty = fileno (in_stream);
|
||||
register int tem, result = -1;
|
||||
@@ -861,7 +877,7 @@ rl_dispatch (key, map)
|
||||
}
|
||||
else
|
||||
ding ();
|
||||
- return;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
switch (map[key].type)
|
||||
@@ -876,7 +892,7 @@ rl_dispatch (key, map)
|
||||
if (func == rl_do_lowercase_version)
|
||||
{
|
||||
rl_dispatch (to_lower (key), map);
|
||||
- return;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
(*map[key].function)(rl_numeric_arg * rl_arg_sign, key);
|
||||
@@ -890,7 +906,7 @@ rl_dispatch (key, map)
|
||||
else
|
||||
{
|
||||
rl_abort ();
|
||||
- return;
|
||||
+ return 0;
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -907,7 +923,7 @@ rl_dispatch (key, map)
|
||||
else
|
||||
{
|
||||
rl_abort ();
|
||||
- return;
|
||||
+ return 0;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -918,10 +934,11 @@ rl_dispatch (key, map)
|
||||
|
||||
macro = savestring ((char *)map[key].function);
|
||||
with_macro_input (macro);
|
||||
- return;
|
||||
+ return 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -1152,6 +1169,8 @@ readline_initialize_everything ()
|
||||
{
|
||||
/* Find out if we are running in Emacs. */
|
||||
running_in_emacs = getenv ("EMACS");
|
||||
|
@ -69,7 +157,70 @@ $NetBSD: patch-an,v 1.4 2008/12/17 02:19:59 christos Exp $
|
|||
|
||||
/* Allocate data structures. */
|
||||
if (!rl_line_buffer)
|
||||
@@ -2505,7 +2516,11 @@
|
||||
@@ -1320,7 +1339,7 @@ rl_universal_argument ()
|
||||
rl_digit_loop ();
|
||||
}
|
||||
|
||||
-rl_digit_loop ()
|
||||
+static void rl_digit_loop (void)
|
||||
{
|
||||
int key, c;
|
||||
while (1)
|
||||
@@ -1450,7 +1469,7 @@ static void output_character_function ()
|
||||
static int compare_strings ();
|
||||
|
||||
/* Basic redisplay algorithm. */
|
||||
-rl_redisplay ()
|
||||
+void rl_redisplay (void)
|
||||
{
|
||||
register int in, out, c, linenum;
|
||||
register char *line = invisible_line;
|
||||
@@ -1677,10 +1696,8 @@ new: eddie> Oh, my little buggy says to
|
||||
no differences, as well as for end of line additions must be handeled.
|
||||
|
||||
Could be made even smarter, but this works well enough */
|
||||
-static
|
||||
-update_line (old, new, current_line)
|
||||
- register char *old, *new;
|
||||
- int current_line;
|
||||
+static void
|
||||
+update_line (char *old, char *new, int current_line)
|
||||
{
|
||||
register char *ofd, *ols, *oe, *nfd, *nls, *ne;
|
||||
int lendiff, wsatend;
|
||||
@@ -1872,8 +1889,7 @@ move_cursor_relative (new, data)
|
||||
}
|
||||
|
||||
/* PWP: move the cursor up or down. */
|
||||
-move_vert (to)
|
||||
- int to;
|
||||
+static void move_vert (int to)
|
||||
{
|
||||
void output_character_function ();
|
||||
register int delta, i;
|
||||
@@ -2018,8 +2034,7 @@ rl_reset_terminal (terminal_name)
|
||||
init_terminal_io (terminal_name);
|
||||
}
|
||||
|
||||
-init_terminal_io (terminal_name)
|
||||
- char *terminal_name;
|
||||
+static void init_terminal_io (char *terminal_name)
|
||||
{
|
||||
extern char *tgetstr ();
|
||||
char *term, *buffer;
|
||||
@@ -2158,9 +2173,8 @@ output_some_chars (string, count)
|
||||
}
|
||||
|
||||
/* Delete COUNT characters from the display line. */
|
||||
-static
|
||||
-delete_chars (count)
|
||||
- int count;
|
||||
+static void
|
||||
+delete_chars (int count)
|
||||
{
|
||||
if (count > screenwidth)
|
||||
return;
|
||||
@@ -2505,7 +2519,11 @@ rl_prep_terminal ()
|
||||
|
||||
tio.c_lflag &= ~(ICANON | ECHO);
|
||||
|
||||
|
@ -82,7 +233,7 @@ $NetBSD: patch-an,v 1.4 2008/12/17 02:19:59 christos Exp $
|
|||
eof_char = otio.c_cc[VEOF];
|
||||
|
||||
#if defined (USE_XON_XOFF)
|
||||
@@ -2637,7 +2652,7 @@
|
||||
@@ -2637,7 +2655,7 @@ alphabetic (c)
|
||||
return (1);
|
||||
|
||||
if (allow_pathname_alphabetic_chars)
|
||||
|
@ -91,7 +242,263 @@ $NetBSD: patch-an,v 1.4 2008/12/17 02:19:59 christos Exp $
|
|||
else
|
||||
return (0);
|
||||
}
|
||||
@@ -3570,7 +3585,7 @@
|
||||
@@ -2845,12 +2863,13 @@ rl_forward (count)
|
||||
#endif /* VI_MODE */
|
||||
{
|
||||
ding ();
|
||||
- return;
|
||||
+ return 0;
|
||||
}
|
||||
else
|
||||
rl_point++;
|
||||
--count;
|
||||
}
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
/* Move backward COUNT characters. */
|
||||
@@ -2865,12 +2884,13 @@ rl_backward (count)
|
||||
if (!rl_point)
|
||||
{
|
||||
ding ();
|
||||
- return;
|
||||
+ return 0;
|
||||
}
|
||||
else
|
||||
--rl_point;
|
||||
--count;
|
||||
}
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
/* Move to the beginning of the line. */
|
||||
@@ -2894,13 +2914,13 @@ rl_forward_word (count)
|
||||
if (count < 0)
|
||||
{
|
||||
rl_backward_word (-count);
|
||||
- return;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
while (count)
|
||||
{
|
||||
if (rl_point == rl_end)
|
||||
- return;
|
||||
+ return 0;
|
||||
|
||||
/* If we are not in a word, move forward until we are in one.
|
||||
Then, move forward until we hit a non-alphabetic character. */
|
||||
@@ -2913,7 +2933,7 @@ rl_forward_word (count)
|
||||
if (alphabetic (c)) break;
|
||||
}
|
||||
}
|
||||
- if (rl_point == rl_end) return;
|
||||
+ if (rl_point == rl_end) return 0;
|
||||
while (++rl_point < rl_end)
|
||||
{
|
||||
c = the_line[rl_point];
|
||||
@@ -2921,6 +2941,7 @@ rl_forward_word (count)
|
||||
}
|
||||
--count;
|
||||
}
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
/* Move backward a word. We do what Emacs does. */
|
||||
@@ -2932,13 +2953,13 @@ rl_backward_word (count)
|
||||
if (count < 0)
|
||||
{
|
||||
rl_forward_word (-count);
|
||||
- return;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
while (count)
|
||||
{
|
||||
if (!rl_point)
|
||||
- return;
|
||||
+ return 0;
|
||||
|
||||
/* Like rl_forward_word (), except that we look at the characters
|
||||
just before point. */
|
||||
@@ -2962,6 +2983,7 @@ rl_backward_word (count)
|
||||
}
|
||||
--count;
|
||||
}
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
/* Clear the current line. Numeric argument to C-l does this. */
|
||||
@@ -2990,7 +3012,7 @@ rl_clear_screen ()
|
||||
if (rl_explicit_arg)
|
||||
{
|
||||
rl_refresh_line ();
|
||||
- return;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
if (term_clrpag)
|
||||
@@ -3000,6 +3022,7 @@ rl_clear_screen ()
|
||||
|
||||
rl_forced_update_display ();
|
||||
rl_display_fixed = 1;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
rl_arrow_keys (count, c)
|
||||
@@ -3047,7 +3070,7 @@ rl_insert (count, c)
|
||||
char *string;
|
||||
|
||||
if (count <= 0)
|
||||
- return;
|
||||
+ return 0;
|
||||
|
||||
/* If we can optimize, then do it. But don't let people crash
|
||||
readline because of extra large arguments. */
|
||||
@@ -3060,7 +3083,7 @@ rl_insert (count, c)
|
||||
|
||||
string[i] = '\0';
|
||||
rl_insert_text (string);
|
||||
- return;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
if (count > 1024)
|
||||
@@ -3079,7 +3102,7 @@ rl_insert (count, c)
|
||||
rl_insert_text (string);
|
||||
count -= decreaser;
|
||||
}
|
||||
- return;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
/* We are inserting a single character.
|
||||
@@ -3104,7 +3127,6 @@ rl_insert (count, c)
|
||||
|
||||
string[i] = '\0';
|
||||
rl_insert_text (string);
|
||||
- return;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -3115,6 +3137,7 @@ rl_insert (count, c)
|
||||
string[0] = c;
|
||||
rl_insert_text (string);
|
||||
}
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
/* Insert the next typed character verbatim. */
|
||||
@@ -3127,9 +3150,10 @@ rl_quoted_insert (count)
|
||||
if (c==0x01)
|
||||
{
|
||||
printf("\007");
|
||||
- return;
|
||||
+ return 0;
|
||||
}
|
||||
rl_insert (count, c);
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
/* Insert a tab character. */
|
||||
@@ -3196,14 +3220,14 @@ rl_rubout (count)
|
||||
if (count < 0)
|
||||
{
|
||||
rl_delete (-count);
|
||||
- return;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
if (!rl_point)
|
||||
{
|
||||
ding ();
|
||||
last_command_was_kill++;
|
||||
- return;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
if (count > 1)
|
||||
@@ -3228,6 +3252,7 @@ rl_rubout (count)
|
||||
rl_display_fixed++;
|
||||
}
|
||||
}
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
/* Delete the character under the cursor. Given a numeric argument,
|
||||
@@ -3238,13 +3263,13 @@ rl_delete (count, invoking_key)
|
||||
if (count < 0)
|
||||
{
|
||||
rl_rubout (-count);
|
||||
- return;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
if (rl_point == rl_end)
|
||||
{
|
||||
ding ();
|
||||
- return;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
if (count > 1)
|
||||
@@ -3256,6 +3281,7 @@ rl_delete (count, invoking_key)
|
||||
}
|
||||
else
|
||||
rl_delete_text (rl_point, rl_point + 1);
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -3412,7 +3438,7 @@ rl_transpose_words (count)
|
||||
int w1_beg, w1_end, w2_beg, w2_end;
|
||||
int orig_point = rl_point;
|
||||
|
||||
- if (!count) return;
|
||||
+ if (!count) return 0;
|
||||
|
||||
/* Find the two words. */
|
||||
rl_forward_word (count);
|
||||
@@ -3429,7 +3455,7 @@ rl_transpose_words (count)
|
||||
{
|
||||
ding ();
|
||||
rl_point = orig_point;
|
||||
- return;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
/* Get the text of the words. */
|
||||
@@ -3457,6 +3483,7 @@ rl_transpose_words (count)
|
||||
/* I think that does it. */
|
||||
rl_end_undo_group ();
|
||||
free (word1); free (word2);
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
/* Transpose the characters at point. If point is at the end of the line,
|
||||
@@ -3465,11 +3492,11 @@ rl_transpose_chars (count)
|
||||
int count;
|
||||
{
|
||||
if (!count)
|
||||
- return;
|
||||
+ return 0;
|
||||
|
||||
if (!rl_point || rl_end < 2) {
|
||||
ding ();
|
||||
- return;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
while (count)
|
||||
@@ -3499,6 +3526,7 @@ rl_transpose_chars (count)
|
||||
else
|
||||
count--;
|
||||
}
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -3570,7 +3598,7 @@ Function *rl_completion_entry_function =
|
||||
If this function exists and returns NULL then call the value of
|
||||
rl_completion_entry_function to try to match, otherwise use the
|
||||
array of strings returned. */
|
||||
|
@ -100,7 +507,7 @@ $NetBSD: patch-an,v 1.4 2008/12/17 02:19:59 christos Exp $
|
|||
|
||||
/* Local variable states what happened during the last completion attempt. */
|
||||
static int completion_changed_buffer = 0;
|
||||
@@ -3706,8 +3721,7 @@
|
||||
@@ -3706,8 +3734,7 @@ rl_complete_internal (what_to_do)
|
||||
variable rl_attempted_completion_function. */
|
||||
if (rl_attempted_completion_function)
|
||||
{
|
||||
|
@ -110,7 +517,7 @@ $NetBSD: patch-an,v 1.4 2008/12/17 02:19:59 christos Exp $
|
|||
|
||||
if (matches)
|
||||
{
|
||||
@@ -3760,8 +3774,7 @@
|
||||
@@ -3760,8 +3787,7 @@ rl_complete_internal (what_to_do)
|
||||
/* We have marked all the dead slots with (char *)-1.
|
||||
Copy all the non-dead entries into a new array. */
|
||||
{
|
||||
|
@ -120,3 +527,257 @@ $NetBSD: patch-an,v 1.4 2008/12/17 02:19:59 christos Exp $
|
|||
|
||||
for (i = 1, j = 1; matches[i]; i++)
|
||||
{
|
||||
@@ -4236,7 +4262,7 @@ rl_revert_line ()
|
||||
/* Do some undoing of things that were done. */
|
||||
rl_undo_command (count)
|
||||
{
|
||||
- if (count < 0) return; /* Nothing to do. */
|
||||
+ if (count < 0) return 0; /* Nothing to do. */
|
||||
|
||||
while (count)
|
||||
{
|
||||
@@ -4250,6 +4276,7 @@ rl_undo_command (count)
|
||||
break;
|
||||
}
|
||||
}
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
/* **************************************************************** */
|
||||
@@ -4277,8 +4304,7 @@ start_using_history ()
|
||||
}
|
||||
|
||||
/* Free the contents (and containing structure) of a HIST_ENTRY. */
|
||||
-free_history_entry (entry)
|
||||
- HIST_ENTRY *entry;
|
||||
+static void free_history_entry(HIST_ENTRY *entry)
|
||||
{
|
||||
if (!entry) return;
|
||||
if (entry->line)
|
||||
@@ -4362,11 +4388,11 @@ rl_get_next_history (count)
|
||||
if (count < 0)
|
||||
{
|
||||
rl_get_previous_history (-count);
|
||||
- return;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
if (!count)
|
||||
- return;
|
||||
+ return 0;
|
||||
|
||||
maybe_replace_line ();
|
||||
|
||||
@@ -4397,6 +4423,7 @@ rl_get_next_history (count)
|
||||
rl_point = 0;
|
||||
#endif /* VI_MODE */
|
||||
}
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
/* Get the previous item out of our interactive history, making it the current
|
||||
@@ -4410,11 +4437,11 @@ rl_get_previous_history (count)
|
||||
if (count < 0)
|
||||
{
|
||||
rl_get_next_history (-count);
|
||||
- return;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
if (!count)
|
||||
- return;
|
||||
+ return 0;
|
||||
|
||||
/* If we don't have a line saved, then save this one. */
|
||||
maybe_save_line ();
|
||||
@@ -4457,6 +4484,7 @@ rl_get_previous_history (count)
|
||||
rl_point = 0;
|
||||
#endif /* VI_MODE */
|
||||
}
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -4643,7 +4671,7 @@ rl_search_history (direction, invoking_k
|
||||
rl_point = orig_point;
|
||||
rl_end = strlen (the_line);
|
||||
rl_clear_message ();
|
||||
- return;
|
||||
+ return 0;
|
||||
|
||||
default:
|
||||
if (c < 32 || c > 126)
|
||||
@@ -4779,6 +4807,7 @@ rl_search_history (direction, invoking_k
|
||||
rl_point = index;
|
||||
rl_clear_message ();
|
||||
}
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
/* Make C be the next command to be executed. */
|
||||
@@ -4831,7 +4860,7 @@ rl_kill_text (from, to)
|
||||
{
|
||||
free (text);
|
||||
last_command_was_kill++;
|
||||
- return;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
/* Delete the copied text from the line. */
|
||||
@@ -4902,6 +4931,7 @@ rl_kill_text (from, to)
|
||||
}
|
||||
rl_kill_index = slot;
|
||||
last_command_was_kill++;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
/* Now REMEMBER! In order to do prepending or appending correctly, kill
|
||||
@@ -5039,14 +5069,14 @@ rl_yank_nth_arg (count, ignore)
|
||||
else
|
||||
{
|
||||
ding ();
|
||||
- return;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
arg = history_arg_extract (count, count, entry->line);
|
||||
if (!arg || !*arg)
|
||||
{
|
||||
ding ();
|
||||
- return;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
rl_begin_undo_group ();
|
||||
@@ -5065,6 +5095,7 @@ rl_yank_nth_arg (count, ignore)
|
||||
free (arg);
|
||||
|
||||
rl_end_undo_group ();
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
/* How to toggle back and forth between editing modes. */
|
||||
@@ -5417,9 +5448,10 @@ rl_macro_bind (keyseq, macro, map)
|
||||
if (rl_translate_keyseq (macro, macro_keys, ¯o_keys_len))
|
||||
{
|
||||
free (macro_keys);
|
||||
- return;
|
||||
+ return 0;
|
||||
}
|
||||
rl_generic_bind (ISMACR, keyseq, macro_keys, map);
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
/* Bind the key sequence represented by the string KEYSEQ to
|
||||
@@ -5441,7 +5473,7 @@ rl_generic_bind (type, keyseq, data, map
|
||||
{
|
||||
if (type == ISMACR)
|
||||
free (data);
|
||||
- return;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
keys = (char *)alloca (1 + (2 * strlen (keyseq)));
|
||||
@@ -5450,7 +5482,7 @@ rl_generic_bind (type, keyseq, data, map
|
||||
of characters. Stuff the characters into ARRAY, and the
|
||||
length of ARRAY into LENGTH. */
|
||||
if (rl_translate_keyseq (keyseq, keys, &keys_len))
|
||||
- return;
|
||||
+ return 0;
|
||||
|
||||
/* Bind keys, making new keymaps as necessary. */
|
||||
for (i = 0; i < keys_len; i++)
|
||||
@@ -5476,6 +5508,7 @@ rl_generic_bind (type, keyseq, data, map
|
||||
map[keys[i]].type = type;
|
||||
}
|
||||
}
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
/* Translate the ASCII representation of SEQ, stuffing the
|
||||
@@ -5661,7 +5694,7 @@ parser_if (args)
|
||||
/* If parsing is turned off, then nothing can turn it back on except
|
||||
for finding the matching endif. In that case, return right now. */
|
||||
if (parsing_conditionalized_out)
|
||||
- return;
|
||||
+ return 0;
|
||||
|
||||
/* Isolate first argument. */
|
||||
for (i = 0; args[i] && !whitespace (args[i]); i++);
|
||||
@@ -5713,6 +5746,7 @@ parser_if (args)
|
||||
parsing_conditionalized_out = 0;
|
||||
else
|
||||
parsing_conditionalized_out = 1;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
/* Invert the current parser state if there is anything on the stack. */
|
||||
@@ -5724,17 +5758,18 @@ parser_else (args)
|
||||
if (!if_stack_depth)
|
||||
{
|
||||
/* Error message? */
|
||||
- return;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
/* Check the previous (n - 1) levels of the stack to make sure that
|
||||
we haven't previously turned off parsing. */
|
||||
for (i = 0; i < if_stack_depth - 1; i++)
|
||||
if (if_stack[i] == 1)
|
||||
- return;
|
||||
+ return 0;
|
||||
|
||||
/* Invert the state of parsing if at top level. */
|
||||
parsing_conditionalized_out = !parsing_conditionalized_out;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
/* Terminate a conditional, popping the value of
|
||||
@@ -5819,18 +5854,18 @@ rl_parse_and_bind (string)
|
||||
string++;
|
||||
|
||||
if (!string || !*string || *string == '#')
|
||||
- return;
|
||||
+ return 0;
|
||||
|
||||
/* If this is a parser directive, act on it. */
|
||||
if (*string == '$')
|
||||
{
|
||||
handle_parser_directive (&string[1]);
|
||||
- return;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
/* If we are supposed to be skipping parsing right now, then do it. */
|
||||
if (parsing_conditionalized_out)
|
||||
- return;
|
||||
+ return 0;
|
||||
|
||||
i = 0;
|
||||
/* If this keyname is a complex key expression surrounded by quotes,
|
||||
@@ -5868,7 +5903,7 @@ rl_parse_and_bind (string)
|
||||
while (*value && whitespace (*value)) value++;
|
||||
|
||||
rl_variable_bind (var, value);
|
||||
- return;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
/* Skip any whitespace between keyname and funname. */
|
||||
@@ -5928,7 +5963,7 @@ rl_parse_and_bind (string)
|
||||
else
|
||||
rl_set_key (seq, rl_named_function (funname), keymap);
|
||||
|
||||
- return;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
/* Get the actual character we want to deal with. */
|
||||
@@ -5972,6 +6007,7 @@ rl_parse_and_bind (string)
|
||||
#endif /* PREFIX_META_HACK */
|
||||
else
|
||||
rl_bind_key (key, rl_named_function (funname));
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
rl_variable_bind (name, value)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
$NetBSD: patch-ar,v 1.2 2008/12/17 02:19:59 christos Exp $
|
||||
$NetBSD: patch-ar,v 1.3 2013/01/11 13:24:32 joerg Exp $
|
||||
|
||||
--- icb/serverlist.c.orig 1995-02-24 16:20:29.000000000 -0500
|
||||
+++ icb/serverlist.c 2008-12-16 20:18:00.000000000 -0500
|
||||
--- icb/serverlist.c.orig 1995-02-24 21:20:29.000000000 +0000
|
||||
+++ icb/serverlist.c
|
||||
@@ -1,4 +1,6 @@
|
||||
#include <stdio.h>
|
||||
+#include <stdlib.h>
|
||||
|
@ -9,7 +9,7 @@ $NetBSD: patch-ar,v 1.2 2008/12/17 02:19:59 christos Exp $
|
|||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include "icb.h"
|
||||
@@ -14,15 +16,14 @@
|
||||
@@ -14,15 +16,14 @@ static FILE *serverfile = NULL;
|
||||
FILE *openserverfile()
|
||||
{
|
||||
struct stat statbuf;
|
||||
|
@ -28,7 +28,7 @@ $NetBSD: patch-ar,v 1.2 2008/12/17 02:19:59 christos Exp $
|
|||
getwd(pwd);
|
||||
#else /* SYSV */
|
||||
getcwd(pwd, MAXPATHLEN+1);
|
||||
@@ -30,11 +31,20 @@
|
||||
@@ -30,11 +31,20 @@ FILE *openserverfile()
|
||||
#ifdef sgi
|
||||
#define SYSV
|
||||
#endif
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
$NetBSD: patch-au,v 1.5 2012/02/16 14:13:15 hans Exp $
|
||||
$NetBSD: patch-au,v 1.6 2013/01/11 13:24:32 joerg Exp $
|
||||
|
||||
--- icb/tcl.c.orig 1995-02-24 16:20:30.000000000 -0500
|
||||
+++ icb/tcl.c 2008-12-16 20:18:01.000000000 -0500
|
||||
--- icb/tcl.c.orig 1995-02-24 21:20:30.000000000 +0000
|
||||
+++ icb/tcl.c
|
||||
@@ -3,13 +3,14 @@
|
||||
|
||||
/* TCL interface */
|
||||
|
@ -19,8 +19,12 @@ $NetBSD: patch-au,v 1.5 2012/02/16 14:13:15 hans Exp $
|
|||
#include <sys/file.h>
|
||||
|
||||
Tcl_Interp *interp;
|
||||
@@ -95,7 +96,11 @@ tclinit()
|
||||
tclreadicbrc()
|
||||
@@ -92,10 +93,14 @@ tclinit()
|
||||
|
||||
}
|
||||
|
||||
-tclreadicbrc()
|
||||
+void tclreadicbrc(void)
|
||||
{
|
||||
char *p, *path;
|
||||
+#ifdef NAME_MAX
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
$NetBSD: patch-av,v 1.4 2012/02/16 14:13:15 hans Exp $
|
||||
$NetBSD: patch-av,v 1.5 2013/01/11 13:24:32 joerg Exp $
|
||||
|
||||
--- icb/unix.c.orig 1995-02-24 16:20:31.000000000 -0500
|
||||
+++ icb/unix.c 2009-07-23 21:22:34.000000000 -0400
|
||||
--- icb/unix.c.orig 1995-02-24 21:20:31.000000000 +0000
|
||||
+++ icb/unix.c
|
||||
@@ -7,20 +7,27 @@
|
||||
#include <stdio.h>
|
||||
#include "icb.h"
|
||||
|
@ -124,6 +124,15 @@ $NetBSD: patch-av,v 1.4 2012/02/16 14:13:15 hans Exp $
|
|||
|
||||
/* get the current window size */
|
||||
getwinsize();
|
||||
@@ -134,7 +145,7 @@ getterm()
|
||||
|
||||
/* set up terminal modes optimal for icb */
|
||||
|
||||
-icbterm()
|
||||
+void icbterm(void)
|
||||
{
|
||||
struct TTYSTRUCT tty;
|
||||
|
||||
@@ -145,14 +156,14 @@ icbterm()
|
||||
bcopy((char *)&origtty, (char *)&tty, (unsigned)sizeof(struct TTYSTRUCT));
|
||||
|
||||
|
@ -144,6 +153,15 @@ $NetBSD: patch-av,v 1.4 2012/02/16 14:13:15 hans Exp $
|
|||
|
||||
echomode = 0;
|
||||
/* set the new flags */
|
||||
@@ -165,7 +176,7 @@ icbterm()
|
||||
|
||||
/* restore term to original settings */
|
||||
|
||||
-restoreterm()
|
||||
+void restoreterm(void)
|
||||
{
|
||||
if (badttyinfo)
|
||||
return;
|
||||
@@ -206,7 +217,11 @@ char *s;
|
||||
struct passwd *pw;
|
||||
char login[17];
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
$NetBSD: patch-bj,v 1.2 2008/12/17 02:19:59 christos Exp $
|
||||
$NetBSD: patch-bj,v 1.3 2013/01/11 13:24:32 joerg Exp $
|
||||
|
||||
--- readline/readline.h.orig 1995-02-24 16:20:03.000000000 -0500
|
||||
+++ readline/readline.h 2008-12-16 20:31:36.000000000 -0500
|
||||
--- readline/readline.h.orig 1995-02-24 21:20:03.000000000 +0000
|
||||
+++ readline/readline.h
|
||||
@@ -5,11 +5,13 @@
|
||||
|
||||
#include <readline/keymaps.h>
|
||||
|
@ -17,7 +17,19 @@ $NetBSD: patch-bj,v 1.2 2008/12/17 02:19:59 christos Exp $
|
|||
|
||||
/* The functions for manipulating the text of the line within readline.
|
||||
Most of these functions are bound to keys by default. */
|
||||
@@ -141,7 +143,7 @@
|
||||
@@ -28,8 +30,9 @@ extern int
|
||||
rl_undo_command (), rl_revert_line (), rl_beginning_of_history (),
|
||||
rl_end_of_history (), rl_forward_search_history (), rl_insert (),
|
||||
rl_upcase_word (), rl_downcase_word (), rl_capitalize_word (),
|
||||
- rl_restart_output (), rl_re_read_init_file (), rl_dump_functions (),
|
||||
- rl_redisplay ();
|
||||
+ rl_restart_output (), rl_re_read_init_file (), rl_dump_functions ();
|
||||
+
|
||||
+extern void rl_redisplay (void);
|
||||
|
||||
/* These are *both* defined even when VI_MODE is not. */
|
||||
extern int rl_vi_editing_mode (), rl_emacs_editing_mode ();
|
||||
@@ -141,7 +144,7 @@ extern Function *rl_ignore_some_completi
|
||||
If this function exists and returns NULL then call the value of
|
||||
rl_completion_entry_function to try to match, otherwise use the
|
||||
array of strings returned. */
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
$NetBSD: patch-bq,v 1.4 2012/02/16 14:13:15 hans Exp $
|
||||
$NetBSD: patch-bq,v 1.5 2013/01/11 13:24:32 joerg Exp $
|
||||
|
||||
--- icb/main.c.orig 1995-02-24 16:20:24.000000000 -0500
|
||||
+++ icb/main.c 2009-07-23 21:19:32.000000000 -0400
|
||||
--- icb/main.c.orig 1995-02-24 21:20:24.000000000 +0000
|
||||
+++ icb/main.c
|
||||
@@ -6,7 +6,8 @@
|
||||
#include "icb.h"
|
||||
#include "externs.h"
|
||||
|
@ -12,3 +12,12 @@ $NetBSD: patch-bq,v 1.4 2012/02/16 14:13:15 hans Exp $
|
|||
#include "getswitch.h"
|
||||
|
||||
char *optv[] = { "clear", "list", "who", "restricted", "nickname:", "group:",
|
||||
@@ -225,7 +226,7 @@ char **argv;
|
||||
tclinit();
|
||||
readlineinit();
|
||||
if (restrictflg && !gv.restricted)
|
||||
- restrict();
|
||||
+ restricted();
|
||||
}
|
||||
|
||||
/* try to connect to port - if it fails, start server if we are on */
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
$NetBSD: patch-br,v 1.1 2009/08/06 08:24:29 plunky Exp $
|
||||
$NetBSD: patch-br,v 1.2 2013/01/11 13:24:32 joerg Exp $
|
||||
|
||||
--- icb/getline.c.orig 2009-08-06 09:17:50.000000000 +0100
|
||||
--- icb/getline.c.orig 1995-02-24 21:20:22.000000000 +0000
|
||||
+++ icb/getline.c
|
||||
@@ -11,7 +11,7 @@ static char *line_read = (char *)NULL;
|
||||
|
||||
|
@ -11,3 +11,71 @@ $NetBSD: patch-br,v 1.1 2009/08/06 08:24:29 plunky Exp $
|
|||
char *prompt;
|
||||
int expand;
|
||||
{
|
||||
@@ -45,9 +45,7 @@ int expand;
|
||||
* keystroke handler for tab key
|
||||
*/
|
||||
int
|
||||
-handletab(count, c)
|
||||
-int count;
|
||||
-char c;
|
||||
+handletab(int count, int c)
|
||||
{
|
||||
char mpref[256];
|
||||
int ppoint;
|
||||
@@ -62,7 +60,7 @@ char c;
|
||||
/* make sure the history's not empty - punt if it is */
|
||||
if (histcount()==0)
|
||||
{
|
||||
- return;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
/* remember cursor location */
|
||||
@@ -86,7 +84,7 @@ char c;
|
||||
}
|
||||
else
|
||||
printf("\007");
|
||||
- return;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
/* starts with command character */
|
||||
@@ -128,7 +126,7 @@ char c;
|
||||
}
|
||||
else
|
||||
printf("\007");
|
||||
- return;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
/* case 4 - nickname completion */
|
||||
@@ -137,7 +135,7 @@ char c;
|
||||
if (word2len > MAX_NICKLEN)
|
||||
{
|
||||
printf("\007");
|
||||
- return;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
if (rl_line_buffer[word2]=='@')
|
||||
@@ -164,7 +162,7 @@ char c;
|
||||
}
|
||||
else
|
||||
printf("\007");
|
||||
- return;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
/* case 5 - replace nickname */
|
||||
@@ -191,9 +189,10 @@ char c;
|
||||
}
|
||||
else
|
||||
printf("\007");
|
||||
- return;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
/* anything else */
|
||||
printf("\007");
|
||||
+ return 0;
|
||||
}
|
||||
|
|
|
@ -1,8 +1,20 @@
|
|||
$NetBSD: patch-bt,v 1.1 2009/08/06 08:24:29 plunky Exp $
|
||||
$NetBSD: patch-bt,v 1.2 2013/01/11 13:24:32 joerg Exp $
|
||||
|
||||
--- icb/s_person.c.orig 2009-08-06 09:20:29.000000000 +0100
|
||||
--- icb/s_person.c.orig 1995-02-24 21:20:28.000000000 +0000
|
||||
+++ icb/s_person.c
|
||||
@@ -106,7 +106,7 @@ int echoflag;
|
||||
@@ -77,10 +77,7 @@ TARGDEFS
|
||||
}
|
||||
|
||||
|
||||
-sendpersonal(nick, text, echoflag)
|
||||
-char *nick;
|
||||
-char *text;
|
||||
-int echoflag;
|
||||
+void sendpersonal(char *nick, char *text, int echoflag)
|
||||
{
|
||||
char *buf;
|
||||
int pl_flags;
|
||||
@@ -106,7 +103,7 @@ int echoflag;
|
||||
{
|
||||
do
|
||||
{
|
||||
|
@ -11,3 +23,12 @@ $NetBSD: patch-bt,v 1.1 2009/08/06 08:24:29 plunky Exp $
|
|||
|
||||
if (!text || (!*text && !last_command_was_kill))
|
||||
{
|
||||
@@ -124,7 +121,7 @@ int echoflag;
|
||||
if (!buf)
|
||||
{
|
||||
putl("[=Error=] No memory to build packet",PL_SCR);
|
||||
- return 0;
|
||||
+ return;
|
||||
}
|
||||
|
||||
sprintf(buf,"%cm %s %s", gv.cmdchar, nick, text);
|
||||
|
|
13
chat/icb/patches/patch-icb_c__hush.c
Normal file
13
chat/icb/patches/patch-icb_c__hush.c
Normal file
|
@ -0,0 +1,13 @@
|
|||
$NetBSD: patch-icb_c__hush.c,v 1.1 2013/01/11 13:24:32 joerg Exp $
|
||||
|
||||
--- icb/c_hush.c.orig 2013-01-11 12:17:01.000000000 +0000
|
||||
+++ icb/c_hush.c
|
||||
@@ -71,7 +71,7 @@ char *nick;
|
||||
return(0);
|
||||
}
|
||||
|
||||
-hushlist()
|
||||
+void hushlist(void)
|
||||
{
|
||||
STRLIST *p;
|
||||
char *s, *t;
|
23
chat/icb/patches/patch-icb_c__replay.c
Normal file
23
chat/icb/patches/patch-icb_c__replay.c
Normal file
|
@ -0,0 +1,23 @@
|
|||
$NetBSD: patch-icb_c__replay.c,v 1.1 2013/01/11 13:24:32 joerg Exp $
|
||||
|
||||
--- icb/c_replay.c.orig 2013-01-11 12:18:00.000000000 +0000
|
||||
+++ icb/c_replay.c
|
||||
@@ -171,6 +171,8 @@ int lines;
|
||||
putl("[=End of review buffer=]", pl_flags);
|
||||
}
|
||||
|
||||
+static void bufparse(char *str);
|
||||
+
|
||||
int bufmatch(str)
|
||||
{
|
||||
bufparse(str);
|
||||
@@ -182,8 +184,7 @@ if (personalflag == -1 && buftype == BUF
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
-bufparse(str)
|
||||
-char *str;
|
||||
+static void bufparse(char *str)
|
||||
{
|
||||
char cc;
|
||||
|
72
chat/icb/patches/patch-icb_msgs.c
Normal file
72
chat/icb/patches/patch-icb_msgs.c
Normal file
|
@ -0,0 +1,72 @@
|
|||
$NetBSD: patch-icb_msgs.c,v 1.1 2013/01/11 13:24:32 joerg Exp $
|
||||
|
||||
--- icb/msgs.c.orig 1995-02-24 21:20:24.000000000 +0000
|
||||
+++ icb/msgs.c
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
/* handle various messages from the server */
|
||||
|
||||
+#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include "icb.h"
|
||||
#include "externs.h"
|
||||
@@ -17,8 +18,7 @@
|
||||
|
||||
/* open message */
|
||||
|
||||
-copenmsg(pkt)
|
||||
-char *pkt;
|
||||
+void copenmsg(char *pkt)
|
||||
{
|
||||
if (split(pkt) != 2) {
|
||||
putl("[=Error=] got bad open message packet", PL_ALL);
|
||||
@@ -38,8 +38,7 @@ char *pkt;
|
||||
|
||||
/* personal message */
|
||||
|
||||
-cpersonalmsg(pkt)
|
||||
-char *pkt;
|
||||
+void cpersonalmsg(char *pkt)
|
||||
{
|
||||
char string[256];
|
||||
char host[256];
|
||||
@@ -66,8 +65,7 @@ char *pkt;
|
||||
|
||||
/* beep message */
|
||||
|
||||
-beep(pkt)
|
||||
-char *pkt;
|
||||
+void beep(char *pkt)
|
||||
{
|
||||
char nick[MAX_NICKLEN+1];
|
||||
|
||||
@@ -110,8 +108,7 @@ exitmsg()
|
||||
|
||||
/* protocol version message */
|
||||
|
||||
-protomsg(pkt)
|
||||
-char *pkt;
|
||||
+void protomsg(char *pkt)
|
||||
{
|
||||
char *p;
|
||||
int proto_level;
|
||||
@@ -168,8 +165,7 @@ char *pkt;
|
||||
|
||||
/* system status update message */
|
||||
|
||||
-statusmsg(pkt)
|
||||
-char *pkt;
|
||||
+void statusmsg(char *pkt)
|
||||
{
|
||||
if (split(pkt) != 2) {
|
||||
putl("[=Error=] got bad status message packet", PL_ALL);
|
||||
@@ -329,8 +325,7 @@ char *pkt;
|
||||
|
||||
/* important system message */
|
||||
|
||||
-importantmsg(pkt)
|
||||
-char *pkt;
|
||||
+void importantmsg(char *pkt)
|
||||
{
|
||||
if (split(pkt) != 2) {
|
||||
putl("[=Error=] got bad \"important\" message packet", PL_ALL);
|
14
chat/icb/patches/patch-icb_parse.c
Normal file
14
chat/icb/patches/patch-icb_parse.c
Normal file
|
@ -0,0 +1,14 @@
|
|||
$NetBSD: patch-icb_parse.c,v 1.1 2013/01/11 13:24:32 joerg Exp $
|
||||
|
||||
--- icb/parse.c.orig 2013-01-11 12:54:12.000000000 +0000
|
||||
+++ icb/parse.c
|
||||
@@ -12,8 +12,7 @@ char *nextword();
|
||||
char *argv[10];
|
||||
static char sbuf[1024];
|
||||
|
||||
-parse(s)
|
||||
-char *s;
|
||||
+void parse(char *s)
|
||||
{
|
||||
char cmdbuf[1024], *p;
|
||||
int result;
|
20
chat/icb/patches/patch-readline_funmap.c
Normal file
20
chat/icb/patches/patch-readline_funmap.c
Normal file
|
@ -0,0 +1,20 @@
|
|||
$NetBSD: patch-readline_funmap.c,v 1.1 2013/01/11 13:24:32 joerg Exp $
|
||||
|
||||
--- readline/funmap.c.orig 2013-01-11 12:46:28.000000000 +0000
|
||||
+++ readline/funmap.c
|
||||
@@ -164,13 +164,14 @@ rl_initialize_funmap ()
|
||||
register int i;
|
||||
|
||||
if (funmap_initialized)
|
||||
- return;
|
||||
+ return 0;
|
||||
|
||||
for (i = 0; default_funmap[i].name; i++)
|
||||
rl_add_funmap_entry (default_funmap[i].name, default_funmap[i].function);
|
||||
|
||||
funmap_initialized = 1;
|
||||
funmap_program_specific_entry_start = i;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
/* Stupid comparison routine for qsort () ing strings. */
|
21
chat/icb/patches/patch-readline_keymaps.c
Normal file
21
chat/icb/patches/patch-readline_keymaps.c
Normal file
|
@ -0,0 +1,21 @@
|
|||
$NetBSD: patch-readline_keymaps.c,v 1.1 2013/01/11 13:24:32 joerg Exp $
|
||||
|
||||
--- readline/keymaps.c.orig 2013-01-11 12:47:12.000000000 +0000
|
||||
+++ readline/keymaps.c
|
||||
@@ -110,7 +110,7 @@ rl_discard_keymap (map)
|
||||
int i;
|
||||
|
||||
if (!map)
|
||||
- return;
|
||||
+ return 0;
|
||||
|
||||
for (i = 0; i < 128; i++)
|
||||
{
|
||||
@@ -128,6 +128,7 @@ rl_discard_keymap (map)
|
||||
break;
|
||||
}
|
||||
}
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
#ifdef STATIC_MALLOC
|
300
chat/icb/patches/patch-readline_vi__mode.c
Normal file
300
chat/icb/patches/patch-readline_vi__mode.c
Normal file
|
@ -0,0 +1,300 @@
|
|||
$NetBSD: patch-readline_vi__mode.c,v 1.1 2013/01/11 13:24:32 joerg Exp $
|
||||
|
||||
--- readline/vi_mode.c.orig 2013-01-11 12:42:57.000000000 +0000
|
||||
+++ readline/vi_mode.c
|
||||
@@ -172,7 +172,7 @@ rl_vi_search (count, key)
|
||||
|
||||
default:
|
||||
ding ();
|
||||
- return;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
vi_histpos = where_history ();
|
||||
@@ -199,7 +199,7 @@ rl_vi_search (count, key)
|
||||
maybe_unsave_line ();
|
||||
rl_clear_message ();
|
||||
rl_point = save_pos;
|
||||
- return;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
case CTRL('W'):
|
||||
@@ -218,7 +218,7 @@ rl_vi_search (count, key)
|
||||
rl_clear_message ();
|
||||
rl_point = 0;
|
||||
ding ();
|
||||
- return;
|
||||
+ return 0;
|
||||
|
||||
default:
|
||||
rl_insert (1, c);
|
||||
@@ -232,6 +232,7 @@ rl_vi_search (count, key)
|
||||
|
||||
vi_last_search = savestring (rl_line_buffer);
|
||||
rl_vi_dosearch (rl_line_buffer, dir);
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
/* Search for STRING in the history list. DIR is < 0 for searching
|
||||
@@ -274,7 +275,7 @@ rl_vi_dosearch (string, dir)
|
||||
if (string == 0 || *string == 0 || vi_histpos < 0)
|
||||
{
|
||||
ding ();
|
||||
- return;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
if ((save = vi_history_search_pos (string, dir, vi_histpos + dir)) == -1)
|
||||
@@ -283,7 +284,7 @@ rl_vi_dosearch (string, dir)
|
||||
rl_clear_message ();
|
||||
rl_point = 0;
|
||||
ding ();
|
||||
- return;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
vi_histpos = save;
|
||||
@@ -305,6 +306,7 @@ rl_vi_dosearch (string, dir)
|
||||
rl_end = strlen (rl_line_buffer);
|
||||
rl_point = 0;
|
||||
rl_clear_message ();
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
/* Completion, from vi's point of view. */
|
||||
@@ -335,19 +337,20 @@ rl_vi_prev_word (count, key)
|
||||
if (count < 0)
|
||||
{
|
||||
rl_vi_next_word (-count, key);
|
||||
- return;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
if (rl_point == 0)
|
||||
{
|
||||
ding ();
|
||||
- return;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
if (uppercase_p (key))
|
||||
rl_vi_bWord (count);
|
||||
else
|
||||
rl_vi_bword (count);
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
/* Next word in vi mode. */
|
||||
@@ -357,19 +360,20 @@ rl_vi_next_word (count, key)
|
||||
if (count < 0)
|
||||
{
|
||||
rl_vi_prev_word (-count, key);
|
||||
- return;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
if (rl_point >= (rl_end - 1))
|
||||
{
|
||||
ding ();
|
||||
- return;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
if (uppercase_p (key))
|
||||
rl_vi_fWord (count);
|
||||
else
|
||||
rl_vi_fword (count);
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
/* Move to the end of the ?next? word. */
|
||||
@@ -379,13 +383,14 @@ rl_vi_end_word (count, key)
|
||||
if (count < 0)
|
||||
{
|
||||
ding ();
|
||||
- return;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
if (uppercase_p (key))
|
||||
rl_vi_eWord (count);
|
||||
else
|
||||
rl_vi_eword (count);
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
/* Move forward a word the way that 'W' does. */
|
||||
@@ -610,7 +615,7 @@ rl_vi_change_case (count, ignore)
|
||||
|
||||
/* Don't try this on an empty line. */
|
||||
if (rl_point >= rl_end)
|
||||
- return;
|
||||
+ return 0;
|
||||
|
||||
while (count-- && rl_point < rl_end)
|
||||
{
|
||||
@@ -631,6 +636,7 @@ rl_vi_change_case (count, ignore)
|
||||
else
|
||||
rl_forward (1);
|
||||
}
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
rl_vi_put (count, key)
|
||||
@@ -779,13 +785,14 @@ rl_vi_delete_to (count, key)
|
||||
if (rl_vi_domove (key, &c))
|
||||
{
|
||||
ding ();
|
||||
- return;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
if ((c != 'l') && (c != '|') && (c != 'h') && rl_mark < rl_end)
|
||||
rl_mark++;
|
||||
|
||||
rl_kill_text (rl_point, rl_mark);
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
rl_vi_change_to (count, key)
|
||||
@@ -799,7 +806,7 @@ rl_vi_change_to (count, key)
|
||||
if (rl_vi_domove (key, &c))
|
||||
{
|
||||
ding ();
|
||||
- return;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
if ((c != 'l') && (c != '|') && (c != 'h') && rl_mark < rl_end)
|
||||
@@ -809,6 +816,7 @@ rl_vi_change_to (count, key)
|
||||
vi_doing_insert = 1;
|
||||
rl_kill_text (rl_point, rl_mark);
|
||||
rl_vi_insertion_mode ();
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
rl_vi_yank_to (count, key)
|
||||
@@ -822,7 +830,7 @@ rl_vi_yank_to (count, key)
|
||||
if (rl_vi_domove (key, &c))
|
||||
{
|
||||
ding ();
|
||||
- return;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
if ((c != 'l') && (c != '|') && (c != 'h') && rl_mark < rl_end)
|
||||
@@ -833,6 +841,7 @@ rl_vi_yank_to (count, key)
|
||||
rl_end_undo_group ();
|
||||
rl_do_undo ();
|
||||
rl_point = save;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
rl_vi_delete (count)
|
||||
@@ -842,7 +851,7 @@ rl_vi_delete (count)
|
||||
if (rl_end == 0)
|
||||
{
|
||||
ding ();
|
||||
- return;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
end = rl_point + count;
|
||||
@@ -854,6 +863,7 @@ rl_vi_delete (count)
|
||||
|
||||
if (rl_point > 0 && rl_point == rl_end)
|
||||
rl_backward (1);
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
/* Turn the current line into a comment in shell history.
|
||||
@@ -932,7 +942,7 @@ rl_vi_char_search (count, key)
|
||||
if (pos == 0)
|
||||
{
|
||||
ding ();
|
||||
- return;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
pos--;
|
||||
@@ -952,7 +962,7 @@ rl_vi_char_search (count, key)
|
||||
if (pos < 0)
|
||||
{
|
||||
ding ();
|
||||
- return;
|
||||
+ return 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -960,7 +970,7 @@ rl_vi_char_search (count, key)
|
||||
if (pos >= rl_end)
|
||||
{
|
||||
ding ();
|
||||
- return;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
pos++;
|
||||
@@ -980,10 +990,11 @@ rl_vi_char_search (count, key)
|
||||
if (pos >= (rl_end - 1))
|
||||
{
|
||||
ding ();
|
||||
- return;
|
||||
+ return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
/* Match brackets */
|
||||
@@ -1002,7 +1013,7 @@ rl_vi_match ()
|
||||
{
|
||||
rl_point = pos;
|
||||
ding ();
|
||||
- return;
|
||||
+ return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1023,7 +1034,7 @@ rl_vi_match ()
|
||||
else
|
||||
{
|
||||
ding ();
|
||||
- return;
|
||||
+ return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1042,11 +1053,12 @@ rl_vi_match ()
|
||||
else
|
||||
{
|
||||
ding ();
|
||||
- return;
|
||||
+ return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
rl_point = pos;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
int
|
||||
@@ -1073,7 +1085,7 @@ rl_vi_change_char (count, key)
|
||||
c = rl_getc (rl_instream);
|
||||
|
||||
if (c == '\033' || c == CTRL ('C'))
|
||||
- return;
|
||||
+ return 0;
|
||||
|
||||
while (count-- && rl_point < rl_end)
|
||||
{
|
||||
@@ -1086,6 +1098,7 @@ rl_vi_change_char (count, key)
|
||||
|
||||
rl_end_undo_group ();
|
||||
}
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
rl_vi_subst (count, key)
|
Loading…
Reference in a new issue