Deleted Added
full compact
printf-pos.c (153375) printf-pos.c (153486)
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 153375 2005-12-13 13:23:27Z phk $");
41__FBSDID("$FreeBSD: head/lib/libc/stdio/vfprintf.c 153486 2005-12-16 18:56:39Z phk $");
42
43/*
44 * Actual printf innards.
45 *
46 * This code is large and complicated...
47 */
48
49#include "namespace.h"
50#include <sys/types.h>
51
52#include <ctype.h>
53#include <limits.h>
54#include <locale.h>
55#include <stddef.h>
56#include <stdint.h>
57#include <stdio.h>
58#include <stdlib.h>
59#include <string.h>
60#include <wchar.h>
42
43/*
44 * Actual printf innards.
45 *
46 * This code is large and complicated...
47 */
48
49#include "namespace.h"
50#include <sys/types.h>
51
52#include <ctype.h>
53#include <limits.h>
54#include <locale.h>
55#include <stddef.h>
56#include <stdint.h>
57#include <stdio.h>
58#include <stdlib.h>
59#include <string.h>
60#include <wchar.h>
61#include <printf.h>
61
62#include <stdarg.h>
63#include "un-namespace.h"
64
65#include "libc_private.h"
66#include "local.h"
67#include "fvwrite.h"
68

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

461 struct __siov *iovp; /* for PRINT macro */
462 int flags; /* flags as above */
463 int ret; /* return value accumulator */
464 int width; /* width from format (%8d), or 0 */
465 int prec; /* precision from format; <0 for N/A */
466 char sign; /* sign prefix (' ', '+', '-', or \0) */
467 char thousands_sep; /* locale specific thousands separator */
468 const char *grouping; /* locale specific numeric grouping rules */
62
63#include <stdarg.h>
64#include "un-namespace.h"
65
66#include "libc_private.h"
67#include "local.h"
68#include "fvwrite.h"
69

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

462 struct __siov *iovp; /* for PRINT macro */
463 int flags; /* flags as above */
464 int ret; /* return value accumulator */
465 int width; /* width from format (%8d), or 0 */
466 int prec; /* precision from format; <0 for N/A */
467 char sign; /* sign prefix (' ', '+', '-', or \0) */
468 char thousands_sep; /* locale specific thousands separator */
469 const char *grouping; /* locale specific numeric grouping rules */
470
471 if (__use_xprintf == 0 && getenv("USE_XPRINTF"))
472 __use_xprintf = 1;
473 if (__use_xprintf > 0)
474 return (__xvprintf(fp, fmt0, ap));
475
469#ifndef NO_FLOATING_POINT
470 /*
471 * We can decompose the printed representation of floating
472 * point numbers into several parts, some of which may be empty:
473 *
474 * [+|-| ] [0x|0X] MMM . NNN [e|E|p|P] [+|-] ZZ
475 * A B ---C--- D E F
476 *

--- 1171 unchanged lines hidden ---
476#ifndef NO_FLOATING_POINT
477 /*
478 * We can decompose the printed representation of floating
479 * point numbers into several parts, some of which may be empty:
480 *
481 * [+|-| ] [0x|0X] MMM . NNN [e|E|p|P] [+|-] ZZ
482 * A B ---C--- D E F
483 *

--- 1171 unchanged lines hidden ---