]> git.saurik.com Git - apple/network_cmds.git/blobdiff - telnet.tproj/network.c
network_cmds-245.19.tar.gz
[apple/network_cmds.git] / telnet.tproj / network.c
index 27cc7bd2a8ef24d7fb3228cd93d4b9db0b8bf03f..800b89611480b58102583ff6a035190ae68f9185 100644 (file)
@@ -1,26 +1,3 @@
-/*
- * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
- *
- * @APPLE_LICENSE_HEADER_START@
- * 
- * "Portions Copyright (c) 1999 Apple Computer, Inc.  All Rights
- * Reserved.  This file contains Original Code and/or Modifications of
- * Original Code as defined in and that are subject to the Apple Public
- * Source License Version 1.0 (the 'License').  You may not use this file
- * except in compliance with the License.  Please obtain a copy of the
- * License at http://www.apple.com/publicsource and read it before using
- * this file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
- * License for the specific language governing rights and limitations
- * under the License."
- * 
- * @APPLE_LICENSE_HEADER_END@
- */
 /*
  * Copyright (c) 1988, 1993
  *     The Regents of the University of California.  All rights reserved.
  * SUCH DAMAGE.
  */
 
+#include <sys/cdefs.h>
+
+#ifdef __FBSDID
+__FBSDID("$FreeBSD: src/crypto/telnet/telnet/network.c,v 1.2.8.2 2002/04/13 10:59:08 markm Exp $");
+#endif
+
 #ifndef lint
-static char sccsid[] = "@(#)network.c  8.2 (Berkeley) 12/15/93";
-#endif /* not lint */
+static const char sccsid[] = "@(#)network.c    8.2 (Berkeley) 12/15/93";
+#endif
 
 #include <sys/types.h>
 #include <sys/socket.h>
@@ -65,6 +48,7 @@ static char sccsid[] = "@(#)network.c 8.2 (Berkeley) 12/15/93";
 #include <errno.h>
 
 #include <arpa/telnet.h>
+#include <unistd.h>
 
 #include "ring.h"
 
@@ -79,8 +63,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);
@@ -97,10 +81,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;
 
@@ -129,8 +113,8 @@ stilloob()
  *     Sets "neturg" to the current location.
  */
 
-    void
-setneturg()
+void
+setneturg(void)
 {
     ring_mark(&netoring);
 }
@@ -145,11 +129,10 @@ setneturg()
  *     useful work.
  */
 
-
-    int
-netflush()
+int
+netflush(void)
 {
-    register int n, n1;
+    int n, n1;
 
 #ifdef ENCRYPTION
     if (encrypt_output)