summaryrefslogtreecommitdiffstats
path: root/libexec
diff options
context:
space:
mode:
authormarkm <markm@FreeBSD.org>2001-11-30 22:37:28 +0000
committermarkm <markm@FreeBSD.org>2001-11-30 22:37:28 +0000
commit9d10280c0b2db016fcf52e1286f10ae1eec0eef2 (patch)
tree5a2f82523134ac4752033664be45a599f019ca06 /libexec
parent14227a41e2b61efeed2657b0c3c771752ca8011f (diff)
downloadFreeBSD-src-9d10280c0b2db016fcf52e1286f10ae1eec0eef2.zip
FreeBSD-src-9d10280c0b2db016fcf52e1286f10ae1eec0eef2.tar.gz
Merge the (in)complete ANSIfication work from src/crypto/telnet.
Diffstat (limited to 'libexec')
-rw-r--r--libexec/telnetd/ext.h176
-rw-r--r--libexec/telnetd/sys_term.c6
-rw-r--r--libexec/telnetd/telnetd.c12
3 files changed, 93 insertions, 101 deletions
diff --git a/libexec/telnetd/ext.h b/libexec/telnetd/ext.h
index e506145..04aa4a3 100644
--- a/libexec/telnetd/ext.h
+++ b/libexec/telnetd/ext.h
@@ -77,107 +77,99 @@ 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)),
- start_slave P((char *, int, char *)),
- suboption P((void)),
- telrcv P((void)),
- ttloop P((void)),
- tty_binaryin P((int)),
- tty_binaryout 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),
+ start_slave(char *, int, char *),
+ 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 *);
diff --git a/libexec/telnetd/sys_term.c b/libexec/telnetd/sys_term.c
index 5fb0b39..0fb8512 100644
--- a/libexec/telnetd/sys_term.c
+++ b/libexec/telnetd/sys_term.c
@@ -137,9 +137,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/libexec/telnetd/telnetd.c b/libexec/telnetd/telnetd.c
index 887002e..7532865 100644
--- a/libexec/telnetd/telnetd.c
+++ b/libexec/telnetd/telnetd.c
@@ -75,11 +75,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
@@ -110,7 +110,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];
OpenPOWER on IntegriCloud