MCPcopy Create free account
hub / github.com/MaxBelkov/visualsyslog / Transliterate

Function Transliterate

sourcecommon/utils.cpp:1217–1237  ·  view source on GitHub ↗

--------------------------------------------------------------------------- �������������� ������� ���� �� ���� � - a � - k � - kh � - b � - l � - c � - v � - m � - ch � - g � - n � - sh � - d � - o � - shh � - e �

Source from the content-addressed store, hash-verified

1215*/
1216//---------------------------------------------------------------------------
1217void Transliterate(char * source, char * dest)
1218{
1219 if( !source || !dest ) return;
1220
1221 char RS[] = "����������������������������������������������������������������";
1222 char RD1[] = "ABVGDEZZIJKLMNOPRSTUFKCCSS\"Y'EJJabvgdezzijklmnoprstufkccss\"y'ejj";
1223 char RD2[] = " H J H HHH\"Y'HUA h j h hhh\"y'hua";
1224
1225 int len = strlen(source);
1226 for(int i=0; i<len; i++)
1227 {
1228 for(int j=0; j<(int)sizeof(RS); j++)
1229 {
1230 if( source[i]==RS[j] )
1231 { *dest++=RD1[j]; if( RD2[j]!=' ' ) *dest++=RD2[j]; goto Next; }
1232 }
1233 *dest++ = source[i];
1234 Next:;
1235 }
1236 *dest = 0;
1237}
1238//---------------------------------------------------------------------------
1239void SetBit(BYTE * data, int bit, bool set)
1240{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected