/*
* Copyright (c) 2001 Proofpoint, Inc. and its suppliers.
* All rights reserved.
*
* By using this file, you agree to the terms and conditions set
* forth in the LICENSE file which can be found at the top level of
* the sendmail distribution.
*
*/
#include <ctype.h>
#include <errno.h>
/*
** SM_CF_GETOPT -- look up option values in the sendmail.cf file
**
** Open the sendmail.cf file and parse all of the 'O' directives.
** Each time one of the options named in the option vector optv
** is found, store a malloced copy of the option value in optv.
**
** Parameters:
** path -- pathname of sendmail.cf file
** optc -- size of option vector
** optv -- pointer to option vector
**
** Results:
** 0 on success, or an errno value on failure.
** An exception is raised on malloc failure.
*/
int
char *path;
int optc;
{
char *p;
char *id;
char *idend;
char *val;
int i;
return errno;
{
if (p != NULL)
*p = '\0';
continue;
else
{
++val;
while (*val == ' ')
++val;
--idend;
*idend = '\0';
}
for (i = 0; i < optc; ++i)
{
{
break;
}
}
}
if (sm_io_error(cfp))
{
errno = save_errno;
return errno;
}
return 0;
}