Index: file.c *** itf.org/file.c Mon May 3 20:12:47 1993 --- itf.apple/file.c Mon May 3 20:13:50 1993 *************** *** 186,192 **** } else { ! if ( (int)fread ((char *)ptr,BLOCK_SIZE,(int)num_blocks,game_file) < 0 ) { display ( "Failed to Read required Blocks\n" ) ; quit () ; --- 186,192 ---- } else { ! if ( (int)fread ((char *)ptr,BLOCK_SIZE,(int)num_blocks,game_file) < num_blocks - 1 ) { display ( "Failed to Read required Blocks\n" ) ; quit () ; *************** *** 521,526 **** --- 521,527 ---- extern boolean script_on ; extern byte_ptr script_status_ptr ; + script_status_ptr = (byte_ptr) &(data_head.script_status); if ( data_head.z_code_version <= VERSION_3 ) { if (( script_on ) && (( *script_status_ptr & SCRIPT_MODE_ON ) == 0 )) Index: infocom.h *** itf.org/infocom.h Mon May 3 20:12:50 1993 --- itf.apple/infocom.h Mon May 3 20:14:12 1993 *************** *** 16,22 **** ** "May the Grues be with you !" ** */ ! #ifndef __INFOCOM__ #define __INFOCOM__ --- 16,23 ---- ** "May the Grues be with you !" ** */ ! #define THINKC ! #undef LSC #ifndef __INFOCOM__ #define __INFOCOM__ *************** *** 550,556 **** --- 551,561 ---- Void restore_game () ; Void ret_false () ; Void ret_true () ; + # ifdef THINKC + Void ret_value (word) ; + # else Void ret_value () ; + # endif Void rts () ; Void save_byte_array () ; Void save_cursor_position () ; Index: machine.h *** itf.org/machine.h Mon May 3 20:12:52 1993 --- itf.apple/machine.h Mon May 3 20:13:55 1993 *************** *** 320,326 **** #define WRITE_STRING "wb" #define APPEND_STRING "a" #define Void int ! #define MALLOC(s) malloc(s) #define FREE(p) free((void *)p) #define main _main #define TIME_FUNCTION time((time_t *)0) --- 320,326 ---- #define WRITE_STRING "wb" #define APPEND_STRING "a" #define Void int ! #define MALLOC(s) xmalloc((size_t)(s)) #define FREE(p) free((void *)p) #define main _main #define TIME_FUNCTION time((time_t *)0) *************** *** 341,347 **** #define ERASE_WINDOW thinkc_erase_window #define SAVE_CURSOR default_save_cursor #define RESTORE_CURSOR default_restore_cursor ! #endif /* THINKC */ /* --- 341,348 ---- #define ERASE_WINDOW thinkc_erase_window #define SAVE_CURSOR default_save_cursor #define RESTORE_CURSOR default_restore_cursor ! #define RCFILE "infocom.rc" ! void *xmalloc(size_t); /* left this in as a debugging hook for malloc */ #endif /* THINKC */ /* Index: makefile *** itf.org/makefile Mon May 3 20:12:52 1993 --- itf.apple/makefile Mon May 3 20:13:55 1993 *************** *** 4,9 **** --- 4,11 ---- # (C)opyright 1987-1992 InfoTaskforce. # + SHELL=/bin/sh + LIBS= OBJECTS = enhanced.o file.o fns.o globals.o infocom.o init.o input.o\ interp.o io.o jump.o message.o object.o options.o\ page.o plus_fns.o print.o property.o status.o\ *************** *** 174,180 **** make CFLAGS='$(OPTFLAG) -DSYS_V -DTERMINFO' LDFLAGS='-lcurses' unix unix: $(OBJECTS) ! $(CC) $(OPTFLAG) -o infocom $(OBJECTS) $(LDFLAGS) $(OBJECTS): infocom.h machine.h makefile --- 176,182 ---- make CFLAGS='$(OPTFLAG) -DSYS_V -DTERMINFO' LDFLAGS='-lcurses' unix unix: $(OBJECTS) ! $(CC) $(OPTFLAG) -o infocom $(OBJECTS) $(LDFLAGS) $(LIBS) $(OBJECTS): infocom.h machine.h makefile Index: print.c *** itf.org/print.c Mon May 3 20:12:54 1993 --- itf.apple/print.c Mon May 3 20:13:57 1993 *************** *** 140,146 **** --- 140,151 ---- word address ; obj = STD_OBJ_ADDR ( obj_num ) ; + # ifndef THINKC address = ((obj -> prop_ptr[0]) << 8) + (obj -> prop_ptr[1]) + 1 ; + # else /* THINKC */ + /* This corrects an alignment problem of thinkc */ + address = (((word)((byte *)obj)[7]) << 8) + ((byte *)obj)[8] + 1; + # endif /* THINKC */ print1 ( address ) ; } Index: property.c *** itf.org/property.c Mon May 3 20:12:54 1993 --- itf.apple/property.c Mon May 3 20:13:57 1993 *************** *** 14,20 **** --- 14,25 ---- register property p ; + # ifndef THINKC p = base_ptr + ((word)(obj -> prop_ptr[0]) << 8) + (obj -> prop_ptr[1]) ; + # else /* THINKC */ + /* This corrects an alignment problem of thinkc */ + p = base_ptr + (((word)((byte *)obj)[7]) << 8) + ((byte *)obj)[8]; + # endif /* THINKC */ return ( p + (*p << 1) + 1 ) ; } Index: support.c *** itf.org/support.c Mon May 3 20:12:55 1993 --- itf.apple/support.c Mon May 3 20:13:57 1993 *************** *** 87,94 **** --- 87,98 ---- } Void + # ifdef THINKC + ret_value (word result ) + # else /* !THINKC */ ret_value ( result ) word result ; + # endif /* !THINKC */ { extern word pc_offset ;