mirror of
https://github.com/cc65/cc65.git
synced 2024-12-27 00:29:31 +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 */
|
/* common */
|
||||||
#include "check.h"
|
#include "check.h"
|
||||||
#include "exprdefs.h"
|
#include "exprdefs.h"
|
||||||
|
#include "tgttrans.h"
|
||||||
#include "xmalloc.h"
|
#include "xmalloc.h"
|
||||||
|
|
||||||
/* ca65 */
|
/* ca65 */
|
||||||
@ -46,7 +47,6 @@
|
|||||||
#include "objcode.h"
|
#include "objcode.h"
|
||||||
#include "objfile.h"
|
#include "objfile.h"
|
||||||
#include "symtab.h"
|
#include "symtab.h"
|
||||||
#include "target.h"
|
|
||||||
#include "toklist.h"
|
#include "toklist.h"
|
||||||
#include "ulabel.h"
|
#include "ulabel.h"
|
||||||
#include "expr.h"
|
#include "expr.h"
|
||||||
@ -484,7 +484,7 @@ static ExprNode* Factor (void)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case TOK_CHARCON:
|
case TOK_CHARCON:
|
||||||
N = LiteralExpr ((unsigned char) XlatChar ((char)IVal));
|
N = LiteralExpr (TgtTranslateChar (IVal));
|
||||||
NextTok ();
|
NextTok ();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -41,6 +41,7 @@
|
|||||||
|
|
||||||
/* common */
|
/* common */
|
||||||
#include "cmdline.h"
|
#include "cmdline.h"
|
||||||
|
#include "target.h"
|
||||||
#include "version.h"
|
#include "version.h"
|
||||||
|
|
||||||
/* ca65 */
|
/* ca65 */
|
||||||
@ -61,7 +62,6 @@
|
|||||||
#include "pseudo.h"
|
#include "pseudo.h"
|
||||||
#include "scanner.h"
|
#include "scanner.h"
|
||||||
#include "symtab.h"
|
#include "symtab.h"
|
||||||
#include "target.h"
|
|
||||||
#include "ulabel.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)
|
static void OptTarget (const char* Opt, const char* Arg)
|
||||||
/* Set the target system */
|
/* Set the target system */
|
||||||
{
|
{
|
||||||
int T;
|
|
||||||
if (Arg == 0) {
|
if (Arg == 0) {
|
||||||
NeedArg (Opt);
|
NeedArg (Opt);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Map the target name to a target id */
|
/* Map the target name to a target id */
|
||||||
T = MapTarget (Arg);
|
Target = FindTarget (Arg);
|
||||||
if (T < 0) {
|
if (Target == TGT_UNKNOWN) {
|
||||||
AbEnd ("Invalid target name: `%s'", Arg);
|
AbEnd ("Invalid target name: `%s'", Arg);
|
||||||
}
|
}
|
||||||
Target = (target_t) T;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -32,7 +32,6 @@ OBJS = condasm.o \
|
|||||||
repeat.o \
|
repeat.o \
|
||||||
scanner.o \
|
scanner.o \
|
||||||
symtab.o \
|
symtab.o \
|
||||||
target.o \
|
|
||||||
toklist.o \
|
toklist.o \
|
||||||
ulabel.o
|
ulabel.o
|
||||||
|
|
||||||
|
@ -90,7 +90,6 @@ OBJS = condasm.obj \
|
|||||||
repeat.obj \
|
repeat.obj \
|
||||||
scanner.obj \
|
scanner.obj \
|
||||||
symtab.obj \
|
symtab.obj \
|
||||||
target.obj \
|
|
||||||
toklist.obj \
|
toklist.obj \
|
||||||
ulabel.obj
|
ulabel.obj
|
||||||
|
|
||||||
@ -137,7 +136,6 @@ FILE pseudo.obj
|
|||||||
FILE repeat.obj
|
FILE repeat.obj
|
||||||
FILE scanner.obj
|
FILE scanner.obj
|
||||||
FILE symtab.obj
|
FILE symtab.obj
|
||||||
FILE target.obj
|
|
||||||
FILE toklist.obj
|
FILE toklist.obj
|
||||||
FILE ulabel.obj
|
FILE ulabel.obj
|
||||||
LIBRARY ..\common\common.lib
|
LIBRARY ..\common\common.lib
|
||||||
|
@ -42,6 +42,7 @@
|
|||||||
/* common */
|
/* common */
|
||||||
#include "bitops.h"
|
#include "bitops.h"
|
||||||
#include "check.h"
|
#include "check.h"
|
||||||
|
#include "tgttrans.h"
|
||||||
|
|
||||||
/* ca65 */
|
/* ca65 */
|
||||||
#include "condasm.h"
|
#include "condasm.h"
|
||||||
@ -58,7 +59,6 @@
|
|||||||
#include "options.h"
|
#include "options.h"
|
||||||
#include "repeat.h"
|
#include "repeat.h"
|
||||||
#include "symtab.h"
|
#include "symtab.h"
|
||||||
#include "target.h"
|
|
||||||
#include "pseudo.h"
|
#include "pseudo.h"
|
||||||
|
|
||||||
|
|
||||||
@ -270,7 +270,7 @@ static void DoASCIIZ (void)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
/* Translate into target charset and emit */
|
/* Translate into target charset and emit */
|
||||||
XlatStr (SVal);
|
TgtTranslateStr (SVal);
|
||||||
EmitData ((unsigned char*) SVal, strlen (SVal));
|
EmitData ((unsigned char*) SVal, strlen (SVal));
|
||||||
NextTok ();
|
NextTok ();
|
||||||
if (Tok == TOK_COMMA) {
|
if (Tok == TOK_COMMA) {
|
||||||
@ -306,7 +306,7 @@ static void DoByte (void)
|
|||||||
while (1) {
|
while (1) {
|
||||||
if (Tok == TOK_STRCON) {
|
if (Tok == TOK_STRCON) {
|
||||||
/* A string, translate into target charset and emit */
|
/* A string, translate into target charset and emit */
|
||||||
XlatStr (SVal);
|
TgtTranslateStr (SVal);
|
||||||
EmitData ((unsigned char*) SVal, strlen (SVal));
|
EmitData ((unsigned char*) SVal, strlen (SVal));
|
||||||
NextTok ();
|
NextTok ();
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user