📄 ebcdicconverter.inl
字号:
//=============================================================================
// BBDSoft General component library
// Copyright (C) 2001, UAB "BBD SOFT" ( http://www.bbdsoft.com/ )
//
// This material is provided "as is", with absolutely no warranty expressed
// or implied. Any use is at your own risk.
//
// Permission to use or copy this software for any purpose is hereby granted
// without fee, provided the above notices are retained on all copies.
// Permission to modify the code and to distribute modified code is granted,
// provided the above notices are retained, and a notice that the code was
// modified is included with the above copyright notice.
//
// The author of this program may be contacted at developers@bbdsoft.com
//=============================================================================
#ifndef _EBCDICCONVERTER_INL
#define _EBCDICCONVERTER_INL
//-----------------------------------------------------------------------------
inline
char EBCDICConverter::toEBCDIC ( const char inChar )
{
return theASCIItoEBCDICTable[inChar];
} // end EBCDICConverter::toEBCDIC (..)
//-----------------------------------------------------------------------------
inline
char EBCDICConverter::toASCII ( const char inChar )
{
return theEBCDICtoASCIITable[inChar];
} // end EBCDICConverter::toASCII (..)
//-----------------------------------------------------------------------------
inline
short EBCDICConverter::swapShort(const short inWord)
{
char * aWord = (char*)&inWord;
short newWord;
char * aNewWord = (char*)&newWord;
aNewWord[0]=aWord[1];
aNewWord[1]=aWord[0];
return newWord;
} // end EBCDICConverter::swapShort (..)
//-----------------------------------------------------------------------------
inline
long EBCDICConverter::swapLong(const long inDWord)
{
char * aWord = (char*)&inDWord;
long newDWord;
char * aNewWord = (char*)&newDWord;
aNewWord[0]=aWord[3];
aNewWord[1]=aWord[2];
aNewWord[2]=aWord[1];
aNewWord[3]=aWord[0];
return newDWord;
} // end EBCDICConverter::swapLong (..)
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -