mirror of
https://github.com/cc65/cc65.git
synced 2024-12-25 17:29:50 +00:00
Move target handling routines into the common directory.
git-svn-id: svn://svn.cc65.org/cc65/trunk@299 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
7691c3cdcc
commit
f871ab4ba6
@ -36,6 +36,7 @@
|
||||
/* common */
|
||||
#include "check.h"
|
||||
#include "exprdefs.h"
|
||||
#include "tgttrans.h"
|
||||
#include "xmalloc.h"
|
||||
|
||||
/* ca65 */
|
||||
@ -46,7 +47,6 @@
|
||||
#include "objcode.h"
|
||||
#include "objfile.h"
|
||||
#include "symtab.h"
|
||||
#include "target.h"
|
||||
#include "toklist.h"
|
||||
#include "ulabel.h"
|
||||
#include "expr.h"
|
||||
@ -484,7 +484,7 @@ static ExprNode* Factor (void)
|
||||
break;
|
||||
|
||||
case TOK_CHARCON:
|
||||
N = LiteralExpr ((unsigned char) XlatChar ((char)IVal));
|
||||
N = LiteralExpr (TgtTranslateChar (IVal));
|
||||
NextTok ();
|
||||
break;
|
||||
|
||||
|
@ -41,6 +41,7 @@
|
||||
|
||||
/* common */
|
||||
#include "cmdline.h"
|
||||
#include "target.h"
|
||||
#include "version.h"
|
||||
|
||||
/* ca65 */
|
||||
@ -61,7 +62,6 @@
|
||||
#include "pseudo.h"
|
||||
#include "scanner.h"
|
||||
#include "symtab.h"
|
||||
#include "target.h"
|
||||
#include "ulabel.h"
|
||||
|
||||
|
||||
@ -283,17 +283,15 @@ static void OptSmart (const char* Opt, const char* Arg)
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
@ -554,10 +552,10 @@ int main (int argc, char* argv [])
|
||||
/* 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;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -32,7 +32,6 @@ OBJS = condasm.o \
|
||||
repeat.o \
|
||||
scanner.o \
|
||||
symtab.o \
|
||||
target.o \
|
||||
toklist.o \
|
||||
ulabel.o
|
||||
|
||||
|
@ -90,7 +90,6 @@ OBJS = condasm.obj \
|
||||
repeat.obj \
|
||||
scanner.obj \
|
||||
symtab.obj \
|
||||
target.obj \
|
||||
toklist.obj \
|
||||
ulabel.obj
|
||||
|
||||
@ -137,7 +136,6 @@ FILE pseudo.obj
|
||||
FILE repeat.obj
|
||||
FILE scanner.obj
|
||||
FILE symtab.obj
|
||||
FILE target.obj
|
||||
FILE toklist.obj
|
||||
FILE ulabel.obj
|
||||
LIBRARY ..\common\common.lib
|
||||
|
@ -42,6 +42,7 @@
|
||||
/* common */
|
||||
#include "bitops.h"
|
||||
#include "check.h"
|
||||
#include "tgttrans.h"
|
||||
|
||||
/* ca65 */
|
||||
#include "condasm.h"
|
||||
@ -58,7 +59,6 @@
|
||||
#include "options.h"
|
||||
#include "repeat.h"
|
||||
#include "symtab.h"
|
||||
#include "target.h"
|
||||
#include "pseudo.h"
|
||||
|
||||
|
||||
@ -270,7 +270,7 @@ static void DoASCIIZ (void)
|
||||
return;
|
||||
}
|
||||
/* Translate into target charset and emit */
|
||||
XlatStr (SVal);
|
||||
TgtTranslateStr (SVal);
|
||||
EmitData ((unsigned char*) SVal, strlen (SVal));
|
||||
NextTok ();
|
||||
if (Tok == TOK_COMMA) {
|
||||
@ -306,7 +306,7 @@ static void DoByte (void)
|
||||
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 {
|
||||
|
Loading…
Reference in New Issue
Block a user