Ignore:
Timestamp:
Jun 25, 2010, 1:13:35 AM (12 years ago)
Author:
charles
Message:

(trunk) #3311 "MingW build of Transmission" -- modify tr_strip_positional_args() to strip out the ' printf flag. Platforms not supporting $ tend to not support ' either

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/utils.c

    r10837 r10844  
    405405***/
    406406
    407 #ifdef DISABLE_GETTEXT
    408 
    409407const char*
    410408tr_strip_positional_args( const char* str )
     
    425423    {
    426424        *out++ = *str;
     425
    427426        if( ( *str == '%' ) && isdigit( str[1] ) )
    428427        {
     
    430429            while( isdigit( *tmp ) )
    431430                ++tmp;
    432 
    433431            if( *tmp == '$' )
    434                 str = tmp;
     432                str = tmp[1]=='\'' ? tmp+1 : tmp;
    435433        }
     434
     435        if( ( *str == '%' ) && ( str[1] == '\'' ) )
     436            str = str + 1;
     437 
    436438    }
    437439    *out = '\0';
     
    439441    return strcmp( buf, in ) ? buf : in;
    440442}
    441 
    442 #endif
    443443
    444444/**
Note: See TracChangeset for help on using the changeset viewer.