1N/A * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers. 1N/A * All rights reserved. 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 * Copyright (c) 1997 Todd C. Miller <Todd.Miller@courtesan.com> 1N/A * Permission to use, copy, modify, and distribute this software for any 1N/A * purpose with or without fee is hereby granted, provided that the above 1N/A * copyright notice and this permission notice appear in all copies. 1N/A * THE SOFTWARE IS PROVIDED "AS IS" AND TODD C. MILLER DISCLAIMS ALL 1N/A * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES 1N/A * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL TODD C. MILLER BE LIABLE 1N/A * FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 1N/A * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION 1N/A * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 1N/A * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 1N/A#
pragma ident "%Z%%M% %I% %E% SMI" 1N/A** SM_VASPRINTF -- printf to a dynamically allocated string 1N/A** Write 'printf' output to a dynamically allocated string 1N/A** buffer which is returned to the caller. 1N/A** str -- *str receives a pointer to the allocated string 1N/A** fmt -- format directives for printing 1N/A** ap -- variable argument list 1N/A** On failure, set *str to NULL, set errno, and return -1. 1N/A** On success, set *str to a pointer to a nul-terminated 1N/A** string buffer containing printf output, and return the 1N/A** length of the string (not counting the nul). 1N/A /* use no more space than necessary */