diff options
Diffstat (limited to 'lib/libc/stdio')
-rw-r--r-- | lib/libc/stdio/fflush.c | 10 | ||||
-rw-r--r-- | lib/libc/stdio/flags.c | 4 | ||||
-rw-r--r-- | lib/libc/stdio/open_memstream.3 | 2 | ||||
-rw-r--r-- | lib/libc/stdio/open_memstream.c | 2 | ||||
-rw-r--r-- | lib/libc/stdio/open_wmemstream.c | 2 | ||||
-rw-r--r-- | lib/libc/stdio/xprintf_float.c | 3 |
6 files changed, 13 insertions, 10 deletions
diff --git a/lib/libc/stdio/fflush.c b/lib/libc/stdio/fflush.c index ef9b45b..123167a 100644 --- a/lib/libc/stdio/fflush.c +++ b/lib/libc/stdio/fflush.c @@ -124,11 +124,13 @@ __sflush(FILE *fp) t = _swrite(fp, (char *)p, n); if (t <= 0) { /* Reset _p and _w. */ - if (p > fp->_p) /* Some was written. */ + if (p > fp->_p) { + /* Some was written. */ memmove(fp->_p, p, n); - fp->_p += n; - if ((fp->_flags & (__SLBF | __SNBF)) == 0) - fp->_w -= n; + fp->_p += n; + if ((fp->_flags & (__SLBF | __SNBF)) == 0) + fp->_w -= n; + } fp->_flags |= __SERR; return (EOF); } diff --git a/lib/libc/stdio/flags.c b/lib/libc/stdio/flags.c index b7552a4..9eed6d7 100644 --- a/lib/libc/stdio/flags.c +++ b/lib/libc/stdio/flags.c @@ -97,6 +97,10 @@ __sflags(const char *mode, int *optr) /* set close-on-exec */ o |= O_CLOEXEC; break; + case 'v': + /* verify */ + o |= O_VERIFY; + break; default: known = 0; break; diff --git a/lib/libc/stdio/open_memstream.3 b/lib/libc/stdio/open_memstream.3 index 117dcb2..e01952b 100644 --- a/lib/libc/stdio/open_memstream.3 +++ b/lib/libc/stdio/open_memstream.3 @@ -1,4 +1,4 @@ -.\" Copyright (c) 2013 Advanced Computing Technologies LLC +.\" Copyright (c) 2013 Hudson River Trading LLC .\" Written by: John H. Baldwin <jhb@FreeBSD.org> .\" All rights reserved. .\" diff --git a/lib/libc/stdio/open_memstream.c b/lib/libc/stdio/open_memstream.c index aa50822..baa71e4 100644 --- a/lib/libc/stdio/open_memstream.c +++ b/lib/libc/stdio/open_memstream.c @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Advanced Computing Technologies LLC + * Copyright (c) 2013 Hudson River Trading LLC * Written by: John H. Baldwin <jhb@FreeBSD.org> * All rights reserved. * diff --git a/lib/libc/stdio/open_wmemstream.c b/lib/libc/stdio/open_wmemstream.c index cf2968a..299e3d8 100644 --- a/lib/libc/stdio/open_wmemstream.c +++ b/lib/libc/stdio/open_wmemstream.c @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Advanced Computing Technologies LLC + * Copyright (c) 2013 Hudson River Trading LLC * Written by: John H. Baldwin <jhb@FreeBSD.org> * All rights reserved. * diff --git a/lib/libc/stdio/xprintf_float.c b/lib/libc/stdio/xprintf_float.c index b719aac..ad17eb2 100644 --- a/lib/libc/stdio/xprintf_float.c +++ b/lib/libc/stdio/xprintf_float.c @@ -168,7 +168,6 @@ __printf_render_float(struct __printf_io *io, const struct printf_info *pi, cons int realsz; /* field size expanded by dprec, sign, etc */ int dprec; /* a copy of prec if [diouxX], 0 otherwise */ char ox[2]; /* space for 0x; ox[1] is either x, X, or \0 */ - int prsize; /* max size of printed field */ int ret; /* return value accumulator */ char *decimal_point; /* locale specific decimal point */ int n2; /* XXX: for PRINTANDPAD */ @@ -344,8 +343,6 @@ here: if (ox[1]) realsz += 2; - prsize = pi->width > realsz ? pi->width : realsz; - /* right-adjusting blank padding */ if (pi->pad != '0' && pi->left == 0) ret += __printf_pad(io, pi->width - realsz, 0); |