/* common */
#include "cmdline.h"
+#include "target.h"
#include "version.h"
/* ca65 */
#include "pseudo.h"
#include "scanner.h"
#include "symtab.h"
-#include "target.h"
#include "ulabel.h"
static void OptTarget (const char* Opt, const char* Arg)
/* Set the target system */
{
- int T;
if (Arg == 0) {
NeedArg (Opt);
}
/* Map the target name to a target id */
- T = MapTarget (Arg);
- if (T < 0) {
+ Target = FindTarget (Arg);
+ if (Target == TGT_UNKNOWN) {
AbEnd ("Invalid target name: `%s'", Arg);
}
- Target = (target_t) T;
}
/* Filename. Check if we already had one */
if (InFile) {
fprintf (stderr, "%s: Don't know what to do with `%s'\n",
- ProgName, Arg);
- exit (EXIT_FAILURE);
+ ProgName, Arg);
+ exit (EXIT_FAILURE);
} else {
- InFile = Arg;
+ InFile = Arg;
}
}
/* common */
#include "bitops.h"
#include "check.h"
+#include "tgttrans.h"
/* ca65 */
#include "condasm.h"
#include "options.h"
#include "repeat.h"
#include "symtab.h"
-#include "target.h"
#include "pseudo.h"
return;
}
/* Translate into target charset and emit */
- XlatStr (SVal);
+ TgtTranslateStr (SVal);
EmitData ((unsigned char*) SVal, strlen (SVal));
NextTok ();
if (Tok == TOK_COMMA) {
while (1) {
if (Tok == TOK_STRCON) {
/* A string, translate into target charset and emit */
- XlatStr (SVal);
+ TgtTranslateStr (SVal);
EmitData ((unsigned char*) SVal, strlen (SVal));
NextTok ();
} else {