Deleted Added
sdiff udiff text old ( 113194 ) new ( 113196 )
full compact
1/*-
2 * Copyright (c) 1990, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Chris Torek.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 24 unchanged lines hidden (view full) ---

33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * SUCH DAMAGE.
35 */
36
37#if defined(LIBC_SCCS) && !defined(lint)
38static char sccsid[] = "@(#)vfprintf.c 8.1 (Berkeley) 6/4/93";
39#endif /* LIBC_SCCS and not lint */
40#include <sys/cdefs.h>
41__FBSDID("$FreeBSD: head/lib/libc/stdio/vfprintf.c 113194 2003-04-07 01:07:48Z das $");
42
43/*
44 * Actual printf innards.
45 *
46 * This code is large and complicated...
47 */
48
49#include "namespace.h"

--- 329 unchanged lines hidden (view full) ---

379 p = wcsarg;
380 memset(&mbs, 0, sizeof(mbs));
381 while (mbp - convbuf < nbytes) {
382 clen = wcrtomb(mbp, *p++, &mbs);
383 if (clen == 0 || clen == (size_t)-1)
384 break;
385 mbp += clen;
386 }
387 *mbp = '\0';
388 if (clen == (size_t)-1)
389 return (NULL);
390
391 return (convbuf);
392}
393
394/*
395 * MT-safe version
396 */
397int

--- 1231 unchanged lines hidden ---