Added generation of C output.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5607 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -42,6 +42,7 @@
|
||||
#include "asm.h"
|
||||
#include "attr.h"
|
||||
#include "bin.h"
|
||||
#include "c.h"
|
||||
#include "error.h"
|
||||
#include "output.h"
|
||||
|
||||
@@ -53,6 +54,15 @@
|
||||
|
||||
|
||||
|
||||
/* Different types of output formats */
|
||||
enum OutputFormat {
|
||||
ofAsm, /* Output assembler source */
|
||||
ofBin, /* Output raw binary format */
|
||||
ofC, /* Output C code */
|
||||
|
||||
ofCount /* Number of output formats without ofAuto */
|
||||
};
|
||||
|
||||
typedef struct OutputFormatDesc OutputFormatDesc;
|
||||
struct OutputFormatDesc {
|
||||
|
||||
@@ -65,6 +75,7 @@ struct OutputFormatDesc {
|
||||
static OutputFormatDesc OutputFormatTable[ofCount] = {
|
||||
{ WriteAsmFile },
|
||||
{ WriteBinFile },
|
||||
{ WriteCFile },
|
||||
};
|
||||
|
||||
/* Table that maps extensions to Output formats. Must be sorted alphabetically */
|
||||
@@ -73,12 +84,14 @@ static const FileId FormatTable[] = {
|
||||
{ "A", ofAsm },
|
||||
{ "ASM", ofAsm },
|
||||
{ "BIN", ofBin },
|
||||
{ "C", ofC },
|
||||
{ "INC", ofAsm },
|
||||
{ "S", ofAsm },
|
||||
|
||||
{ "a", ofAsm },
|
||||
{ "asm", ofAsm },
|
||||
{ "bin", ofBin },
|
||||
{ "c", ofC },
|
||||
{ "inc", ofAsm },
|
||||
{ "s", ofAsm },
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user