More SDL tweaks. Still won't run.
authorDavid Griffith <dave@661.org>
Tue, 17 Jan 2012 04:28:55 +0000 (20:28 -0800)
committerDavid Griffith <dave@661.org>
Tue, 17 Jan 2012 04:28:55 +0000 (20:28 -0800)
src/common/frotz.h
src/sdl/sf_frotz.h
src/sdl/sf_sig.c
src/sdl/sf_video.c

index 7c7f45e3185c85f449b029563f9f09ff541797e9..315767303ec7535e8359f2abdb3b3e903994a01d 100644 (file)
@@ -31,6 +31,7 @@ typedef int bool;
 #include <stdio.h>
 
 
+/* typedef unsigned short zbyte; */
 typedef unsigned char zbyte;
 typedef unsigned short zword;
 
index 3d356b355d80998f3032c209d6895d85a6cdee62..ee88a2ddf8cc9509b96fea1889b2778e169a7dc1 100644 (file)
@@ -201,7 +201,7 @@ void sf_sleep( int millisecs);
 
 unsigned long sf_ticks (void);
 
-void sf_DrawInput(zword * buffer, int pos, int ptx, int pty, int width, bool cursor);
+void sf_DrawInput(zchar * buffer, int pos, int ptx, int pty, int width, bool cursor);
 
 int sf_aiffwav( FILE *f, int foffs, void ** wav, int *size);
 
index 0de4b1307985f7a68fbc9cf05fdead2a9cc3a88f..9a50c509bce79af5dd179dcaab1e158d3bb5ee36 100644 (file)
@@ -1,5 +1,6 @@
 #include <stdio.h>
 #include <signal.h>
+#include <stdlib.h>
 
 #include "sf_frotz.h"
 
@@ -43,8 +44,10 @@ void sf_installhandlers()
 #include <execinfo.h>
 
 /* get REG_EIP from ucontext.h */
+#ifndef __USE_GNU
 #define __USE_GNU
 #include <ucontext.h>
+#endif
 
 // REG_EIP does not exist on 64bit CPU
 #if defined(__amd64__) || defined (__x86_64__)
index 4305eeb1ccd950cd1553fc31498aef9885a0ccbb..a5f4d28c839e8dbed8e13df7779cfb142abeb76b 100644 (file)
@@ -43,7 +43,7 @@ void sf_getclip( int *x, int *y, int *w, int *h)
   *w = xmax-xmin; *h = ymax-ymin;\r
   }\r
 \r
-static int mywcslen( zword *b)\r
+static int mywcslen( zchar *b)\r
   {\r
   int n=0;\r
   while (*b++) n++;\r
@@ -715,7 +715,7 @@ zchar os_read_key(int timeout, int cursor)
 #define MAXHISTORY 8192\r
 static zword History[MAXHISTORY] = {0};\r
 static int histptr = 0;\r
-static void addtoHistory( zword *buf)\r
+static void addtoHistory( zchar *buf)\r
   {\r
   int n = mywcslen(buf)+2;\r
   int avail = MAXHISTORY - histptr;\r
@@ -958,7 +958,7 @@ zchar os_read_line(int max, zchar *buf, int timeout, int width, int continued)
   }\r
 \r
 // Draw the current input line\r
-void sf_DrawInput(zword * buffer, int pos, int ptx, int pty, int width, bool cursor)\r
+void sf_DrawInput(zchar * buffer, int pos, int ptx, int pty, int width, bool cursor)\r
   {\r
   int height;\r
   SF_textsetting * ts = sf_curtextsetting();\r