mirror of
https://git.code.sf.net/p/newrpl/sources
synced 2024-11-16 19:51:25 +01:00
Renumbered libraries again to fix symbolics w/units interaction.
This commit is contained in:
parent
ea29be49be
commit
2435eb4b4a
6 changed files with 50 additions and 34 deletions
|
@ -109,14 +109,14 @@ SOURCES += main.cpp\
|
|||
newrpl/dectranscen.c \
|
||||
newrpl/backup.c \
|
||||
newrpl/sanity.c \
|
||||
newrpl/lib-52-symbolic.c \
|
||||
newrpl/lib-32-lam.c \
|
||||
newrpl/lib-58-matrix.c \
|
||||
newrpl/lib-65-system.c \
|
||||
firmware/hal_msgenglish.c \
|
||||
newrpl/units.c \
|
||||
newrpl/lib-60-units.c \
|
||||
newrpl/lib-62-lists.c
|
||||
newrpl/lib-62-lists.c \
|
||||
newrpl/lib-56-symbolic.c \
|
||||
newrpl/lib-52-matrix.c \
|
||||
newrpl/lib-54-units.c
|
||||
|
||||
HEADERS += mainwindow.h \
|
||||
qemuscreen.h \
|
||||
|
|
|
@ -14,11 +14,11 @@
|
|||
// ALL OTHER FUNCTIONS ARE LOCAL
|
||||
|
||||
// MAIN LIBRARY NUMBER, CHANGE THIS FOR EACH LIBRARY
|
||||
#define LIBRARY_NUMBER 58
|
||||
#define LIB_ENUM lib58_enum
|
||||
#define LIB_NAMES lib58_names
|
||||
#define LIB_HANDLER lib58_handler
|
||||
#define LIB_NUMBEROFCMDS LIB58_NUMBEROFCMDS
|
||||
#define LIBRARY_NUMBER 52
|
||||
#define LIB_ENUM lib52_enum
|
||||
#define LIB_NAMES lib52_names
|
||||
#define LIB_HANDLER lib52_handler
|
||||
#define LIB_NUMBEROFCMDS LIB52_NUMBEROFCMDS
|
||||
|
||||
// LIST OF LIBRARY NUMBERS WHERE THIS LIBRARY REGISTERS TO
|
||||
// HAS TO BE A HALFWORD LIST TERMINATED IN ZERO
|
|
@ -17,13 +17,13 @@
|
|||
// ALL OTHER FUNCTIONS ARE LOCAL
|
||||
|
||||
// MAIN LIBRARY NUMBER, CHANGE THIS FOR EACH LIBRARY
|
||||
#define LIBRARY_NUMBER 60
|
||||
#define LIB_ENUM lib60enum
|
||||
#define LIB_NAMES lib60_names
|
||||
#define LIB_HANDLER lib60_handler
|
||||
#define LIB_TOKENINFO lib60_tokeninfo
|
||||
#define LIB_NUMBEROFCMDS LIB60_NUMBEROFCMDS
|
||||
#define ROMPTR_TABLE romptr_table60
|
||||
#define LIBRARY_NUMBER 54
|
||||
#define LIB_ENUM lib54enum
|
||||
#define LIB_NAMES lib54_names
|
||||
#define LIB_HANDLER lib54_handler
|
||||
#define LIB_TOKENINFO lib54_tokeninfo
|
||||
#define LIB_NUMBEROFCMDS LIB54_NUMBEROFCMDS
|
||||
#define ROMPTR_TABLE romptr_table54
|
||||
|
||||
// LIST OF LIBRARY NUMBERS WHERE THIS LIBRARY REGISTERS TO
|
||||
// HAS TO BE A HALFWORD LIST TERMINATED IN ZERO
|
||||
|
@ -1338,6 +1338,17 @@ void LIB_HANDLER()
|
|||
}
|
||||
|
||||
// THERE IS A '_', NOW SPLIT THE TOKEN AND START A PROLOG OF A UNIT
|
||||
|
||||
if( (*(ptr-1)==']') || (*(ptr-1)=='}') ) {
|
||||
// LET THE MATRIX OR LIST FINISH COMPILING, THEN DO
|
||||
// A UNIT-APPLY OPERATOR INSTEAD OF COMPILING A UNIT OBJECT
|
||||
|
||||
BlankStart=NextTokenStart=(WORDPTR)utf8nskip((char * )TokenStart,(char *)BlankStart,f);
|
||||
RetNum=ERR_NOTMINE_SPLITTOKEN;
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
rplCompileAppend(MKPROLOG(LIBRARY_NUMBER,0));
|
||||
|
||||
BlankStart=NextTokenStart=(WORDPTR)utf8nskip((char * )TokenStart,(char *)BlankStart,f);
|
||||
|
@ -1392,7 +1403,9 @@ void LIB_HANDLER()
|
|||
rplDecompAppendChar('_');
|
||||
|
||||
// NO NEED TO USE BRACKETS UNLESS IT'S A SYMBOLIC
|
||||
if(!DecompMode) closebracket=0;
|
||||
if(DecompMode) rplDecompAppendChar('[');
|
||||
else closebracket=0;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -1595,7 +1608,10 @@ void LIB_HANDLER()
|
|||
}
|
||||
|
||||
case OPCODE_GETINFO:
|
||||
if(ISPROLOG(*DecompileObject)) RetNum=OK_TOKENINFO | MKTOKENINFO(0,TITYPE_NUMBER,0,1);
|
||||
if(ISPROLOG(*DecompileObject)) {
|
||||
RetNum=OK_TOKENINFO | MKTOKENINFO(0,TITYPE_NUMBER,0,1);
|
||||
return;
|
||||
}
|
||||
libGetInfo2(*DecompileObject,(char **)LIB_NAMES,(BINT *)LIB_TOKENINFO,LIB_NUMBEROFCMDS);
|
||||
return;
|
||||
|
|
@ -17,12 +17,12 @@
|
|||
// ALL OTHER FUNCTIONS ARE LOCAL
|
||||
|
||||
// MAIN LIBRARY NUMBER, CHANGE THIS FOR EACH LIBRARY
|
||||
#define LIBRARY_NUMBER 52
|
||||
#define LIB_ENUM lib52enum
|
||||
#define LIB_NAMES lib52_names
|
||||
#define LIB_HANDLER lib52_handler
|
||||
#define LIB_NUMBEROFCMDS LIB52_NUMBEROFCMDS
|
||||
#define ROMPTR_TABLE romptr_table52
|
||||
#define LIBRARY_NUMBER 56
|
||||
#define LIB_ENUM lib56enum
|
||||
#define LIB_NAMES lib56_names
|
||||
#define LIB_HANDLER lib56_handler
|
||||
#define LIB_NUMBEROFCMDS LIB56_NUMBEROFCMDS
|
||||
#define ROMPTR_TABLE romptr_table56
|
||||
|
||||
// LIST OF LIBRARY NUMBERS WHERE THIS LIBRARY REGISTERS TO
|
||||
// HAS TO BE A HALFWORD LIST TERMINATED IN ZERO
|
|
@ -169,13 +169,13 @@ extern void libGetPTRFromID(WORDPTR *table,WORD id);
|
|||
// RESERVE (DOIDENT|8) FOR FUTURE FLAG USE IN SYMBOLICS
|
||||
#define DOMAXIDENT 47 // JUST A CONVENIENCE MACRO - MAXIMUM LIB NUMBER TAKEN BY IDENTS
|
||||
|
||||
#define DOUNIT 60 // UNIT OBJECT
|
||||
#define DOUNIT 54 // UNIT OBJECT
|
||||
|
||||
#define DOLIST 62
|
||||
|
||||
#define DOSYMB 52 // SYMBOLIC OBJECT
|
||||
#define DOSYMB 56 // SYMBOLIC OBJECT
|
||||
|
||||
#define DOMATRIX 58 // ARRAY OBJECT
|
||||
#define DOMATRIX 52 // ARRAY OBJECT
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -27,9 +27,9 @@ extern void lib32_handler();
|
|||
|
||||
extern void lib52_handler();
|
||||
|
||||
extern void lib58_handler();
|
||||
extern void lib54_handler();
|
||||
|
||||
extern void lib60_handler();
|
||||
extern void lib56_handler();
|
||||
extern void lib62_handler();
|
||||
|
||||
extern void lib64_handler();
|
||||
|
@ -100,14 +100,14 @@ const LIBHANDLER const ROMLibs[]={
|
|||
// LIB 32 THRU 47 ARE IDENTS
|
||||
lib32_handler,
|
||||
|
||||
// SYMBOLICS
|
||||
// MATRIX
|
||||
lib52_handler,
|
||||
|
||||
// MATRIX
|
||||
lib58_handler,
|
||||
|
||||
// UNITS
|
||||
lib60_handler,
|
||||
lib54_handler,
|
||||
|
||||
// SYMBOLIC
|
||||
lib56_handler,
|
||||
|
||||
// LISTS
|
||||
lib62_handler,
|
||||
|
|
Loading…
Reference in a new issue