Cygwin: mmap: allow remapping part of an existing anonymous mapping
[newlib-cygwin.git] / newlib / libc / stdio / sprint_r.c
blob81c7b7f236596ec66323871c13f766fbb0b0ad69
1 #include <newlib.h>
3 #ifdef _FVWRITE_IN_STREAMIO
5 #include <reent.h>
6 #include <stdio.h>
7 #include "fvwrite.h"
9 /*
10 * Flush out all the vectors defined by the given uio,
11 * then reset it so that it can be reused.
13 int
14 __sprint_r (struct _reent *ptr,
15 FILE *fp,
16 register struct __suio *uio)
18 register int err = 0;
20 if (uio->uio_resid == 0) {
21 uio->uio_iovcnt = 0;
22 return (0);
24 err = __sfvwrite_r(ptr, fp, uio);
25 uio->uio_resid = 0;
26 uio->uio_iovcnt = 0;
27 return (err);
30 #endif