frotz-issue-44: Added compiler support for Apple MacOS Sierra 10.12 plus MacPorts...
authorTim Telcik <telcik@gmail.com>
Mon, 12 Jun 2017 16:20:33 +0000 (00:20 +0800)
committerTim Telcik <telcik@gmail.com>
Mon, 12 Jun 2017 16:20:33 +0000 (00:20 +0800)
Makefile
src/common/fastmem.c
src/curses/ux_blorb.h
src/curses/ux_init.c
src/curses/ux_resource.c

index e853b890a3cdf7bcaaba183a68a9831ef63cf0e0..7785fb7977491b0ad812f5eaa30950ce26e3d1a7 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -57,6 +57,8 @@ CURSES = -lncurses
 #INCL = -I/usr/pkg/include
 #INCL = -I/usr/freeware/include
 #INCL = -I/5usr/include
+## INCL path for Apple MacOS Sierra 10.12 plus MacPorts
+INCL = -I/opt/local/include
 
 # Just in case your operating system keeps its user-added libraries
 # somewhere unusual...
@@ -65,6 +67,8 @@ CURSES = -lncurses
 #LIB = -L/usr/pkg/lib
 #LIB = -L/usr/freeware/lib
 #LIB = -L/5usr/lib
+## LIB path for Apple MacOS Sierra 10.12 plus MacPorts
+LIB = -L/opt/local/lib
 
 # Uncomment this if you're compiling Unix Frotz on a machine that lacks 
 # the strrchr() libc library call.  If you don't know what this means,
@@ -187,7 +191,8 @@ all:        $(NAME) d$(NAME)
 .SUFFIXES: .c .o .h
 
 $(COMMON_OBJECT): %.o: %.c
-       $(CC) $(OPTS) -o $@ -c $<
+       #$(CC) $(OPTS) -o $@ -c $<
+       $(CC) $(OPTS) $(INCL) -o $@ -c $<
 
 $(BLORB_OBJECT): %.o: %.c
        $(CC) $(CFLAGS) $(OPTS) -o $@ -c $<
@@ -196,7 +201,8 @@ $(DUMB_OBJECT): %.o: %.c
        $(CC) $(CFLAGS) $(OPTS) -o $@ -c $<
 
 $(CURSES_OBJECT): %.o: %.c
-       $(CC) $(OPTS) -o $@ -c $<
+       #$(CC) $(OPTS) -o $@ -c $<
+       $(CC) $(OPTS) $(INCL) -o $@ -c $<
 
 
 ####################################
index 1e7879068953ec8a789baa9e7267e5235d4f3f75..113370e15817429bbdaff889823f74a1bf7dd5b0 100644 (file)
@@ -682,7 +682,7 @@ void z_restore (void)
 {
     char new_name[MAX_FILE_NAME + 1];
     char default_name[MAX_FILE_NAME + 1];
-    FILE *gfp;
+    FILE *gfp = NULL;
 
     zword success = 0;
 
index 18aac1b1bfabce685caaa52a3bc0cab4b5c77d69..1be180a6d564dfd1045fea34f9fb04b8ab33ab16 100644 (file)
@@ -21,7 +21,8 @@ typedef struct sampledata_struct {
  */
 typedef struct {
     bb_result_t bbres;
-    ulong type;
+    // ulong type;
+    uint32_t type;
     FILE *fp;
 } myresource;
 
index e08e2b4825ae427c57c157b2f6ac5bc02b2065ce..d1f03bf007aca54418cf255a1ead8e9d83d5dca8 100644 (file)
@@ -993,7 +993,7 @@ does nothing.
 static void sigint_handler(int dummy)
 {
     signal(SIGINT, sigint_handler);
-    dummy = dummy;
+    // dummy = dummy;
 
     os_stop_sample(0);
     scrollok(stdscr, TRUE); scroll(stdscr);
index 0880feec789bb435bf0ea954a61c486ff674fb62..72782fc140b84b527eb91a4648c8af5582b04c50 100644 (file)
@@ -23,7 +23,8 @@ bb_map_t *blorb_map;
 int ux_getresource( int num, int ispic, int method, myresource * res)
 {
     int st;
-    ulong usage;
+    // ulong usage;
+    uint32_t usage;
 
     res->bbres.data.ptr = NULL;
     res->fp = NULL;