Diff for /np2/codecnv/codecnv.h between versions 1.1 and 1.4

version 1.1, 2005/02/12 12:13:56 version 1.4, 2007/01/02 12:56:54
Line 1 Line 1
 #ifndef _CODECNV_H  
 #define _CODECNV_H  #if !defined(NP2_CODECNV_H__)
   #define NP2_CODECNV_H__
   
 #ifdef __cplusplus  #ifdef __cplusplus
 extern "C" {  extern "C" {
Line 7  extern "C" { Line 8  extern "C" {
   
 UINT codecnv_sjistoeuc(char *dst, UINT dcnt, const char *src, UINT scnt);  UINT codecnv_sjistoeuc(char *dst, UINT dcnt, const char *src, UINT scnt);
 UINT codecnv_sjistoucs2(UINT16 *dst, UINT dcnt, const char *src, UINT scnt);  UINT codecnv_sjistoucs2(UINT16 *dst, UINT dcnt, const char *src, UINT scnt);
   UINT codecnv_sjis2utf(UINT16 *dst, UINT dcnt, const char *src, UINT scnt);
   
 UINT codecnv_euctosjis(char *dst, UINT dcnt, const char *src, UINT scnt);  UINT codecnv_euctosjis(char *dst, UINT dcnt, const char *src, UINT scnt);
 UINT codecnv_euctoucs2(UINT16 *dst, UINT dcnt, const char *src, UINT scnt);  UINT codecnv_euctoucs2(UINT16 *dst, UINT dcnt, const char *src, UINT scnt);
Line 19  UINT codecnv_ucs2toutf8(char *dst, UINT  Line 21  UINT codecnv_ucs2toutf8(char *dst, UINT 
 }  }
 #endif  #endif
   
 #endif  #endif  // !defined(NP2_CODECNV_H__)
   
   
   
   
   // codecnv仕様
   //
   //      (dst != NULL) 時はテストのみ行なう。この場合dcnt=無限と扱う。
   //
   //      scnt == -1 の場合、String Modeとなる。
   //      ・NULLまで変換する
   //      ・dcntが足りなくても dstは必ずNULL Terminateとなる。
   //
   //      戻り値: 書き込みバッファ数が返る。(NULL Terminateも含む)
   //
   //      codecnv_AtoB(NULL, 0, "ABC\0DEF", -1) == 4
   //      codecnv_AtoB(buf, 5, "ABC\0DEF", -1) == 4 / Copy(buf, "ABC\0", 4)
   //      codecnv_AtoB(buf, 3, "ABC\0DEF", -1) == 3 / Copy(buf, "AB\0", 3)
   //
   //
   //      scnt != -1 の場合、Binary Modeとなる。
   //      ・scnt分変換を行なう
   //
   //      戻り値: 書き込みバッファ数が返る。
   //
   //      codecnv_AtoB(NULL, 0, "ABC\0DEF", 7) == 7
   //      codecnv_AtoB(NULL, 0, "ABC\0DEF", 4) == 4
   //      codecnv_AtoB(buf, 7, "ABC\0DEF", 5) == 5 / Copy(buf, "ABC\0D", 5)
   //      codecnv_AtoB(buf, 3, "ABC\0DEF", 6) == 3 / Copy(buf, "ABC", 3)
   //      codecnv_AtoB(buf, 3, "ABC\0DEF", 0) == 0 / Copy(buf, "", 0)
   

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


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