[Scummvm-git-logs] scummvm master -> 6ba11c8f93c865a51e1fec5cc4cfe5b89176f8b3

bluegr bluegr at gmail.com
Sun Oct 24 12:11:22 UTC 2021


This automated email contains information about 4 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
df52fee40d ICB: Remove calls to _flushall
454e30312c COMMON: Add isAscii function to replace non standard isascii
d1cc639318 GLK: HUGO: Replace call to isascii by our implementation
6ba11c8f93 WIN32: Make sure _argc and _argv are present with mingw


Commit: df52fee40d4b1d4029045963fc852283895eda04
    https://github.com/scummvm/scummvm/commit/df52fee40d4b1d4029045963fc852283895eda04
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2021-10-24T15:11:18+03:00

Commit Message:
ICB: Remove calls to _flushall

This doesn't seem necessary and it's not a standard function

Changed paths:
    engines/icb/jpeg.cpp


diff --git a/engines/icb/jpeg.cpp b/engines/icb/jpeg.cpp
index 9963a654e6..c795944727 100644
--- a/engines/icb/jpeg.cpp
+++ b/engines/icb/jpeg.cpp
@@ -40,10 +40,6 @@
 #include "engines/icb/jpeg.h"
 #include "engines/icb/global_objects_pc.h"
 
-#ifndef _WIN32
-#define _flushall() fflush(NULL)
-#endif
-
 namespace ICB {
 
 // A.3.6 Figure A.6
@@ -152,11 +148,9 @@ void JpegDecoder::ReadMarker() {
 			// We call ReadByte to make sure the problem
 			// is not a premature EOF.
 			(void)ReadByte();
-			_flushall();
 			// throw ("Unknown, unsupported, or reserved marker encountered");
 		}
 	}
-	_flushall();
 }
 
 void JpegDecoder::ReadHuffmanTable() {


Commit: 454e30312cca1e86e2313aa69aa8ddd862da5950
    https://github.com/scummvm/scummvm/commit/454e30312cca1e86e2313aa69aa8ddd862da5950
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2021-10-24T15:11:18+03:00

Commit Message:
COMMON: Add isAscii function to replace non standard isascii

Changed paths:
    common/util.cpp
    common/util.h


diff --git a/common/util.cpp b/common/util.cpp
index 13ee273eb3..ef5b37b6bd 100644
--- a/common/util.cpp
+++ b/common/util.cpp
@@ -109,6 +109,11 @@ bool parseBool(const String &val, bool &valAsBool) {
 		if (c < 0 || c > 127) \
 			return false
 
+bool isAscii(int c) {
+	ENSURE_ASCII_CHAR(c);
+	return true;
+}
+
 bool isAlnum(int c) {
 	ENSURE_ASCII_CHAR(c);
 	return isalnum((byte)c);
diff --git a/common/util.h b/common/util.h
index 9250192d32..cf6d2a71d3 100644
--- a/common/util.h
+++ b/common/util.h
@@ -156,6 +156,18 @@ extern void hexdump(const byte * data, int len, int bytesPerLine = 16, int start
 bool parseBool(const String &val, bool &valAsBool);
 
 
+/**
+ * Test whether the given character is in ASCII range (between 0 and 127 included).
+ *
+ * If the parameter is outside the range of a signed or unsigned char, then
+ * false is returned.
+ *
+ * @param c		The character to test.
+ *
+ * @return True if the character is ASCII, false otherwise.
+ */
+bool isAscii(int c);
+
 /**
  * Test whether the given character is alphanumeric (a-z, A-Z, 0-9).
  *


Commit: d1cc63931801f51f32f64b388bf88e119fe2a292
    https://github.com/scummvm/scummvm/commit/d1cc63931801f51f32f64b388bf88e119fe2a292
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2021-10-24T15:11:18+03:00

Commit Message:
GLK: HUGO: Replace call to isascii by our implementation

Changed paths:
    engines/glk/hugo/heparse.cpp


diff --git a/engines/glk/hugo/heparse.cpp b/engines/glk/hugo/heparse.cpp
index c5a939ddab..7ba36827ad 100644
--- a/engines/glk/hugo/heparse.cpp
+++ b/engines/glk/hugo/heparse.cpp
@@ -2344,7 +2344,7 @@ void Hugo::SeparateWords() {
 
 	for (i=1; i<=(int)strlen(a); i++)
 	{
-		if (inquote!=1 && isascii(a[i-1]))
+		if (inquote!=1 && Common::isAscii(a[i-1]))
 			b[0] = (char)tolower(a[i-1]);
 		else b[0] = a[i-1];
 		b[1] = '\0';


Commit: 6ba11c8f93c865a51e1fec5cc4cfe5b89176f8b3
    https://github.com/scummvm/scummvm/commit/6ba11c8f93c865a51e1fec5cc4cfe5b89176f8b3
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2021-10-24T15:11:18+03:00

Commit Message:
WIN32: Make sure _argc and _argv are present with mingw

In mingw32 when __STRICT_ANSI__ is defined these variables doesn't get
defined

Changed paths:
    backends/platform/sdl/win32/win32-main.cpp


diff --git a/backends/platform/sdl/win32/win32-main.cpp b/backends/platform/sdl/win32/win32-main.cpp
index 1464955345..331e6921f5 100644
--- a/backends/platform/sdl/win32/win32-main.cpp
+++ b/backends/platform/sdl/win32/win32-main.cpp
@@ -22,6 +22,8 @@
 
 // Disable symbol overrides so that we can use system headers.
 #define FORBIDDEN_SYMBOL_ALLOW_ALL
+// HACK: Mingw32 doesn't define _argc _argv in strict ANSI mode
+#undef __STRICT_ANSI__
 
 #include "common/scummsys.h"
 




More information about the Scummvm-git-logs mailing list