1N/A * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers. 1N/A * All rights reserved. 1N/A * Copyright (c) 1990, 1993 1N/A * The Regents of the University of California. All rights reserved. 1N/A * This code is derived from software contributed to Berkeley by 1N/A * By using this file, you agree to the terms and conditions set 1N/A * forth in the LICENSE file which can be found at the top level of 1N/A * the sendmail distribution. 1N/A#
pragma ident "%Z%%M% %I% %E% SMI" 1N/A** SM_IO_READ -- read data from the file pointer 1N/A** fp -- file pointer to read from 1N/A** timeout -- time to complete the read 1N/A** buf -- location to place read data 1N/A** size -- size of each chunk of data 1N/A** Failure: returns 0 (zero) _and_ sets errno 1N/A** Success: returns the number of whole chunks read. 1N/A** A read returning 0 (zero) is only an indication of error when errno 1N/A ** The ANSI standard requires a return value of 0 for a count 1N/A ** or a size of 0. Peculiarily, it imposes no such requirements 1N/A ** on fwrite; it only requires read to be broken. 1N/A /* fp->f_r = 0 ... done in sm_refill */ 1N/A ** Take whatever we have available. Spend no more time 1N/A ** trying to get all that has been requested. 1N/A ** This is needed on some file types (such as 1N/A ** SASL) that would jam when given extra, untimely 1N/A /* no more input: return partial result */