1
0
mirror of https://github.com/adtools/clib2.git synced 2025-12-08 14:59:05 +00:00

- The printf() family stripped trailing zeroes from the integer part

of %g output. Fixed.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15078 87f5fb63-7c3d-0410-a384-fd976d0f7a62
This commit is contained in:
Olaf Barthel
2006-01-02 13:23:33 +00:00
parent 23c2091ab4
commit e833477448
5 changed files with 37 additions and 24 deletions

View File

@ -3,6 +3,9 @@
__main symbol definition no longer clashes with the definition in
"libgcc.a".
- The printf() family stripped trailing zeroes from the integer part
of %g output. Fixed.
c.lib 1.198 (11.12.2005)

View File

@ -1,5 +1,5 @@
/*
* $Id: dos.h,v 1.16 2005-11-28 09:53:51 obarthel Exp $
* $Id: dos.h,v 1.17 2006-01-02 13:23:33 obarthel Exp $
*
* :ts=4
*
@ -427,7 +427,7 @@ extern int __translate_io_error_to_errno(LONG io_error);
* linker library.
*/
extern VOID __lib_exit(VOID);
extern BOOL __lib_init(struct Library * SysBase);
extern BOOL __lib_init(struct Library * _SysBase);
/****************************************************************************/

View File

@ -1,5 +1,5 @@
/*
* $Id: select.h,v 1.4 2005-11-27 10:28:16 obarthel Exp $
* $Id: select.h,v 1.5 2006-01-02 13:23:33 obarthel Exp $
*
* :ts=4
*
@ -63,6 +63,14 @@ extern "C" {
/****************************************************************************/
/*
* In case the select() data structures and macros are already
* defined by somebody else...
*/
#ifndef FD_SET
/****************************************************************************/
/*
* select() uses bit masks of file descriptors in longs. These macros
* manipulate such bit fields.
@ -87,6 +95,10 @@ typedef struct fd_set
/****************************************************************************/
#endif /* FD_SET */
/****************************************************************************/
/*
* The following prototypes may clash with the bsdsocket.library or
* usergroup.library API definitions.

View File

@ -1,5 +1,5 @@
#
# $Id: smakefile,v 1.58 2005-11-28 09:53:51 obarthel Exp $
# $Id: smakefile,v 1.59 2006-01-02 13:23:33 obarthel Exp $
#
# :ts=8
#
@ -36,7 +36,7 @@ INCLUDE_DIR = V:include
CPU = cpu=060
MATH = define=IEEE_FLOATING_POINT_SUPPORT math=IEEE
SUPPORT = define=UNIX_PATH_SEMANTICS define=SOCKET_SUPPORT define=USERGROUP_SUPPORT \
define=__C_MACROS__ define=__THREAD_SAFE
define=__C_MACROS__
##############################################################################
@ -557,7 +557,6 @@ STDLIB_OBJ = \
stdlib_system.o \
stdlib_unsetenv.o \
stdlib_utilitybase.o \
stdlib_wildcard_expand.o \
stdlib_stdio_window_spec.o
STRING_OBJ = \
@ -630,7 +629,6 @@ UNISTD_OBJ = \
termios_cfsetispeed.o \
termios_cfsetospeed.o \
termios_console_fdhookentry.o \
termios_headers.h
termios_openserial.o \
termios_tcdrain.o \
termios_tcflow.o \
@ -679,9 +677,8 @@ UNISTD_OBJ = \
unistd_unix_path_semantics.o \
unistd_unlink.o \
unistd_usleep.o \
utsname_uname.o
# \
# unistd_wildcard_expand.o
utsname_uname.o \
unistd_wildcard_expand.o
USERGROUP_OBJ = \
usergroup_crypt.o \
@ -962,7 +959,6 @@ c.lib: \
@echo >>T:$@.cmd $(MATH_OBJ)
@echo >>T:$@.cmd $(MOUNT_OBJ)
@echo >>T:$@.cmd $(SIGNAL_OBJ)
@echo >>T:$@.cmd $(SOCKET_OBJ)
@echo >>T:$@.cmd $(STAT_OBJ)
@echo >>T:$@.cmd $(STDIO_OBJ)
@echo >>T:$@.cmd $(STDLIB_OBJ)
@ -970,12 +966,14 @@ c.lib: \
@echo >>T:$@.cmd $(STRING_OBJ)
@echo >>T:$@.cmd $(TIME_OBJ)
@echo >>T:$@.cmd $(UNISTD_OBJ)
@echo >>T:$@.cmd $(USERGROUP_OBJ)
@echo >>T:$@.cmd $(UTIME_OBJ)
oml T:$@ <T:$@.cmd
@copy buf=0 T:$@ $@
@-delete T:$@ T:$@.cmd
# @echo >>T:$@.cmd $(USERGROUP_OBJ)
# @echo >>T:$@.cmd $(SOCKET_OBJ)
##############################################################################
mkid:

View File

@ -1,5 +1,5 @@
/*
* $Id: stdio_vfprintf.c,v 1.19 2005-06-26 11:57:26 tfrieden Exp $
* $Id: stdio_vfprintf.c,v 1.20 2006-01-02 13:23:33 obarthel Exp $
*
* :ts=4
*
@ -997,20 +997,20 @@ vfprintf(FILE * stream,const char * format, va_list arg)
if(max_digits > 0 && max_digits < num_trailing_zeroes)
num_trailing_zeroes = max_digits;
}
}
/* Strip trailing digits and decimal point
* unless we shouldn't.
*/
if(strip_trailing_zeroes && FLAG_IS_CLEAR(format_flags,FORMATF_AlternateConversion))
{
SHOWMSG("strip trailing zeroes and comma");
/* Strip trailing digits and decimal point
* unless we shouldn't.
*/
if(strip_trailing_zeroes && FLAG_IS_CLEAR(format_flags,FORMATF_AlternateConversion))
{
SHOWMSG("strip trailing zeroes and comma");
while(output_buffer > buffer_start+1 && output_buffer[-1] == '0')
output_buffer--;
while(output_buffer > buffer_start+1 && output_buffer[-1] == '0')
output_buffer--;
if(output_buffer > buffer_start && output_buffer[-1] == '.')
output_buffer--;
if(output_buffer > buffer_start && output_buffer[-1] == '.')
output_buffer--;
}
}
}
else