# # patch "ChangeLog" # from [3a2345fc6a54f3e2e20c50da572852a27b5afd29] # to [ae2d98f6da60ef8b4edc783a55c8adc393dd5576] # # patch "sanity.cc" # from [d43cf000a18c156b97527e0724635b050159d16d] # to [7aef12692c6817c9405c6e34552c48a0b79335f8] # # patch "sanity.hh" # from [2c8cee0f678668a356de29a5c61fb3eed8c87b74] # to [5a3b4f9635067d92301924a42621085c15a33188] # ======================================================================== --- ChangeLog 3a2345fc6a54f3e2e20c50da572852a27b5afd29 +++ ChangeLog ae2d98f6da60ef8b4edc783a55c8adc393dd5576 @@ -1,5 +1,10 @@ 2005-09-22 Benoît Dejean + * sanity.{cc,hh}: Uninlined F() and FP(). + This happily saves ~100KB of .text on my ppc. + +2005-09-22 Benoît Dejean + * netsync.cc: Reverted changes from f0a632bf14468b6e03a488d6f1a64ef18b61d04c to 4f7f638954c79c54460d04c3be111acad8b26dd3 ======================================================================== --- sanity.cc d43cf000a18c156b97527e0724635b050159d16d +++ sanity.cc 7aef12692c6817c9405c6e34552c48a0b79335f8 @@ -298,3 +298,16 @@ % name % func % file % line ).str(); } + + +boost::format F(const char * str) +{ + return boost::format(gettext(str), get_user_locale()); +} + + +boost::format FP(const char * str1, const char * strn, unsigned long count) +{ + return boost::format(ngettext(str1, strn, count), get_user_locale()); +} + ======================================================================== --- sanity.hh 2c8cee0f678668a356de29a5c61fb3eed8c87b74 +++ sanity.hh 5a3b4f9635067d92301924a42621085c15a33188 @@ -92,10 +92,10 @@ extern sanity global_sanity; // F is for when you want to build a boost formatter for display -#define F(str) boost::format(gettext(str), get_user_locale()) +boost::format F(const char * str); // FP is for when you want to build a boost formatter for displaying a plural -#define FP(str1, strn, count) boost::format(ngettext(str1, strn, count), get_user_locale()) +boost::format FP(const char * str1, const char * strn, unsigned long count); // L is for logging, you can log all you want #define L(fmt) global_sanity.log(fmt, __FILE__, __LINE__)