parseconf.c (22989) | parseconf.c (27077) |
---|---|
1/* 2 * Copyright (c) 1988, 1992 The University of Utah and the Center 3 * for Software Science (CSS). 4 * Copyright (c) 1992, 1993 5 * The Regents of the University of California. All rights reserved. 6 * 7 * This code is derived from software contributed to Berkeley by 8 * the Center for Software Science of the University of Utah Computer --- 24 unchanged lines hidden (view full) --- 33 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 34 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 35 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 36 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 37 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 38 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 39 * SUCH DAMAGE. 40 * | 1/* 2 * Copyright (c) 1988, 1992 The University of Utah and the Center 3 * for Software Science (CSS). 4 * Copyright (c) 1992, 1993 5 * The Regents of the University of California. All rights reserved. 6 * 7 * This code is derived from software contributed to Berkeley by 8 * the Center for Software Science of the University of Utah Computer --- 24 unchanged lines hidden (view full) --- 33 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 34 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 35 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 36 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 37 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 38 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 39 * SUCH DAMAGE. 40 * |
41 * @(#)parseconf.c 8.1 (Berkeley) 6/4/93 42 * $Id$ | 41 * from: @(#)parseconf.c 8.1 (Berkeley) 6/4/93 42 * $Id: parseconf.c,v 1.5 1997/02/22 14:21:57 peter Exp $ |
43 * | 43 * |
44 * Utah $Hdr: parseconf.c 3.1 92/07/06$ | 44 * From: Utah Hdr: parseconf.c 3.1 92/07/06 |
45 * Author: Jeff Forys, University of Utah CSS 46 */ 47 48#ifndef lint | 45 * Author: Jeff Forys, University of Utah CSS 46 */ 47 48#ifndef lint |
49static char sccsid[] = "@(#)parseconf.c 8.1 (Berkeley) 6/4/93"; | 49static const char sccsid[] = "@(#)parseconf.c 8.1 (Berkeley) 6/4/93"; |
50#endif /* not lint */ 51 52#include <sys/param.h> 53#include <sys/stat.h> 54 55#include <ctype.h> 56#include <dirent.h> 57#include <fcntl.h> --- 20 unchanged lines hidden (view full) --- 78** - GetBootFiles() must be called before this routine 79** to create a linked list of default boot files. 80*/ 81int 82ParseConfig() 83{ 84 FILE *fp; 85 CLIENT *client; | 50#endif /* not lint */ 51 52#include <sys/param.h> 53#include <sys/stat.h> 54 55#include <ctype.h> 56#include <dirent.h> 57#include <fcntl.h> --- 20 unchanged lines hidden (view full) --- 78** - GetBootFiles() must be called before this routine 79** to create a linked list of default boot files. 80*/ 81int 82ParseConfig() 83{ 84 FILE *fp; 85 CLIENT *client; |
86 u_char *addr; | 86 u_int8_t *addr; |
87 char line[C_LINELEN]; 88 register char *cp, *bcp; 89 register int i, j; 90 int omask, linecnt = 0; 91 92 if (BootAny) /* ignore config file */ 93 return(1); 94 --- 142 unchanged lines hidden (view full) --- 237** pointer to a static array of RMP_ADDRLEN bytes. 238** 239** Side Effects: 240** None. 241** 242** Warnings: 243** - The return value points to a static buffer; it must 244** be copied if it's to be saved. | 87 char line[C_LINELEN]; 88 register char *cp, *bcp; 89 register int i, j; 90 int omask, linecnt = 0; 91 92 if (BootAny) /* ignore config file */ 93 return(1); 94 --- 142 unchanged lines hidden (view full) --- 237** pointer to a static array of RMP_ADDRLEN bytes. 238** 239** Side Effects: 240** None. 241** 242** Warnings: 243** - The return value points to a static buffer; it must 244** be copied if it's to be saved. |
245** - For speed, we assume a u_char consists of 8 bits. | |
246*/ | 245*/ |
247u_char * | 246u_int8_t * |
248ParseAddr(str) 249 char *str; 250{ | 247ParseAddr(str) 248 char *str; 249{ |
251 static u_char addr[RMP_ADDRLEN]; | 250 static u_int8_t addr[RMP_ADDRLEN]; |
252 register char *cp; 253 register unsigned i; 254 register int part, subpart; 255 256 bzero((char *)&addr[0], RMP_ADDRLEN); /* zero static buffer */ 257 258 part = subpart = 0; 259 for (cp = str; *cp; cp++) { --- 101 unchanged lines hidden --- | 251 register char *cp; 252 register unsigned i; 253 register int part, subpart; 254 255 bzero((char *)&addr[0], RMP_ADDRLEN); /* zero static buffer */ 256 257 part = subpart = 0; 258 for (cp = str; *cp; cp++) { --- 101 unchanged lines hidden --- |