From: drh Date: Fri, 4 Jan 2008 19:12:35 +0000 (+0000) Subject: Fix mkopcodeh.awk so that it works on a mac. (CVS 4679) X-Git-Tag: version-3.6.10~1498 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4aeb7bf77811ca6c316a2c60865757a4c70bd50c;p=thirdparty%2Fsqlite.git Fix mkopcodeh.awk so that it works on a mac. (CVS 4679) FossilOrigin-Name: 59d3dfa41f99e99b836649a0870cbfc1c275a654 --- diff --git a/manifest b/manifest index 65b7ea12fb..5e2181a87c 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Some\smodifications\sto\sinsert.c\sto\swork\swithout\susing\sthe\sstack.\s(CVS\s4678) -D 2008-01-04T19:10:29 +C Fix\smkopcodeh.awk\sso\sthat\sit\sworks\son\sa\smac.\s(CVS\s4679) +D 2008-01-04T19:12:36 F Makefile.arm-wince-mingw32ce-gcc ac5f7b2cef0cd850d6f755ba6ee4ab961b1fadf7 F Makefile.in 30789bf70614bad659351660d76b8e533f3340e9 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654 @@ -69,7 +69,7 @@ F mkdll.sh 5f8438dcac98e795d7df6529159a1ec566de0183 F mkextu.sh 416f9b7089d80e5590a29692c9d9280a10dbad9f F mkextw.sh 1a866b53637dab137191341cc875575a5ca110fb F mkopcodec.awk 3fb9bf077053c968451f4dd03d11661ac373f9d1 -F mkopcodeh.awk 533dc52704d097a8482964d17b8009e485546246 +F mkopcodeh.awk a500ebdc9058f40297a66d612fbdc6ea5edbea3b F mkso.sh 24bde4c09e6fe80f718db3c31c068f45e13a2f2c F publish.sh 1c0658c63d70f182a8f5e17cc28422f1b237f51d F publish_osx.sh eca87df1e3d43d128d97d3261fd48b3d6877996e @@ -603,7 +603,7 @@ F www/tclsqlite.tcl 8be95ee6dba05eabcd27a9d91331c803f2ce2130 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0 F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b F www/whentouse.tcl fc46eae081251c3c181bd79c5faef8195d7991a5 -P 042dcb9621934d0318a7c6e9cd08b20a569db367 -R 23122a1c7ba45624bb7ec24bd9213db7 -U danielk1977 -Z 01db8752e7bca636624abb4391a1c05d +P d9ac6beef538376d0ea0a1daa95cf1dfe36143cf +R bb1afb0cece51bb03fc32298acfa1a05 +U drh +Z e43057f61cf41de45bd869c414681b5e diff --git a/manifest.uuid b/manifest.uuid index 8de29bbc0b..a972cea1ca 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -d9ac6beef538376d0ea0a1daa95cf1dfe36143cf \ No newline at end of file +59d3dfa41f99e99b836649a0870cbfc1c275a654 \ No newline at end of file diff --git a/mkopcodeh.awk b/mkopcodeh.awk index c734fb354b..407f40821d 100644 --- a/mkopcodeh.awk +++ b/mkopcodeh.awk @@ -66,22 +66,23 @@ used[op[name]] = 1 sameas[op[name]] = sym } - sub(",","",$i) - if($i=="no-push"){ + x = $i + sub(",","",x) + if(x=="no-push"){ nopush[name] = 1 - }else if($i=="out1"){ + }else if(x=="out1"){ out1[name] = 1 - }else if($i=="out2"){ + }else if(x=="out2"){ out2[name] = 2 - }else if($i=="out3"){ + }else if(x=="out3"){ out3[name] = 3 - }else if($i=="in1"){ + }else if(x=="in1"){ in1[name] = 1 - }else if($i=="in2"){ + }else if(x=="in2"){ in2[name] = 1 - }else if($i=="in3"){ + }else if(x=="in3"){ in3[name] = 1 - }else if($i=="jump"){ + }else if(x=="jump"){ jump[name] = 1 } } @@ -132,14 +133,17 @@ END { # for(i=0; i<=max; i++) bv[i] = 0; for(name in op){ - if( jump[name] ) bv[x] += 0x01; - if( out1[name] ) bv[x] += 0x02; - if( out2[name] ) bv[x] += 0x04; - if( out3[name] ) bv[x] += 0x08; - if( in1[name] ) bv[x] += 0x10; - if( in2[name] ) bv[x] += 0x20; - if( in3[name] ) bv[x] += 0x40; - if( 0 == nopush[name] ) bv[x] = bv[x] + 0x80; + x = op[name] + a0 = a1 = a2 = a3 = a4 = a5 = a6 = a7 = 0 + if( jump[name] ) a0 = 1; + if( out1[name] ) a1 = 2; + if( out2[name] ) a2 = 4; + if( out3[name] ) a3 = 8; + if( in1[name] ) a4 = 16; + if( in2[name] ) a5 = 32; + if( in3[name] ) a6 = 64; + if( nopush[name]==0 ) a7 = 128; + bv[x] = a0+a1+a2+a3+a4+a5+a6+a7; } print "\n" print "/* Properties such as \"out2\" or \"jump\" that are specified in"