2 * Copyright (c) 2000-2001, 2004, 2006 Sendmail, Inc. and its suppliers.
4 * Copyright (c) 1990, 1993
5 * The Regents of the University of California. All rights reserved.
7 * This code is derived from software contributed to Berkeley by
10 * By using this file, you agree to the terms and conditions set
11 * forth in the LICENSE file which can be found at the top level of
12 * the sendmail distribution.
15 #pragma ident "%Z%%M% %I% %E% SMI"
18 SM_RCSID("@(#)$Id: flags.c,v 1.23 2006/12/19 19:44:23 ca Exp $")
19 #include <sys/types.h>
26 ** SM_FLAGS -- translate external (user) flags into internal flags
29 ** flags -- user select flags
32 ** Internal flag value matching user selected flags
41 switch(SM_IO_MODE(flags
))
43 case SM_IO_RDONLY
: /* open for reading */
47 case SM_IO_WRONLY
: /* open for writing */
51 case SM_IO_APPEND
: /* open for appending */
55 case SM_IO_RDWR
: /* open for read and write */
63 if (SM_IS_BINARY(flags
))