Doc.
authorMartin Pool <mbp@samba.org>
Mon, 14 Apr 2003 04:55:49 +0000 (04:55 +0000)
committerMartin Pool <mbp@samba.org>
Mon, 14 Apr 2003 04:55:49 +0000 (04:55 +0000)
Add additional test case for a bug recently found in rsync by Paul
Green.  Appparently it was fixed here a while ago.
(This used to be commit a0033cc83c837bc075dd689fdf7a69a6aa4ecd18)

source3/lib/snprintf.c

index 1eae2f09b9bc5a6bf6525fda7336230cc325b291..81e4866cc5f4464d2672cd8300929dafa9140131 100644 (file)
@@ -1,3 +1,7 @@
+/*
+ * NOTE: If you change this file, please merge it into rsync, samba, etc.
+ */
+
 /*
  * Copyright Patrick Powell 1995
  * This code is based on code written by Patrick Powell (papowell@astart.com)
@@ -61,6 +65,9 @@
 #define NULL 0
 #endif
 
+/* TODO: Perhaps always include config.h, but strip out the macros for
+ * snprintf() etc when in test mode? */
+
 #ifdef TEST_SNPRINTF /* need math library headers for testing */
 #include <math.h>
 #endif
@@ -866,8 +873,9 @@ static void dopr_outch(char *buffer, size_t *currlen, size_t maxlen, char c)
                "-16.16f",
                NULL
        };
+       /* XXX: What does "0203.9" even mean?  An octal floating point number??? */
        double fp_nums[] = { 6442452944.1234, -1.5, 134.21, 91340.2, 341.1234, 0203.9, 0.96, 0.996, 
-                            0.9996, 1.996, 4.136, 5.030201, 0};
+                            0.9996, 1.996, 4.136, 5.030201, 0, 0.00205};
        char *int_fmt[] = {
                "%-1.5d",
                "%1.5d",