|
[code]int pt_trans( TCHAR *tmode, struct resbuf* ent1_210, struct resbuf* ent2_210, int status, ads_point ptin, ads_point ptout )
{
struct resbuf *from=NULL, *to=NULL;
int fret;
if( !_tcsicmp( tmode, _T("UtoW") ) )
{
from = ads_buildlist( RTSHORT, 1, RTNONE );
to = ads_buildlist( RTSHORT, 0, RTNONE );
fret = ads_trans( ptin, from, to, status, ptout );
}
else if( !_tcsicmp( tmode, _T("WtoU") ) )
{
from = ads_buildlist( RTSHORT, 0, RTNONE );
to = ads_buildlist( RTSHORT, 1, RTNONE );
fret = ads_trans( ptin, from, to, status, ptout );
}
else if( !_tcsicmp( tmode, _T("EtoE") ) )
{
fret = ads_trans( ptin, ent1_210, ent2_210, status, ptout );
}
else if( !_tcsicmp( tmode, _T("EtoU") ) )
{
to = ads_buildlist( RTSHORT, 1, RTNONE );
fret = ads_trans( ptin, ent1_210, to, status, ptout );
}
else if( !_tcsicmp( tmode, _T("EtoW") ) )
{
to = ads_buildlist( RTSHORT, 0, RTNONE );
fret = ads_trans( ptin, ent1_210, to, status, ptout );
}
else if( !_tcsicmp( tmode, _T("UtoE") ) )
{
from = ads_buildlist( RTSHORT, 1, RTNONE );
fret = ads_trans( ptin, from, ent2_210, status, ptout );
}
else if( !_tcsicmp( tmode, _T("WtoE") ) )
{
from = ads_buildlist( RTSHORT, 0, RTNONE );
fret = ads_trans( ptin, from, ent2_210, status, ptout );
}
if ( from ) ads_relrb( from );
if ( to ) ads_relrb( to );
return fret;
} [/code] |
|