]> thyrsus.com Git - intercal.git/commitdiff
Make IFFI work against cfunge trunk as well as 0.4.0. API for some used functions...
authorArvid Norlander <anmaster@tele2.se>
Thu, 9 Apr 2009 20:18:58 +0000 (16:18 -0400)
committerEric S. Raymond <esr@thyrsus.com>
Thu, 26 Aug 2010 00:35:39 +0000 (20:35 -0400)
etc/IFFI/IFFI.c
etc/IFFI/IFFI.h
etc/cftoec.sh

index ecaadc333a1ea9cb543f78a489905079e67d2967..c401b976c81881943f8e5ce7b835c6608b17b119 100644 (file)
@@ -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!?");
index 88d82db63f563329f7ce9284009c9b0878193aab..b25768fa62e22b61cde6ba69153ba1a8ee74d96a 100644 (file)
@@ -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
 
index 2899db73d486d1fb1695001e7d1188db900ad725..deccd48f548f86881393fd694f7b20de19bad445 100644 (file)
@@ -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 .