skins/AknSkins/sdcsrc/SDCInput.cpp
branchRCL_3
changeset 107 9f95a5546443
parent 106 e4e3998ddda2
child 111 2fab78db5d89
equal deleted inserted replaced
106:e4e3998ddda2 107:9f95a5546443
   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     while( *aTarget++ = (char)*aSource++);
   244     int i = 0;
   245     }
   245     while( true )
   246 
   246         {
   247 void CSDCInput::ConvertToWchar( wchar_t* aTarget, const char* aSource )
   247         aTarget[i] = (char)aSource[i];
   248     {
   248         if( !aSource[i] ) break;
   249     while( *aTarget++ = (wchar_t)*aSource++);
   249         i++;
       
   250         }
   250     }
   251     }
   251 
   252 
   252 void CSDCInput::ConvertToAsciiWithCPPEscapes( char* aTarget, const wchar_t* aSource )
   253 void CSDCInput::ConvertToAsciiWithCPPEscapes( char* aTarget, const wchar_t* aSource )
   253     {
   254     {
   254     int srcI = 0;
   255     int srcI = 0;
   340     if( iUnicode )
   341     if( iUnicode )
   341         {
   342         {
   342 #if (defined(__MSVCRT__) || defined(_MSC_VER))
   343 #if (defined(__MSVCRT__) || defined(_MSC_VER))
   343         iNextChar = fgetwc( iFile );
   344         iNextChar = fgetwc( iFile );
   344 #else
   345 #else
   345         /* Workaround for linux */
   346         /* to make it work under linux */
   346         char c1 = fgetc(iFile);
   347         char c1 = fgetc(iFile);
   347         char c2 = fgetc(iFile);
   348         char c2 = fgetc(iFile);
   348         
   349         
   349         iNextChar = c1 | (c2 << 8);
   350         iNextChar = c1 | (c2 << 8);
   350 #endif
   351 #endif