X-Git-Url: https://git.saurik.com/apple/network_cmds.git/blobdiff_plain/b7080c8e96625177072137d504eb8e9c9d748e49..f47db663cb3ae4d2fc391bb3acf9d0c2b38a41b7:/telnet.tproj/network.c diff --git a/telnet.tproj/network.c b/telnet.tproj/network.c index 27cc7bd..800b896 100644 --- a/telnet.tproj/network.c +++ b/telnet.tproj/network.c @@ -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. @@ -54,9 +31,15 @@ * SUCH DAMAGE. */ +#include + +#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 #include @@ -65,6 +48,7 @@ static char sccsid[] = "@(#)network.c 8.2 (Berkeley) 12/15/93"; #include #include +#include #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)