X-Git-Url: https://git.saurik.com/cycript.git/blobdiff_plain/f95d2598051e347460e028286ff2d33e5825e548..2653bd3e4403a1ec608c655520ae7dc77e364845:/Bridge.sh diff --git a/Bridge.sh b/Bridge.sh index 795057c..0bf14ab 100755 --- a/Bridge.sh +++ b/Bridge.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # Cycript - Optimizing JavaScript Compiler/Runtime -# Copyright (C) 2009-2014 Jay Freeman (saurik) +# Copyright (C) 2009-2015 Jay Freeman (saurik) # GNU Affero General Public License, Version 3 {{{ # @@ -24,6 +24,12 @@ cat << EOF #include #include #include "Execute.hpp" + +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wunknown-pragmas" +#pragma clang diagnostic ignored "-Wdeprecated-register" +#endif %} %language=ANSI-C @@ -32,18 +38,24 @@ cat << EOF %define slot-name name_ %struct-type -%omit-struct-type %pic +%delimiters="|" + struct CYBridgeEntry { int name_; const char *value_; - void *cache_; }; %% EOF -grep '^[CFV]' "$1" | sed -e 's/^C/0/;s/^F/1/;s/^V/2/' | sed -e 's/"/\\"/g;s/^\([^ ]*\) \([^ ]*\) \(.*\)$/\1\2, "\3", NULL/'; -grep '^[EST]' "$1" | sed -e 's/^S/3/;s/^T/4/;s/^E/5/' | sed -e 's/^5\(.*\)$/4\1 i/;s/"/\\"/g' | sed -e 's/^\([^ ]*\) \([^ ]*\) \(.*\)$/\1\2, "\3", NULL/'; +grep -v '^$' + +cat <