Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/stdio/vfwprintf.c')
-rw-r--r--newlib/libc/stdio/vfwprintf.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/newlib/libc/stdio/vfwprintf.c b/newlib/libc/stdio/vfwprintf.c
index 968c218b5..d76fff0d6 100644
--- a/newlib/libc/stdio/vfwprintf.c
+++ b/newlib/libc/stdio/vfwprintf.c
@@ -396,11 +396,10 @@ _DEFUN(_VFWPRINTF_R, (data, fp, fmt0, ap),
wchar_t sign; /* sign prefix (' ', '+', '-', or \0) */
#ifdef _WANT_IO_C99_FORMATS
/* locale specific numeric grouping */
- wchar_t thousands_sep = L'\0';
- const char *grouping = NULL;
+ wchar_t thousands_sep;
+ const char *grouping;
#endif
-#if defined (_MB_CAPABLE) && !defined (__HAVE_LOCALE_INFO_EXTENDED__) \
- && (defined (FLOATING_POINT) || defined (_WANT_IO_C99_FORMATS))
+#ifdef _MB_CAPABLE
mbstate_t state; /* mbtowc calls from library must not change state */
#endif
#ifdef FLOATING_POINT
@@ -416,7 +415,7 @@ _DEFUN(_VFWPRINTF_R, (data, fp, fmt0, ap),
#if defined (FLOATING_POINT) || defined (_WANT_IO_C99_FORMATS)
int ndig = 0; /* actual number of digits returned by cvt */
#endif
-#if defined (FLOATING_POINT) && defined (_WANT_IO_C99_FORMATS)
+#ifdef _WANT_IO_C99_FORMATS
int nseps; /* number of group separators with ' */
int nrepeats; /* number of repeats of the last group */
#endif
@@ -554,20 +553,20 @@ _DEFUN(_VFWPRINTF_R, (data, fp, fmt0, ap),
#ifndef STRING_ONLY
/* Initialize std streams if not dealing with sprintf family. */
CHECK_INIT (data, fp);
- _newlib_flockfile_start (fp);
+ _flockfile (fp);
ORIENT(fp, 1);
/* sorry, fwprintf(read_only_file, "") returns EOF, not 0 */
if (cantwrite (data, fp)) {
- _newlib_flockfile_exit (fp);
+ _funlockfile (fp);
return (EOF);
}
/* optimise fwprintf(stderr) (and other unbuffered Unix files) */
if ((fp->_flags & (__SNBF|__SWR|__SRW)) == (__SNBF|__SWR) &&
fp->_file >= 0) {
- _newlib_flockfile_exit (fp);
+ _funlockfile (fp);
return (__sbwprintf (data, fp, fmt0, ap));
}
#else /* STRING_ONLY */
@@ -620,10 +619,10 @@ _DEFUN(_VFWPRINTF_R, (data, fp, fmt0, ap),
sign = L'\0';
#ifdef FLOATING_POINT
lead = 0;
+#endif
#ifdef _WANT_IO_C99_FORMATS
nseps = nrepeats = 0;
#endif
-#endif
#ifndef _NO_POS_ARGS
N = arg_index;
is_pos_arg = 0;
@@ -1466,7 +1465,7 @@ error:
if (malloc_buf != NULL)
_free_r (data, malloc_buf);
#ifndef STRING_ONLY
- _newlib_flockfile_end (fp);
+ _funlockfile (fp);
#endif
return (__sferror (fp) ? EOF : ret);
/* NOTREACHED */