diff options
author | Paul Gilbert | 2018-12-01 09:43:34 -0800 |
---|---|---|
committer | Paul Gilbert | 2018-12-08 19:05:59 -0800 |
commit | d3c46f7078c05fc38bde26d38f6d767167c54c6f (patch) | |
tree | 81cdc66554fdb1cfe00cf4627c2764afffbb94d9 /engines | |
parent | 41b62ab00db1d1730b1d61b77fda0df2c65753c0 (diff) | |
download | scummvm-rg350-d3c46f7078c05fc38bde26d38f6d767167c54c6f.tar.gz scummvm-rg350-d3c46f7078c05fc38bde26d38f6d767167c54c6f.tar.bz2 scummvm-rg350-d3c46f7078c05fc38bde26d38f6d767167c54c6f.zip |
GLK: TADS: Add Regex class
Diffstat (limited to 'engines')
-rw-r--r-- | engines/glk/module.mk | 1 | ||||
-rw-r--r-- | engines/glk/tads/tads2/os.cpp | 2 | ||||
-rw-r--r-- | engines/glk/tads/tads2/os.h | 20 |
3 files changed, 21 insertions, 2 deletions
diff --git a/engines/glk/module.mk b/engines/glk/module.mk index 89be6a2507..a8128506c9 100644 --- a/engines/glk/module.mk +++ b/engines/glk/module.mk @@ -47,6 +47,7 @@ MODULE_OBJS := \ tads/tads.o \ tads/tads2/ler.o \ tads/tads2/os.o \ + tads/tads2/regex.o \ tads/tads2/tads2.o \ tads/tads3/tads3.o diff --git a/engines/glk/tads/tads2/os.cpp b/engines/glk/tads/tads2/os.cpp index df7cb423fe..248611d5ad 100644 --- a/engines/glk/tads/tads2/os.cpp +++ b/engines/glk/tads/tads2/os.cpp @@ -215,7 +215,7 @@ void OS::oss_change_status_right(const char *str) { oss_draw_status_line(); } -int OS::memicmp(char *s1, char *s2, int len) { +int OS::memicmp(const char *s1, const char *s2, int len) { char *x1, *x2; int i, result; diff --git a/engines/glk/tads/tads2/os.h b/engines/glk/tads/tads2/os.h index ba0058d98a..3c50cb5e64 100644 --- a/engines/glk/tads/tads2/os.h +++ b/engines/glk/tads/tads2/os.h @@ -30,6 +30,17 @@ namespace TADS { namespace TADS2 { /** + * Allocate a memory block + */ +#define mchalo(CTX, SIZE, COMMENT) ((byte *)new byte[SIZE]) + +/** + * Free a memory block + */ +#define mchfre(PTR) delete[] (byte *)PTR + + +/** * The character (or characters) which mark the beginning of a special fileref string. * The important thing is that the string be one that is either not allowed in * filenames on your platform or is unlikely to be the first part of a filename. @@ -288,10 +299,17 @@ protected: */ void os_print(const char *str, size_t len); + /**@}*/ + + /** + * \defgroup Memory routines + * @{ + */ + /** * Compare two strings */ - int memicmp(char *s1, char *s2, int len); + int memicmp(const char *s1, const char *s2, int len); /**@}*/ |