From: Ezra Peisach Date: Mon, 2 Jul 2001 10:45:38 +0000 (+0000) Subject: * commands.c: Declare local functions static X-Git-Tag: krb5-1.3-alpha1~1257 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=3e871f46719cb0496ed86307a7969487e2aed933;p=krb5.git * commands.c: Declare local functions static * main.c: Declare usage() static. * ring.h: Provide full prototypes for ring_mark() and ring_clear_mark(). * sys_bsd.c: Declare signal handler and NetNonblockingIO static. * telnet.c: Declear gettermname() and mklist() static. Change local variable timeout to tmie_out to avoid shadowing curses header file. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13541 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/appl/telnet/telnet/ChangeLog b/src/appl/telnet/telnet/ChangeLog index 44b9690a1..3c26a8e36 100644 --- a/src/appl/telnet/telnet/ChangeLog +++ b/src/appl/telnet/telnet/ChangeLog @@ -1,3 +1,18 @@ +2001-07-01 Ezra Peisach + + * commands.c: Declare local functions static. + + * main.c: Declare usage() static. + + * ring.h: Provide full prototypes for ring_mark() and + ring_clear_mark(). + + * sys_bsd.c: Declare signal handler and NetNonblockingIO static. + + * telnet.c: Declear gettermname() and mklist() static. Change + local variable timeout to tmie_out to avoid shadowing curses + header file. + 2001-06-22 Ezra Peisach * commands.c (tn): Change sin to sin4 to not shadow global. diff --git a/src/appl/telnet/telnet/commands.c b/src/appl/telnet/telnet/commands.c index c23570e00..e992d39d0 100644 --- a/src/appl/telnet/telnet/commands.c +++ b/src/appl/telnet/telnet/commands.c @@ -123,10 +123,11 @@ extern int isprefix(); extern char **genget(); extern int Ambiguous(); -static int call(); +static int call (); void cmdrc P((char *, char *)); static int send_tncmd P((void (*func)(), char *, char *)); +static int help(int, char **); typedef struct { char *name; /* command name */ @@ -1193,7 +1194,7 @@ struct modelist { int arg1; }; -extern int modehelp(); +static int modehelp(void); static struct modelist ModeList[] = { { "character", "Disable LINEMODE option", docharmode, 1 }, @@ -1228,7 +1229,7 @@ static struct modelist ModeList[] = { }; - int +static int modehelp() { struct modelist *mt; @@ -1386,7 +1387,7 @@ togcrmod() } /*VARARGS*/ - int +static int suspend() { #ifdef SIGTSTP @@ -1417,7 +1418,7 @@ suspend() #if !defined(TN3270) /*ARGSUSED*/ - int +static int shell(argc, argv) int argc; char *argv[]; @@ -1509,7 +1510,7 @@ quit() } /*VARARGS*/ - int +static int logout() { send_do(TELOPT_LOGOUT, 1); @@ -1529,7 +1530,7 @@ struct slclist { int arg; }; -static void slc_help(); +static void slc_help(void); struct slclist SlcList[] = { { "export", "Use local special character definitions", @@ -1663,7 +1664,7 @@ getenvcmd(name) genget(name, (char **) EnvList, sizeof(struct envlist)); } -int +static int env_cmd(argc, argv) int argc; char *argv[]; @@ -1708,7 +1709,7 @@ struct env_lst { struct env_lst envlisthead; - struct env_lst * +static struct env_lst * env_find(var) unsigned char *var; { @@ -2231,7 +2232,7 @@ forw_help() return 0; } -int +static int forw_cmd(argc, argv) int argc; char *argv[]; diff --git a/src/appl/telnet/telnet/externs.h b/src/appl/telnet/telnet/externs.h index 81652a2ad..06c2a9ba6 100644 --- a/src/appl/telnet/telnet/externs.h +++ b/src/appl/telnet/telnet/externs.h @@ -294,6 +294,13 @@ extern void send_will P((int, int)), send_wont P((int, int)); +extern void + sendbrk P((void)), + intp P((void)), + xmitAO P((void)), + xmitEL P((void)), + xmitEC P((void)); + extern void lm_will P((unsigned char *, int)), lm_wont P((unsigned char *, int)), diff --git a/src/appl/telnet/telnet/main.c b/src/appl/telnet/telnet/main.c index 5ca592ad6..f41ce4d27 100644 --- a/src/appl/telnet/telnet/main.c +++ b/src/appl/telnet/telnet/main.c @@ -81,7 +81,7 @@ tninit() #endif } - void +static void usage() { fprintf(stderr, "Usage: %s %s%s%s%s\n", diff --git a/src/appl/telnet/telnet/ring.h b/src/appl/telnet/telnet/ring.h index 8624e0a0e..7d9fd4f47 100644 --- a/src/appl/telnet/telnet/ring.h +++ b/src/appl/telnet/telnet/ring.h @@ -101,8 +101,8 @@ extern void #endif /* ENCRYPTION */ extern void - ring_clear_mark(), - ring_mark(); + ring_clear_mark P((Ring *ring)), + ring_mark P((Ring *ring)); extern int ring_at_mark P((Ring *)); diff --git a/src/appl/telnet/telnet/sys_bsd.c b/src/appl/telnet/telnet/sys_bsd.c index 90ea810c1..2f9da5b1b 100644 --- a/src/appl/telnet/telnet/sys_bsd.c +++ b/src/appl/telnet/telnet/sys_bsd.c @@ -206,8 +206,6 @@ extern int kludgelinemode; * 1 Do add this character */ -extern void xmitAO(), xmitEL(), xmitEC(), intp(), sendbrk(); - int TerminalSpecialChars(c) int c; @@ -639,7 +637,7 @@ TerminalNewMode(f) if (f != -1) { #ifdef SIGTSTP - SIG_FUNC_RET susp(); + static SIG_FUNC_RET susp(); #endif /* SIGTSTP */ #ifdef SIGINFO SIG_FUNC_RET ayt(); @@ -814,7 +812,7 @@ NetClose(fd) } - void +static void NetNonblockingIO(fd, onoff) int fd; int onoff; @@ -847,7 +845,7 @@ NetSetPgrp(fd) */ /* ARGSUSED */ - SIG_FUNC_RET +static SIG_FUNC_RET deadpeer(sig) int sig; { @@ -859,7 +857,7 @@ int intr_happened = 0; int intr_waiting = 0; /* ARGSUSED */ - SIG_FUNC_RET +static SIG_FUNC_RET intr(sig) int sig; { @@ -876,7 +874,7 @@ intr(sig) } /* ARGSUSED */ - SIG_FUNC_RET +static SIG_FUNC_RET intr2(sig) int sig; { @@ -893,7 +891,7 @@ intr2(sig) #ifdef SIGTSTP /* ARGSUSED */ - SIG_FUNC_RET +static SIG_FUNC_RET susp(sig) int sig; { @@ -906,7 +904,7 @@ susp(sig) #ifdef SIGWINCH /* ARGSUSED */ - SIG_FUNC_RET +static SIG_FUNC_RET sendwin(sig) int sig; { diff --git a/src/appl/telnet/telnet/telnet.c b/src/appl/telnet/telnet/telnet.c index 04df686c5..628b556b6 100644 --- a/src/appl/telnet/telnet/telnet.c +++ b/src/appl/telnet/telnet/telnet.c @@ -644,7 +644,7 @@ dontoption(option) static char *name_unknown = "UNKNOWN"; static char *unknown[] = { 0, 0 }; - char ** +static char ** mklist(buf, name) char *buf, *name; { @@ -795,7 +795,7 @@ extern char ttytype[]; int resettermname = 1; - char * +static char * gettermname() { char *tname; @@ -2333,7 +2333,7 @@ telnet(user) */ if (wantencryption) { extern int auth_has_failed; - time_t timeout = time(0) + 60; + time_t time_out = time(0) + 60; send_do(TELOPT_ENCRYPT, 1); send_will(TELOPT_ENCRYPT, 1); @@ -2355,7 +2355,7 @@ telnet(user) } if (encrypt_is_encrypting()) break; - if (time(0) > timeout) { + if (time(0) > time_out) { printf("\nEncryption could not be enabled. Good-bye.\n\r"); Exit(1); }