/*****************************************************************************/
/* */
-/* tgttrans.c */
+/* tgttrans.c */
/* */
-/* Character set translation */
+/* Character set translation */
/* */
/* */
/* */
/*****************************************************************************/
-/* Data */
+/* Data */
/*****************************************************************************/
/*****************************************************************************/
-/* Code */
+/* Code */
/*****************************************************************************/
int TgtTranslateChar (int C)
/* Translate one character from the source character set into the target
- * system character set.
- */
+** system character set.
+*/
{
/* Translate */
return Tab[C & 0xFF];
void TgtTranslateBuf (void* Buf, unsigned Len)
/* Translate a buffer of the given length from the source character set into
- * the target system character set.
- */
+** the target system character set.
+*/
{
/* Translate */
unsigned char* B = (unsigned char*)Buf;
while (Len--) {
- *B = Tab[*B];
- ++B;
+ *B = Tab[*B];
+ ++B;
}
}
void TgtTranslateStrBuf (StrBuf* Buf)
/* Translate a string buffer from the source character set into the target
- * system character set.
- */
+** system character set.
+*/
{
TgtTranslateBuf (SB_GetBuf (Buf), SB_GetLen (Buf));
}
void TgtTranslateSet (unsigned Index, unsigned char C)
/* Set the translation code for the given character */
{
- CHECK (Index > 0 && Index < sizeof (Tab));
+ CHECK (Index < sizeof (Tab));
Tab[Index] = C;
}
-
-
-
-
-