[Commit] nickle ChangeLog,1.114,1.115 float.c,1.26,1.27

Keith Packard commit at keithp.com
Thu Dec 16 21:49:36 PST 2004


Committed by: keithp

Update of /local/src/CVS/nickle
In directory home.keithp.com:/tmp/cvs-serv8377

Modified Files:
	ChangeLog float.c 
Log Message:
2004-12-16  Keith Packard  <keithp at keithp.com>

	* float.c: (FloatPrint):
	Trim '0's from floating point when no precision is specified


Index: ChangeLog
===================================================================
RCS file: /local/src/CVS/nickle/ChangeLog,v
retrieving revision 1.114
retrieving revision 1.115
diff -u -d -r1.114 -r1.115
--- ChangeLog	17 Dec 2004 02:05:20 -0000	1.114
+++ ChangeLog	17 Dec 2004 05:49:33 -0000	1.115
@@ -1,5 +1,10 @@
 2004-12-16  Keith Packard  <keithp at keithp.com>
 
+	* float.c: (FloatPrint):
+	Trim '0's from floating point when no precision is specified
+
+2004-12-16  Keith Packard  <keithp at keithp.com>
+
 	* builtin.c: (BuiltinSetUserdefType), (BuiltinType):
 	* builtin.h:
 	Add support for up to 100 user-defined types for builtin functions

Index: float.c
===================================================================
RCS file: /local/src/CVS/nickle/float.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- float.c	17 Dec 2004 02:05:20 -0000	1.26
+++ float.c	17 Dec 2004 05:49:33 -0000	1.27
@@ -941,6 +941,9 @@
 	    frac_wrote++;
 	}
 	*--frac_string = '.';
+	if (orig_prec < 0)
+	    while (frac_buffer[frac_width-1] == '0')
+		frac_buffer[--frac_width] = '\0';
     }
     else
 	frac_width = 0;




More information about the Commit mailing list