1CHANGES -- trio 2 3 4The changes listed without a name attributed to them were most likely done by 5Bjorn Reese and/or Daniel Stenberg. 6 7 8Bogofilter-local change - 2005-12-30 9------------------------------------ 10* Matthias Andree 11 Fix triodef.h to work on systems were empty macros don't default to 0 12 in numeric evaluations, such as Sun Workshop 6. 13 14 15Version 1.11 - 2005/12/26 16------------------------- 17* Fixed accuracy for denormalized numbers (bug item #758327). 18 19* Glen Davidson 20 Fixed scanning of floating-point numbers without a decimal-point (bug item 21 #1370427). 22 23* David Byron 24 Fixed more compiler warnings. 25 26* Fixed compilation of trio_to_long_double and TRIO_FEATURE_FLOAT (reported by 27 David Byron). 28 29* Fixed precision of large floating-point numbers (bug item #1314524). 30 31* Karl Bochert 32 Fixed trio_fpclassify_and_signbit to only restore the floating-point 33 precision. 34 35* Fixed detection of need for ieee option on FreeBSD/Alpha. 36 37* Added TRIO_SNPRINTF_ONLY compilation. 38 39* Fixed trio_to_double by not using strtod() on Tru64/DECC because it does not 40 support hex-floats. 41 42* Fixed crash on 64 bits machines related to a previous workaround in version 43 1.9 for uninitialized va_list (reported by Nicolai Tufar, suggestion by 44 Douglas Gwyn). 45 46* Patrick Jessee 47 Fixed width calculation for %g. 48 49* Added macros for internal features. 50 51* Jon Foster 52 Added macros for conditional compilation of many features. Documented all 53 the features. 54 55* Karl Bochert 56 Fixed problem with Borland C++, which changes the floating-point precision 57 for certain math functions (log10() and _fpclass()). 58 59* Karl Bochert 60 Fixed compilation warnings on Borland C++. 61 62* Removed any occurrence of #elif because Borland C++ reports wrong line 63 numbers when they are present (reported by Karl Bochert). 64 65* David Byron 66 Added trio_asprintfv. 67 68* Brian Chapman 69 Fixed Mac OS X compilation. 70 71* David Byron 72 Fixed several compiler warnings. 73 74* Fixed printing of out-of-range arguments for %hhd and %hd. These arguments 75 can be out of range because of default integer promotion. 76 77* Bob Friesenhahn 78 Fixed installation of header files. 79 80* Joe Orton 81 Added SHELL to Makefile.in to avoid problems with CShells. 82 83* Shaun Tancheff 84 Fixed regresion tests for MSVC. 85 86* Craig Berry 87 Fixed the VMS C99 workaround. 88 89 90Version 1.10 - 2003/03/06 91------------------------- 92* Rearranged some include files to accommodate large file support (reported by 93 Albert Chin-A-Young). 94 95* Added support for SunOS 4.1.x lack of strerror, tolower, and toupper 96 (reported by Peter McCluskey). 97 98* Fixed pedantic compilation with TRIO_MINIMAL. 99 100* Jose Kahan 101 Moved <limits.h> to avoid redefinition problems. 102 103* Fixed hex-float exponents (reported by Matthias Clasen). 104 105* Fixed handling of negative width and precision via paramters (reported by 106 Jacob Navia). 107 108* Nigel Hall 109 Fixed TRIO_VA_START for VMS. 110 111* Rune Enggaard Lausen 112 Fixed compilation for Borland C++ Builder. 113 114* Fixed precision of hex-float numbers (reported by James Antill). 115 116* Fixed plus sign only to be added for signed numbers. 117 118* Fixed printing of integers with value and precision of zero (reported by 119 James Antill). 120 121* Fixed %#.o to only print one zero if the value is zero (reported by James 122 Antill). 123 124* Rewrote check for IEEE compilation option to remove dependency on additional 125 scripts. 126 127* Mehdi Lavasani 128 Makefile install target fixed to work with older install programs. 129 130* Collapsed the DECC, MSVC, HP-UX, and AIX code for trio_fpclassify_and_sign() 131 with further preprocessing. 132 133 134Version 1.9 - 2002/10/13 135------------------------ 136* Fixed trio_fpclassify_and_signbit on AIX 3.2 137 138* Added configure check for -ieee/-mieee compilation option for Alpha machines. 139 140* Craig Berry 141 Fixed compilation on VMS. 142 143* Albert Chin-A-Young 144 Fixed incorrect conditional expression in trio_isinf. 145 146* Fixed the warnings about uninitialized va_list in the printfv and scanfv 147 family without the use of compiler specific pragmas (suggested by Ian 148 Pilcher). 149 150* Fixed space flag for floating-point numbers (reported by Ian Main). 151 152 153Version 1.8 - 2002/07/10 154------------------------ 155* Fixed infinite loop in multibyte handling (reported by Gisli Ottarsson). 156 157* Added the customizable cprintf/cscanf family which enables to user to specify 158 input and output stream functions (suggested by Florian Schulze). 159 160* Fixed trio_isinf by removing the HP-UX workaround, and instead making sure 161 that the C99 macro will adhere to the trio return values (reported by Luke 162 Dunstan). 163 164* Alexander Lukyanov 165 Fixed boundary case for scanning and EOF. 166 167* Jacob Navia 168 Enabled the L modifier for formatting. 169 170* Added TRIO_MINIMAL to build trio without the string functions. 171 172* Added the R modifier to print rounded floating-point numbers. 173 174* Added trio_to_long_double and long double scanning (the L modifier). 175 176* Added trio_locale_decimal_point, trio_locale_thousand_separator, 177 trio_locale_grouping to overwrite locale settings. 178 179* Rewrote TrioWriteDouble to avoid temporary buffers and thus the danger of 180 buffer overflows (for instance %.5000f). 181 182* Improved floating-point formatting accuracy. 183 184* Fixed formatting of non-decimal exponents. 185 186* Fixed thousand separator checking. 187 188* Fixed %f scanning to get a float and %lf to get a double. 189 190* Fixed WIN32 compilation (reported by Emmanuel Mogenet) 191 192* Fixed regression test cases to exclude disabled features. 193 194 195Version 1.7 - 2002/05/07 196------------------------ 197* Fixed trio_to_double to handle hex-floats properly. 198 199* Fixed printing of %a-format to be like %e, not like %g. 200 201* Fixed floating-point printing of values beyond the machine accuracy. 202 203* Fixed %f for printing with large precision. 204 205* Fixed the usage of C99 nan(), which caused a crash on OSF/1 (reported by 206 Georg Bolz) 207 208* Joe Orton 209 Fixed %p on 64-bit platforms. 210 211* Made trio compile with K&R compilers. 212 213* Emmanuel Mogenet 214 Fixed bug in trio_asprintf. 215 216* Emmanuel Mogenet 217 Various WIN32 fixes. 218 219* Joe Orton 220 Fixed trio_isinf() on HP-UX, and added test cases. 221 222* Joe Orton 223 Fixed non-portable use of $^ in Makefile. 224 225* Joe Orton 226 Added autoconf. 227 228* Alexander Lukyanov 229 Fixed a number of bugs in the scanning of EOF and the count specifier. 230 231* Richard Jinks 232 Added trio_nzero 233 234* Fixed incorrect handling of return code from TrioReadChar (reported by 235 Henrik L�f) 236 237* Fixed parsing of character class expressions. 238 239* Fixed trio_to_double which did not work with long fractions. 240 241* Fixed %f for printing of large numbers. 242 243* Fixed %#s to handle whitespaces as non-printable characters. 244 245* Added trio_isfinite, trio_signbit, and trio_fpclassify. 246 247* Added new test cases. 248 249 250Version 1.6 - 2002/01/13 251------------------------ 252* Added dynamic string functions. 253 254* Rewrote and extended documentation in JavaDoc (using Doxygen). 255 256* Moved and renamed strio functions to triostr. 257 258* Robert Collins 259 Added definition for Cygwin. 260 261* Markus Henke 262 Added long double workaround for the HP C/iX compiler. 263 264* Marc Verwerft 265 Improved error handling for dynamically allocated strings. 266 267* John Fotheringham 268 Made trionan compile on OpenVMS. 269 270* Added 'd' and 'D' as exponent letters when using TRIO_MICROSOFT. 271 272* Fixed uninitial memory read for the parameter modifiers. 273 274 275Version 1.5 - 2001/09/08 276------------------------ 277* Merged with libxml changes. 278 279* Moved NaN and Inf handling to separate file to enable reuse in other 280 projects. 281 282* Igor Zlatkovic 283 Fixed TrioGenerateNan for MSVC. 284 285* Fixed lots of preprocessor macros and internal data structure names. 286 287 288Version 1.4 - 2001/06/03 289------------------------ 290* Added hex-float (%a and %A) for scanning. 291 292* Added wide character arguments (%ls, %ws, %S, %lc, %wc, and %C) for both 293 printf and scanf. 294 295* Added mutex callbacks for user-specified specifiers to enable applications to 296 add thread-safety. These are registered with trio_register, where the 297 namespace is set to either ":enter" to lock a mutex, or ":leave" to unlock a 298 mutex. 299 300* Added equivalence class expressions for scanning. For example, %[[=a=]] scans 301 for all letters in the same equivalence class as the letter 'a' as defined 302 by the locale. 303 304* Changed character class expressions for scanning. The expressions must now 305 be embedded withing an extra set of brackets, e.g. %[[:alpha:]]. This was 306 done to adhere to the syntax of UNIX98 regular expressions. 307 308* Added the possibility to specify standard support (TRIO_C99 etc.) as compiler 309 options. 310 311* Fixed conversion of hex-float in StrToDouble. 312 313* Fixed formatting of hex-float numbers. 314 315* Stan Boehm 316 Fixed crash on QNX, which happend because some buffers on the stack were too 317 big. 318 319* Fixed default precision for %f and %g (reported by Jose Ortiz) 320 321* Howard Kapustein 322 Added the I8, I16, I32, and I64 modifiers. 323 324* Jose Ortiz 325 Fixed rounding problem for %e. 326 327* Jose Ortiz 328 Fixed various problems with the xlC and Sun C++ compilers. 329 330 331Version 1.3 - 2001/05/16 332------------------------ 333* trio's treatment of the field width when the %e code was used was not 334 correct (reported by Gisli Ottarsson). It turns out the fraction part should 335 be zero-padded by default and the exponent part should be zero-prefixed if 336 it is only one digit. At least that's how the GNU and Sun libc's work. The 337 trio floating point output looks identical to them now. 338 339* Fixed group scanning with modifiers. 340 341* Fixed compilation for 64-bit Digital Unix. 342 343* Igor Zlatkovic 344 Fixed compilation of dprintf, which uses read/write, for MSVC. 345 346* Fixed various compilation problems on Digital Unix (mainly associated with 347 va_list). 348 349 350Version 1.2 - 2001/04/11 351------------------------ 352* Added autoconf integration. If compiled with HAVE_CONFIG_H the following 353 happens. Firstly, <config.h> is included. Secondly, trio will only be 354 compiled if WITH_TRIO is defined herein. Thirdly, if TRIO_REPLACE_STDIO is 355 defined, only stdio functions that have not been detected by autoconf, i.e. 356 those not defined by HAVE_PRINTF or similar, will be replaced by trio 357 functions (suggested by Daniel Veillard). 358 359* Fixed '%m.nf' output. Previously trio did not treat the width properly 360 in all cases (reported by Gisli Ottarsson). 361 362* Added explicit promotion for the scanfv family. 363 364* Fixed more C++ compilation warnings. 365 366 367Version 1.1 - 2001/02/25 368------------------------ 369* Added explicit promotion for the printfv familiy. A float must be specified 370 by %hf. 371 372* Fixed positionals for printfv (reported by Gisli Ottarsson). 373 374* Fixed an integer to pointer conversion problem on the SGI MIPS C compiler 375 (reported by Gisli Ottarsson). 376 377* Fixed ANSI C++ warnings (type casting, and namespace is a reserved keyword). 378 379* Added \n to all examples in the documentation to prevent confusion. 380 381* Fixed StrSubstringMax 382 383 384Version 1.0 - 2000/12/10 385------------------------ 386* Bumped Version number. 387 388 389Version 0.25 - 2000/12/09 390------------------------- 391* Wrote more documentation. 392 393* Improved NaN support and added NaN to regression test. 394 395* Fixed C99 support. 396 397* Added missing getter/setter functions. 398 399 400Version 0.24 - 2000/12/02 401------------------------- 402* Added callback functionality for the user-defined specifier (<>). All 403 the necessary functions are defined in triop.h header file. See the 404 documentation for trio_register for further detail. 405 406* Wrote initial documentation on the callback functionality. 407 408* Added the printfv and scanfv family of functions, which takes a pointer 409 array rather than variadic arguments. Each pointer in the array must point 410 to the associated data (requested by Bruce Korb). 411 412* As indicated in version 0.21 the extension modifiers (<>) have now been 413 completely removed. 414 415* Added skipping of thousand-separators in floating-point number scanning. 416 417 418Version 0.23 - 2000/10/21 419------------------------- 420* Added width to scanning of floating-point numbers. 421 422* Wrote more documentation on trio_printf. 423 424* Fixed problem with trailing zeroes after decimal-point. 425 426 427Version 0.22 - 2000/08/06 428------------------------- 429* Added LC_CTYPE locale dependent character class expressions to scan lists. 430 Included are [:alnum:], [:alpha:], [:cntrl:], [:digit:], [:graph:], 431 [:lower:], [:print:], [:punct:], [:space:], [:upper:], [:xdigit:] 432 433* Added C escapes to alternative string formatting and scanning. 434 435* Added StrSubstringMax. 436 437* Wrote a little more documentation. 438 439* Fixed scanf return values. 440 441* Fixed a sign error for non-ascii characters. 442 443 444Version 0.21 - 2000/07/19 445------------------------- 446* Converted the documentation to TeX. With latex2man the documentation can 447 automatically be converted into man pages. 448 449* Added trio_scanf, trio_vscanf, trio_fscanf, and trio_vfscanf. 450 451* Added trio_dprintf, trio_vdprintf, trio_dscanf, and trio_vdscanf. These 452 functions can be used to write and read directly to pipes and sockets (the 453 assume blocking sockets). Stdio buffering is surpassed, so the functions are 454 async-safe. However, reading from stdin (STDIN_FILENO) or writing to stdout 455 (STDOUT_FILENO) reintroduces the buffering. 456 457* Added trio_dprintf and trio_vdprintf. These can be used to write directly 458 to pipes and sockets. 459 460* Paul Janzen 461 Added trio_asprintf and trio_vasprintf, which are compatible with the GNU 462 and BSD interfaces. 463 464* Added scanlist ranges for group scanning (%[]). 465 466* Added width for scanning (missing for floating-point numbers though). 467 468* Added variable size modifier (&) to handle system defined types of unknown 469 size. This modifier makes certain assumptions about the integer sizes, which 470 may not be valid on any machine. Consequently, the modifier will remain 471 undocumented, as it may be removed later. 472 473* Added \777 and \xFF to alternative string scanning (%#s) 474 475* Added the TRIO_REPLACE_STDIO check in the header. 476 477* Improved performance of the multibyte character parsing. 478 479* Fixed positionals (%n$) which had stopped working. 480 481* Fixed hh and ll modifiers to allow exactly two letters and no more. 482 483* Fixed ANSI C++ warnings. Also fixed the compiler warning about casting 484 between integer and pointer (this has been annoying me for ages). 485 486* Fixed snprintf and vsnprintf with zero buffer size. 487 488* Fixed NAN problems (reported by Keith Briggs). 489 490* Fixed parsing of multibyte characters. The format string was not correctly 491 advanced in case of a multibyte character. 492 493* Renamed many of the internal functions to have more consistant names. 494 495* Removed the <quote=c> and <fill=c> modifiers. They are not really worth 496 including. The other <> modifiers may disappear as well. 497 498 499Version 0.20 - 2000/06/05 500------------------------- 501* Added intmax_t and ptrdiff_t support. 502 503* Added support for LC_NUMERIC grouping. 504 505* Added double-dot notation for the conversion base. The style is now 506 %width.precision.base, where any argument can be a number, an asterix 507 indicating a parameter, or be omitted entirely. For example, %*..2i is 508 to specify binary numbers without precision, and with width as a parameter 509 on the va_list. 510 511* Added sticky modifier (!), which makes subsequent specifiers of the same 512 type reuse the current modifiers. Inspired by a suggestion from Gary Porter. 513 514* Added group scanning (%[]). Scanlist ranges and multibyte sequences are not 515 supported yet. 516 517* Added count scanning (%n). 518 519* Changed the number scanning to accept thousand separators and any base. 520 521* Fixed positional for parameters. It is possible to write something like 522 %3$*1$.*2$d (which happens to be the same as %*.*d). 523 524* Fixed precision of integers. 525 526* Fixed parameter flags. Before trio could only handle one parameter flag per 527 specifier, although two (three with double-dot base) were possible. 528 529* Fixed isinf() for those platforms where it is unimplemented. 530 531 532Version 0.18 - 2000/05/27 533------------------------- 534* Rewrote the entire floating-point formatting function (Danny Dulai had 535 reported several errors and even supplied some patches, which unfortunately 536 were lost due to the refactoring). 537 538* Removed the use of strlen() in the declaration of a stack array. This 539 caused problems on some compilers (besides it isn't really ANSI C compliant 540 anyways). Using some arbitrarily chosen maximum value; should examine if 541 some standard defines an upper limit on the length of decimal-point and 542 thousands-separator (sizeof(wchar_t) perhaps?) 543 544* Changed the parsing of the format string to be multibyte aware. 545 546 547Version 0.17 - 2000/05/19 548------------------------- 549* Added INF, -INF, and NAN for floating-point numbers. 550 551* Fixed %#.9g -- alternative with precision. 552 553* Ken Gibson 554 Fixed printing of negative hex numbers 555 556* Joerg (last name unknown) 557 Fixed convertion of non-ASCII characters 558 559 560Version 0.16 - 1999/08/06 561------------------------- 562* Changed the constness of the second argument of StrFloat and StrDouble. The 563 lack of parameter overloading in C is the reason for the strange use of 564 constness in strtof and strtod. 565 566* Cleaned up constness. 567 568 569Version 0.15 - 1999/07/23 570------------------------- 571* Fixed the internal representation of numbers from signed to unsigned. Signed 572 numbers posed a problem for large unsigned numbers (reported by Tero) 573 574* Fixed a tiny bug in trio_vsprintfcat 575 576* Changed the meaning of the max argument of StrAppendMax to be consistant 577 with StrFormatAppendMax. Now it is the maximal size of the entire target 578 buffer, not just the appended size. This makes it easier to avoid buffer 579 overflows (requested by Tero) 580 581 582Version 0.14 - 1999/05/16 583------------------------- 584* Added size_t support (just waiting for a C99 compliant compiler to add 585 ptrdiff_t and intmax_t) 586 587* Rewrote TrioOutStreamDouble so it does not use the libc sprintf to emulate 588 floating-point anylonger. 589 590* Fixed width, precision, and adjustment for numbers and doubles. 591 592 593Version 0.13 - 1999/05/06 594------------------------- 595* Fixed zero padding for %d. Now %d will only zero pad if explicitly requested 596 to do so with the 0 flag (reported by Tero). 597 598* Fixed an incorrect while() condition in TrioGetString (reported by Tero). 599 600 601Version 0.12 - 1999/04/19 602------------------------- 603* Fixed incorrect zero padding of pointers 604 605* Added StrHash with STRIO_HASH_PLAIN 606 607* Added StrFormatDateMax 608 609 610Version 0.11 - 1999/03/25 611------------------------- 612* Made it compile under cygwin 613 614* Fixed a bug were TrioPreprocess would return an error if no formatting chars 615 were found (reported by Tero). 616 617 618Version - 1999/03/19 619-------------------- 620* Added trio_strerror and TRIO_ERROR_NAME. 621 622* Changed the error codes to be positive (as errno) 623 624* Fixed two reads of uninitialized memory reported by Purify 625 626* Added binary specifiers 'b' and 'B' (like SCO.) ThousandSeparator can be 627 used to separate nibbles (4 bit) 628 629* Renamed all Internal* functions to Trio*, which seems like a better 630 namespace (even though it is of no practical interest because these 631 functions are not visible beyond the scope of this file.) 632 633 634Version - 1999/03/12 635-------------------- 636* Added hex-float format for StrToDouble 637 638* Double references and gaps in the arguments are not allowed (for the %n$ 639 format) and in both cases an error code is returned. 640 641* Added StrToDouble (and StrToFloat) 642 643 644Version - 1999/03/08 645-------------------- 646* Added InStream and OutStream to the trio_T structure. 647 648* Started work on TrioScan. 649 650* Return values for errors changed. Two macros to unpack the error code has 651 been added to the header. 652 653* Shortshort (hh) flag added. 654 655* %#s also quotes the quote-char now. 656 657* Removed the 'errorInFormat' boolean, which isn't used anymore after the 658 functions bail out with an error instead. 659 660 661Version - 1999/03/04 662-------------------- 663* More than MAX_PARAMETERS parametes will now cause the TrioPreprocess() 664 function to return error. 665 666* Unknown flags and/or specifiers cause errors too. 667 668* Added trio_snprintfcat and trio_vsnprintfcat and the defined name 669 StrFormatAppendMax. They append a formatted string to the end of a string. 670 671* Define MAX_PARAMETERS to 128 at all times instead of using NL_ARGMAX when 672 that exists. 673 674* Added platform fixes for Amiga as suggested by Tero J�nk� <tesaja@utu.fi> 675 676 677Version - 1999/01/31 678-------------------- 679* vaprintf did add a zero byte even when it had failed. 680 681* Cleaned up the code for locale handling and thousand separator 682 683* Added trio_aprintf() and trio_vaprintf(). They return an allocated string. 684 685* Added thousands separator for numbers 686 687* Added floating point support for *printf 688 689 690Version - 1998/10/20 691-------------------- 692* StrMatchCase() called StrMatch() instead of itself recursively 693 694* Rewrote the implementation of *printf and *scanf and put all the code in 695 this file. Extended qualifiers and qualifiers from other standards were 696 added. 697 698* Added StrSpanFunction, StrToLong, and StrToUnsignedLong 699 700 701Version - 1998/05/23 702-------------------- 703* Made the StrEqual* functions resistant to NULL pointers 704 705* Turns out strdup() is no standard at all, and some platforms (I seem to 706 recall HP-UX) has problems with it. Made our own StrDuplicate() instead. 707 708* Added StrFormat() and StrFormatMax() to serve as sprintf() and snprintf() 709 respectively. 710