vfprintf.c (1829d5da5355930d5cfa8ec8add8ff47dc0bebab) | vfprintf.c (1b0181df2f46ef73a41ea8c9b7026718f8eec3a1) |
---|---|
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 --- 155 unchanged lines hidden (view full) --- 164 * Helper function for `fprintf to unbuffered unix file': creates a 165 * temporary buffer. We only work on write-only files; this avoids 166 * worries about ungetc buffers and so forth. 167 */ 168static int 169__sbprintf(FILE *fp, const char *fmt, va_list ap) 170{ 171 int ret; | 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 --- 155 unchanged lines hidden (view full) --- 164 * Helper function for `fprintf to unbuffered unix file': creates a 165 * temporary buffer. We only work on write-only files; this avoids 166 * worries about ungetc buffers and so forth. 167 */ 168static int 169__sbprintf(FILE *fp, const char *fmt, va_list ap) 170{ 171 int ret; |
172 FILE fake; | 172 FILE fake = FAKE_FILE; |
173 unsigned char buf[BUFSIZ]; 174 175 /* XXX This is probably not needed. */ 176 if (prepwrite(fp) != 0) 177 return (EOF); 178 179 /* copy the important variables */ 180 fake._flags = fp->_flags & ~__SNBF; --- 842 unchanged lines hidden --- | 173 unsigned char buf[BUFSIZ]; 174 175 /* XXX This is probably not needed. */ 176 if (prepwrite(fp) != 0) 177 return (EOF); 178 179 /* copy the important variables */ 180 fake._flags = fp->_flags & ~__SNBF; --- 842 unchanged lines hidden --- |