cf.c (182352) | cf.c (249729) |
---|---|
1/* 2 * Copyright (c) 2001 Sendmail, Inc. and its suppliers. 3 * All rights reserved. 4 * 5 * By using this file, you agree to the terms and conditions set 6 * forth in the LICENSE file which can be found at the top level of 7 * the sendmail distribution. 8 * 9 */ 10 11#include <sm/gen.h> | 1/* 2 * Copyright (c) 2001 Sendmail, Inc. and its suppliers. 3 * All rights reserved. 4 * 5 * By using this file, you agree to the terms and conditions set 6 * forth in the LICENSE file which can be found at the top level of 7 * the sendmail distribution. 8 * 9 */ 10 11#include <sm/gen.h> |
12SM_RCSID("@(#)$Id: cf.c,v 1.6 2001/09/11 04:04:47 gshapiro Exp $") | 12SM_RCSID("@(#)$Id: cf.c,v 1.7 2013/03/12 15:24:50 ca Exp $") |
13 14#include <ctype.h> 15#include <errno.h> 16 17#include <sm/cf.h> 18#include <sm/io.h> 19#include <sm/string.h> 20#include <sm/heap.h> --- 28 unchanged lines hidden (view full) --- 49 char *idend; 50 char *val; 51 int i; 52 53 cfp = sm_io_open(SmFtStdio, SM_TIME_DEFAULT, path, SM_IO_RDONLY, NULL); 54 if (cfp == NULL) 55 return errno; 56 | 13 14#include <ctype.h> 15#include <errno.h> 16 17#include <sm/cf.h> 18#include <sm/io.h> 19#include <sm/string.h> 20#include <sm/heap.h> --- 28 unchanged lines hidden (view full) --- 49 char *idend; 50 char *val; 51 int i; 52 53 cfp = sm_io_open(SmFtStdio, SM_TIME_DEFAULT, path, SM_IO_RDONLY, NULL); 54 if (cfp == NULL) 55 return errno; 56 |
57 while (sm_io_fgets(cfp, SM_TIME_DEFAULT, buf, sizeof(buf)) != NULL) | 57 while (sm_io_fgets(cfp, SM_TIME_DEFAULT, buf, sizeof(buf)) >= 0) |
58 { 59 p = strchr(buf, '\n'); 60 if (p != NULL) 61 *p = '\0'; 62 63 if (buf[0] != 'O' || buf[1] != ' ') 64 continue; 65 --- 35 unchanged lines hidden --- | 58 { 59 p = strchr(buf, '\n'); 60 if (p != NULL) 61 *p = '\0'; 62 63 if (buf[0] != 'O' || buf[1] != ' ') 64 continue; 65 --- 35 unchanged lines hidden --- |