-/*
- * 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>
#include <errno.h>
#include <arpa/telnet.h>
+#include <unistd.h>
#include "ring.h"
* Initialize internal network data structures.
*/
- void
-init_network()
+void
+init_network(void)
{
if (ring_init(&netoring, netobuf, sizeof netobuf) != 1) {
exit(1);
* Telnet "synch" processing).
*/
- int
-stilloob()
+int
+stilloob(void)
{
- static struct timeval timeout = { 0 };
+ static struct timeval timeout = { 0, 0 };
fd_set excepts;
int value;
* Sets "neturg" to the current location.
*/
- void
-setneturg()
+void
+setneturg(void)
{
ring_mark(&netoring);
}
* useful work.
*/
-
- int
-netflush()
+int
+netflush(void)
{
- register int n, n1;
+ int n, n1;
#ifdef ENCRYPTION
if (encrypt_output)