Diff for /np2/win9x/oemtext.cpp between versions 1.1 and 1.5

version 1.1, 2005/02/09 20:11:35 version 1.5, 2005/03/20 13:12:49
Line 1 Line 1
 #include        "compiler.h"  #include        "compiler.h"
   #include        "oemtext.h"
   
   
 #if defined(OSLANG_UTF8)  #if defined(OSLANG_UTF8)
 UINT oemtext_sjis2oem(char *dst, UINT dcnt, const char *src, UINT scnt) {  UINT oemtext_sjistooem(OEMCHAR *dst, UINT dcnt, const char *src, UINT scnt) {
   
         UINT    leng;          UINT    leng;
         UINT16  *ucs2;          UINT16  *ucs2;
Line 18  UINT oemtext_sjis2oem(char *dst, UINT dc Line 20  UINT oemtext_sjis2oem(char *dst, UINT dc
                 return(0);                  return(0);
         }          }
         MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, src, -1, ucs2, leng);          MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, src, -1, ucs2, leng);
         ret = ucscnv_ucs2toutf8(dst, dcnt, ucs2, leng);          ret = codecnv_ucs2toutf8(dst, dcnt, ucs2, leng);
         _MFREE(ucs2);          _MFREE(ucs2);
         return(ret);          return(ret);
 }  }
   
 UINT oemtext_oem2sjis(char *dst, UINT dcnt, const char *src, UINT scnt) {  UINT oemtext_oemtosjis(char *dst, UINT dcnt, const OEMCHAR *src, UINT scnt) {
   
         UINT    leng;          UINT    leng;
         UINT16  *ucs2;          UINT16  *ucs2;
Line 31  UINT oemtext_oem2sjis(char *dst, UINT dc Line 33  UINT oemtext_oem2sjis(char *dst, UINT dc
   
         (void)scnt;          (void)scnt;
   
         leng = ucscnv_utf8toucs2(NULL, 0, src, (UINT)-1);          leng = codecnv_utf8toucs2(NULL, 0, src, (UINT)-1);
         if (leng == 0) {          if (leng == 0) {
                 return(0);                  return(0);
         }          }
Line 39  UINT oemtext_oem2sjis(char *dst, UINT dc Line 41  UINT oemtext_oem2sjis(char *dst, UINT dc
         if (ucs2 == NULL) {          if (ucs2 == NULL) {
                 return(0);                  return(0);
         }          }
         ucscnv_utf8toucs2(ucs2, leng, src, (UINT)-1);          codecnv_utf8toucs2(ucs2, leng, src, (UINT)-1);
         ret = WideCharToMultiByte(CP_ACP, 0, ucs2, leng, dst, dcnt, NULL, NULL);          ret = WideCharToMultiByte(CP_ACP, 0, ucs2, leng, dst, dcnt, NULL, NULL);
         _MFREE(ucs2);          _MFREE(ucs2);
         return(ret);          return(ret);
   }
   #elif defined(OSLANG_UCS2)
   UINT oemtext_sjistooem(OEMCHAR *dst, UINT dcnt, const char *src, UINT scnt) {
   
           return(MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, src, -1, dst, dcnt));
   }
   
   UINT oemtext_oemtosjis(char *dst, UINT dcnt, const OEMCHAR *src, UINT scnt) {
   
           return(WideCharToMultiByte(CP_ACP, 0, src, -1, dst, dcnt, NULL, NULL));
 }  }
 #endif  #endif
   

Removed from v.1.1  
changed lines
  Added in v.1.5


RetroPC.NET-CVS <cvs@retropc.net>