skins/AknSkins/sdcsrc/SDCInput.cpp
changeset 64 ecb300a325e8
parent 53 8f0f421d3d0f
child 107 9f95a5546443
equal deleted inserted replaced
60:8c5e74913800 64:ecb300a325e8
   239     return result;
   239     return result;
   240     }
   240     }
   241 
   241 
   242 void CSDCInput::ConvertToAscii( char* aTarget, const wchar_t* aSource )
   242 void CSDCInput::ConvertToAscii( char* aTarget, const wchar_t* aSource )
   243     {
   243     {
   244     int i = 0;
   244     while( *aTarget++ = (char)*aSource++);
   245     while( true )
   245     }
   246         {
   246 
   247         aTarget[i] = (char)aSource[i];
   247 void CSDCInput::ConvertToWchar( wchar_t* aTarget, const char* aSource )
   248         if( !aSource[i] ) break;
   248     {
   249         i++;
   249     while( *aTarget++ = (wchar_t)*aSource++);
   250         }
       
   251     }
   250     }
   252 
   251 
   253 void CSDCInput::ConvertToAsciiWithCPPEscapes( char* aTarget, const wchar_t* aSource )
   252 void CSDCInput::ConvertToAsciiWithCPPEscapes( char* aTarget, const wchar_t* aSource )
   254     {
   253     {
   255     int srcI = 0;
   254     int srcI = 0;
   341     if( iUnicode )
   340     if( iUnicode )
   342         {
   341         {
   343 #if (defined(__MSVCRT__) || defined(_MSC_VER))
   342 #if (defined(__MSVCRT__) || defined(_MSC_VER))
   344         iNextChar = fgetwc( iFile );
   343         iNextChar = fgetwc( iFile );
   345 #else
   344 #else
   346         /* to make it work under linux */
   345         /* Workaround for linux */
   347         char c1 = fgetc(iFile);
   346         char c1 = fgetc(iFile);
   348         char c2 = fgetc(iFile);
   347         char c2 = fgetc(iFile);
   349         
   348         
   350         iNextChar = c1 | (c2 << 8);
   349         iNextChar = c1 | (c2 << 8);
   351 #endif
   350 #endif