4 The changes listed without a name attributed to them were most likely done by
5 Bjorn Reese and/or Daniel Stenberg.
7 Version 1.14 - 2010/01/26
8 -------------------------
10 Added trio_xstring_append_max.
12 * Fixed compilation problem on Cygwin due to lack of long double math
13 (reported by Matthias Andree).
16 Added #undef of standard stdio function names before assigning trio functions
20 Upgraded configure.in to use new macros instead of obsoleted macros.
23 Added VPATH to Makefile.in
26 Fixed problem with subnormal numbers which caused an infinite loop outputting
30 Improved parsing performance by avoiding memset() and memcpy() on character
34 Fixed %u scanning of signed numbers.
37 Fixed group scanning for non-matching input.
39 * Fixed missing undo of look-ahead reading for scanf functions. This does only
40 work for the scanf* and fscanf* functions, not dscanf* and cscanf* functions
41 (reported by Gideon Smeding).
43 * If the format string is empty, scanf does not attempt to read any input.
46 Fixed Borland compilation for user-defined specifiers.
49 Version 1.13 - 2008/11/09
50 -------------------------
52 Added the $<format|skip> format for user-defined specifiers, which is
53 compatible with compiler warnings about mismatches between specifiers and
56 * Added TRIO_DEPRECATED flag (reported by David Boyce)
58 * Fixed rounding adjustment for long double (reported as bug item #2136686).
60 * Added Makefile dependency for test target (reported as bug item #2136636).
63 Fixed long long support for MSVC.
65 * Fixed potential problem with read after buffer end for non-zero terminated
66 strings (reported as bug item #1828465).
71 * Fixed number of significant digits for %g.
74 Version 1.12 - 2006/10/22
75 -------------------------
76 * Fixed scanning of floats (reported by Bernd Ahlers).
78 * Fixed configure.in for GCC on Tru64 and MIPSpro on IRIX (reported by Andreas
82 Added support for LynxOS.
85 Version 1.11 - 2006/04/08
86 -------------------------
88 Fixed trio_unregister. If the first element was removed, the remaining
89 list would be removed as well.
91 * Fixed unintended formatting of %e that would result in non-zero numbers
92 starting with zero (reported by Mark Pickelmann and Gisli Ottarsson).
94 * Fixed compilation with Sun Workshop 6 (reported by Matthias Andree).
96 * Fixed accuracy for denormalized numbers (bug item #758327).
99 Fixed scanning of floating-point numbers without a decimal-point (bug item
103 Fixed more compiler warnings.
105 * Fixed compilation of trio_to_long_double and TRIO_FEATURE_FLOAT (reported by
108 * Fixed precision of large floating-point numbers (bug item #1314524).
111 Fixed trio_fpclassify_and_signbit to only restore the floating-point
114 * Fixed detection of need for ieee option on FreeBSD/Alpha.
116 * Added TRIO_SNPRINTF_ONLY compilation.
118 * Fixed trio_to_double by not using strtod() on Tru64/DECC because it does not
121 * Fixed crash on 64 bits machines related to a previous workaround in version
122 1.9 for uninitialized va_list (reported by Nicolai Tufar, suggestion by
126 Fixed width calculation for %g.
128 * Added macros for internal features.
131 Added macros for conditional compilation of many features. Documented all
135 Fixed problem with Borland C++, which changes the floating-point precision
136 for certain math functions (log10() and _fpclass()).
139 Fixed compilation warnings on Borland C++.
141 * Removed any occurrence of #elif because Borland C++ reports wrong line
142 numbers when they are present (reported by Karl Bochert).
145 Added trio_asprintfv.
148 Fixed Mac OS X compilation.
151 Fixed several compiler warnings.
153 * Fixed printing of out-of-range arguments for %hhd and %hd. These arguments
154 can be out of range because of default integer promotion.
157 Fixed installation of header files.
160 Added SHELL to Makefile.in to avoid problems with CShells.
163 Fixed regresion tests for MSVC.
166 Fixed the VMS C99 workaround.
169 Version 1.10 - 2003/03/06
170 -------------------------
171 * Rearranged some include files to accommodate large file support (reported by
172 Albert Chin-A-Young).
174 * Added support for SunOS 4.1.x lack of strerror, tolower, and toupper
175 (reported by Peter McCluskey).
177 * Fixed pedantic compilation with TRIO_MINIMAL.
180 Moved <limits.h> to avoid redefinition problems.
182 * Fixed hex-float exponents (reported by Matthias Clasen).
184 * Fixed handling of negative width and precision via paramters (reported by
188 Fixed TRIO_VA_START for VMS.
190 * Rune Enggaard Lausen
191 Fixed compilation for Borland C++ Builder.
193 * Fixed precision of hex-float numbers (reported by James Antill).
195 * Fixed plus sign only to be added for signed numbers.
197 * Fixed printing of integers with value and precision of zero (reported by
200 * Fixed %#.o to only print one zero if the value is zero (reported by James
203 * Rewrote check for IEEE compilation option to remove dependency on additional
207 Makefile install target fixed to work with older install programs.
209 * Collapsed the DECC, MSVC, HP-UX, and AIX code for trio_fpclassify_and_sign()
210 with further preprocessing.
213 Version 1.9 - 2002/10/13
214 ------------------------
215 * Fixed trio_fpclassify_and_signbit on AIX 3.2
217 * Added configure check for -ieee/-mieee compilation option for Alpha machines.
220 Fixed compilation on VMS.
222 * Albert Chin-A-Young
223 Fixed incorrect conditional expression in trio_isinf.
225 * Fixed the warnings about uninitialized va_list in the printfv and scanfv
226 family without the use of compiler specific pragmas (suggested by Ian
229 * Fixed space flag for floating-point numbers (reported by Ian Main).
232 Version 1.8 - 2002/07/10
233 ------------------------
234 * Fixed infinite loop in multibyte handling (reported by Gisli Ottarsson).
236 * Added the customizable cprintf/cscanf family which enables to user to specify
237 input and output stream functions (suggested by Florian Schulze).
239 * Fixed trio_isinf by removing the HP-UX workaround, and instead making sure
240 that the C99 macro will adhere to the trio return values (reported by Luke
244 Fixed boundary case for scanning and EOF.
247 Enabled the L modifier for formatting.
249 * Added TRIO_MINIMAL to build trio without the string functions.
251 * Added the R modifier to print rounded floating-point numbers.
253 * Added trio_to_long_double and long double scanning (the L modifier).
255 * Added trio_locale_decimal_point, trio_locale_thousand_separator,
256 trio_locale_grouping to overwrite locale settings.
258 * Rewrote TrioWriteDouble to avoid temporary buffers and thus the danger of
259 buffer overflows (for instance %.5000f).
261 * Improved floating-point formatting accuracy.
263 * Fixed formatting of non-decimal exponents.
265 * Fixed thousand separator checking.
267 * Fixed %f scanning to get a float and %lf to get a double.
269 * Fixed WIN32 compilation (reported by Emmanuel Mogenet)
271 * Fixed regression test cases to exclude disabled features.
274 Version 1.7 - 2002/05/07
275 ------------------------
276 * Fixed trio_to_double to handle hex-floats properly.
278 * Fixed printing of %a-format to be like %e, not like %g.
280 * Fixed floating-point printing of values beyond the machine accuracy.
282 * Fixed %f for printing with large precision.
284 * Fixed the usage of C99 nan(), which caused a crash on OSF/1 (reported by
288 Fixed %p on 64-bit platforms.
290 * Made trio compile with K&R compilers.
293 Fixed bug in trio_asprintf.
299 Fixed trio_isinf() on HP-UX, and added test cases.
302 Fixed non-portable use of $^ in Makefile.
308 Fixed a number of bugs in the scanning of EOF and the count specifier.
313 * Fixed incorrect handling of return code from TrioReadChar (reported by
316 * Fixed parsing of character class expressions.
318 * Fixed trio_to_double which did not work with long fractions.
320 * Fixed %f for printing of large numbers.
322 * Fixed %#s to handle whitespaces as non-printable characters.
324 * Added trio_isfinite, trio_signbit, and trio_fpclassify.
326 * Added new test cases.
329 Version 1.6 - 2002/01/13
330 ------------------------
331 * Added dynamic string functions.
333 * Rewrote and extended documentation in JavaDoc (using Doxygen).
335 * Moved and renamed strio functions to triostr.
338 Added definition for Cygwin.
341 Added long double workaround for the HP C/iX compiler.
344 Improved error handling for dynamically allocated strings.
347 Made trionan compile on OpenVMS.
349 * Added 'd' and 'D' as exponent letters when using TRIO_MICROSOFT.
351 * Fixed uninitial memory read for the parameter modifiers.
354 Version 1.5 - 2001/09/08
355 ------------------------
356 * Merged with libxml changes.
358 * Moved NaN and Inf handling to separate file to enable reuse in other
362 Fixed TrioGenerateNan for MSVC.
364 * Fixed lots of preprocessor macros and internal data structure names.
367 Version 1.4 - 2001/06/03
368 ------------------------
369 * Added hex-float (%a and %A) for scanning.
371 * Added wide character arguments (%ls, %ws, %S, %lc, %wc, and %C) for both
374 * Added mutex callbacks for user-specified specifiers to enable applications to
375 add thread-safety. These are registered with trio_register, where the
376 namespace is set to either ":enter" to lock a mutex, or ":leave" to unlock a
379 * Added equivalence class expressions for scanning. For example, %[[=a=]] scans
380 for all letters in the same equivalence class as the letter 'a' as defined
383 * Changed character class expressions for scanning. The expressions must now
384 be embedded withing an extra set of brackets, e.g. %[[:alpha:]]. This was
385 done to adhere to the syntax of UNIX98 regular expressions.
387 * Added the possibility to specify standard support (TRIO_C99 etc.) as compiler
390 * Fixed conversion of hex-float in StrToDouble.
392 * Fixed formatting of hex-float numbers.
395 Fixed crash on QNX, which happend because some buffers on the stack were too
398 * Fixed default precision for %f and %g (reported by Jose Ortiz)
401 Added the I8, I16, I32, and I64 modifiers.
404 Fixed rounding problem for %e.
407 Fixed various problems with the xlC and Sun C++ compilers.
410 Version 1.3 - 2001/05/16
411 ------------------------
412 * trio's treatment of the field width when the %e code was used was not
413 correct (reported by Gisli Ottarsson). It turns out the fraction part should
414 be zero-padded by default and the exponent part should be zero-prefixed if
415 it is only one digit. At least that's how the GNU and Sun libc's work. The
416 trio floating point output looks identical to them now.
418 * Fixed group scanning with modifiers.
420 * Fixed compilation for 64-bit Digital Unix.
423 Fixed compilation of dprintf, which uses read/write, for MSVC.
425 * Fixed various compilation problems on Digital Unix (mainly associated with
429 Version 1.2 - 2001/04/11
430 ------------------------
431 * Added autoconf integration. If compiled with HAVE_CONFIG_H the following
432 happens. Firstly, <config.h> is included. Secondly, trio will only be
433 compiled if WITH_TRIO is defined herein. Thirdly, if TRIO_REPLACE_STDIO is
434 defined, only stdio functions that have not been detected by autoconf, i.e.
435 those not defined by HAVE_PRINTF or similar, will be replaced by trio
436 functions (suggested by Daniel Veillard).
438 * Fixed '%m.nf' output. Previously trio did not treat the width properly
439 in all cases (reported by Gisli Ottarsson).
441 * Added explicit promotion for the scanfv family.
443 * Fixed more C++ compilation warnings.
446 Version 1.1 - 2001/02/25
447 ------------------------
448 * Added explicit promotion for the printfv familiy. A float must be specified
451 * Fixed positionals for printfv (reported by Gisli Ottarsson).
453 * Fixed an integer to pointer conversion problem on the SGI MIPS C compiler
454 (reported by Gisli Ottarsson).
456 * Fixed ANSI C++ warnings (type casting, and namespace is a reserved keyword).
458 * Added \n to all examples in the documentation to prevent confusion.
460 * Fixed StrSubstringMax
463 Version 1.0 - 2000/12/10
464 ------------------------
465 * Bumped Version number.
468 Version 0.25 - 2000/12/09
469 -------------------------
470 * Wrote more documentation.
472 * Improved NaN support and added NaN to regression test.
476 * Added missing getter/setter functions.
479 Version 0.24 - 2000/12/02
480 -------------------------
481 * Added callback functionality for the user-defined specifier (<>). All
482 the necessary functions are defined in triop.h header file. See the
483 documentation for trio_register for further detail.
485 * Wrote initial documentation on the callback functionality.
487 * Added the printfv and scanfv family of functions, which takes a pointer
488 array rather than variadic arguments. Each pointer in the array must point
489 to the associated data (requested by Bruce Korb).
491 * As indicated in version 0.21 the extension modifiers (<>) have now been
494 * Added skipping of thousand-separators in floating-point number scanning.
497 Version 0.23 - 2000/10/21
498 -------------------------
499 * Added width to scanning of floating-point numbers.
501 * Wrote more documentation on trio_printf.
503 * Fixed problem with trailing zeroes after decimal-point.
506 Version 0.22 - 2000/08/06
507 -------------------------
508 * Added LC_CTYPE locale dependent character class expressions to scan lists.
509 Included are [:alnum:], [:alpha:], [:cntrl:], [:digit:], [:graph:],
510 [:lower:], [:print:], [:punct:], [:space:], [:upper:], [:xdigit:]
512 * Added C escapes to alternative string formatting and scanning.
514 * Added StrSubstringMax.
516 * Wrote a little more documentation.
518 * Fixed scanf return values.
520 * Fixed a sign error for non-ascii characters.
523 Version 0.21 - 2000/07/19
524 -------------------------
525 * Converted the documentation to TeX. With latex2man the documentation can
526 automatically be converted into man pages.
528 * Added trio_scanf, trio_vscanf, trio_fscanf, and trio_vfscanf.
530 * Added trio_dprintf, trio_vdprintf, trio_dscanf, and trio_vdscanf. These
531 functions can be used to write and read directly to pipes and sockets (the
532 assume blocking sockets). Stdio buffering is surpassed, so the functions are
533 async-safe. However, reading from stdin (STDIN_FILENO) or writing to stdout
534 (STDOUT_FILENO) reintroduces the buffering.
537 Added trio_asprintf and trio_vasprintf, which are compatible with the GNU
540 * Added scanlist ranges for group scanning (%[]).
542 * Added width for scanning (missing for floating-point numbers though).
544 * Added variable size modifier (&) to handle system defined types of unknown
545 size. This modifier makes certain assumptions about the integer sizes, which
546 may not be valid on any machine. Consequently, the modifier will remain
547 undocumented, as it may be removed later.
549 * Added \777 and \xFF to alternative string scanning (%#s)
551 * Added the TRIO_REPLACE_STDIO check in the header.
553 * Improved performance of the multibyte character parsing.
555 * Fixed positionals (%n$) which had stopped working.
557 * Fixed hh and ll modifiers to allow exactly two letters and no more.
559 * Fixed ANSI C++ warnings. Also fixed the compiler warning about casting
560 between integer and pointer (this has been annoying me for ages).
562 * Fixed snprintf and vsnprintf with zero buffer size.
564 * Fixed NAN problems (reported by Keith Briggs).
566 * Fixed parsing of multibyte characters. The format string was not correctly
567 advanced in case of a multibyte character.
569 * Renamed many of the internal functions to have more consistant names.
571 * Removed the <quote=c> and <fill=c> modifiers. They are not really worth
572 including. The other <> modifiers may disappear as well.
575 Version 0.20 - 2000/06/05
576 -------------------------
577 * Added intmax_t and ptrdiff_t support.
579 * Added support for LC_NUMERIC grouping.
581 * Added double-dot notation for the conversion base. The style is now
582 %width.precision.base, where any argument can be a number, an asterix
583 indicating a parameter, or be omitted entirely. For example, %*..2i is
584 to specify binary numbers without precision, and with width as a parameter
587 * Added sticky modifier (!), which makes subsequent specifiers of the same
588 type reuse the current modifiers. Inspired by a suggestion from Gary Porter.
590 * Added group scanning (%[]). Scanlist ranges and multibyte sequences are not
593 * Added count scanning (%n).
595 * Changed the number scanning to accept thousand separators and any base.
597 * Fixed positional for parameters. It is possible to write something like
598 %3$*1$.*2$d (which happens to be the same as %*.*d).
600 * Fixed precision of integers.
602 * Fixed parameter flags. Before trio could only handle one parameter flag per
603 specifier, although two (three with double-dot base) were possible.
605 * Fixed isinf() for those platforms where it is unimplemented.
608 Version 0.18 - 2000/05/27
609 -------------------------
610 * Rewrote the entire floating-point formatting function (Danny Dulai had
611 reported several errors and even supplied some patches, which unfortunately
612 were lost due to the refactoring).
614 * Removed the use of strlen() in the declaration of a stack array. This
615 caused problems on some compilers (besides it isn't really ANSI C compliant
616 anyways). Using some arbitrarily chosen maximum value; should examine if
617 some standard defines an upper limit on the length of decimal-point and
618 thousands-separator (sizeof(wchar_t) perhaps?)
620 * Changed the parsing of the format string to be multibyte aware.
623 Version 0.17 - 2000/05/19
624 -------------------------
625 * Added INF, -INF, and NAN for floating-point numbers.
627 * Fixed %#.9g -- alternative with precision.
630 Fixed printing of negative hex numbers
632 * Joerg (last name unknown)
633 Fixed convertion of non-ASCII characters
636 Version 0.16 - 1999/08/06
637 -------------------------
638 * Changed the constness of the second argument of StrFloat and StrDouble. The
639 lack of parameter overloading in C is the reason for the strange use of
640 constness in strtof and strtod.
642 * Cleaned up constness.
645 Version 0.15 - 1999/07/23
646 -------------------------
647 * Fixed the internal representation of numbers from signed to unsigned. Signed
648 numbers posed a problem for large unsigned numbers (reported by Tero)
650 * Fixed a tiny bug in trio_vsprintfcat
652 * Changed the meaning of the max argument of StrAppendMax to be consistant
653 with StrFormatAppendMax. Now it is the maximal size of the entire target
654 buffer, not just the appended size. This makes it easier to avoid buffer
655 overflows (requested by Tero)
658 Version 0.14 - 1999/05/16
659 -------------------------
660 * Added size_t support (just waiting for a C99 compliant compiler to add
661 ptrdiff_t and intmax_t)
663 * Rewrote TrioOutStreamDouble so it does not use the libc sprintf to emulate
664 floating-point anylonger.
666 * Fixed width, precision, and adjustment for numbers and doubles.
669 Version 0.13 - 1999/05/06
670 -------------------------
671 * Fixed zero padding for %d. Now %d will only zero pad if explicitly requested
672 to do so with the 0 flag (reported by Tero).
674 * Fixed an incorrect while() condition in TrioGetString (reported by Tero).
677 Version 0.12 - 1999/04/19
678 -------------------------
679 * Fixed incorrect zero padding of pointers
681 * Added StrHash with STRIO_HASH_PLAIN
683 * Added StrFormatDateMax
686 Version 0.11 - 1999/03/25
687 -------------------------
688 * Made it compile under cygwin
690 * Fixed a bug were TrioPreprocess would return an error if no formatting chars
691 were found (reported by Tero).
696 * Added trio_strerror and TRIO_ERROR_NAME.
698 * Changed the error codes to be positive (as errno)
700 * Fixed two reads of uninitialized memory reported by Purify
702 * Added binary specifiers 'b' and 'B' (like SCO.) ThousandSeparator can be
703 used to separate nibbles (4 bit)
705 * Renamed all Internal* functions to Trio*, which seems like a better
706 namespace (even though it is of no practical interest because these
707 functions are not visible beyond the scope of this file.)
712 * Added hex-float format for StrToDouble
714 * Double references and gaps in the arguments are not allowed (for the %n$
715 format) and in both cases an error code is returned.
717 * Added StrToDouble (and StrToFloat)
722 * Added InStream and OutStream to the trio_T structure.
724 * Started work on TrioScan.
726 * Return values for errors changed. Two macros to unpack the error code has
727 been added to the header.
729 * Shortshort (hh) flag added.
731 * %#s also quotes the quote-char now.
733 * Removed the 'errorInFormat' boolean, which isn't used anymore after the
734 functions bail out with an error instead.
739 * More than MAX_PARAMETERS parametes will now cause the TrioPreprocess()
740 function to return error.
742 * Unknown flags and/or specifiers cause errors too.
744 * Added trio_snprintfcat and trio_vsnprintfcat and the defined name
745 StrFormatAppendMax. They append a formatted string to the end of a string.
747 * Define MAX_PARAMETERS to 128 at all times instead of using NL_ARGMAX when
750 * Added platform fixes for Amiga as suggested by Tero Jänkä <tesaja@utu.fi>
755 * vaprintf did add a zero byte even when it had failed.
757 * Cleaned up the code for locale handling and thousand separator
759 * Added trio_aprintf() and trio_vaprintf(). They return an allocated string.
761 * Added thousands separator for numbers
763 * Added floating point support for *printf
768 * StrMatchCase() called StrMatch() instead of itself recursively
770 * Rewrote the implementation of *printf and *scanf and put all the code in
771 this file. Extended qualifiers and qualifiers from other standards were
774 * Added StrSpanFunction, StrToLong, and StrToUnsignedLong
779 * Made the StrEqual* functions resistant to NULL pointers
781 * Turns out strdup() is no standard at all, and some platforms (I seem to
782 recall HP-UX) has problems with it. Made our own StrDuplicate() instead.
784 * Added StrFormat() and StrFormatMax() to serve as sprintf() and snprintf()