diff options
author | cvs2svn <cvs2svn@FreeBSD.org> | 2003-09-17 15:10:37 +0000 |
---|---|---|
committer | cvs2svn <cvs2svn@FreeBSD.org> | 2003-09-17 15:10:37 +0000 |
commit | 464dcfe228252ca8def24f45e4a0f34e6bd28297 (patch) | |
tree | a7f04887e56cfb9a681cc2285e5397d50c98ab1e /contrib/sendmail/libsm/fwalk.c | |
parent | 58fec675655367c5258890235a8cb889c2b53fac (diff) |
Notes
Diffstat (limited to 'contrib/sendmail/libsm/fwalk.c')
-rw-r--r-- | contrib/sendmail/libsm/fwalk.c | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/contrib/sendmail/libsm/fwalk.c b/contrib/sendmail/libsm/fwalk.c deleted file mode 100644 index b878c1a933f3..000000000000 --- a/contrib/sendmail/libsm/fwalk.c +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers. - * All rights reserved. - * Copyright (c) 1990, 1993 - * The Regents of the University of California. All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * Chris Torek. - * - * 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 <sm/gen.h> -SM_RCSID("@(#)$Id: fwalk.c,v 1.21 2001/09/11 04:04:48 gshapiro Exp $") -#include <errno.h> -#include <sm/io.h> -#include "local.h" -#include "glue.h" - -/* -** SM_FWALK -- apply a function to all found-open file pointers -** -** Parameters: -** function -- a function vector to be applied -** timeout -- time to complete actions (milliseconds) -** -** Returns: -** The (binary) OR'd result of each function call -*/ - -int -sm_fwalk(function, timeout) - int (*function) __P((SM_FILE_T *, int *)); - int *timeout; -{ - register SM_FILE_T *fp; - register int n, ret; - register struct sm_glue *g; - int fptimeout; - - ret = 0; - for (g = &smglue; g != NULL; g = g->gl_next) - { - for (fp = g->gl_iobs, n = g->gl_niobs; --n >= 0; fp++) - { - if (fp->f_flags != 0) - { - if (*timeout == SM_TIME_DEFAULT) - fptimeout = fp->f_timeout; - else - fptimeout = *timeout; - if (fptimeout == SM_TIME_IMMEDIATE) - continue; /* skip it */ - ret |= (*function)(fp, &fptimeout); - } - } - } - return ret; -} |