summaryrefslogtreecommitdiffstats
path: root/crypto/telnet/telnet/network.c
diff options
context:
space:
mode:
authormarkm <markm@FreeBSD.org>2001-11-30 21:06:38 +0000
committermarkm <markm@FreeBSD.org>2001-11-30 21:06:38 +0000
commit19fd256fae7c15fbb63128196d5550a72c559ea8 (patch)
tree1caab024c94078fe45902c1c2f8f58e5bdb7d4f4 /crypto/telnet/telnet/network.c
parente92874bd103e4d5462fd2c0013b77afc3d52df05 (diff)
downloadFreeBSD-src-19fd256fae7c15fbb63128196d5550a72c559ea8.zip
FreeBSD-src-19fd256fae7c15fbb63128196d5550a72c559ea8.tar.gz
Very large style makeover.
1) ANSIfy. 2) Clean up ifdefs so that a) ones that never/always apply are appropriately either fully removed, or just the #if junk is removed. b) change #if defined(FOO) for appropiate values of FOO. (currently AUTHENTICATION and ENCRYPTION) 3) WARNS=2 fixing 4) GC other unused stuff This code can now be unifdef(1)ed to make non-crypto telnet.
Diffstat (limited to 'crypto/telnet/telnet/network.c')
-rw-r--r--crypto/telnet/telnet/network.c30
1 files changed, 14 insertions, 16 deletions
diff --git a/crypto/telnet/telnet/network.c b/crypto/telnet/telnet/network.c
index 17fff47..049f54f 100644
--- a/crypto/telnet/telnet/network.c
+++ b/crypto/telnet/telnet/network.c
@@ -31,14 +31,13 @@
* SUCH DAMAGE.
*/
+#include <sys/cdefs.h>
+
+__FBSDID("$FreeBSD$");
+
#ifndef lint
-#if 0
static const char sccsid[] = "@(#)network.c 8.2 (Berkeley) 12/15/93";
-#else
-static const char rcsid[] =
- "$FreeBSD$";
#endif
-#endif /* not lint */
#include <sys/types.h>
#include <sys/socket.h>
@@ -62,8 +61,8 @@ unsigned char netobuf[2*BUFSIZ], netibuf[BUFSIZ];
* Initialize internal network data structures.
*/
- void
-init_network()
+void
+init_network(void)
{
if (ring_init(&netoring, netobuf, sizeof netobuf) != 1) {
exit(1);
@@ -80,10 +79,10 @@ init_network()
* Telnet "synch" processing).
*/
- int
-stilloob()
+int
+stilloob(void)
{
- static struct timeval timeout = { 0 };
+ static struct timeval timeout = { 0, 0 };
fd_set excepts;
int value;
@@ -112,8 +111,8 @@ stilloob()
* Sets "neturg" to the current location.
*/
- void
-setneturg()
+void
+setneturg(void)
{
ring_mark(&netoring);
}
@@ -128,11 +127,10 @@ setneturg()
* useful work.
*/
-
- int
-netflush()
+int
+netflush(void)
{
- register int n, n1;
+ int n, n1;
#ifdef ENCRYPTION
if (encrypt_output)
OpenPOWER on IntegriCloud