xprintf.c (19e03ca8038019fe0fe7f511b91b758b95b78664) | xprintf.c (1b0181df2f46ef73a41ea8c9b7026718f8eec3a1) |
---|---|
1/*- 2 * Copyright (c) 2005 Poul-Henning Kamp 3 * Copyright (c) 1990, 1993 4 * The Regents of the University of California. All rights reserved. 5 * 6 * This code is derived from software contributed to Berkeley by 7 * Chris Torek. 8 * --- 34 unchanged lines hidden (view full) --- 43#include <stdint.h> 44#include <assert.h> 45#include <stdarg.h> 46#include <namespace.h> 47#include <string.h> 48#include <wchar.h> 49#include "un-namespace.h" 50 | 1/*- 2 * Copyright (c) 2005 Poul-Henning Kamp 3 * Copyright (c) 1990, 1993 4 * The Regents of the University of California. All rights reserved. 5 * 6 * This code is derived from software contributed to Berkeley by 7 * Chris Torek. 8 * --- 34 unchanged lines hidden (view full) --- 43#include <stdint.h> 44#include <assert.h> 45#include <stdarg.h> 46#include <namespace.h> 47#include <string.h> 48#include <wchar.h> 49#include "un-namespace.h" 50 |
51#include "local.h" |
|
51#include "printf.h" 52#include "fvwrite.h" 53 54int __use_xprintf = -1; 55 56/* private stuff -----------------------------------------------------*/ 57 58union arg { --- 511 unchanged lines hidden (view full) --- 570 * Helper function for `fprintf to unbuffered unix file': creates a 571 * temporary buffer. We only work on write-only files; this avoids 572 * worries about ungetc buffers and so forth. 573 */ 574static int 575__v3printf(FILE *fp, const char *fmt, int pct, va_list ap) 576{ 577 int ret; | 52#include "printf.h" 53#include "fvwrite.h" 54 55int __use_xprintf = -1; 56 57/* private stuff -----------------------------------------------------*/ 58 59union arg { --- 511 unchanged lines hidden (view full) --- 571 * Helper function for `fprintf to unbuffered unix file': creates a 572 * temporary buffer. We only work on write-only files; this avoids 573 * worries about ungetc buffers and so forth. 574 */ 575static int 576__v3printf(FILE *fp, const char *fmt, int pct, va_list ap) 577{ 578 int ret; |
578 FILE fake; | 579 FILE fake = FAKE_FILE; |
579 unsigned char buf[BUFSIZ]; 580 581 /* copy the important variables */ 582 fake._flags = fp->_flags & ~__SNBF; 583 fake._file = fp->_file; 584 fake._cookie = fp->_cookie; 585 fake._write = fp->_write; 586 fake._orientation = fp->_orientation; --- 103 unchanged lines hidden --- | 580 unsigned char buf[BUFSIZ]; 581 582 /* copy the important variables */ 583 fake._flags = fp->_flags & ~__SNBF; 584 fake._file = fp->_file; 585 fake._cookie = fp->_cookie; 586 fake._write = fp->_write; 587 fake._orientation = fp->_orientation; --- 103 unchanged lines hidden --- |