aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/glk/module.mk1
-rw-r--r--engines/glk/tads/tads2/os.cpp2
-rw-r--r--engines/glk/tads/tads2/os.h20
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);
/**@}*/