static char sccsid[] = "@(#)69 1.1 src/bldenv/sbtools/libsb/vsprintf.c, bldprocess, bos412, GOLDA411a 4/29/93 12:25:50"; /* * Copyright (c) 1990, 1991, 1992 * Open Software Foundation, Inc. * * Permission is hereby granted to use, copy, modify and freely distribute * the software in this file and its documentation for any purpose without * fee, provided that the above copyright notice appears in all copies and * that both the copyright notice and this permission notice appear in * supporting documentation. Further, provided that the name of Open * Software Foundation, Inc. ("OSF") not be used in advertising or * publicity pertaining to distribution of the software without prior * written permission from OSF. OSF makes no representations about the * suitability of this software for any purpose. It is provided "as is" * without express or implied warranty. */ /* * ODE 2.1.1 */ #if !defined(lint) && !defined(_NOIDENT) static char rcsid[] = "@(#)$RCSfile: vsprintf.c,v $ $Revision: 2.8 $ (OSF) $Date: 91/12/05 21:13:34 $"; #endif /* * Copyright (c) 1988 Regents of the University of California. * All rights reserved. * * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, * advertising materials, and other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived * from this software without specific prior written permission. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ /*** *** "vsprintf.c 5.2 (Berkeley) 6/27/88"; ***/ #include #include #if !_DOPRNT_IS_VISIBLE /* * No new architectures make _doprnt() visible. */ #define _doprnt _doprnt_va #endif int vsprintf(str, fmt, ap) char *str, *fmt; va_list ap; { FILE f; int len; f._flag = _IOWRT+_IOSTRG; f._ptr = str; f._cnt = 32767; len = _doprnt(fmt, ap, &f); *f._ptr = 0; return (len); } int vsnprintf(str, n, fmt, ap) char *str, *fmt; va_list ap; { FILE f; int len; f._flag = _IOWRT+_IOSTRG; f._ptr = str; f._cnt = n-1; len = _doprnt(fmt, ap, &f); *f._ptr = 0; return (len); }