parms.c (215702) | parms.c (230045) |
---|---|
1/* 2 * Copyright (c) 1983, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 12 unchanged lines hidden (view full) --- 21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * | 1/* 2 * Copyright (c) 1983, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 12 unchanged lines hidden (view full) --- 21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * |
29 * $FreeBSD: head/sbin/routed/parms.c 215702 2010-11-22 19:40:27Z brucec $ | 29 * $FreeBSD: head/sbin/routed/parms.c 230045 2012-01-13 06:56:59Z kevlo $ |
30 */ 31 32#include "defs.h" 33#include "pathnames.h" 34#include <sys/stat.h> 35 36#ifdef __NetBSD__ 37__RCSID("$NetBSD$"); 38#elif defined(__FreeBSD__) | 30 */ 31 32#include "defs.h" 33#include "pathnames.h" 34#include <sys/stat.h> 35 36#ifdef __NetBSD__ 37__RCSID("$NetBSD$"); 38#elif defined(__FreeBSD__) |
39__RCSID("$FreeBSD: head/sbin/routed/parms.c 215702 2010-11-22 19:40:27Z brucec $"); | 39__RCSID("$FreeBSD: head/sbin/routed/parms.c 230045 2012-01-13 06:56:59Z kevlo $"); |
40#else 41__RCSID("$Revision: 2.26 $"); 42#ident "$Revision: 2.26 $" 43#endif 44 45 46static struct parm *parms; 47struct intnet *intnets; --- 135 unchanged lines hidden (view full) --- 183 184 if (0 > fstat(fileno(fp), &sb)) { 185 msglog("could not stat() "_PATH_GATEWAYS); 186 (void)fclose(fp); 187 return; 188 } 189 190 for (lnum = 1; ; lnum++) { | 40#else 41__RCSID("$Revision: 2.26 $"); 42#ident "$Revision: 2.26 $" 43#endif 44 45 46static struct parm *parms; 47struct intnet *intnets; --- 135 unchanged lines hidden (view full) --- 183 184 if (0 > fstat(fileno(fp), &sb)) { 185 msglog("could not stat() "_PATH_GATEWAYS); 186 (void)fclose(fp); 187 return; 188 } 189 190 for (lnum = 1; ; lnum++) { |
191 if (0 == fgets(lbuf, sizeof(lbuf), fp)) | 191 if (fgets(lbuf, sizeof(lbuf), fp) == NULL) |
192 break; 193 lptr = lbuf; 194 while (*lptr == ' ') 195 lptr++; 196 p = lptr+strlen(lptr)-1; 197 while (*p == '\n' 198 || (*p == ' ' && (p == lptr+1 || *(p-1) != '\\'))) 199 *p-- = '\0'; --- 839 unchanged lines hidden --- | 192 break; 193 lptr = lbuf; 194 while (*lptr == ' ') 195 lptr++; 196 p = lptr+strlen(lptr)-1; 197 while (*p == '\n' 198 || (*p == ' ' && (p == lptr+1 || *(p-1) != '\\'))) 199 *p-- = '\0'; --- 839 unchanged lines hidden --- |