Deleted Added
full compact
printf-pos.c (128819) printf-pos.c (130231)
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>
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 128819 2004-05-02 10:55:06Z das $");
41__FBSDID("$FreeBSD: head/lib/libc/stdio/vfprintf.c 130231 2004-06-08 05:45:32Z das $");
42
43/*
44 * Actual printf innards.
45 *
46 * This code is large and complicated...
47 */
48
49#include "namespace.h"

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

637 thousands_sep = '\0';
638 grouping = NULL;
639 convbuf = NULL;
640#ifndef NO_FLOATING_POINT
641 dtoaresult = NULL;
642 decimal_point = localeconv()->decimal_point;
643#endif
644 /* sorry, fprintf(read_only_file, "") returns EOF, not 0 */
42
43/*
44 * Actual printf innards.
45 *
46 * This code is large and complicated...
47 */
48
49#include "namespace.h"

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

637 thousands_sep = '\0';
638 grouping = NULL;
639 convbuf = NULL;
640#ifndef NO_FLOATING_POINT
641 dtoaresult = NULL;
642 decimal_point = localeconv()->decimal_point;
643#endif
644 /* sorry, fprintf(read_only_file, "") returns EOF, not 0 */
645 if (cantwrite(fp))
645 if (prepwrite(fp) != 0)
646 return (EOF);
647
648 /* optimise fprintf(stderr) (and other unbuffered Unix files) */
649 if ((fp->_flags & (__SNBF|__SWR|__SRW)) == (__SNBF|__SWR) &&
650 fp->_file >= 0)
651 return (__sbprintf(fp, fmt0, ap));
652
653 fmt = (char *)fmt0;

--- 991 unchanged lines hidden ---
646 return (EOF);
647
648 /* optimise fprintf(stderr) (and other unbuffered Unix files) */
649 if ((fp->_flags & (__SNBF|__SWR|__SRW)) == (__SNBF|__SWR) &&
650 fp->_file >= 0)
651 return (__sbprintf(fp, fmt0, ap));
652
653 fmt = (char *)fmt0;

--- 991 unchanged lines hidden ---