apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Ruppert ...@ruppert-it.de>
Subject scanf() family functions in apr?
Date Mon, 10 Sep 2007 20:35:17 GMT
Hi all,

I'm currently finishing a linux to windows port using apr and mingw and
stumbled over the 64-bit integer problem. Normally gcc uses %lld/%llu
for 64-bit integers for printf() and scanf() like functions. But mingw
uses the microsoft %I64d/%I64u style formatting. So I introduced a
define for using these different formatting strings like

#ifdef MINGW
#define INT64FMT "%I64d"
#else
#define INT64FMT "%lld"
#endif

Now I used this define in scanf()/printf() functions but also in my own
my_snprintf() function which just wraps apr_vsnprintf() function. But
the apr version for sure does not support the windows style 64-bit
formatting string. Now it would be very nice if there would be an
apr_scanf() function which just also uses the "%lld" string! Any chances
for such a function?

Also related to formatting functions, I currently use the ANSI-C
versions for file i/o because there is no apr_file_vprintf() function!
What about this function? I' really need it, to write my own functions
which can prepand a prefix to any output...

Regards,
Stefan

Mime
View raw message