diff --git a/sakura_core/mem/CNativeA.cpp b/sakura_core/mem/CNativeA.cpp index 696483ac56..dfe7d792ff 100644 --- a/sakura_core/mem/CNativeA.cpp +++ b/sakura_core/mem/CNativeA.cpp @@ -1,4 +1,4 @@ -#include "StdAfx.h" +#include "StdAfx.h" #include #include #include "mem/CNativeA.h" @@ -26,35 +26,35 @@ CNativeA::CNativeA(const CNativeA& rhs) // -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- // -// ƒlƒCƒeƒBƒuÝ’èƒCƒ“ƒ^[ƒtƒF[ƒX // +// ãƒã‚¤ãƒ†ã‚£ãƒ–設定インターフェース // // -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- // -// ƒoƒbƒtƒ@‚Ì“à—e‚ð’u‚«Š·‚¦‚é +// ãƒãƒƒãƒ•ã‚¡ã®å†…容を置ãæ›ãˆã‚‹ void CNativeA::SetString( const char* pszData ) { SetString(pszData,strlen(pszData)); } -// ƒoƒbƒtƒ@‚Ì“à—e‚ð’u‚«Š·‚¦‚éBnLen‚Í•¶Žš’PˆÊB +// ãƒãƒƒãƒ•ã‚¡ã®å†…容を置ãæ›ãˆã‚‹ã€‚nLenã¯æ–‡å­—å˜ä½ã€‚ void CNativeA::SetString( const char* pData, int nDataLen ) { int nDataLenBytes = nDataLen * sizeof(char); CNative::SetRawData(pData, nDataLenBytes); } -// ƒoƒbƒtƒ@‚Ì“à—e‚ð’u‚«Š·‚¦‚é +// ãƒãƒƒãƒ•ã‚¡ã®å†…容を置ãæ›ãˆã‚‹ void CNativeA::SetNativeData( const CNativeA& pcNative ) { CNative::SetRawData(pcNative); } -// ƒoƒbƒtƒ@‚ÌÅŒã‚Ƀf[ƒ^‚ð’ljÁ‚·‚é +// ãƒãƒƒãƒ•ã‚¡ã®æœ€å¾Œã«ãƒ‡ãƒ¼ã‚¿ã‚’追加ã™ã‚‹ void CNativeA::AppendString( const char* pszData ) { AppendString(pszData, strlen(pszData)); } -//! ƒoƒbƒtƒ@‚ÌÅŒã‚Ƀf[ƒ^‚ð’ljÁ‚·‚éBnLength‚Í•¶Žš’PˆÊB +//! ãƒãƒƒãƒ•ã‚¡ã®æœ€å¾Œã«ãƒ‡ãƒ¼ã‚¿ã‚’追加ã™ã‚‹ã€‚nLengthã¯æ–‡å­—å˜ä½ã€‚ void CNativeA::AppendString( const char* pszData, int nLength ) { CNative::AppendRawData(pszData, nLength * sizeof(char)); @@ -69,13 +69,13 @@ const CNativeA& CNativeA::operator = ( char cChar ) return *this; } -//! ƒoƒbƒtƒ@‚ÌÅŒã‚Ƀf[ƒ^‚ð’ljÁ‚·‚é +//! ãƒãƒƒãƒ•ã‚¡ã®æœ€å¾Œã«ãƒ‡ãƒ¼ã‚¿ã‚’追加ã™ã‚‹ void CNativeA::AppendNativeData( const CNativeA& pcNative ) { AppendString(pcNative.GetStringPtr(), pcNative.GetStringLength()); } -//! (d—vFnDataLen‚Í•¶Žš’PˆÊ) ƒoƒbƒtƒ@ƒTƒCƒY‚Ì’²®B•K—v‚ɉž‚¶‚ÄŠg‘å‚·‚éB +//! (é‡è¦ï¼šnDataLenã¯æ–‡å­—å˜ä½) ãƒãƒƒãƒ•ã‚¡ã‚µã‚¤ã‚ºã®èª¿æ•´ã€‚å¿…è¦ã«å¿œã˜ã¦æ‹¡å¤§ã™ã‚‹ã€‚ void CNativeA::AllocStringBuffer( int nDataLen ) { CNative::AllocBuffer(nDataLen * sizeof(char)); @@ -89,12 +89,12 @@ const CNativeA& CNativeA::operator += ( char ch ) } // -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- // -// ŒÝŠ· // +// äº’æ› // // -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- // void CNativeA::SetStringNew(const wchar_t* wszData, int nDataLen) { - std::wstring buf(wszData,nDataLen); //Ø‚èo‚µ + std::wstring buf(wszData,nDataLen); //切り出㗠char* tmp=wcstombs_new(buf.c_str()); SetString(tmp); delete[] tmp; @@ -107,7 +107,7 @@ void CNativeA::SetStringNew(const wchar_t* wszData) // -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- // -// ƒlƒCƒeƒBƒuŽæ“¾ƒCƒ“ƒ^[ƒtƒF[ƒX // +// ãƒã‚¤ãƒ†ã‚£ãƒ–å–得インターフェース // // -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- // int CNativeA::GetStringLength() const @@ -121,7 +121,7 @@ const char* CNativeA::GetStringPtr(int* pnLength) const return GetStringPtr(); } -// ”CˆÓˆÊ’u‚Ì•¶ŽšŽæ“¾BnIndex‚Í•¶Žš’PˆÊB +// ä»»æ„ä½ç½®ã®æ–‡å­—å–得。nIndexã¯æ–‡å­—å˜ä½ã€‚ char CNativeA::operator[](int nIndex) const { if( nIndex < GetStringLength() ){ @@ -132,10 +132,10 @@ char CNativeA::operator[](int nIndex) const } // -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- // -// ƒlƒCƒeƒBƒu•ÏŠ·ƒCƒ“ƒ^[ƒtƒF[ƒX // +// ãƒã‚¤ãƒ†ã‚£ãƒ–変æ›ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ãƒ¼ã‚¹ // // -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- // -/* •¶Žš—ñ’uŠ· */ +/* æ–‡å­—åˆ—ç½®æ› */ void CNativeA::Replace( const char* pszFrom, const char* pszTo ) { CNativeA cmemWork; @@ -164,7 +164,7 @@ void CNativeA::Replace( const char* pszFrom, const char* pszTo ) -/* •¶Žš—ñ’uŠ·i“ú–{Œêl—¶”Åj */ +/* 文字列置æ›ï¼ˆæ—¥æœ¬èªžè€ƒæ…®ç‰ˆï¼‰ */ void CNativeA::Replace_j( const char* pszFrom, const char* pszTo ) { CNativeA cmemWork; @@ -196,10 +196,10 @@ void CNativeA::Replace_j( const char* pszFrom, const char* pszTo ) // -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- // -// ˆê”ʃCƒ“ƒ^[ƒtƒF[ƒX // +// 一般インターフェース // // -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- // -/* ¬•¶Žš */ +/* å°æ–‡å­— */ void CNativeA::ToLower() { unsigned char* pBuf = (unsigned char*)GetStringPtr(); @@ -215,20 +215,20 @@ void CNativeA::ToLower() pBuf[i] = uc; } else if( nCharChars == 2 ){ - /* ‘SŠp‰p‘啶Žš¨‘SŠp‰p¬•¶Žš */ + /* 全角英大文字→全角英å°æ–‡å­— */ if( pBuf[i] == 0x82 && pBuf[i + 1] >= 0x60 && pBuf[i + 1] <= 0x79 ){ pBuf[i] = pBuf[i]; pBuf[i + 1] = pBuf[i + 1] + 0x21; -//@@@ 2001.02.03 Start by MIK: ƒMƒŠƒVƒƒ•¶Žš•ÏŠ· - //‘啶Žš:0x839f`0x83b6 - //¬•¶Žš:0x83bf`0x83d6 +//@@@ 2001.02.03 Start by MIK: ã‚®ãƒªã‚·ãƒ£æ–‡å­—å¤‰æ› + //大文字:0x839f~0x83b6 + //å°æ–‡å­—:0x83bf~0x83d6 }else if( pBuf[i] == 0x83 && pBuf[i + 1] >= 0x9f && pBuf[i + 1] <= 0xb6 ){ pBuf[i] = pBuf[i]; pBuf[i + 1] = pBuf[i + 1] + 0x20; //@@@ 2001.02.03 End -//@@@ 2001.02.03 Start by MIK: ƒƒVƒA•¶Žš•ÏŠ· - //‘啶Žš:0x8440`0x8460 - //¬•¶Žš:0x8470`0x8491 0x847f‚ª‚È‚¢I +//@@@ 2001.02.03 Start by MIK: ãƒ­ã‚·ã‚¢æ–‡å­—å¤‰æ› + //大文字:0x8440~0x8460 + //å°æ–‡å­—:0x8470~0x8491 0x847fãŒãªã„ï¼ }else if( pBuf[i] == 0x84 && pBuf[i + 1] >= 0x40 && pBuf[i + 1] <= 0x60 ){ pBuf[i] = pBuf[i]; if( pBuf[i + 1] >= 0x4f ){ @@ -250,7 +250,7 @@ void CNativeA::ToLower() -/* ‘啶Žš */ +/* 大文字 */ void CNativeA::ToUpper() { unsigned char* pBuf = (unsigned char*)GetStringPtr(); @@ -266,20 +266,20 @@ void CNativeA::ToUpper() pBuf[i] = uc; } else if( nCharChars == 2 ){ - /* ‘SŠp‰p¬•¶Žš¨‘SŠp‰p‘啶Žš */ + /* 全角英å°æ–‡å­—→全角英大文字 */ if( pBuf[i] == 0x82 && pBuf[i + 1] >= 0x81 && pBuf[i + 1] <= 0x9a ){ pBuf[i] = pBuf[i]; pBuf[i + 1] = pBuf[i + 1] - 0x21; -//@@@ 2001.02.03 Start by MIK: ƒMƒŠƒVƒƒ•¶Žš•ÏŠ· - //‘啶Žš:0x839f`0x83b6 - //¬•¶Žš:0x83bf`0x83d6 +//@@@ 2001.02.03 Start by MIK: ã‚®ãƒªã‚·ãƒ£æ–‡å­—å¤‰æ› + //大文字:0x839f~0x83b6 + //å°æ–‡å­—:0x83bf~0x83d6 }else if( pBuf[i] == 0x83 && pBuf[i + 1] >= 0xbf && pBuf[i + 1] <= 0xd6 ){ pBuf[i] = pBuf[i]; pBuf[i + 1] = pBuf[i + 1] - 0x20; //@@@ 2001.02.03 End -//@@@ 2001.02.03 Start by MIK: ƒƒVƒA•¶Žš•ÏŠ· - //‘啶Žš:0x8440`0x8460 - //¬•¶Žš:0x8470`0x8491 0x847f‚ª‚È‚¢I +//@@@ 2001.02.03 Start by MIK: ãƒ­ã‚·ã‚¢æ–‡å­—å¤‰æ› + //大文字:0x8440~0x8460 + //å°æ–‡å­—:0x8470~0x8491 0x847fãŒãªã„ï¼ }else if( pBuf[i] == 0x84 && pBuf[i + 1] >= 0x70 && pBuf[i + 1] <= 0x91 && pBuf[i + 1] != 0x7f ){ pBuf[i] = pBuf[i]; if( pBuf[i + 1] >= 0x7f ){ @@ -298,10 +298,10 @@ void CNativeA::ToUpper() } -/* ”¼Šp¨‘SŠp */ +/* åŠè§’→全角 */ void CNativeA::ToZenkaku( - int bHiragana, /* 1== ‚Ђ炪‚È 0==ƒJƒ^ƒJƒi //2==‰p”ê—p 2001/07/30 Misaka ’ljÁ */ - int bHanKataOnly /* 1== ”¼ŠpƒJƒ^ƒJƒi‚É‚Ì‚Ýì—p‚·‚é*/ + int bHiragana, /* 1== ã²ã‚‰ãŒãª 0==カタカナ //2==英数専用 2001/07/30 Misaka 追加 */ + int bHanKataOnly /* 1== åŠè§’カタカナã«ã®ã¿ä½œç”¨ã™ã‚‹*/ ) { unsigned char* pBuf = (unsigned char*)GetStringPtr(); @@ -313,9 +313,9 @@ void CNativeA::ToZenkaku( unsigned short usDes; unsigned char* pBufDes; int nBufDesLen; - static unsigned char* pszHanKataSet = (unsigned char*)"¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞß"; - static unsigned char* pszDakuSet = (unsigned char*)"¶·¸¹º»¼½¾¿ÀÁÂÃÄÊËÌÍÎ"; - static unsigned char* pszYouSet = (unsigned char*)"ÊËÌÍÎ"; + static unsigned char* pszHanKataSet = (unsigned char*)"。「」、・ヲァィゥェォャュョッーアイウエオカキクケコサシスセソタï¾ï¾‚テトナニヌネノハヒフï¾ï¾Žï¾ï¾ï¾‘メモヤユヨラリルレロワï¾ï¾žï¾Ÿ"; + static unsigned char* pszDakuSet = (unsigned char*)"カキクケコサシスセソタï¾ï¾‚テトハヒフï¾ï¾Ž"; + static unsigned char* pszYouSet = (unsigned char*)"ハヒフï¾ï¾Ž"; BOOL bHenkanOK; pBufDes = new unsigned char[nBufLen * 2 + 1]; @@ -328,12 +328,12 @@ void CNativeA::ToZenkaku( nCharChars = CShiftJis::GetSizeOfChar( (const char *)pBuf, nBufLen, i ); if( nCharChars == 1){ bHenkanOK = FALSE; - if( bHanKataOnly ){ /* 1== ”¼ŠpƒJƒ^ƒJƒi‚É‚Ì‚Ýì—p‚·‚é */ + if( bHanKataOnly ){ /* 1== åŠè§’カタカナã«ã®ã¿ä½œç”¨ã™ã‚‹ */ if( NULL != strchr( (const char *)pszHanKataSet, pBuf[i] ) ){ bHenkanOK = TRUE; } }else{ - //! ‰p”•ÏŠ·—p‚ÉV‚½‚ÈðŒ‚ð•t‰Á 2001/07/30 Misaka + //! 英数変æ›ç”¨ã«æ–°ãŸãªæ¡ä»¶ã‚’付加 2001/07/30 Misaka if( ( (unsigned char)0x20 <= pBuf[i] && pBuf[i] <= (unsigned char)0x7E ) || ( bHiragana != 2 && (unsigned char)0xA1 <= pBuf[i] && pBuf[i] <= (unsigned char)0xDF ) ){ @@ -343,34 +343,34 @@ void CNativeA::ToZenkaku( if( bHenkanOK ){ usSrc = pBuf[i]; if( !bHiragana && - pBuf[i] == (unsigned char)'³' && - pBuf[i + 1] == (unsigned char)'Þ' && + pBuf[i] == (unsigned char)'ï½³' && + pBuf[i + 1] == (unsigned char)'゙' && bHiragana != 2 ){ - usDes = (unsigned short)0x8394; /* ƒ” */ + usDes = (unsigned short)0x8394; /* ヴ */ nCharChars = 2; }else { usDes = (unsigned short)_mbbtombc( usSrc ); - /* ‘÷‰¹ */ - if( bHiragana != 2 && pBuf[i + 1] == (unsigned char)'Þ' && NULL != strchr( (const char *)pszDakuSet, pBuf[i] ) ){ + /* æ¿éŸ³ */ + if( bHiragana != 2 && pBuf[i + 1] == (unsigned char)'゙' && NULL != strchr( (const char *)pszDakuSet, pBuf[i] ) ){ usDes++; nCharChars = 2; } - /* X‰¹ */ - //! ‰p”•ÏŠ·—p‚ÉV‚½‚ÈðŒ‚ð•t‰Á 2001/07/30 Misaka - //! bHiragana != 2 //‰p”•ÏŠ·ƒtƒ‰ƒO‚ªƒIƒ“‚Å‚Í‚È‚¢ê‡ - if( bHiragana != 2 && pBuf[i + 1] == (unsigned char)'ß' && NULL != strchr( (const char *)pszYouSet, pBuf[i] ) ){ + /* 拗音 */ + //! 英数変æ›ç”¨ã«æ–°ãŸãªæ¡ä»¶ã‚’付加 2001/07/30 Misaka + //! bHiragana != 2 //英数変æ›ãƒ•ãƒ©ã‚°ãŒã‚ªãƒ³ã§ã¯ãªã„å ´åˆ + if( bHiragana != 2 && pBuf[i + 1] == (unsigned char)'゚' && NULL != strchr( (const char *)pszYouSet, pBuf[i] ) ){ usDes += 2; nCharChars = 2; } } if( bHiragana == 1 ){ - /* ‚Ђ炪‚È‚É•ÏŠ·‰Â”\‚ȃJƒ^ƒJƒi‚È‚ç‚ÎA‚Ђ炪‚È‚É•ÏŠ·‚·‚é */ - if( (unsigned short)0x8340 <= usDes && usDes <= (unsigned short)0x837e ){ /* ƒ@`ƒ~ */ + /* ã²ã‚‰ãŒãªã«å¤‰æ›å¯èƒ½ãªã‚«ã‚¿ã‚«ãƒŠãªã‚‰ã°ã€ã²ã‚‰ãŒãªã«å¤‰æ›ã™ã‚‹ */ + if( (unsigned short)0x8340 <= usDes && usDes <= (unsigned short)0x837e ){ /* ァ~ミ */ usDes-= (unsigned short)0x00a1; }else - if( (unsigned short)0x8380 <= usDes && usDes <= (unsigned short)0x8393 ){ /* ƒ€`ƒ“ */ + if( (unsigned short)0x8380 <= usDes && usDes <= (unsigned short)0x8393 ){ /* ム~ン */ usDes-= (unsigned short)0x00a2; } } @@ -386,20 +386,20 @@ void CNativeA::ToZenkaku( if( nCharChars == 2 ){ usDes = usSrc = pBuf[i + 1] | ( pBuf[i] << 8 ); if( bHanKataOnly == 0 ){ - if( bHiragana == 1 ){//‰p”•ÏŠ·‚ð•t‰Á‚µ‚½‚½‚ß‚É”’l‚ÅŽw’肵‚½@2001/07/30 Misaka - /* ‘SŠp‚Ђ炪‚È‚É•ÏŠ·‰Â”\‚È‘SŠpƒJƒ^ƒJƒi‚È‚ç‚ÎA‚Ђ炪‚È‚É•ÏŠ·‚·‚é */ - if( (unsigned short)0x8340 <= usSrc && usSrc <= (unsigned short)0x837e ){ /* ƒ@`ƒ~ */ + if( bHiragana == 1 ){//英数変æ›ã‚’付加ã—ãŸãŸã‚ã«æ•°å€¤ã§æŒ‡å®šã—ãŸã€€2001/07/30 Misaka + /* 全角ã²ã‚‰ãŒãªã«å¤‰æ›å¯èƒ½ãªå…¨è§’カタカナãªã‚‰ã°ã€ã²ã‚‰ãŒãªã«å¤‰æ›ã™ã‚‹ */ + if( (unsigned short)0x8340 <= usSrc && usSrc <= (unsigned short)0x837e ){ /* ァ~ミ */ usDes = usSrc - (unsigned short)0x00a1; }else - if( (unsigned short)0x8380 <= usSrc && usSrc <= (unsigned short)0x8393 ){ /* ƒ€`ƒ“ */ + if( (unsigned short)0x8380 <= usSrc && usSrc <= (unsigned short)0x8393 ){ /* ム~ン */ usDes = usSrc - (unsigned short)0x00a2; } - }else if( bHiragana == 0 ){//‰p”•ÏŠ·‚ð•t‰Á‚µ‚½‚½‚ß‚É”’l‚ÅŽw’肵‚½@2001/07/30 Misaka - /* ‘SŠpƒJƒ^ƒJƒi‚É•ÏŠ·‰Â”\‚È‘SŠp‚Ђ炪‚È‚È‚ç‚ÎAƒJƒ^ƒJƒi‚É•ÏŠ·‚·‚é */ - if( (unsigned short)0x829f <= usSrc && usSrc <= (unsigned short)0x82dd ){ /* ‚Ÿ`‚Ý */ + }else if( bHiragana == 0 ){//英数変æ›ã‚’付加ã—ãŸãŸã‚ã«æ•°å€¤ã§æŒ‡å®šã—ãŸã€€2001/07/30 Misaka + /* 全角カタカナã«å¤‰æ›å¯èƒ½ãªå…¨è§’ã²ã‚‰ãŒãªãªã‚‰ã°ã€ã‚«ã‚¿ã‚«ãƒŠã«å¤‰æ›ã™ã‚‹ */ + if( (unsigned short)0x829f <= usSrc && usSrc <= (unsigned short)0x82dd ){ /* ã~㿠*/ usDes = usSrc + (unsigned short)0x00a1; }else - if( (unsigned short)0x82de <= usSrc && usSrc <= (unsigned short)0x82f1 ){ /* ‚Þ`‚ñ */ + if( (unsigned short)0x82de <= usSrc && usSrc <= (unsigned short)0x82f1 ){ /* む~ん */ usDes = usSrc + (unsigned short)0x00a2; } } @@ -425,8 +425,8 @@ void CNativeA::ToZenkaku( } -/* TAB¨‹ó”’ */ -void CNativeA::TABToSPACE( int nTabSpace /* TAB‚Ì•¶Žš” */ ) +/* TAB→空白 */ +void CNativeA::TABToSPACE( int nTabSpace /* TABã®æ–‡å­—æ•° */ ) { using namespace ACODE; @@ -442,7 +442,7 @@ void CNativeA::ToZenkaku( CEol cEol; nBgn = 0; nPosDes = 0; - /* CRLF‚Å‹æØ‚ç‚ê‚éusv‚ð•Ô‚·BCRLF‚Ís’·‚ɉÁ‚¦‚È‚¢ */ + /* CRLFã§åŒºåˆ‡ã‚‰ã‚Œã‚‹ã€Œè¡Œã€ã‚’è¿”ã™ã€‚CRLFã¯è¡Œé•·ã«åŠ ãˆãªã„ */ while( NULL != ( pLine = GetNextLine( GetStringPtr(), GetStringLength(), &nLineLen, &nBgn, &cEol ) ) ){ if( 0 < nLineLen ){ nPosX = 0; @@ -465,7 +465,7 @@ void CNativeA::ToZenkaku( pDes = new char[nPosDes + 1]; nBgn = 0; nPosDes = 0; - /* CRLF‚Å‹æØ‚ç‚ê‚éusv‚ð•Ô‚·BCRLF‚Ís’·‚ɉÁ‚¦‚È‚¢ */ + /* CRLFã§åŒºåˆ‡ã‚‰ã‚Œã‚‹ã€Œè¡Œã€ã‚’è¿”ã™ã€‚CRLFã¯è¡Œé•·ã«åŠ ãˆãªã„ */ while( NULL != ( pLine = GetNextLine( GetStringPtr(), GetStringLength(), &nLineLen, &nBgn, &cEol ) ) ){ if( 0 < nLineLen ){ nPosX = 0; @@ -495,10 +495,10 @@ void CNativeA::ToZenkaku( } -//!‹ó”’¨TAB•ÏŠ· +//!空白→TABå¤‰æ› /*! - @param nTabSpace TAB‚Ì•¶Žš” - ’P“Ƃ̃Xƒy[ƒX‚Í•ÏŠ·‚µ‚È‚¢ + @param nTabSpace TABã®æ–‡å­—æ•° + å˜ç‹¬ã®ã‚¹ãƒšãƒ¼ã‚¹ã¯å¤‰æ›ã—ãªã„ @author Stonee @date 2001/5/27 @@ -516,13 +516,13 @@ void CNativeA::SPACEToTAB( int nTabSpace ) int nPosX; CEol cEol; - BOOL bSpace = FALSE; //ƒXƒy[ƒX‚̈—’†‚©‚Ç‚¤‚© + BOOL bSpace = FALSE; //スペースã®å‡¦ç†ä¸­ã‹ã©ã†ã‹ int j; int nStartPos; nBgn = 0; nPosDes = 0; - /* •ÏŠ·Œã‚É•K—v‚ȃoƒCƒg”‚𒲂ׂé */ + /* 変æ›å¾Œã«å¿…è¦ãªãƒã‚¤ãƒˆæ•°ã‚’調ã¹ã‚‹ */ while( NULL != ( pLine = GetNextLine( GetStringPtr(), GetStringLength(), &nLineLen, &nBgn, &cEol ) ) ){ if( 0 < nLineLen ){ nPosDes += nLineLen; @@ -535,12 +535,12 @@ void CNativeA::SPACEToTAB( int nTabSpace ) pDes = new char[nPosDes + 1]; nBgn = 0; nPosDes = 0; - /* CRLF‚Å‹æØ‚ç‚ê‚éusv‚ð•Ô‚·BCRLF‚Ís’·‚ɉÁ‚¦‚È‚¢ */ + /* CRLFã§åŒºåˆ‡ã‚‰ã‚Œã‚‹ã€Œè¡Œã€ã‚’è¿”ã™ã€‚CRLFã¯è¡Œé•·ã«åŠ ãˆãªã„ */ while( NULL != ( pLine = GetNextLine( GetStringPtr(), GetStringLength(), &nLineLen, &nBgn, &cEol ) ) ){ if( 0 < nLineLen ){ - nPosX = 0; // ˆ—’†‚Ìi‚ɑΉž‚·‚é•\Ž¦Œ…ˆÊ’u - bSpace = FALSE; //’¼‘O‚ªƒXƒy[ƒX‚© - nStartPos = 0; // ƒXƒy[ƒX‚Ì擪 + nPosX = 0; // 処ç†ä¸­ã®iã«å¯¾å¿œã™ã‚‹è¡¨ç¤ºæ¡ä½ç½® + bSpace = FALSE; //ç›´å‰ãŒã‚¹ãƒšãƒ¼ã‚¹ã‹ + nStartPos = 0; // スペースã®å…ˆé ­ for( i = 0; i < nLineLen; ++i ){ if( SPACE == pLine[i] || TAB == pLine[i] ){ if( bSpace == FALSE ){ @@ -564,8 +564,8 @@ void CNativeA::SPACEToTAB( int nTabSpace ) nStartPos += nTabSpace - ( nStartPos % nTabSpace ); } // 2003.08.05 Moca - // •ÏŠ·Œã‚ÉTAB‚ª1‚‚à“ü‚ç‚È‚¢ê‡‚ɃXƒy[ƒX‚ð‹l‚ß‚·‚¬‚Ä - // ƒoƒbƒtƒ@‚ð‚Í‚Ýo‚·‚Ì‚ðC³ + // 変æ›å¾Œã«TABãŒ1ã¤ã‚‚入らãªã„å ´åˆã«ã‚¹ãƒšãƒ¼ã‚¹ã‚’è©°ã‚ã™ãŽã¦ + // ãƒãƒƒãƒ•ã‚¡ã‚’ã¯ã¿å‡ºã™ã®ã‚’修正 for( j = nStartPos; j < nPosX; j++ ){ pDes[nPosDes] = SPACE; nPosDes++; @@ -594,8 +594,8 @@ void CNativeA::SPACEToTAB( int nTabSpace ) nStartPos += nTabSpace - ( nStartPos % nTabSpace ); } // 2003.08.05 Moca - // •ÏŠ·Œã‚ÉTAB‚ª1‚‚à“ü‚ç‚È‚¢ê‡‚ɃXƒy[ƒX‚ð‹l‚ß‚·‚¬‚Ä - // ƒoƒbƒtƒ@‚ð‚Í‚Ýo‚·‚Ì‚ðC³ + // 変æ›å¾Œã«TABãŒ1ã¤ã‚‚入らãªã„å ´åˆã«ã‚¹ãƒšãƒ¼ã‚¹ã‚’è©°ã‚ã™ãŽã¦ + // ãƒãƒƒãƒ•ã‚¡ã‚’ã¯ã¿å‡ºã™ã®ã‚’修正 for( j = nStartPos; j < nPosX; j++ ){ pDes[nPosDes] = SPACE; nPosDes++; @@ -604,7 +604,7 @@ void CNativeA::SPACEToTAB( int nTabSpace ) } } - /* s––‚̈— */ + /* 行末ã®å‡¦ç† */ CMemory cEolMem; CShiftJis::S_GetEol(&cEolMem,cEol.GetType()); auto_memcpy( &pDes[nPosDes], (const char*)cEolMem.GetRawPtr(), cEolMem.GetRawLength() ); nPosDes += cEolMem.GetRawLength(); @@ -620,17 +620,17 @@ void CNativeA::SPACEToTAB( int nTabSpace ) // -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- // -// staticƒCƒ“ƒ^[ƒtƒF[ƒX // +// staticインターフェース // // -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- // -//! Žw’肵‚½ˆÊ’u‚Ì•¶Žš‚ª‰½ƒoƒCƒg•¶Žš‚©‚ð•Ô‚· +//! 指定ã—ãŸä½ç½®ã®æ–‡å­—ãŒä½•ãƒã‚¤ãƒˆæ–‡å­—ã‹ã‚’返㙠int CNativeA::GetSizeOfChar( const char* pData, int nDataLen, int nIdx ) { return CShiftJis::GetSizeOfChar(pData,nDataLen,nIdx); } -/* ƒ|ƒCƒ“ƒ^‚ÅŽ¦‚µ‚½•¶Žš‚ÌŽŸ‚É‚ ‚镶Žš‚̈ʒu‚ð•Ô‚µ‚Ü‚· */ -/* ŽŸ‚É‚ ‚镶Žš‚ªƒoƒbƒtƒ@‚ÌÅŒã‚̈ʒu‚ð‰z‚¦‚éꇂÍ&pData[nDataLen]‚ð•Ô‚µ‚Ü‚· */ +/* ãƒã‚¤ãƒ³ã‚¿ã§ç¤ºã—ãŸæ–‡å­—ã®æ¬¡ã«ã‚る文字ã®ä½ç½®ã‚’è¿”ã—ã¾ã™ */ +/* 次ã«ã‚る文字ãŒãƒãƒƒãƒ•ã‚¡ã®æœ€å¾Œã®ä½ç½®ã‚’越ãˆã‚‹å ´åˆã¯&pData[nDataLen]ã‚’è¿”ã—ã¾ã™ */ const char* CNativeA::GetCharNext( const char* pData, int nDataLen, const char* pDataCurrent ) { //#ifdef _DEBUG @@ -644,10 +644,10 @@ const char* CNativeA::GetCharNext( const char* pData, int nDataLen, const char* { // pNext = ::CharNext( pDataCurrent ); if( - /* SJIS‘SŠpƒR[ƒh‚Ì1ƒoƒCƒg–Ú‚© */ //Sept. 1, 2000 jepro 'ƒVƒtƒg'‚ð'S'‚É•ÏX + /* SJIS全角コードã®1ãƒã‚¤ãƒˆç›®ã‹ */ //Sept. 1, 2000 jepro 'シフト'ã‚’'S'ã«å¤‰æ›´ _IS_SJIS_1( (unsigned char)pDataCurrent[0] ) && - /* SJIS‘SŠpƒR[ƒh‚Ì2ƒoƒCƒg–Ú‚© */ //Sept. 1, 2000 jepro 'ƒVƒtƒg'‚ð'S'‚É•ÏX + /* SJIS全角コードã®2ãƒã‚¤ãƒˆç›®ã‹ */ //Sept. 1, 2000 jepro 'シフト'ã‚’'S'ã«å¤‰æ›´ _IS_SJIS_2( (unsigned char)pDataCurrent[1] ) ){ pNext = pDataCurrent + 2; @@ -662,8 +662,8 @@ const char* CNativeA::GetCharNext( const char* pData, int nDataLen, const char* return pNext; } -/* ƒ|ƒCƒ“ƒ^‚ÅŽ¦‚µ‚½•¶Žš‚Ì’¼‘O‚É‚ ‚镶Žš‚̈ʒu‚ð•Ô‚µ‚Ü‚· */ -/* ’¼‘O‚É‚ ‚镶Žš‚ªƒoƒbƒtƒ@‚Ì擪‚̈ʒu‚ð‰z‚¦‚éꇂÍpData‚ð•Ô‚µ‚Ü‚· */ +/* ãƒã‚¤ãƒ³ã‚¿ã§ç¤ºã—ãŸæ–‡å­—ã®ç›´å‰ã«ã‚る文字ã®ä½ç½®ã‚’è¿”ã—ã¾ã™ */ +/* ç›´å‰ã«ã‚る文字ãŒãƒãƒƒãƒ•ã‚¡ã®å…ˆé ­ã®ä½ç½®ã‚’越ãˆã‚‹å ´åˆã¯pDataã‚’è¿”ã—ã¾ã™ */ const char* CNativeA::GetCharPrev( const char* pData, int nDataLen, const char* pDataCurrent ) { //#ifdef _DEBUG @@ -674,18 +674,18 @@ const char* CNativeA::GetCharPrev( const char* pData, int nDataLen, const char* const char* pPrev; pPrev = ::CharPrevA( pData, pDataCurrent ); -//===1999.08.12 ‚±‚Ì‚â‚è•û‚¾‚ÆAƒ_ƒ‚¾‚Á‚½B===============- +//===1999.08.12 ã“ã®ã‚„ã‚Šæ–¹ã ã¨ã€ãƒ€ãƒ¡ã ã£ãŸã€‚===============- // // if( (pDataCurrent - 1)[0] == '\0' ){ // pPrev = pDataCurrent - 1; // }else{ // if( pDataCurrent - pData >= 2 && -// /* SJIS‘SŠpƒR[ƒh‚Ì1ƒoƒCƒg–Ú‚© */ //Sept. 1, 2000 jepro 'ƒVƒtƒg'‚ð'S'‚É•ÏX +// /* SJIS全角コードã®1ãƒã‚¤ãƒˆç›®ã‹ */ //Sept. 1, 2000 jepro 'シフト'ã‚’'S'ã«å¤‰æ›´ // ( // ( (unsigned char)0x81 <= (unsigned char)pDataCurrent[-2] && (unsigned char)pDataCurrent[-2] <= (unsigned char)0x9F ) || // ( (unsigned char)0xE0 <= (unsigned char)pDataCurrent[-2] && (unsigned char)pDataCurrent[-2] <= (unsigned char)0xFC ) // ) && -// /* SJIS‘SŠpƒR[ƒh‚Ì2ƒoƒCƒg–Ú‚© */ //Sept. 1, 2000 jepro 'ƒVƒtƒg'‚ð'S'‚É•ÏX +// /* SJIS全角コードã®2ãƒã‚¤ãƒˆç›®ã‹ */ //Sept. 1, 2000 jepro 'シフト'ã‚’'S'ã«å¤‰æ›´ // ( // ( (unsigned char)0x40 <= (unsigned char)pDataCurrent[-1] && (unsigned char)pDataCurrent[-1] <= (unsigned char)0x7E ) || // ( (unsigned char)0x80 <= (unsigned char)pDataCurrent[-1] && (unsigned char)pDataCurrent[-1] <= (unsigned char)0xFC )