diff options
author | Paul Gilbert | 2018-12-02 10:53:18 -0800 |
---|---|---|
committer | Paul Gilbert | 2018-12-08 19:05:59 -0800 |
commit | 7212924b1ead017b4c769ca4fb8cdad6bf95e78e (patch) | |
tree | 08e1e9970932ecd9e4e7f002cfa70f8ac4bd9edc /engines/glk/tads | |
parent | c68542dba8ecf7a9ad061c015061832eaa4bb016 (diff) | |
download | scummvm-rg350-7212924b1ead017b4c769ca4fb8cdad6bf95e78e.tar.gz scummvm-rg350-7212924b1ead017b4c769ca4fb8cdad6bf95e78e.tar.bz2 scummvm-rg350-7212924b1ead017b4c769ca4fb8cdad6bf95e78e.zip |
GLK: TADS: Compilation fixes
Diffstat (limited to 'engines/glk/tads')
-rw-r--r-- | engines/glk/tads/tads2/ler.cpp | 2 | ||||
-rw-r--r-- | engines/glk/tads/tads2/os.cpp | 6 | ||||
-rw-r--r-- | engines/glk/tads/tads2/regex.cpp | 9 |
3 files changed, 11 insertions, 6 deletions
diff --git a/engines/glk/tads/tads2/ler.cpp b/engines/glk/tads/tads2/ler.cpp index 930fdf02a1..970fe31d67 100644 --- a/engines/glk/tads/tads2/ler.cpp +++ b/engines/glk/tads/tads2/ler.cpp @@ -33,7 +33,7 @@ int errcxdef::errfmt(char *outbuf, int outbufl, char *fmt, int argc, erradef *ar int argi = 0; int len; char buf[20]; - char *p = nullptr; + const char *p = nullptr; char fmtchar; while (*fmt != '\0' && outbufl > 1) { diff --git a/engines/glk/tads/tads2/os.cpp b/engines/glk/tads/tads2/os.cpp index 514a912bd5..17bdc346e5 100644 --- a/engines/glk/tads/tads2/os.cpp +++ b/engines/glk/tads/tads2/os.cpp @@ -51,6 +51,7 @@ glui32 OS::oss_convert_file_type(int type) { } glui32 OS::oss_convert_fileref_to_string(frefid_t file_to_convert, char *buffer, int buf_len) { +#ifdef TODO char temp_string[32]; glui32 value, i = 0, digit, digit_flag = false, // Have we put a digit in the string yet? @@ -74,10 +75,12 @@ glui32 OS::oss_convert_fileref_to_string(frefid_t file_to_convert, char *buffer, return false; sprintf(buffer, "%s%s%s", OSS_FILEREF_STRING_PREFIX, temp_string, OSS_FILEREF_STRING_SUFFIX); +#endif return true; } frefid_t OS::oss_convert_string_to_fileref(char *buffer, glui32 usage) { +#ifdef TODO char temp_string[32]; glui32 value = 0, i, multiplier = 1; @@ -97,6 +100,9 @@ frefid_t OS::oss_convert_string_to_fileref(char *buffer, glui32 usage) { // If not, return the new fileref return (glk_fileref_create_by_name(usage, os_get_root_name(buffer), 0)); +#else + return nullptr; +#endif } bool OS::oss_is_string_a_fileref(char *buffer) { diff --git a/engines/glk/tads/tads2/regex.cpp b/engines/glk/tads/tads2/regex.cpp index f6a009a0a9..d5eee3ac4a 100644 --- a/engines/glk/tads/tads2/regex.cpp +++ b/engines/glk/tads/tads2/regex.cpp @@ -1069,19 +1069,18 @@ int re_context::match(const char *entire_str, const char *str, size_t origlen, case RE_RANGE: case RE_RANGE_EXCL: { - int match; + int match_val; // make sure we have a character to match if (curlen == 0) return -1; // see if we match - match = re_is_bit_set(tuple->char_range, - (int)(unsigned char)*p); + match_val = re_is_bit_set(tuple->char_range, (int)(unsigned char)*p); // make sure we got what we wanted - if ((tuple->ch == RE_RANGE && !match) - || (tuple->ch == RE_RANGE_EXCL && match)) + if ((tuple->ch == RE_RANGE && !match_val) + || (tuple->ch == RE_RANGE_EXCL && match_val)) return -1; // skip this character of the input |