diff options
author | Paul Gilbert | 2019-05-12 10:38:03 +1000 |
---|---|---|
committer | Paul Gilbert | 2019-05-12 10:38:03 +1000 |
commit | 9f6e1a8f293b1b525c79437e002d7848bc952ce4 (patch) | |
tree | 82b70863aef146ac29026982815c353abd1d0d20 /engines/glk | |
parent | 6b6670caf9812a980a9aa4049bf6931aa943b79b (diff) | |
download | scummvm-rg350-9f6e1a8f293b1b525c79437e002d7848bc952ce4.tar.gz scummvm-rg350-9f6e1a8f293b1b525c79437e002d7848bc952ce4.tar.bz2 scummvm-rg350-9f6e1a8f293b1b525c79437e002d7848bc952ce4.zip |
GLK: HUGO: Compilation fixes
Diffstat (limited to 'engines/glk')
-rw-r--r-- | engines/glk/hugo/hemedia.cpp | 2 | ||||
-rw-r--r-- | engines/glk/hugo/heparse.cpp | 2 | ||||
-rw-r--r-- | engines/glk/hugo/hugo.h | 4 | ||||
-rw-r--r-- | engines/glk/hugo/stringfn.cpp | 6 | ||||
-rw-r--r-- | engines/glk/hugo/stringfn.h | 2 |
5 files changed, 12 insertions, 4 deletions
diff --git a/engines/glk/hugo/hemedia.cpp b/engines/glk/hugo/hemedia.cpp index 19c9874ed4..a7ddbf6d00 100644 --- a/engines/glk/hugo/hemedia.cpp +++ b/engines/glk/hugo/hemedia.cpp @@ -63,7 +63,7 @@ int Hugo::loadres(HUGO_FILE infile, int reslen, int type) { while (reslen > 0) { - n = hugo_fread(buf, 1, reslen < sizeof buf ? reslen : sizeof buf, infile); + n = hugo_fread(buf, 1, reslen < (int)sizeof(buf) ? reslen : sizeof(buf), infile); if (n <= 0) break; glk_put_buffer_stream(stream, buf, n); diff --git a/engines/glk/hugo/heparse.cpp b/engines/glk/hugo/heparse.cpp index da01810a8e..c837b465fd 100644 --- a/engines/glk/hugo/heparse.cpp +++ b/engines/glk/hugo/heparse.cpp @@ -284,7 +284,7 @@ int Hugo::DomainObj(int obj) { return yes; } -unsigned int Hugo::FindWord(char *a) { +unsigned int Hugo::FindWord(const char *a) { unsigned int ptr = 0; int i, p, alen; diff --git a/engines/glk/hugo/hugo.h b/engines/glk/hugo/hugo.h index 8d2d18b749..e49e313dd2 100644 --- a/engines/glk/hugo/hugo.h +++ b/engines/glk/hugo/hugo.h @@ -197,7 +197,7 @@ private: int extra_param; char loaded_filename[MAX_RES_PATH]; char loaded_resname[MAX_RES_PATH]; - char resource_type = 0; + char resource_type; // herun int passlocal[MAXLOCALS]; ///< locals passed to routine @@ -760,7 +760,7 @@ private: /** * Returns the dictionary address of <a>. */ - unsigned int FindWord(char *a); + unsigned int FindWord(const char *a); /** * Checks to see if <obj> is in objlist[]. diff --git a/engines/glk/hugo/stringfn.cpp b/engines/glk/hugo/stringfn.cpp index 4e94b3e495..0b194cf853 100644 --- a/engines/glk/hugo/stringfn.cpp +++ b/engines/glk/hugo/stringfn.cpp @@ -112,5 +112,11 @@ char *StringFunctions::strlwr(char *s) { return s; } +char *StringFunctions::strupr(char *s) { + for (char *sp = s; *sp; ++sp) + *sp = toupper(*sp); + return s; +} + } // End of namespace Hugo } // End of namespace Glk diff --git a/engines/glk/hugo/stringfn.h b/engines/glk/hugo/stringfn.h index 2ee6e3ed74..f5f29b12a4 100644 --- a/engines/glk/hugo/stringfn.h +++ b/engines/glk/hugo/stringfn.h @@ -58,6 +58,8 @@ public: char *hugo_strcpy(char *s, const char *t); char *strlwr(char *s); + + char *strupr(char *s); }; |