From cdc1955354d043eb5a687177ca1c81d93f6ad2b5 Mon Sep 17 00:00:00 2001
From: William Kendrick
Date: Mon, 12 May 2003 02:57:39 +0000
Subject: [PATCH] Various Win32 patches from John P.
---
docs/CHANGES.txt | 5 ++++-
docs/README.txt | 6 +++++-
docs/html/README.html | 2 +-
src/tuxpaint.c | 18 ++++++++++++------
4 files changed, 22 insertions(+), 9 deletions(-)
diff --git a/docs/CHANGES.txt b/docs/CHANGES.txt
index f8fef7c37..fb1571ee3 100644
--- a/docs/CHANGES.txt
+++ b/docs/CHANGES.txt
@@ -7,7 +7,10 @@ bill@newbreedsoftware.com
http://www.newbreedsoftware.com/tuxpaint/
-2003.May.8 (0.9.11) [cvs]
+2003.May.11 (0.9.11) [cvs]
+ * Windows bugfixes.
+ John Popplewell
+
* Mac OS X print update. Get to a print dialog by holding Alt/Option when
clicking "Print." (Similar to how Windows handles it.)
Darrell Walisser
diff --git a/docs/README.txt b/docs/README.txt
index d18bfbad9..497c8b89f 100644
--- a/docs/README.txt
+++ b/docs/README.txt
@@ -9,7 +9,7 @@
bill@newbreedsoftware.com
http://www.newbreedsoftware.com/tuxpaint/
- June 14, 2002 - April 5, 2003
+ June 14, 2002 - May 11, 2003
----------------------------------------------------------------------
@@ -337,6 +337,8 @@ Options
|--------------------+------------------+---------|
|greek | | |
|--------------------+------------------+---------|
+ |hebrew | | |
+ |--------------------+------------------+---------|
|hungarian |magyar | |
|--------------------+------------------+---------|
|icelandic |islenska | |
@@ -513,6 +515,8 @@ Options
|---------------+-------------------+--------------------|
|fr_FR@euro |Franc,ais |French |
|---------------+-------------------+--------------------|
+ |he_IL (*) | |Hebrew |
+ |---------------+-------------------+--------------------|
|hu_HU |Magyar |Hungarian |
|---------------+-------------------+--------------------|
|id_ID |Bahasa Indonesia |Indonesian |
diff --git a/docs/html/README.html b/docs/html/README.html
index 284b255f4..5ee7698be 100644
--- a/docs/html/README.html
+++ b/docs/html/README.html
@@ -21,7 +21,7 @@ New Breed Software
bill@newbreedsoftware.com
http://www.newbreedsoftware.com/tuxpaint/
-June 14, 2002 - April 25, 2003
+June 14, 2002 - May 11, 2003
diff --git a/src/tuxpaint.c b/src/tuxpaint.c
index a831c04ca..6258ba393 100644
--- a/src/tuxpaint.c
+++ b/src/tuxpaint.c
@@ -7,12 +7,12 @@
bill@newbreedsoftware.com
http://www.newbreedsoftware.com/tuxpaint/
- June 14, 2002 - April 26, 2003
+ June 14, 2002 - May 11, 2003
*/
#define VER_VERSION "0.9.11"
-#define VER_DATE "2003.04.26"
+#define VER_DATE "2003.05.11"
/* #define DEBUG */
@@ -122,6 +122,7 @@ extern char* g_win32_getlocale(void);
#define strncasecmp strnicmp
#define snprintf _snprintf
#define S_ISDIR(i) ((i&_S_IFDIR)!=0)
+#define alloca _alloca
#endif /* WIN32 */
@@ -215,7 +216,7 @@ void win32_perror(const char *str)
#define clamp(lo,value,hi) (min(max(value,lo),hi))
-#define RENDER_TEXT TTF_RenderUTF8_Blended
+#define RENDER_TEXT TTF_RenderText_Blended
/* Possible languages: */
@@ -2025,7 +2026,7 @@ void mainloop(void)
{
if (((unsigned char *) event.user.data1)[0] == '=')
{
- draw_tux_text(TUX_GREAT, event.user.data1 + 1, 1, 0);
+ draw_tux_text(TUX_GREAT, (char *) event.user.data1 + 1, 1, 0);
}
else
{
@@ -3560,7 +3561,7 @@ void setup(int argc, char * argv[])
#ifndef WIN32
fprintf(stderr, "Note: printcfg option only applies to Windows!\n");
#endif
- use_print_config = 0;
+ use_print_config = 1;
}
else if (strstr(argv[i], "--printdelay=") == argv[i])
{
@@ -4070,7 +4071,6 @@ void setup(int argc, char * argv[])
"trails in fullscreen mode. Disabling fancy cursors.\n"
"(You can do this yourself with 'nofancycursors' option,\n"
"to avoid this warning in the future.)\n");
- }
no_fancy_cursors = 1;
}
#endif
@@ -10851,7 +10851,13 @@ escape_string_type escape_strings[] = {
unsigned char * unescape(char * str)
{
int i, j, len, esclen, inside_escape;
+
+#ifndef WIN32
char outstr[strlen(str + 1)], escapestr[strlen(str + 1)];
+#else
+ char *outstr = alloca( strlen(str + 1) );
+ char *escapestr = alloca( strlen(str + 1) );
+#endif
inside_escape = 0;
len = 0;