From Mark.Martinec@ijs.si Wed, 18 Oct 2000 19:04:24 +0200 Date: Wed, 18 Oct 2000 19:04:24 +0200 From: Mark Martinec Mark.Martinec@ijs.si Subject: [snprintf-announce] Portable snprintf version 2.2 available - a %c bug fixed A new release 2.2 of portable snprintf routine is now available. Most importantly it fixes a (possible) problem with %c conversion. Available at: http://www.ijs.si/software/snprintf/ A new mailing list snprintf-announce@ijs.si is also now available. This is a very low-traffic mailing list where announcements about new versions will be posted, as well as warnings about threatening bugs if discovered. The posting is restricted to snprintf developer(s). To subscribe to (or unsubscribe from) the mailing list please visit the list server's web page http://mailman.ijs.si/listinfo/snprintf-announce You can also subscribe to the list by mailing the command SUBSCRIBE either in the subject or in the message body to the address snprintf-announce-request@ijs.si . You will be asked for confirmation before subscription will be effective. The list of members is only accessible to the list administrator, so there is no need for concern about automatic e-mail address gatherers. Here are the release notes for version 2.2: + BUG FIX: the %c conversion used a temporary variable that was no longer in scope when referenced, possibly causing incorrect resulting character; + BUG FIX: make precision and minimal field width unsigned to handle huge values (2^31 <= n < 2^32) correctly; also be more careful in the use of signed/unsigned/size_t internal variables -- probably more careful than many vendor implementations, but there may still be a case where huge values of str_m, precision or minimal field could cause incorrect behaviour; + use separate variables for signed/unsigned arguments, and for short/int, long, and long long argument lengths to avoid possible incompatibilities on certain computer architectures. Also use separate variable arg_sign to hold sign of a numeric argument, to make code more transparent; + some fiddling with zero padding and "0x" to make it Linux compatible; + systematically use macros fast_memcpy and fast_memset instead of case-by-case hand optimization; determine some breakeven string lengths for different architectures; + terminology change: format -> conversion specifier, C9x -> ISO/IEC 9899:1999 ("ISO C99"), alternative form -> alternate form, data type modifier -> length modifier; + several comments rephrased and new ones added; + make compiler not complain about 'credits' defined but not used; Regards Mark Martinec -- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! Mark Martinec (system manager) tel +386 1 4773-575 !! !! J. Stefan Institute, Jamova 39 fax +386 1 2519-385 !! !! SI-1000 Ljubljana, Slovenia mark.martinec@ijs.si !! !!!!!!!!!!!!!!!!!!!!!!!!!! http://www.ijs.si/people/mark/ !!!!