mirror of
https://github.com/cc65/cc65.git
synced 2024-12-27 00:29:31 +00:00
Use the new TgtTranslateBuf function
git-svn-id: svn://svn.cc65.org/cc65/trunk@493 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
c45592efbf
commit
2df60e5033
@ -293,14 +293,20 @@ static void DoAlign (void)
|
||||
static void DoASCIIZ (void)
|
||||
/* Define text with a zero terminator */
|
||||
{
|
||||
unsigned Len;
|
||||
|
||||
while (1) {
|
||||
/* Must have a string constant */
|
||||
if (Tok != TOK_STRCON) {
|
||||
ErrorSkip (ERR_STRCON_EXPECTED);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Get the length of the string constant */
|
||||
Len = strlen (SVal);
|
||||
|
||||
/* Translate into target charset and emit */
|
||||
TgtTranslateStr (SVal);
|
||||
EmitData ((unsigned char*) SVal, strlen (SVal));
|
||||
EmitData ((unsigned char*) TgtTranslateBuf (SVal, Len), Len);
|
||||
NextTok ();
|
||||
if (Tok == TOK_COMMA) {
|
||||
NextTok ();
|
||||
@ -335,8 +341,8 @@ static void DoByte (void)
|
||||
while (1) {
|
||||
if (Tok == TOK_STRCON) {
|
||||
/* A string, translate into target charset and emit */
|
||||
TgtTranslateStr (SVal);
|
||||
EmitData ((unsigned char*) SVal, strlen (SVal));
|
||||
unsigned Len = strlen (SVal);
|
||||
EmitData ((unsigned char*) TgtTranslateBuf (SVal, Len), Len);
|
||||
NextTok ();
|
||||
} else {
|
||||
EmitByte (Expression ());
|
||||
|
@ -74,10 +74,7 @@ void TranslateLiteralPool (unsigned Offs)
|
||||
* charset.
|
||||
*/
|
||||
{
|
||||
while (Offs < LiteralOffs) {
|
||||
LiteralPool[Offs] = TgtTranslateChar (LiteralPool[Offs]);
|
||||
++Offs;
|
||||
}
|
||||
TgtTranslateBuf (LiteralPool + Offs, LiteralOffs - Offs);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user