New TgtTranslateBuf function
git-svn-id: svn://svn.cc65.org/cc65/trunk@492 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -150,3 +150,23 @@ char* TgtTranslateStr (char* S)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
char* TgtTranslateBuf (char* Buf, unsigned Len)
|
||||||
|
/* Translate a buffer of the given length from the source character set into
|
||||||
|
* the target system character set.
|
||||||
|
*/
|
||||||
|
{
|
||||||
|
/* Translate */
|
||||||
|
if (Tab) {
|
||||||
|
unsigned char* B = (unsigned char*)Buf;
|
||||||
|
while (Len--) {
|
||||||
|
*B = Tab[*B];
|
||||||
|
++B;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Return the argument string */
|
||||||
|
return Buf;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -57,6 +57,11 @@ char* TgtTranslateStr (char* S);
|
|||||||
* system character set.
|
* system character set.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
char* TgtTranslateBuf (char* Buf, unsigned Len);
|
||||||
|
/* Translate a buffer of the given length from the source character set into
|
||||||
|
* the target system character set.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* End of tgttrans.h */
|
/* End of tgttrans.h */
|
||||||
|
|||||||
Reference in New Issue
Block a user