mirror of
https://github.com/adtools/clib2.git
synced 2025-12-08 14:59:05 +00:00
- Small fixes to the scanf() family.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14938 87f5fb63-7c3d-0410-a384-fd976d0f7a62
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: stdio_vfprintf.c,v 1.15 2005-05-08 08:51:29 obarthel Exp $
|
||||
* $Id: stdio_vfprintf.c,v 1.16 2005-05-08 11:27:26 obarthel Exp $
|
||||
*
|
||||
* :ts=4
|
||||
*
|
||||
@ -37,8 +37,6 @@
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
/*#define DEBUG*/
|
||||
|
||||
#ifndef _STDIO_HEADERS_H
|
||||
#include "stdio_headers.h"
|
||||
#endif /* _STDIO_HEADERS_H */
|
||||
@ -76,6 +74,8 @@ get_num_leading_digits(__long_double_t v,int radix)
|
||||
{
|
||||
int num_digits;
|
||||
|
||||
SHOWVALUE(radix);
|
||||
|
||||
if(v < radix)
|
||||
{
|
||||
num_digits = 1;
|
||||
@ -124,7 +124,7 @@ vfprintf(FILE * stream,const char * format, va_list arg)
|
||||
parameter_size_long_long,
|
||||
parameter_size_long_double,
|
||||
parameter_size_intmax_t,
|
||||
parameter_size_default,
|
||||
parameter_size_default
|
||||
};
|
||||
|
||||
struct iob * iob = (struct iob *)stream;
|
||||
@ -892,6 +892,8 @@ vfprintf(FILE * stream,const char * format, va_list arg)
|
||||
exponent). */
|
||||
num_leading_digits = get_num_leading_digits(v,radix);
|
||||
|
||||
SHOWVALUE(num_leading_digits);
|
||||
|
||||
v /= pow(radix,(double)num_leading_digits);
|
||||
|
||||
for(i = 0 ; (max_digits != 0) && (i < num_leading_digits) && (output_buffer < buffer_stop) ; i++)
|
||||
|
||||
Reference in New Issue
Block a user