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.10 - 2003/03/06
8 -------------------------
9 * Rearranged some include files to accommodate large file support (reported by
12 * Added support for SunOS 4.1.x lack of strerror, tolower, and toupper
13 (reported by Peter McCluskey).
15 * Fixed pedantic compilation with TRIO_MINIMAL.
18 Moved <limits.h> to avoid redefinition problems.
20 * Fixed hex-float exponents (reported by Matthias Clasen).
22 * Fixed handling of negative width and precision via paramters (reported by
26 Fixed TRIO_VA_START for VMS.
28 * Rune Enggaard Lausen
29 Fixed compilation for Borland C++ Builder.
31 * Fixed precision of hex-float numbers (reported by James Antill).
33 * Fixed plus sign only to be added for signed numbers.
35 * Fixed printing of integers with value and precision of zero (reported by
38 * Fixed %#.o to only print one zero if the value is zero (reported by James
41 * Rewrote check for IEEE compilation option to remove dependency on additional
45 Makefile install target fixed to work with older install programs.
47 * Collapsed the DECC, MSVC, HP-UX, and AIX code for trio_fpclassify_and_sign()
48 with further preprocessing.
51 Version 1.9 - 2002/10/13
52 ------------------------
53 * Fixed trio_fpclassify_and_signbit on AIX 3.2
55 * Added configure check for -ieee/-mieee compilation option for Alpha machines.
58 Fixed compilation on VMS.
61 Fixed incorrect conditional expression in trio_isinf.
63 * Fixed the warnings about uninitialized va_list in the printfv and scanfv
64 family without the use of compiler specific pragmas (suggested by Ian
67 * Fixed space flag for floating-point numbers (reported by Ian Main).
70 Version 1.8 - 2002/07/10
71 ------------------------
72 * Fixed infinite loop in multibyte handling (reported by Gisli Ottarsson).
74 * Added the customizable cprintf/cscanf family which enables to user to specify
75 input and output stream functions (suggested by Florian Schulze).
77 * Fixed trio_isinf by removing the HP-UX workaround, and instead making sure
78 that the C99 macro will adhere to the trio return values (reported by Luke
82 Fixed boundary case for scanning and EOF.
85 Enabled the L modifier for formatting.
87 * Added TRIO_MINIMAL to build trio without the string functions.
89 * Added the R modifier to print rounded floating-point numbers.
91 * Added trio_to_long_double and long double scanning (the L modifier).
93 * Added trio_locale_decimal_point, trio_locale_thousand_separator,
94 trio_locale_grouping to overwrite locale settings.
96 * Rewrote TrioWriteDouble to avoid temporary buffers and thus the danger of
97 buffer overflows (for instance %.5000f).
99 * Improved floating-point formatting accuracy.
101 * Fixed formatting of non-decimal exponents.
103 * Fixed thousand separator checking.
105 * Fixed %f scanning to get a float and %lf to get a double.
107 * Fixed WIN32 compilation (reported by Emmanuel Mogenet)
109 * Fixed regression test cases to exclude disabled features.
112 Version 1.7 - 2002/05/07
113 ------------------------
114 * Fixed trio_to_double to handle hex-floats properly.
116 * Fixed printing of %a-format to be like %e, not like %g.
118 * Fixed floating-point printing of values beyond the machine accuracy.
120 * Fixed %f for printing with large precision.
122 * Fixed the usage of C99 nan(), which caused a crash on OSF/1 (reported by
126 Fixed %p on 64-bit platforms.
128 * Made trio compile with K&R compilers.
131 Fixed bug in trio_asprintf.
137 Fixed trio_isinf() on HP-UX, and added test cases.
140 Fixed non-portable use of $^ in Makefile.
146 Fixed a number of bugs in the scanning of EOF and the count specifier.
151 * Fixed incorrect handling of return code from TrioReadChar (reported by
154 * Fixed parsing of character class expressions.
156 * Fixed trio_to_double which did not work with long fractions.
158 * Fixed %f for printing of large numbers.
160 * Fixed %#s to handle whitespaces as non-printable characters.
162 * Added trio_isfinite, trio_signbit, and trio_fpclassify.
164 * Added new test cases.
167 Version 1.6 - 2002/01/13
168 ------------------------
169 * Added dynamic string functions.
171 * Rewrote and extended documentation in JavaDoc (using Doxygen).
173 * Moved and renamed strio functions to triostr.
176 Added definition for Cygwin.
179 Added long double workaround for the HP C/iX compiler.
182 Improved error handling for dynamically allocated strings.
185 Made trionan compile on OpenVMS.
187 * Added 'd' and 'D' as exponent letters when using TRIO_MICROSOFT.
189 * Fixed uninitial memory read for the parameter modifiers.
192 Version 1.5 - 2001/09/08
193 ------------------------
194 * Merged with libxml changes.
196 * Moved NaN and Inf handling to separate file to enable reuse in other
200 Fixed TrioGenerateNan for MSVC.
202 * Fixed lots of preprocessor macros and internal data structure names.
205 Version 1.4 - 2001/06/03
206 ------------------------
207 * Added hex-float (%a and %A) for scanning.
209 * Added wide character arguments (%ls, %ws, %S, %lc, %wc, and %C) for both
212 * Added mutex callbacks for user-specified specifiers to enable applications to
213 add thread-safety. These are registered with trio_register, where the
214 namespace is set to either ":enter" to lock a mutex, or ":leave" to unlock a
217 * Added equivalence class expressions for scanning. For example, %[[=a=]] scans
218 for all letters in the same equivalence class as the letter 'a' as defined
221 * Changed character class expressions for scanning. The expressions must now
222 be embedded withing an extra set of brackets, e.g. %[[:alpha:]]. This was
223 done to adhere to the syntax of UNIX98 regular expressions.
225 * Added the possibility to specify standard support (TRIO_C99 etc.) as compiler
228 * Fixed conversion of hex-float in StrToDouble.
230 * Fixed formatting of hex-float numbers.
233 Fixed crash on QNX, which happend because some buffers on the stack were too
236 * Fixed default precision for %f and %g (reported by Jose Ortiz)
239 Added the I8, I16, I32, and I64 modifiers.
242 Fixed rounding problem for %e.
245 Fixed various problems with the xlC and Sun C++ compilers.
248 Version 1.3 - 2001/05/16
249 ------------------------
250 * trio's treatment of the field width when the %e code was used was not
251 correct (reported by Gisli Ottarsson). It turns out the fraction part should
252 be zero-padded by default and the exponent part should be zero-prefixed if
253 it is only one digit. At least that's how the GNU and Sun libc's work. The
254 trio floating point output looks identical to them now.
256 * Fixed group scanning with modifiers.
258 * Fixed compilation for 64-bit Digital Unix.
261 Fixed compilation of dprintf, which uses read/write, for MSVC.
263 * Fixed various compilation problems on Digital Unix (mainly associated with
267 Version 1.2 - 2001/04/11
268 ------------------------
269 * Added autoconf integration. If compiled with HAVE_CONFIG_H the following
270 happens. Firstly, <config.h> is included. Secondly, trio will only be
271 compiled if WITH_TRIO is defined herein. Thirdly, if TRIO_REPLACE_STDIO is
272 defined, only stdio functions that have not been detected by autoconf, i.e.
273 those not defined by HAVE_PRINTF or similar, will be replaced by trio
274 functions (suggested by Daniel Veillard).
276 * Fixed '%m.nf' output. Previously trio did not treat the width properly
277 in all cases (reported by Gisli Ottarsson).
279 * Added explicit promotion for the scanfv family.
281 * Fixed more C++ compilation warnings.
284 Version 1.1 - 2001/02/25
285 ------------------------
286 * Added explicit promotion for the printfv familiy. A float must be specified
289 * Fixed positionals for printfv (reported by Gisli Ottarsson).
291 * Fixed an integer to pointer conversion problem on the SGI MIPS C compiler
292 (reported by Gisli Ottarsson).
294 * Fixed ANSI C++ warnings (type casting, and namespace is a reserved keyword).
296 * Added \n to all examples in the documentation to prevent confusion.
298 * Fixed StrSubstringMax
301 Version 1.0 - 2000/12/10
302 ------------------------
303 * Bumped Version number.
306 Version 0.25 - 2000/12/09
307 -------------------------
308 * Wrote more documentation.
310 * Improved NaN support and added NaN to regression test.
314 * Added missing getter/setter functions.
317 Version 0.24 - 2000/12/02
318 -------------------------
319 * Added callback functionality for the user-defined specifier (<>). All
320 the necessary functions are defined in triop.h header file. See the
321 documentation for trio_register for further detail.
323 * Wrote initial documentation on the callback functionality.
325 * Added the printfv and scanfv family of functions, which takes a pointer
326 array rather than variadic arguments. Each pointer in the array must point
327 to the associated data (requested by Bruce Korb).
329 * As indicated in version 0.21 the extension modifiers (<>) have now been
332 * Added skipping of thousand-separators in floating-point number scanning.
335 Version 0.23 - 2000/10/21
336 -------------------------
337 * Added width to scanning of floating-point numbers.
339 * Wrote more documentation on trio_printf.
341 * Fixed problem with trailing zeroes after decimal-point.
344 Version 0.22 - 2000/08/06
345 -------------------------
346 * Added LC_CTYPE locale dependent character class expressions to scan lists.
347 Included are [:alnum:], [:alpha:], [:cntrl:], [:digit:], [:graph:],
348 [:lower:], [:print:], [:punct:], [:space:], [:upper:], [:xdigit:]
350 * Added C escapes to alternative string formatting and scanning.
352 * Added StrSubstringMax.
354 * Wrote a little more documentation.
356 * Fixed scanf return values.
358 * Fixed a sign error for non-ascii characters.
361 Version 0.21 - 2000/07/19
362 -------------------------
363 * Converted the documentation to TeX. With latex2man the documentation can
364 automatically be converted into man pages.
366 * Added trio_scanf, trio_vscanf, trio_fscanf, and trio_vfscanf.
368 * Added trio_dprintf, trio_vdprintf, trio_dscanf, and trio_vdscanf. These
369 functions can be used to write and read directly to pipes and sockets (the
370 assume blocking sockets). Stdio buffering is surpassed, so the functions are
371 async-safe. However, reading from stdin (STDIN_FILENO) or writing to stdout
372 (STDOUT_FILENO) reintroduces the buffering.
374 * Added trio_dprintf and trio_vdprintf. These can be used to write directly
375 to pipes and sockets.
378 Added trio_asprintf and trio_vasprintf, which are compatible with the GNU
381 * Added scanlist ranges for group scanning (%[]).
383 * Added width for scanning (missing for floating-point numbers though).
385 * Added variable size modifier (&) to handle system defined types of unknown
386 size. This modifier makes certain assumptions about the integer sizes, which
387 may not be valid on any machine. Consequently, the modifier will remain
388 undocumented, as it may be removed later.
390 * Added \777 and \xFF to alternative string scanning (%#s)
392 * Added the TRIO_REPLACE_STDIO check in the header.
394 * Improved performance of the multibyte character parsing.
396 * Fixed positionals (%n$) which had stopped working.
398 * Fixed hh and ll modifiers to allow exactly two letters and no more.
400 * Fixed ANSI C++ warnings. Also fixed the compiler warning about casting
401 between integer and pointer (this has been annoying me for ages).
403 * Fixed snprintf and vsnprintf with zero buffer size.
405 * Fixed NAN problems (reported by Keith Briggs).
407 * Fixed parsing of multibyte characters. The format string was not correctly
408 advanced in case of a multibyte character.
410 * Renamed many of the internal functions to have more consistant names.
412 * Removed the <quote=c> and <fill=c> modifiers. They are not really worth
413 including. The other <> modifiers may disappear as well.
416 Version 0.20 - 2000/06/05
417 -------------------------
418 * Added intmax_t and ptrdiff_t support.
420 * Added support for LC_NUMERIC grouping.
422 * Added double-dot notation for the conversion base. The style is now
423 %width.precision.base, where any argument can be a number, an asterix
424 indicating a parameter, or be omitted entirely. For example, %*..2i is
425 to specify binary numbers without precision, and with width as a parameter
428 * Added sticky modifier (!), which makes subsequent specifiers of the same
429 type reuse the current modifiers. Inspired by a suggestion from Gary Porter.
431 * Added group scanning (%[]). Scanlist ranges and multibyte sequences are not
434 * Added count scanning (%n).
436 * Changed the number scanning to accept thousand separators and any base.
438 * Fixed positional for parameters. It is possible to write something like
439 %3$*1$.*2$d (which happens to be the same as %*.*d).
441 * Fixed precision of integers.
443 * Fixed parameter flags. Before trio could only handle one parameter flag per
444 specifier, although two (three with double-dot base) were possible.
446 * Fixed isinf() for those platforms where it is unimplemented.
449 Version 0.18 - 2000/05/27
450 -------------------------
451 * Rewrote the entire floating-point formatting function (Danny Dulai had
452 reported several errors and even supplied some patches, which unfortunately
453 were lost due to the refactoring).
455 * Removed the use of strlen() in the declaration of a stack array. This
456 caused problems on some compilers (besides it isn't really ANSI C compliant
457 anyways). Using some arbitrarily chosen maximum value; should examine if
458 some standard defines an upper limit on the length of decimal-point and
459 thousands-separator (sizeof(wchar_t) perhaps?)
461 * Changed the parsing of the format string to be multibyte aware.
464 Version 0.17 - 2000/05/19
465 -------------------------
466 * Added INF, -INF, and NAN for floating-point numbers.
468 * Fixed %#.9g -- alternative with precision.
471 Fixed printing of negative hex numbers
473 * Joerg (last name unknown)
474 Fixed convertion of non-ASCII characters
477 Version 0.16 - 1999/08/06
478 -------------------------
479 * Changed the constness of the second argument of StrFloat and StrDouble. The
480 lack of parameter overloading in C is the reason for the strange use of
481 constness in strtof and strtod.
483 * Cleaned up constness.
486 Version 0.15 - 1999/07/23
487 -------------------------
488 * Fixed the internal representation of numbers from signed to unsigned. Signed
489 numbers posed a problem for large unsigned numbers (reported by Tero)
491 * Fixed a tiny bug in trio_vsprintfcat
493 * Changed the meaning of the max argument of StrAppendMax to be consistant
494 with StrFormatAppendMax. Now it is the maximal size of the entire target
495 buffer, not just the appended size. This makes it easier to avoid buffer
496 overflows (requested by Tero)
499 Version 0.14 - 1999/05/16
500 -------------------------
501 * Added size_t support (just waiting for a C99 compliant compiler to add
502 ptrdiff_t and intmax_t)
504 * Rewrote TrioOutStreamDouble so it does not use the libc sprintf to emulate
505 floating-point anylonger.
507 * Fixed width, precision, and adjustment for numbers and doubles.
510 Version 0.13 - 1999/05/06
511 -------------------------
512 * Fixed zero padding for %d. Now %d will only zero pad if explicitly requested
513 to do so with the 0 flag (reported by Tero).
515 * Fixed an incorrect while() condition in TrioGetString (reported by Tero).
518 Version 0.12 - 1999/04/19
519 -------------------------
520 * Fixed incorrect zero padding of pointers
522 * Added StrHash with STRIO_HASH_PLAIN
524 * Added StrFormatDateMax
527 Version 0.11 - 1999/03/25
528 -------------------------
529 * Made it compile under cygwin
531 * Fixed a bug were TrioPreprocess would return an error if no formatting chars
532 were found (reported by Tero).
537 * Added trio_strerror and TRIO_ERROR_NAME.
539 * Changed the error codes to be positive (as errno)
541 * Fixed two reads of uninitialized memory reported by Purify
543 * Added binary specifiers 'b' and 'B' (like SCO.) ThousandSeparator can be
544 used to separate nibbles (4 bit)
546 * Renamed all Internal* functions to Trio*, which seems like a better
547 namespace (even though it is of no practical interest because these
548 functions are not visible beyond the scope of this file.)
553 * Added hex-float format for StrToDouble
555 * Double references and gaps in the arguments are not allowed (for the %n$
556 format) and in both cases an error code is returned.
558 * Added StrToDouble (and StrToFloat)
563 * Added InStream and OutStream to the trio_T structure.
565 * Started work on TrioScan.
567 * Return values for errors changed. Two macros to unpack the error code has
568 been added to the header.
570 * Shortshort (hh) flag added.
572 * %#s also quotes the quote-char now.
574 * Removed the 'errorInFormat' boolean, which isn't used anymore after the
575 functions bail out with an error instead.
580 * More than MAX_PARAMETERS parametes will now cause the TrioPreprocess()
581 function to return error.
583 * Unknown flags and/or specifiers cause errors too.
585 * Added trio_snprintfcat and trio_vsnprintfcat and the defined name
586 StrFormatAppendMax. They append a formatted string to the end of a string.
588 * Define MAX_PARAMETERS to 128 at all times instead of using NL_ARGMAX when
591 * Added platform fixes for Amiga as suggested by Tero Jänkä <tesaja@utu.fi>
596 * vaprintf did add a zero byte even when it had failed.
598 * Cleaned up the code for locale handling and thousand separator
600 * Added trio_aprintf() and trio_vaprintf(). They return an allocated string.
602 * Added thousands separator for numbers
604 * Added floating point support for *printf
609 * StrMatchCase() called StrMatch() instead of itself recursively
611 * Rewrote the implementation of *printf and *scanf and put all the code in
612 this file. Extended qualifiers and qualifiers from other standards were
615 * Added StrSpanFunction, StrToLong, and StrToUnsignedLong
620 * Made the StrEqual* functions resistant to NULL pointers
622 * Turns out strdup() is no standard at all, and some platforms (I seem to
623 recall HP-UX) has problems with it. Made our own StrDuplicate() instead.
625 * Added StrFormat() and StrFormatMax() to serve as sprintf() and snprintf()