#endif
}
+/**
+***
+**/
+
+#ifdef DISABLE_GETTEXT
+
+const char*
+tr_strip_positional_args( const char* str )
+{
+ static size_t bufsize = 0;
+ static char * buf = NULL;
+ const size_t len = strlen( str );
+ char * out;
+
+ if( bufsize < len ) {
+ bufsize = len * 2;
+ buf = tr_renew( char, buf, bufsize );
+ }
+
+ for( out=buf; *str; ++str ) {
+ *out++ = *str;
+ if( ( *str == '%' ) && isdigit( str[1] ) ) {
+ const char * tmp = str + 1;
+ while( isdigit( *tmp ) )
+ ++tmp;
+ if( *tmp == '$' )
+ str = tmp;
+ }
+ }
+ *out = '\0';
+
+ return buf;
+}
+
+#endif
/**
***
#endif
#endif
+/* #define DISABLE_GETTEXT */
+#ifdef DISABLE_GETTEXT
+const char* tr_strip_positional_args( const char* fmt );
+#undef _
+#define _(a) tr_strip_positional_args(a)
+#endif
+
#define tr_nerr( n, a... ) tr_msg( __FILE__, __LINE__, TR_MSG_ERR, n, ## a )
#define tr_ninf( n, a... ) tr_msg( __FILE__, __LINE__, TR_MSG_INF, n, ## a )
#define tr_ndbg( n, a... ) tr_msg( __FILE__, __LINE__, TR_MSG_DBG, n, ## a )