mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-18 22:26:30 +01:00
overload symReplaceStr
This commit is contained in:
parent
b99f326465
commit
4c1e3a69ac
1 changed files with 17 additions and 1 deletions
|
@ -51,6 +51,22 @@ symReplaceStrIfDiff( MPFORMAL XP_UCHAR** loc, const TDesC16& desc )
|
||||||
*loc = newStr;
|
*loc = newStr;
|
||||||
} /* symReplaceStr */
|
} /* symReplaceStr */
|
||||||
|
|
||||||
|
void
|
||||||
|
symReplaceStrIfDiff( MPFORMAL XP_UCHAR** loc, const XP_UCHAR* str )
|
||||||
|
{
|
||||||
|
if ( *loc != NULL ) {
|
||||||
|
if ( 0 == XP_STRCMP( *loc, str ) ) {
|
||||||
|
return; /* nothing to do */
|
||||||
|
}
|
||||||
|
/* need to free */
|
||||||
|
XP_FREE( mpool, *loc );
|
||||||
|
}
|
||||||
|
|
||||||
|
TInt len = XP_STRLEN( str ) + 1;
|
||||||
|
*loc = (XP_UCHAR*)XP_MALLOC( mpool, len );
|
||||||
|
XP_MEMCPY( (void*)*loc, (void*)str, len );
|
||||||
|
} /* symReplaceStrIfDiff */
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@ -83,7 +99,7 @@ void sym_debugf( char* aFmt, ... )
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
void p_ignore(...) {}
|
void p_ignore( char* , ...) {}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue