Beispiel #1
0
/*
 * copyString - copy from string to memory
 */
static char _ISFAR *copyString( char _ISFAR *mem, const char _ISFAR *str, int len )
{
    if ( !mem || !str ) return( mem );
    _FARmemcpy( mem, str, len );
    return( mem+len );

} /* copyString */
Beispiel #2
0
/*
 * copyString - copy from string to memory
 */
static char _ISFAR *copyString( char _ISFAR *mem, char _ISFAR *str, int len )
{
#if defined(__NT__) && !defined(__DEC__)
    int i;

    for(i=0;i<len/2;i++ ) {
        *(short *)mem = *str;
        mem += 2;
        str++;
    }
    return( mem );
#else
    _FARmemcpy( mem, str, len );
    return( mem+len );
#endif

} /* copyString */
Beispiel #3
0
/*
 * copyString - copy from string to memory
 */
static char _ISFAR *copyString( char _ISFAR *mem, char _ISFAR *str, int len )
{
#if defined(__NT__)
    // convert ANSI or DBCS string to Unicode properly - rnk 3/1/96
    MultiByteToWideChar( CP_ACP, MB_PRECOMPOSED, str, -1, (LPWSTR)mem, len );
    return( mem + len );
#if 0 // old non-Kanji safe version - rnk
    int i;

    for(i=0;i<len/2;i++ ) {
        *(short *)mem = *str;
        mem += 2;
        str++;
    }
    return( mem );
#endif
#else
    _FARmemcpy( mem, str, len );
    return( mem+len );
#endif

} /* copyString */