diff options
author | markm <markm@FreeBSD.org> | 2001-11-30 22:28:07 +0000 |
---|---|---|
committer | markm <markm@FreeBSD.org> | 2001-11-30 22:28:07 +0000 |
commit | 14227a41e2b61efeed2657b0c3c771752ca8011f (patch) | |
tree | 751a532a1b619f10cb6fc297ada4141a2d178a68 /contrib/telnet/telnetd | |
parent | 57acab063b3ef9760ddafee33cca79b6f179421a (diff) | |
download | FreeBSD-src-14227a41e2b61efeed2657b0c3c771752ca8011f.zip FreeBSD-src-14227a41e2b61efeed2657b0c3c771752ca8011f.tar.gz |
Damn. The previous mega-commit was incomplete WRT ANSIfication. This
fixes that.
Diffstat (limited to 'contrib/telnet/telnetd')
-rw-r--r-- | contrib/telnet/telnetd/ext.h | 182 | ||||
-rw-r--r-- | contrib/telnet/telnetd/sys_term.c | 6 | ||||
-rw-r--r-- | contrib/telnet/telnetd/telnetd.c | 12 |
3 files changed, 96 insertions, 104 deletions
diff --git a/contrib/telnet/telnetd/ext.h b/contrib/telnet/telnetd/ext.h index d9becde..448ba68 100644 --- a/contrib/telnet/telnetd/ext.h +++ b/contrib/telnet/telnetd/ext.h @@ -80,115 +80,107 @@ extern int pty, net; extern char line[16]; extern int SYNCHing; /* we are in TELNET SYNCH mode */ -#ifndef P -# ifdef __STDC__ -# define P(x) x -# else -# define P(x) () -# endif -#endif - extern void - _termstat P((void)), - add_slc P((char, char, cc_t)), - check_slc P((void)), - change_slc P((char, char, cc_t)), - cleanup P((int)), - clientstat P((int, int, int)), - copy_termbuf P((char *, size_t)), - deferslc P((void)), - defer_terminit P((void)), - do_opt_slc P((unsigned char *, int)), - doeof P((void)), - dooption P((int)), - dontoption P((int)), - edithost P((char *, char *)), - fatal P((int, const char *)), - fatalperror P((int, const char *)), - get_slc_defaults P((void)), - init_env P((void)), - init_termbuf P((void)), - interrupt P((void)), - localstat P((void)), - flowstat P((void)), - netclear P((void)), - netflush P((void)), + _termstat(void), + add_slc(char, char, cc_t), + check_slc(void), + change_slc(char, char, cc_t), + cleanup(int), + clientstat(int, int, int), + copy_termbuf(char *, size_t), + deferslc(void), + defer_terminit(void), + do_opt_slc(unsigned char *, int), + doeof(void), + dooption(int), + dontoption(int), + edithost(char *, char *), + fatal(int, const char *), + fatalperror(int, const char *), + get_slc_defaults(void), + init_env(void), + init_termbuf(void), + interrupt(void), + localstat(void), + flowstat(void), + netclear(void), + netflush(void), #ifdef DIAGNOSTICS - printoption P((const char *, int)), - printdata P((const char *, char *, int)), - printsub P((char, unsigned char *, int)), + printoption(const char *, int), + printdata(const char *, char *, int), + printsub(char, unsigned char *, int), #endif - process_slc P((unsigned char, unsigned char, cc_t)), - ptyflush P((void)), - putchr P((int)), - putf P((char *, char *)), - recv_ayt P((void)), - send_do P((int, int)), - send_dont P((int, int)), - send_slc P((void)), - send_status P((void)), - send_will P((int, int)), - send_wont P((int, int)), - sendbrk P((void)), - sendsusp P((void)), - set_termbuf P((void)), - start_login P((char *, int, char *)), - start_slc P((int)), + process_slc(unsigned char, unsigned char, cc_t), + ptyflush(void), + putchr(int), + putf(char *, char *), + recv_ayt(void), + send_do(int, int), + send_dont(int, int), + send_slc(void), + send_status(void), + send_will(int, int), + send_wont(int, int), + sendbrk(void), + sendsusp(void), + set_termbuf(void), + start_login(char *, int, char *), + start_slc(int), #ifdef AUTHENTICATION - start_slave P((char *)), + start_slave(char *), #else - start_slave P((char *, int, char *)), + start_slave(char *, int, char *), #endif - suboption P((void)), - telrcv P((void)), - ttloop P((void)), - tty_binaryin P((int)), - tty_binaryout P((int)); + suboption(void), + telrcv(void), + ttloop(void), + tty_binaryin(int), + tty_binaryout(int); extern int - end_slc P((unsigned char **)), - getnpty P((void)), + end_slc(unsigned char **), + getnpty(void), #ifndef convex - getpty P((int *)), + getpty(int *), #endif - login_tty P((int)), - spcset P((int, cc_t *, cc_t **)), - stilloob P((int)), - terminit P((void)), - termstat P((void)), - tty_flowmode P((void)), - tty_restartany P((void)), - tty_isbinaryin P((void)), - tty_isbinaryout P((void)), - tty_iscrnl P((void)), - tty_isecho P((void)), - tty_isediting P((void)), - tty_islitecho P((void)), - tty_isnewmap P((void)), - tty_israw P((void)), - tty_issofttab P((void)), - tty_istrapsig P((void)), - tty_linemode P((void)); + login_tty(int), + spcset(int, cc_t *, cc_t **), + stilloob(int), + terminit(void), + termstat(void), + tty_flowmode(void), + tty_restartany(void), + tty_isbinaryin(void), + tty_isbinaryout(void), + tty_iscrnl(void), + tty_isecho(void), + tty_isediting(void), + tty_islitecho(void), + tty_isnewmap(void), + tty_israw(void), + tty_issofttab(void), + tty_istrapsig(void), + tty_linemode(void); extern void - tty_rspeed P((int)), - tty_setecho P((int)), - tty_setedit P((int)), - tty_setlinemode P((int)), - tty_setlitecho P((int)), - tty_setsig P((int)), - tty_setsofttab P((int)), - tty_tspeed P((int)), - willoption P((int)), - wontoption P((int)); - -int output_data __P((const char *, ...)) __printflike(1, 2); -void output_datalen __P((const char *, int)); -void startslave __P((char *, int, char *)); + tty_rspeed(int), + tty_setecho(int), + tty_setedit(int), + tty_setlinemode(int), + tty_setlitecho(int), + tty_setsig(int), + tty_setsofttab(int), + tty_tspeed(int), + willoption(int), + wontoption(int); + +int output_data(const char *, ...) __printflike(1, 2); +void output_datalen(const char *, int); +void startslave(char *, int, char *); #ifdef ENCRYPTION -extern void (*encrypt_output) P((unsigned char *, int)); -extern int (*decrypt_input) P((int)); +extern void (*encrypt_output)(unsigned char *, int); +extern int (*decrypt_input)(int); extern char *nclearto; #endif /* ENCRYPTION */ diff --git a/contrib/telnet/telnetd/sys_term.c b/contrib/telnet/telnetd/sys_term.c index 9edde84..eff9b1e 100644 --- a/contrib/telnet/telnetd/sys_term.c +++ b/contrib/telnet/telnetd/sys_term.c @@ -140,9 +140,9 @@ struct termios termbuf, termbuf2; /* pty control structure */ #include <sys/types.h> #include <libutil.h> -int cleanopen __P((char *)); -void scrub_env __P((void)); -static char **addarg __P((char **, const char *)); +int cleanopen(char *); +void scrub_env(void); +static char **addarg(char **, const char *); /* * init_termbuf() diff --git a/contrib/telnet/telnetd/telnetd.c b/contrib/telnet/telnetd/telnetd.c index 7527b7e..02f21cf 100644 --- a/contrib/telnet/telnetd/telnetd.c +++ b/contrib/telnet/telnetd/telnetd.c @@ -82,11 +82,11 @@ int debug = 0; int keepalive = 1; const char *altlogin; -void doit __P((struct sockaddr *)); -int terminaltypeok __P((char *)); -void startslave __P((char *, int, char *)); -extern void usage P((void)); -static void _gettermname __P((void)); +void doit(struct sockaddr *); +int terminaltypeok(char *); +void startslave(char *, int, char *); +extern void usage(void); +static void _gettermname(void); /* * The string to pass to getopt(). We do it this way so @@ -123,7 +123,7 @@ int family = AF_INET; char *hostname; char host_name[MAXHOSTNAMELEN]; -extern void telnet P((int, int, char *)); +extern void telnet(int, int, char *); int level; char user_name[256]; |