Port sc6 to C++.
This commit is contained in:
parent
142fbaafdd
commit
3eb1faa470
@ -87,7 +87,7 @@ binary.sources += [
|
||||
'sc3.c',
|
||||
'sc4.c',
|
||||
'sc5.c',
|
||||
'sc6.c',
|
||||
'sc6.cpp',
|
||||
'sc7.cpp',
|
||||
'scexpand.cpp',
|
||||
'sci18n.cpp',
|
||||
|
@ -79,7 +79,7 @@ typedef struct tagAMX_DBG_HDR {
|
||||
|
||||
typedef struct tagAMX_DBG_FILE {
|
||||
ucell address PACKED; /* address in the code segment where generated code (for this file) starts */
|
||||
const char name[1]; /* ASCII string, zero-terminated */
|
||||
char name[1]; /* ASCII string, zero-terminated */
|
||||
} PACKED AMX_DBG_FILE;
|
||||
|
||||
typedef struct tagAMX_DBG_LINE {
|
||||
@ -95,7 +95,7 @@ typedef struct tagAMX_DBG_SYMBOL {
|
||||
char ident; /* kind of symbol (function/variable) */
|
||||
char vclass; /* class of symbol (global/local) */
|
||||
int16_t dim PACKED; /* number of dimensions */
|
||||
const char name[1]; /* ASCII string, zero-terminated */
|
||||
char name[1]; /* ASCII string, zero-terminated */
|
||||
} PACKED AMX_DBG_SYMBOL;
|
||||
|
||||
typedef struct tagAMX_DBG_SYMDIM {
|
||||
@ -105,19 +105,19 @@ typedef struct tagAMX_DBG_SYMDIM {
|
||||
|
||||
typedef struct tagAMX_DBG_TAG {
|
||||
int16_t tag PACKED; /* tag id */
|
||||
const char name[1]; /* ASCII string, zero-terminated */
|
||||
char name[1]; /* ASCII string, zero-terminated */
|
||||
} PACKED AMX_DBG_TAG;
|
||||
|
||||
typedef struct tagAMX_DBG_MACHINE {
|
||||
int16_t automaton PACKED; /* automaton id */
|
||||
ucell address PACKED; /* address of state variable */
|
||||
const char name[1]; /* ASCII string, zero-terminated */
|
||||
char name[1]; /* ASCII string, zero-terminated */
|
||||
} PACKED AMX_DBG_MACHINE;
|
||||
|
||||
typedef struct tagAMX_DBG_STATE {
|
||||
int16_t state PACKED; /* state id */
|
||||
int16_t automaton PACKED; /* automaton id */
|
||||
const char name[1]; /* ASCII string, zero-terminated */
|
||||
char name[1]; /* ASCII string, zero-terminated */
|
||||
} PACKED AMX_DBG_STATE;
|
||||
|
||||
typedef struct tagAMX_DBG {
|
||||
|
@ -44,7 +44,7 @@ typedef cell (*OPCODE_PROC)(FILE *fbin,char *params,cell opcode);
|
||||
|
||||
typedef struct {
|
||||
cell opcode;
|
||||
char *name;
|
||||
const char *name;
|
||||
int segment; /* sIN_CSEG=parse in cseg, sIN_DSEG=parse in dseg */
|
||||
OPCODE_PROC func;
|
||||
} OPCODEC;
|
@ -45,13 +45,13 @@ typedef struct {
|
||||
const char *find;
|
||||
const char *replace;
|
||||
int savesize; /* number of bytes saved (in bytecode) */
|
||||
} PRE_SEQUENCE;
|
||||
} SETUP_SEQUENCE;
|
||||
typedef struct {
|
||||
char *find;
|
||||
char *replace;
|
||||
int savesize; /* number of bytes saved (in bytecode) */
|
||||
} SEQUENCE;
|
||||
static PRE_SEQUENCE sequences_cmp[] = {
|
||||
static SETUP_SEQUENCE sequences_cmp[] = {
|
||||
/* A very common sequence in four varieties
|
||||
* load.s.pri n1 load.s.pri n2
|
||||
* push.pri load.s.alt n1
|
||||
|
Loading…
Reference in New Issue
Block a user