2 * Copyright (c) 2000-2001 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: fscanf.c,v 1.15 2001/03/02 23:53:41 ca Exp $")
19 #include <sm/varargs.h>
20 #include <sm/assert.h>
25 ** SM_IO_FSCANF -- convert input data to translated format
28 ** fp -- the file pointer to obtain the data from
29 ** timeout -- time to complete scan
30 ** fmt -- the format to translate the data to
31 ** ... -- memory locations to place the formated data
34 ** Failure: returns SM_IO_EOF
35 ** Success: returns the number of data units translated
40 sm_io_fscanf(SM_FILE_T
*fp
, int timeout
, char const *fmt
, ...)
42 sm_io_fscanf(fp
, timeout
, fmt
, va_alist
)
47 #endif /* SM_VA_STD */
52 SM_REQUIRE_ISA(fp
, SmFileMagic
);
54 ret
= sm_vfscanf(fp
, timeout
, fmt
, ap
);