From: Arvid Norlander Date: Thu, 9 Apr 2009 20:18:58 +0000 (-0400) Subject: Make IFFI work against cfunge trunk as well as 0.4.0. API for some used functions... X-Git-Tag: 0.29~137 X-Git-Url: http://thyrsus.com/gitweb/?a=commitdiff_plain;h=5fed53487474ce59a6819e2dbd32b7365228ded4;p=intercal.git Make IFFI work against cfunge trunk as well as 0.4.0. API for some used functions changed. --- diff --git a/etc/IFFI/IFFI.c b/etc/IFFI/IFFI.c index ecaadc3..c401b97 100644 --- a/etc/IFFI/IFFI.c +++ b/etc/IFFI/IFFI.c @@ -62,7 +62,11 @@ void ick_interpreter_run(void) perror("Couldn't create funge space!?"); exit(EXIT_FAILURE); } +#if (CFUNGE_API_VERSION < 2) fungespace_load_string(ick_iffi_befungeString); +#else + fungespace_load_string(ick_iffi_befungeString, strlen((const char*)ick_iffi_befungeString)); +#endif iffiIP = ip_create(); if (iffiIP == NULL) { perror("Couldn't create instruction pointer!?"); diff --git a/etc/IFFI/IFFI.h b/etc/IFFI/IFFI.h index 88d82db..b25768f 100644 --- a/etc/IFFI/IFFI.h +++ b/etc/IFFI/IFFI.h @@ -30,7 +30,7 @@ #include "../../global.h" #include "../manager.h" -#if !defined(CFUNGE_API_VERSION) || (CFUNGE_API_VERSION != 1) +#if !defined(CFUNGE_API_VERSION) || (CFUNGE_API_VERSION > 2) # error "This version of IFFI isn't compatible with this cfunge version." #endif diff --git a/etc/cftoec.sh b/etc/cftoec.sh index 2899db7..deccd48 100644 --- a/etc/cftoec.sh +++ b/etc/cftoec.sh @@ -89,7 +89,7 @@ if [ "$CFUNGE_CFLAGS" ]; then CFLAGS="$CFLAGS $CFUNGE_CFLAGS" fi # Please enable this when making changes. Requested by the cfunge author. -#CFLAGS="$CFLAGS -Wall -Wextra -pedantic -Wpointer-arith -Wimplicit -Wnested-externs -Wcast-align -Wcast-qual -Wbad-function-cast -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wparentheses -Wshadow -Wundef -Wpacked -Wfloat-equal -Wstrict-aliasing=2 -Wformat=2 -Wdisabled-optimization -Wmissing-noreturn -Wmissing-format-attribute -Wdeclaration-after-statement -Wunused-function -Wunused-label -Wunused-value -Wunused-variable -Wwrite-strings" +#CFLAGS="$CFLAGS -Wall -Wextra -pedantic -Wpointer-arith -Wimplicit -Wnested-externs -Wcast-align -Wcast-qual -Wbad-function-cast -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wparentheses -Wshadow -Wundef -Wpacked -Wfloat-equal -Wstrict-aliasing=2 -Wformat=2 -Wmissing-noreturn -Wmissing-format-attribute -Wdeclaration-after-statement -Wunused-function -Wunused-label -Wunused-value -Wunused-variable -Wwrite-strings" echo " " Duplicating cfunge source tree so that it can be modified... cp -r $CFUNGE_PATH/src $CFUNGE_PATH/lib $CFUNGE_PATH/tools .