diff --git a/.cvsignore b/.cvsignore new file mode 100644 index 0000000000000000000000000000000000000000..0d8f646ad9d09a23c3e1c4e18ac67fa5e777cd32 --- /dev/null +++ b/.cvsignore @@ -0,0 +1,10 @@ +build +mudlib +reports +test +test1 +testcache +solaris +alpha +alpha-gcc +Pike_v0.1.tar.gz diff --git a/.gitattributes b/.gitattributes index 8f9eb1d361edf973cd4aae354d0dcacc572ee8db..a92794403205b6a0730cbebee2806f285556500b 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,3 +1,2 @@ [attr]binary -text -crlf -diff -ident * text ident -*.gif binary diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..eb79d2764e47db5787696a4f4014d7737bbec14e --- /dev/null +++ b/.gitignore @@ -0,0 +1,42 @@ +RCS +SCCS +CVS +CVS.adm +RCSLOG +cvslog.* +tags +TAGS +.make.state +.nse_depinfo +*~ +#* +.#* +,* +_$* +*$ +*.old +*.bak +*.BAK +*.orig +*.rej +.del-* +*.a +*.olb +*.o +*.obj +*.so +*.exe +*.Z +*.elc +*.ln +core +/build +/mudlib +/reports +/test +/test1 +/testcache +/solaris +/alpha +/alpha-gcc +/Pike_v0.1.tar.gz diff --git a/README b/README index 09416d879da4a34b7ae405192bdcae3e7959808a..8845491e639f532d5f2ffb56fcd49f7aee02f0b6 100644 --- a/README +++ b/README @@ -1,8 +1,10 @@ -Micro LPC by Fredrik H�binette 1994-1995 +Pike by Fredrik H�binette 1994-1996 Permission to copy, modify, and distribute this source for any legal purpose granted as long as my name is still attatched to it. More specifically the GPL licence applies to this software. Read src/README for details on installation. -New releases can be found on ftp://ftp.lysator.liu.se:/pub/languages/ulpc/ +New releases can be found on ftp://ftp.infovav.se:/pub/pike/ +Send bugreports to pike-bugs@infovav.se +There is also a mailing list, to subscribe to it mail: pike-request@infovav.se diff --git a/bin/create_testsuite b/bin/create_testsuite deleted file mode 100755 index 15d766573fd74a168ff18a8192c9b61c6a2a327e..0000000000000000000000000000000000000000 --- a/bin/create_testsuite +++ /dev/null @@ -1,1747 +0,0 @@ -#!/bin/sh -# -#generates a script that is supposed to test uLPC -#note that not everything is tested yet, you are welcome to -#submit more tests. -# - - -GNU_M4=`echo "changequote([,])ifdef([__gnu__],yes,no)" | m4` -if [ $GNU_M4 = "no" ]; then - echo "$0 requires GNU m4" 1>&2 - exit 1 -fi - - - - - - -m4 <<\EOTESTS -divert(-1) - -changequote([[,]]) -changecom - -define(TESTNO,0) -define(doquote,[[patsubst(patsubst(patsubst([[[[[[$1]]]]]],\\,\\\\),\",\\"),\ -,\\n)]]) - -define(test_any, [[define([[TESTNO]],incr(TESTNO))dnl - "=mixed a() { doquote([[$1]]); }\n"+ // test TESTNO - "mixed b() { return doquote([[$2]]); }",]]) -define(test_do, [[define([[TESTNO]],incr(TESTNO))dnl - "dmixed a() { doquote([[$1]]); }\n", // test TESTNO]]) -define(test_true, [[define([[TESTNO]],incr(TESTNO))dnl - "tmixed a() { return doquote([[$1]]); }", // test TESTNO]]) -define(test_false, [[define([[TESTNO]],incr(TESTNO))dnl - "fmixed a() { return doquote([[$1]]); }", // test TESTNO]]) -define(test_eq, [[define([[TESTNO]],incr(TESTNO))dnl - "=mixed a() { return doquote([[$1]]); }\n"+ // test TESTNO - "mixed b() { return doquote([[$2]]); }",]]) -define(test_equal, [[define([[TESTNO]],incr(TESTNO))dnl - "emixed a() { return doquote([[$1]]); }\n"+ // test TESTNO - "mixed b() { return doquote([[$2]]); }",]]) -define(test_compile_error, [[define([[TESTNO]],incr(TESTNO))dnl - "cmixed a() { doquote([[$1]]); }\n", // test TESTNO]]) -define(test_eval_error, [[define([[TESTNO]],incr(TESTNO))dnl - "Emixed a() { doquote([[$1]]); }\n", // test TESTNO]]) -define(test_define_program, [[define([[TESTNO]],incr(TESTNO))dnl - "Pstring a() { return \"doquote([[$1]])\"; }\n"+ // test TESTNO - "string b() { return \"doquote([[$2]])\"; }",]]) -define(test_program, [[define([[TESTNO]],incr(TESTNO))dnl - "t\n"+"doquote([[$1]])\n", // test TESTNO ]]) - - - -divert(0)dnl -#!ulpc -int main(int argc, string *argv) -{ - - int e, verbose, successes, errors, t; - string *tests; - program testprogram; - int start, fail; - - for(e=1;e<argc;e++) - { - switch(argv[e]) - { - case "-h": - case "--help": - perror("Usage: "+argv[e]+" [-v | --verbose] [-h | --help] [-t <testno>]\n"); - return 0; - - case "-v": - case "--verbose": - verbose++; - break; - - case "-s": - case "--start-test": - sscanf(argv[++e],"%d",start); - start--; - break; - - case "-f": - case "--fail": - fail++; - break; - - - case "-t": - case "--trace": - t++; - break; - - default: - perror("Unnown argument "+argv[e]+" (try "+argv[0]+" --help for more info).\n"); - - } - } - - tests = ({ - - -// signum, signame -test_eq(signum("SIGKILL"),9) -test_eq(signum("SIGINT"),2) -test_eq(signame(9),"SIGKILL") -test_eq(signame(2),"SIGINT") - -// kill, signal, getpid -test_true(intp(getpid())) -test_do(signal(signum("SIGUSR1"),lambda() { add_efun("AFJLLAF",17); })) -test_do(kill(getpid(),signum("SIGUSR1"))) -test_eq(AFJLLAF,17) -test_do(add_efun("AFJLLAF")) -test_do(signal(signum("SIGUSR1"))) - -// class -test_true(programp(class {})) -test_true(functionp(clone(class { int foo() { return 1; }})->foo)) -test_true(clone(class { int foo() { return 1; }})->foo()) -test_true(clone(class { int i=1; })->i) -test_false(clone(class { int foo() { return 1; }})->bar) -test_eq(clone(clone(class { program foo=class { int i=20; }; })->foo)->i,20) - -// Not yet cataloged -test_any(int i=10; { int i; } return i, 10) -test_program(void foo(int a ,int b); function(int,int:void) a() { return foo; }) -test_program(void foo(int a, int ... b); function(int,int ...:void) a() { return foo; }) -test_program(void foo(); function(:void) a() { return foo; }) -test_compile_error([[} void foo(); function(:string) a() { return foo;]]) - -test_do(int p; foreach(({1,2,3,4,5}),p) random_seed(p)) -test_eq([[random_seed(17),random(20000)]],[[random_seed(17),random(20000)]]) -test_eq([[random_seed(18),random(20000)]],[[random_seed(18),random(20000)]]) -test_eq([[random_seed(19),random(20000)]],[[random_seed(19),random(20000)]]) -test_do(lambda(){return;}()) -test_do(sleep(1)) -test_compile_error([[} int foo() { return]]); -test_compile_error([[} void foo() { return 1]]); -test_equal( ({ lambda() { return 3; } , lambda() { return 7; }, lambda() { return 9; } })(), ({ 3,7,9 })) -test_true(stringp(sprintf("%O",({1,2,"foo"})))) -test_true(stringp(sprintf("%O",([1:2,"foo":"bar"])))) -test_any(int *a=({10}); a[0]++; return a[0], 11) -test_any(mapping a=([10:11]); a[10]++; return a[10], 12) -test_any(int e; object o=clone((program)"/precompiled/file"); if(!o->open("conftest.h","wct")) return -1; e=o->write("return 17;\n"); if(!o->close()) return -1; return e,11) -test_equal(mkmapping( ({3,6,2}), ({"3","6","2"})), ([3:"3", 6:"6", 2:"2"])) -test_equal(sum(([3:"3", 6:"6", 2:"2"])), ([3:"3", 6:"6", 2:"2"])) -test_true(sum(([3:"3", 6:"6", 2:"2"])) != ([3:"3", 6:"6", 2:"2"])) -test_any([[ -#include "conftest.h" -]],17) -test_any([[ -#include <conftest.h> -]],17) -test_true(intp(__LINE__)) -test_true(stringp(__FILE__)) -test_true(stringp(__DATE__)) -test_true(stringp(__TIME__)) -test_true(efun::stringp("")) -test_equal([["a,b,4,7,8s,asfd,a,d,f" / ","]],[["a,b,4,7,8s,asfd,a,d,f" / ","]]) -test_any([[string *a="a,b"/","; a[0]="c"; return equal(a,({"c","b"}))]],1) -test_true(0||1) -test_true(1||0) -test_true(!0||!0) -test_true(!0&&!0) -test_any(mixed a=1; a+=1; return a,2) -test_any(mixed a=1; a-=1; return a,0) -test_equal("abcd"/"" - indices("abcd"),({"a","b","c","d"})) -test_equal("abcd"/"" & indices("abcd"),({})) -test_eq(sizeof("abcd"/"" & "de"/""),1) -test_equal( ({0,0,0,0,0}), ({0,0,0,0,0})) -test_equal( ({0,0,0,0,0}), allocate(5,"object")) -test_equal(mkmapping("abcd"/"","jklm"/"") | mkmapping("jclm"/"","alcd"/""), - mkmapping("abcdjlm"/"","jklmacd"/"")) -test_program(int foo() { return 17;} mixed a() { return foo() == 17; }) -test_any([[mixed a; a=2; a=a*3; return a]],6) -test_any([[mixed a = ({1}); a=a+({2}); return equal(a,({1,2}))]],1) -test_define_program(/test,[[int foo() { return 17; }]]) -test_any(function bar=clone((program)"/test")->foo; return bar(),17) -test_eq(popen("echo foo"),"foo\n") - -// sscanf -test_any([[mixed a; return sscanf("11","%d",a)]],1) -test_any([[mixed a; sscanf("11","%d",a); return a]],11) -test_any([[mixed a,b; return sscanf("11foo","%dfoo",a)]],1) -test_any([[mixed a,b; sscanf("11foo","%dfoo",a); return a]],11) -test_any([[mixed a,b; return sscanf("11foo","%d%s",a,b)]],2) -test_any([[mixed a,b; sscanf("11foo","%d%s",a,b); return b]],"foo") -test_any([[mixed a,b; return sscanf("foo","%c%s",b,a)]],2) -test_any([[mixed a,b; sscanf("foo","%c%s",b,a); return b]],'f') -test_any([[mixed a,b; sscanf("foo","%c%s",b,a); return a]],"oo") -test_any([[mixed a,b; return sscanf("1.0","%f",a)]],1) -test_any([[mixed a,b; sscanf("1.0","%f",a); return a]],1.0) -test_any([[mixed a,b; sscanf("abcdeFGji","%[a-z]%s",a,b); return a]],"abcde") -test_any([[mixed a,b; sscanf("abcdeFGji","%[a-z]%s",a,b); return b]],"FGji") - -test_any([[mixed a,b; return sscanf("foo-%-bar","%s-%%-%s",a,b);]],2) -test_any([[mixed a,b; sscanf("foo-%-bar","%s-%%-%s",a,b); return a]],"foo") -test_any([[mixed a,b; sscanf("foo-%-bar","%s-%%-%s",a,b); return b]],"bar") - -// Basics -test_true(1) -test_true("") -test_true(!0) -test_true(!(!1)) -test_true(this_object()) -test_true(a) // a is the test function -test_true(0.0) -test_true(([])) -test_true(({})) -test_true((<>)) -test_true(object_program(this_object())) - -// testing ! -test_equal(!"",0) -test_equal(!this_object(),0) -test_equal(!this_function(),0) - -// testing == -test_true(1==1) -test_true(!(1==2)) -test_true(""=="") -test_true(!(""=="foo")) -test_true(this_object()==this_object()) -// test_true(this_function()==main) -test_true(2.0==2.0) -test_true(({})==({})) - -// testing != -test_true(({1})!=({1})) -test_true(1!=2) -test_true(!(1==2)) -test_true(!(""!="")) -test_true(""!="foo") - -// testing < > <= >= -define(test_cmp,[[ -test_true($1<$2) -test_true(!($1>$2)) -test_true($2>$1) -test_true(!($2<$1)) -test_true($1<=$2) -test_true(!($1>=$2)) -test_true($2>=$1) -test_true(!($2<=$1)) -test_true($2<=$2) -test_true($1>=$1) ]]) - - -test_cmp(1,2) -test_cmp(1.0,2.0) -test_cmp("a","b") -test_cmp("","b") - -// hex construction -test_eq(0,0x0) -test_eq(1,0x1) -test_eq(10,0xa) -test_eq(16,0x10) -test_eq(65535,0xffff) -test_eq(17*257*65537,0x11111111) - -// octal construction -test_eq(0,00) -test_eq(1,01) -test_eq(8,010) -test_eq(64,0100) -test_eq(1073741824,010000000000) -test_eq((8+1)*(8*8+1)*(8*8*8*8+1),011111111) - -// string construction tests -test_eq(16,"\20"[0]) -test_eq(16,"\020"[0]) -test_eq(255,"\377"[0]) -test_eq(4,'\4') -test_true("\r"[0]!='r') -test_eq("\r"[0],'\r') -test_eq("\n"[0],'\n') - -// testing + -test_eq(1+1,2) -test_eq(1+(-2),-1) -test_eq((-2)+(-2),-4) -test_eq("hi"+"there","hithere") -test_eq("human"+"number"+666,"humannumber666") -test_eq("human"+("number"+666),"humannumber666") -test_eq(("human"+"number")+666,"humannumber666") -test_eq(("human"+"number")+666+111,"humannumber666111") -test_eq("humannumber"+(666+111),"humannumber777") -test_eq("a"+"b"+"c"+"d"+"e"+"f"+"g"+"h"+"i"+"j"+"k"+"l"+"m"+"n"+"o"+"p"+"q"+"r"+"s"+"t"+"u"+"v"+"x"+"y","abcdefghijklmnopqrstuvxy") -test_eq(1.0+1.0,2.0) -test_eq(1.0+(-1.0),0.0) -test_eq((-1.0)+(-1.0),-2.0) -test_equal(({1,2,3})+({4,5,6}),({1,2,3,4,5,6})) -test_equal((<1,2,3,4>)+(<4,5,6>),(<1,2,3,4,4,5,6>)) -test_equal(([0:1,3:6])+([5:2,3:6]),([0:1,3:6,3:6,5:2])) -test_eval_error(return this_object() + this_object()) - -// testing - -test_eq(10-3,7) -test_eq(3-10,-7) -test_eq(10.0-3.0,7.0) -test_eq(3.0-10.0,-7.0) -test_eq("foobargazonk"-"o","fbargaznk") -test_equal(({"foo","bar","gazonk"})-({"foo","gazonk"}),({"bar"})) -test_equal(({"c","foo","bar","gazonk","a","b",})-({"foo","gazonk"}),({"c","bar","a","b"})) -test_equal((<"foo","bar","gazonk">)-(<"foo","gazonk">),(<"bar">)) -test_equal((["foo":3,"bar":4,"gazonk":5])-(["foo":3,"gazonk":8]),(["bar":4])) - -// testing ~ -test_eq(-1-4,~4) -test_eq(-1-627893874,~627893874) - -// testing * -test_eq(3*4,12) -test_eq(4*3,12) -test_eq(2*2*2*2*2,32) -test_eq(3.0*4.0,12.0) -test_eq(4.0*3.0,12.0) -test_eq(2.0*2.0*2.0*2.0*2.0,32.0) -test_eq(({"foo","bar","gazonk"})*"-","foo-bar-gazonk") - -// testing / -test_eq(12/3,4) -test_eq(13/3,4) -test_eq(14/3,4) -test_eq(15/3,5) -test_eval_error(return 15/0) -test_eq(12.0/3.0,4.0) -test_eq(14.0/4.0,3.5) -test_eq(15.0/3.0,5.0) -test_eval_error(return 15.0/0.0) -test_equal("foo-bar-gazonk"/"-",({"foo","bar","gazonk"})) -test_equal("foobargazonk"/"",({"f","o","o","b","a","r","g","a","z","o","n","k"})) - -// testing % -test_eq(12%3,0) -test_eq(13%3,1) -test_eq(14%3,2) -test_eq(15%3,0) -test_eval_error(return 15 % 0) -test_eq(12.0 % 3.0,0.0) -test_eq(13.0 % 3.0,1.0) -test_eq(14.0 % 3.0,2.0) -test_eq(14.5 % 3.0,2.5) -test_eq(15.0 % 3.0,0.0) -test_eval_error(return 15.0 % 0.0) - -// testing && -test_eq(0 && 1,0) -test_eq(1 && 0,0) -test_eq(0 && 0,0) -test_eq(1 && 1,1) -test_eq(78 && 1,1) -test_eq(78 && 99,99) -test_eq(78 && 99,99) - -// testing || -test_eq(0 || 1,1) -test_eq(1 || 0,1) -test_eq(0 || 0,0) -test_eq(1 || 1,1) -test_eq(78 || 1,78) -test_eq(78 || 0,78) - -// testing | -test_eq(0 | 0,0) -test_eq(1 | 1,1) -test_eq(4 | 1,5) -test_eq(1 | 9,9) -test_equal( sort_array(({1,2,3,4,4}) | ({3,5,6})), ({1,2,3,4,4,5,6})) -test_equal( (<4,5,6>) | (<5,5,5>), (<4,5,5,5,6>) ) -test_equal( ([-4:8,8:7]) | ([3:3,8:3]), ([-4:8,8:3,3:3]) ) - -// testing & -test_eq(0 & 0,0) -test_eq(1 & 1,1) -test_eq(4 & 1,0) -test_eq(1 & 9,1) -test_equal( ({1,2,3,4,4}) & ({3,5,6}), ({3})) -test_equal( (<4,5,6>) & (<5,5,5>), (<5>) ) -test_equal( ([-4:8,8:7]) & ([3:3,8:3]), ([8:3]) ) - -// testing ^ -test_eq(0 ^ 0,0) -test_eq(1 ^ 1,0) -test_eq(4 ^ 1,5) -test_eq(1 ^ 9,8) -test_equal( ({1,2,3,4,4}) ^ ({3,5,6}), ({1,2,4,4,5,6})) -test_equal( (<4,5,6>) ^ (<5,5,5>), (<4,5,5,6>) ) -test_equal( ([-4:8,8:7]) ^ ([3:3,8:3]), ([-4:8,3:3]) ) - -// testing << -test_eq(1<<0,1) -test_eq(1<<1,2) -test_eq(1<<10,1024) -test_eq(5<<3,40) - -// testing >> -test_eq(9>>2,2) -test_eq(1>>1,0) -test_eq(1024>>10,1) -test_eq(47>>3,5) - -// testing ? : -test_true(0?0:1) -test_true(1?1:0) -test_true(""?1:0) -test_true(!0?1:0) -test_true(!(!1)?1:0) -test_true(this_object()?1:0) -test_true(a?1:0) // a is the test function -test_true(0.0?1:0) -test_true(([])?1:0) -test_true(({})?1:0) -test_true((<>)?1:0) -test_true(object_program(this_object())?1:0) - -// testing indexing -test_eq("foo"[0],'f') -test_eq("foo"[1],'o') -test_eq("foo"[2],'o') -test_eq("foo"[-1],'o') -test_eq("foo"[-2],'o') -test_eq("foo"[-3],'f') -test_eq(({'f','o','o'})[0],'f') -test_eq(({'f','o','o'})[1],'o') -test_eq(({'f','o','o'})[2],'o') -test_eq(({'f','o','o'})[-1],'o') -test_eq(({'f','o','o'})[-2],'o') -test_eq(({'f','o','o'})[-3],'f') -test_eq(([0:'f',1:'o',2:'o'])[0],'f') -test_eq(([0:'f',1:'o',2:'o'])[1],'o') -test_eq(([0:'f',1:'o',2:'o'])[2],'o') -test_eq(([0:'f',1:'o',2:'o'])[3],0) -test_eq(([0:'f',1:'o',2:'o'])[-1],0) -test_eq((<'f','o','o'>)['o'],1) -test_eq((<'f','o','o'>)['f'],1) -test_eq((<'f','o','o'>)['b'],0) -test_eq((<'f','o','o'>)[-1],0) - -// index assigning -test_any(mixed a=({1}); a[0]=2; return equal(a,({2})),1) -test_any(mixed a=(<1>); a[1]=2; return equal(a,(<1>)),1) -test_any(mixed a=(<1>); a[0]=2; return equal(a,(<1,0>)),1) -test_any(mixed a=(<1>); a[1]=0; return equal(a,(<>)),1) -test_any(mixed a=(<1>); a[0]=0; return equal(a,(<1>)),1) -test_any(mixed a=([1:1]); a[0]=0; return equal(a,([1:1,0:0])),1) -test_any(mixed a=([1:1]); a[1]=0; return equal(a,([1:0])),1) - -test_define_program(/test,[[public int q,w,e,r; mixed t; mixed getw() { return w; } void setw(int _) { w=_; }]]) -test_eq(clone((program)"/test")->q,0) -test_eq(clone((program)"/test")->w,0) -test_eq(clone((program)"/test")->e,0) -test_eq(clone((program)"/test")->r,0) -test_eq(clone((program)"/test")->getw(),0) -test_any(object o=clone((program)"/test"); o->setw(17); return o->w,17) -test_any(object o=clone((program)"/test"); o->w=17; return o->getw(),17) - -test_eq(clone((program)"/test")["q"],0) -test_eq(clone((program)"/test")["w"],0) -test_eq(clone((program)"/test")["e"],0) -test_eq(clone((program)"/test")["r"],0) -test_eq(clone((program)"/test")["getw"](),0) -test_any(object o=clone((program)"/test"); o["setw"](17); return o["w"],17) -test_any(object o=clone((program)"/test"); o["w"]=17; return o["getw"](),17) - -// testing range -test_eq("foObar"[0..0],"f") -test_eq("foobargazonk"[3..5],"bar") -test_eq("foo"[1..10],"oo") -test_eq("foo"[-100..0],"f") -test_eq("foo"[-100..100],"foo") -test_eq("foo"[1..0],"") -test_eq("foo"[0..-100],"") -test_equal(({1,2,3})[0..0],({1})) -test_equal(({1,2,3})[1..2],({2,3})) -test_equal(({1,2,3})[2..10],({3})) -test_equal(({1,2,3})[-100..0],({1})) -test_equal(({1,2,3})[-100..100],({1,2,3})) -test_equal(({1,2,3})[1..0],({})) -test_equal(({1,2,3})[0..-100],({})) - -// testing @ -test_equal(({1,2,3}),lambda(mixed ... x) { return x; }(@a())) -test_equal(explode("foo",""),lambda(mixed ... x) { return x; }(@a())) -test_any([[mixed *a=({1,2,3}); return lambda(mixed ... x) { return x; }(@a) !=a]],1) - -// testing += -test_any(int a=1; a+=10; return a,11) -// testing -= -test_any(int a=1; a-=10; return a,-9) -// testing &= -test_any(int a=3; a&=10; return a,2) -// testing |= -test_any(int a=3; a|=10; return a,11) -// testing ^= -test_any(int a=3; a^=10; return a,9) -// testing <<= -test_any(int a=3; a<<=2; return a,12) -// testing <<= -test_any(int a=12; a>>=2; return a,3) -// testing *= -test_any(int a=12; a*=2; return a,24) -// testing /= -test_any(int a=12; a/=2; return a,6) -// testing %= -test_any(int a=12; a%=7; return a,5) - -// testing control structs -test_any(return 1,1) -test_any(return lambda(){return 1;} (),1 ) -test_any(if(0) return 0; else return 1,1) -test_any(if(0) return 0; return 1,1) -test_any(if(1) return 1; else return 0,1) -test_any(if("") return 1; else return 0,1) -test_any(if(!0) return 1; else return 0,1) -test_any(if(!(!1)) return 1; else return 0,1) -test_any(if(this_object()) return 1; else return 0,1) -test_any(if(a) return 1; else return 0,1) dnl a is the test function -test_any(if(0.0) return 1; else return 0,1) -test_any(if(([])) return 1; else return 0,1) -test_any(if(({})) return 1; else return 0,1) -test_any(if((<>)) return 1; else return 0,1) -test_any(if(object_program(this_object())) return 1; else return 0,1) - -// break -test_any(while(1) break; return 1,1) -test_any(while(1) if(1) break; return 1,1) - -// for -test_any(int e; for(e=0;e<10;e++) break; return e,0) -test_any(int e; for(e=0;e<10;e++) continue; return e,10) -test_any(int e;string t=""; for(e=0;e<10;e++) t+=e; return t,"0123456789") -test_any(int e;string t=""; for(e=0;e>-10;e--) t+=e; return t,"0-1-2-3-4-5-6-7-8-9") - -// foreach -test_any([[int e;string t=""; foreach(({7,6,3,8}),e) t+=e; return t]],"7638") -test_any([[string s;if(1) foreach(({}),s); else foreach(({}),s); return 1]],1) - -// do-whilte -test_any(int e;string t=""; e=0; do{ t+=e; }while(++e<6); return t,"012345";) - -// while -test_any(int e;string t=""; e=8; while(--e) t+=e; return t,"7654321";) -test_any(int e;string t=""; e=8; while(e--) t+=e; return t,"76543210";) -test_any(int e;string t=""; e=0; while(++e<6) t+=e; return t,"12345";) -test_any(int e=1;string t=""; while(e<20){t+=e;e*=2;} return t,"124816";) - -// Switch -test_any(switch("") { case 0: case "gazonk": return 0; } return 1,1) -test_any(switch("") { case "gazonk": case 0: return 0; } return 1,1) -test_any(switch(0) { case 0: case "gazonk": return 0; } return 1,0) -test_any(switch("gazonk") { case "gazonk": case 0: return 0; } return 1,0) -test_any(switch(0) { case "": } return 1,1) -test_any(switch(1) { case 1: return 1; default: } return 0,1) -test_any(switch(2) { case 1: return 0; default: return 1;} return 0,1) -test_any(switch(1) { default: return 0; case 1: return 1; } return 0,1) -test_any(switch(2) { default: return 1; case 1: return 0; } return 0,1) -test_any(switch(0) { case "apa": case 1.0: return 0; } return 1,1) -test_any(switch("apa") { case "apa": return 1; case 1.0: } return 0,1) -test_any(switch(1.0) { case "apa": return 0; case 1.0: return 1; } return 0,1) -test_any(switch("sune") { case "gunnel": return 0; case "gunnar": return 1; case "sune": case "gusten": return 0; } return 0,0) -test_any(switch("a") { case "a": return 1; case "b": case "c": case "d": case 'a': case '1': case '0': default: } return 0,1) -test_any(switch("b") { case "a": return 0; case "b": return 1; case "c": case "d": case 'a': case '1': case '0': default: } return 0,1) -test_any(switch("c") { case "a": case "b": return 0; case "c": return 1; case "d": case 'a': case '1': case '0': default: } return 0,1) -test_any(switch("d") { case "a": case "b": case "c": return 0; case "d": return 1; case 'a': case '1': case '0': default: } return 0,1) -test_any(switch('a') { case "a": case "b": case "c": case "d": return 0; case 'a': return 1; case '1': case '0': default: } return 0,1) -test_any(switch('1') { case "a": case "b": case "c": case "d": case 'a': return 0; case '1': return 1; case '0': default: } return 0,1) -test_any(switch('0') { case "a": case "b": case "c": case "d": case 'a': case '1': return 0; case '0': return 1; default: } return 0,1) -test_any(switch("a") { case "a": return 1; case "b": return 2; case "c": return 3; case "d": return 4; case 'a': return 5; case '1': return 6; case '0': return 7; default: return 8; } return 9,1) -test_any(switch("b") { case "a": return 1; case "b": return 2; case "c": return 3; case "d": return 4; case 'a': return 5; case '1': return 6; case '0': return 7; default: return 8; } return 9,2) -test_any(switch("c") { case "a": return 1; case "b": return 2; case "c": return 3; case "d": return 4; case 'a': return 5; case '1': return 6; case '0': return 7; default: return 8; } return 9,3) -test_any(switch("d") { case "a": return 1; case "b": return 2; case "c": return 3; case "d": return 4; case 'a': return 5; case '1': return 6; case '0': return 7; default: return 8; } return 9,4) -test_any(switch('a') { case "a": return 1; case "b": return 2; case "c": return 3; case "d": return 4; case 'a': return 5; case '1': return 6; case '0': return 7; default: return 8; } return 9,5) -test_any(switch('1') { case "a": return 1; case "b": return 2; case "c": return 3; case "d": return 4; case 'a': return 5; case '1': return 6; case '0': return 7; default: return 8; } return 9,6) -test_any(switch('0') { case "a": return 1; case "b": return 2; case "c": return 3; case "d": return 4; case 'a': return 5; case '1': return 6; case '0': return 7; default: return 8; } return 9,7) -test_any(switch('9') { case "a": return 1; case "b": return 2; case "c": return 3; case "d": return 4; case 'a': return 5; case '1': return 6; case '0': return 7; default: return 8; } return 9,8) - - -define(test_switch0,[[ -test_any(switch($1) { case $2: return $6; case $3: return $7; case $4: return $8; case $5: return $9; } return 0,$10) -test_any(switch($1) { default: return 0; case $2: return $6; case $3: return $7; case $4: return $8; case $5: return $9; } return -1,$10) -test_any(switch($1) { case $2: return $6; default: return 0; case $3: return $7; case $4: return $8; case $5: return $9; } return -1,$10) -test_any(switch($1) { case $2: return $6; case $3: return $7; default: return 0; case $4: return $8; case $5: return $9; } return -1,$10) -test_any(switch($1) { case $2: return $6; case $3: return $7; case $4: return $8; default: return 0; case $5: return $9; } return -1,$10) -test_any(switch($1) { case $2: return $6; case $3: return $7; case $4: return $8; case $5: return $9; default: return 0; } return -1,$10) -]]) - -define(test_switch1,[[ -test_switch0($1, $2,$3,$4,$5, $6,$7,$8,$9, $10) -test_switch0($1, $2,$3,$5,$4, $6,$7,$9,$8, $10) -]]) - -define(test_switch2,[[ -test_switch1($1, $2,$3,$4,$5, $6,$7,$8,$9, $10) -test_switch1($1, $2,$4,$3,$5, $6,$8,$7,$9, $10) -test_switch1($1, $2,$5,$4,$3, $6,$9,$8,$7, $10) -]]) - -define(test_switch3,[[ -test_switch2($1, $2,$3,$4,$5, 2,3,4,5, $6) -test_switch2($1, $3,$2,$4,$5, 3,2,4,5, $6) -test_switch2($1, $4,$3,$2,$5, 4,3,2,5, $6) -test_switch2($1, $5,$3,$4,$2, 5,3,4,2, $6) -]]) - -define(test_switch4,[[ -test_switch3($1,$2,$3,$4,$5,0) -test_switch3($2,$2,$3,$4,$5,2) -test_switch3($3,$2,$3,$4,$5,3) -test_switch3($4,$2,$3,$4,$5,4) -test_switch3($5,$2,$3,$4,$5,5) -]]) - -test_switch4(17,18,19,20,21) -test_switch4("a","b","c","d","e") -test_switch4("a",0,"c","d","e") -test_switch4(1.0,2.0,3.0,4.0,5.0) -test_switch4(this_object(),"",0,4.0,1) - -test_any(int e;string t=""; for(e=0;e<10;e++) switch(e) { default: t+=e; case 4..8: } return t,"01239") -test_any([[float e,q; q=0.0; for(e=0.1;e<10.0;e+=1.0) switch(e) { default: q+=e; case 4.0..8.0: } return q]],0.1+1.1+2.1+3.1+8.1+9.1) - -// testing preprocessor -// #define -test_any([[ -#define FOOa 1 -return FOOa; -]],1) - -test_any([[ -#define FOOb 17 -#undef FOOb -#define FOOb 1 -return FOOb; -]],1) - -test_compile_error([[ -#define FOOc FOOc FOO -FOO -]]) - -test_compile_error([[ -#error FOOd -FOO -]]) - -// /* */ -test_any([[ -/* return 99; * / /* */ -return 1; -]],1) - -// // -test_any([[ -// return 99; -return 1; -]],1) - -// #if -define(test_if_true,[[test_any([[ -#if $1 -return 1; -#else -return 0; -#endif -]],1)]]) -define(test_if_false,[[test_any([[ -#if $1 -return 1; -#else -return 0; -#endif -]],0)]]) - -test_if_true(1) -test_if_false(0) - -// #if == -test_if_true(1==1) -test_if_false(1==2) - -// #if != -test_if_true(1!=2) -test_if_false(1!=1) - -// #if ( ) -test_if_true( (((1))==1) ) -test_if_false( ((1)==(2)) ) - -// #if -1 -test_if_true( -1 ) -test_if_true( (-1) ) -test_if_true( (-1==0-1) ) - -// #if ~ -test_if_true( (-1-1==~1) ) - -// #if ?: -test_if_true( 17 == ( 1 ? 17 : 18 ) ) -test_if_true( 18 == ( 0 ? 17 : 18 ) ) - -// #if || -test_if_true( 10 == ( 10 || 20 ) ) -test_if_true( 20 == ( 0 || 20 ) ) - -// #if && -test_if_true( 0 == ( 0 && 20 ) ) -test_if_true( 20 == ( 10 && 20 ) ) - -// #if | -test_if_true( 3 == ( 1 | 2 ) ) -test_if_true( 2 == ( 2 | 2 ) ) - -// #if ^ -test_if_true( 0 == ( 2 ^ 2 ) ) -test_if_true( 3 == ( 1 ^ 2 ) ) - -// #if & -test_if_true( 0 == ( 1 & 2 ) ) -test_if_true( 2 == ( 2 & 7 ) ) - -// #if <= >= < > ! strings, floats - -define(test_if_cmp,[[ -test_if_true($1<$2) -test_if_true(!($1>$2)) -test_if_true($2>$1) -test_if_true(!($2<$1)) -test_if_true($1<=$2) -test_if_true(!($1>=$2)) -test_if_true($2>=$1) -test_if_true(!($2<=$1)) -test_if_true($2<=$2) -test_if_true($1>=$1) ]]) - -test_if_cmp(1,2) -test_if_cmp(1.0,2.0) -test_if_cmp("a","b") - -// #if << -test_if_true(1<<10==1024) -test_if_true(5<<3==40) - -// #if >> -test_if_true(1024>>10==1) -test_if_true(47>>3==5) - -// #if + -test_if_true(1024+10==1034) -test_if_true(47+3==50) - -// #if - -test_if_true(1024-10==1014) -test_if_true(47-3==44) - -// #if * -test_if_true(1024*10==10240) - -// #if / -test_if_true(47/3==15) - -test_compile_error([[ -#if 1/0 -return 1; -#else -return 0; -#endif -]]) - -// #if % -test_if_true(47%3==2) -test_compile_error([[ -#if 1%0 -return 1; -#else -return 0; -#endif -]]) - -// #if [ ] -test_if_true("foo"[0]=='f') - -// #if defined -test_any([[ -#define FOOe 0 -#if defined(FOOe) -return 1; -#else -return 0; -#endif -]],1) - -// #if define < x -test_any([[ -#define FOOf 1 -#if FOOf < 2 -return 1; -#else -return 0; -#endif -]],1) - -// #if define < x -test_any([[ -#define FOOg 1 -#if FOOg < 0 -return 0; -#else -return 1; -#endif -]],1) - -// #if x < define -test_any([[ -#define FOOh 1 -#if 0 < FOOh -return 1; -#else -return 0; -#endif -]],1) - -// #if x < define -test_any([[ -#define FOOi 1 -#if 2 < FOOi -return 0; -#else -return 1; -#endif -]],1) - -// #if efun -// see test for add_efun() - -// #if /* */ -test_any([[ -#if 1 /* trying to be mean // * / */ /* /* */ -return 1; /* */ -#define foo -# 1 "---" -#undef foo -#else /* trying to be mean // * / */ /* /* */ -return 0; // -#endif /* trying to be mean // * / */ /* /* */ -]],1) - -test_any([[ -#if 0 /* trying to be mean // * / */ /* /* */ -return 0; /* */ -#define foo -# 1 "---" -#undef foo -#else /* trying to be mean // * / */ /* /* */ -return 1; // -#endif /* trying to be mean // * / */ /* /* */ -]],1) - -// #if // -test_any([[ -#if 1 //* trying to be mean // */ */ -return 1; -#else //* trying to be mean // */ */ -return 0; -#endif //* trying to be mean // */ */ -]],1) - -test_any([[ -#if 0 //* trying to be mean // */ */ -return 0; -#else //* trying to be mean // */ */ -return 1; -#endif //* trying to be mean // */ */ -]],1) - -test_any([[ -#define FOOj -#if defined(FOOj) -return 1; -#else -return 0; -#endif -]],1) - -test_any([[ -#if defined(FOOk) -return 0; -#else -return 1; -#endif -]],1) - -// #ifdef -test_any([[ -#ifdef FOOl -return 0; -#else -return 1; -#endif -]],1) - -test_any([[ -#define FOOm -#ifdef FOOm -return 1; -#else -return 0; -#endif -]],1) - -// #ifndef -test_any([[ -#define FOOo -#ifndef FOOo -return 0; -#else -return 1; -#endif -]],1) - -test_any([[ -#ifndef FOOp -return 1; -#else -return 0; -#endif -]],1) - -// #else -test_any([[ -#if 1 -return 1; -#else -FEL -#if 0 -FEL -#else -FEL -#endif -return 0; -#endif -]],1) - -test_any([[ -#if 0 -FEL -#if 0 -FEL -#else -FEL -#if 1 -FEL -#else -FEL -#endif -#endif -return 0; -#else -return 1; -#endif -]],1) - -// #elif -test_any([[ -#if 0 -return 0; -#elif 0 -return 0; -#else -return 1; -#endif -]],1) - -test_any([[ -#if 0 -return 0; -#elif 1 -return 1; -#else -return 0; -#endif -]],1) - -test_any([[ -#if 1 -return 1; -#elif 1 -return 0; -#else -return 0; -#endif -]],1) - -// #elseif -test_any([[ -#if 0 -return 0; -#elseif 0 -return 0; -#else -return 1; -#endif -]],1) - -test_any([[ -#if 0 -return 0; -#elseif 0 -return 0; -#elseif 1 -return 1; -#elseif 0 -return 0; -#elseif 0 -return 0; -#else -FEL -#endif -]],1) - -test_any([[ -#if 0 -return 0; -#elseif 1 -return 1; -#else -return 0; -#endif -]],1) - -test_any([[ -#if 1 -return 1; -#elseif 1 -return 0; -#else -return 0; -#endif -]],1) - -// #pragma -// FIXME: add tests for real pragmas -test_any([[ -#pragma whatever -return 1; -]],1) - -// #include -// FIXME add test for #include - -// tests for file module -test_true(programp((program)"/precompiled/file")) -test_true(programp((program)"/precompiled/port")) -test_any(object o; o=clone((program)"/precompiled/file"); destruct(o); return 1,1) - -// - file->open -// - file->close -test_any(object o=clone((program)"/precompiled/file"); return o->open("conftest","wct") && o->close(),1) - -// - file_stat -test_eq(file_stat("conftest")[1],0) - -// - rm -test_true(rm("conftest")) -test_eq(file_stat("conftest"),0) - -// - file->write -test_any(int e; object o=clone((program)"/precompiled/file"); if(!o->open("conftest","wct")) return -1; e=o->write("sune"); if(!o->close()) return -1; return e,4) - -// - file->read -test_any(string s; object o=clone((program)"/precompiled/file"); if(!o->open("conftest","r")) return -1; s=o->read(4); if(!o->close()) return -1; return s,"sune") - -test_any(string s; object o=clone((program)"/precompiled/file"); if(!o->open("conftest","r")) return -1; s=o->read(999999); if(!o->close()) return -1; return s,"sune") - -test_any(int e; object o=clone((program)"/precompiled/file"); if(!o->open("conftest","wct")) return -1; e=o->write(sprintf("%'+-*'100000s","")); if(!o->close()) return -1; return e,100000) - -test_any(string s; object o=clone((program)"/precompiled/file"); if(!o->open("conftest","r")) return -1; s=o->read(9999999); if(!o->close()) return -1; return s,sprintf("%'+-*'100000s","")) - -// - file->seek -// - file->tell -test_any(object o=clone((program)"/precompiled/file"); return o->open("conftest","r") && o->read(4711) && o->tell() == 4711 && o->close(),1) - -// - file->stat -test_any(object o=clone((program)"/precompiled/file"); return equal(o->open("conftest","r") && o->stat(), file_stat("conftest")),1) - -// - file->errno -test_do(clone((program)"/precompiled/file")->errno()) - -// - file->set_nonblocking -// - file->set_blocking -// - file->set_id -// - file->query_id -test_any(object o=clone((program)"/precompiled/file"); return o->query_id()==o,1) - -// - file->query_read_callback -test_do(clone((program)"/precompiled/file")->query_read_callback()) - -// - file->query_write_callback -test_do(clone((program)"/precompiled/file")->query_write_callback()) - -// - file->query_close_callback -test_do(clone((program)"/precompiled/file")->query_close_callback()) - -// - file->dup -// - file->assign -// - file->assign2 -// - file->open_socket -// - file->connect -// - file->query_address - -// - socket->bind -// - socket->set_id -// - socket->query_id -// - socket->errno -// - socket->accept - -test_true(rm("conftest")) -test_eq(file_stat("conftest"),0) - -// - file_stat -// - perror -// - rm -// - mkdir -// - get_dir -// - cd -// - getcwd -test_true(stringp(getcwd())) -test_eq('/',getcwd()[0]) - -// - sprintf module -test_true(stringp(sprintf(""))) -test_eq(sprintf("%d",1),"1") -test_eq(sprintf("%%"),"%") -test_eq(sprintf("%d",1),"1") -test_eq(sprintf("%d",-1),"-1") -test_eq(sprintf("%u",1<<31),"2147483648") -test_eq(sprintf("%o",255),"377") -test_eq(sprintf("%x",255),"ff") -test_eq(sprintf("%X",255),"FF") -test_eq(sprintf("%c",255),"\377") -test_true(stringp(sprintf("%f",255.0))) -test_true(stringp(sprintf("%g",255.0))) -test_true(stringp(sprintf("%e",255.0))) -test_true(stringp(sprintf("%e",255.0))) -test_eq(sprintf("%s","foobaR"),"foobaR") -test_eq(sprintf("%s","foo\nbar"),"foo\nbar") -test_true(stringp(sprintf("%O",this_object()))) -test_true(stringp(sprintf("%O",({})))) -test_eq(sprintf("%n"),"") -test_eq(sprintf("%t",1),"int") -test_eq(sprintf("%t",this_object()),"object") -test_eq(sprintf("%{%d\n%}",({1,2,3,4})),"1\n2\n3\n4\n") - -test_eq(strlen(sprintf("%1000s","")),1000) -test_eq(sprintf("%2d",1)," 1") -test_eq(sprintf("%2d",1)," 1") -test_eq(sprintf("%2d",2222),"2222") -test_eq(sprintf("%!2d",2222),"22") -test_eq(sprintf("%!!2d",2222),"2222") -test_eq(sprintf("% d",2)," 2") -test_eq(sprintf("% d",-2),"-2") -test_eq(sprintf("%+d",2),"+2") -test_eq(sprintf("%+d",-2),"-2") -test_eq(sprintf("%-2d",2),"2 ") -test_eq(sprintf("%|3d",2)," 2 ") -test_eq(sprintf("%-=3s","f o bar gaz"),"f o\nbar\ngaz") -dnl test_eq(sprintf("%/3s","f o bargaz"),"f o\nbar\ngaz") -dnl test_true(stringp(sprintf("%3#s","f\no\nbargaz\nonk"))) -dnl test_true(stringp(sprintf("%3$s","f\no\nbargaz\nonk"))) -test_eq(sprintf("%*d",3,3)," 3") -test_eq(sprintf("%'FOO'10s","BAR"),"FOOFOOFBAR") -test_eq(sprintf("%d %<d %<d",2),"2 2 2") -dnl . : and ; hasn't been tested -dnl ^, @ and _ hasn't been tested yet -test_eval_error(sprintf("%d")) - -// - Here we try the regexp module -test_true(programp((program)"/precompiled/regexp")) -test_any(object o; o=clone((program)"/precompiled/regexp"); destruct(o); return 1,1) - -// regexp->create -test_any(object o; o=clone((program)"/precompiled/regexp","^.*$"); destruct(o); return 1,1) - -// regexp->match -test_eq(clone((program)"/precompiled/regexp","^.*$")->match(""),1) -test_eq(clone((program)"/precompiled/regexp","^.*$")->match("a"),1) -test_eq(clone((program)"/precompiled/regexp","^.*$")->match("-"),1) -test_eq(clone((program)"/precompiled/regexp","^$")->match(""),1) -test_eq(clone((program)"/precompiled/regexp","^.$")->match("a"),1) -test_eq(clone((program)"/precompiled/regexp","^.$")->match("-"),1) -test_eq(clone((program)"/precompiled/regexp","^[abc]$")->match("-"),0) -test_eq(clone((program)"/precompiled/regexp","^[abc]$")->match("a"),1) -test_eq(clone((program)"/precompiled/regexp","^[abc]$")->match("c"),1) -test_eq(clone((program)"/precompiled/regexp","^[^abc]$")->match("-"),1) -test_eq(clone((program)"/precompiled/regexp","^[^abc]$")->match("a"),0) -test_eq(clone((program)"/precompiled/regexp","^[^abc]$")->match("c"),0) -test_eq(clone((program)"/precompiled/regexp","^a*$")->match("aaaa"),1) -test_eq(clone((program)"/precompiled/regexp","^a|b$")->match("a"),1) -test_eq(clone((program)"/precompiled/regexp","^a|b$")->match("b"),1) - -// regexp->split -test_equal(clone((program)"/precompiled/regexp","^(a*)[^a]*$")->split("aaabbb"),({"aaa"})) - - -// - Here we try the math module - -// - tan -test_true(floatp(tan(0.5))) -test_eq(0.5,tan(atan(0.5))) -test_eq(0.5,atan(tan(0.5))) -// - asin -test_true(floatp(asin(0.7))) -test_eq(asin(0.0),0.0) -// - atan -test_true(floatp(atan(0.7))) -test_true(3.1415 < 4.0*atan(1.0)) -test_true(3.1416 > 4.0*atan(1.0)) -// - sin -test_true(floatp(sin(1.2))) -test_true(sin(atan(1.0))>0.707) -test_true(sin(atan(1.0))<0.708) -// - acos -test_true(acos(0.7) > 0.795) -test_true(acos(0.7) < 0.796) -// - cos -test_true(floatp(cos(1.2))) -test_true(cos(atan(1.0))>0.707) -test_true(cos(atan(1.0))<0.708) -// - sqrt -test_eq(4,sqrt(16)) -test_eq(4,sqrt(17)) -test_eq(4,sqrt(24)) -test_eq(4.0,sqrt(16.0)) -// - floor -test_eq(17.0,floor(17.0)) -test_eq(17.0,floor(17.1)) -test_eq(17.0,floor(17.7)) -// - ceil -test_eq(17.0,ceil(17.0)) -test_eq(18.0,ceil(17.1)) -test_eq(18.0,ceil(17.7)) -// - exp -// - log -test_true(2.70001>exp(log(2.7))) -test_true(2.69999<exp(log(2.7))) -test_true(2.70001>log(exp(2.7))) -test_true(2.69999<log(exp(2.7))) -// - pow -test_eq(pow(10.0,10.0),10000000000.0) - -// foop -define(do_test_foop,[[ -test_eq($1 (17), !($2)) -test_eq($1 (1.7), !($2-1)) -test_eq($1 ("17"), !($2-2)) -test_eq($1 (this_object()), !($2-3)) -test_eq($1 (a), !($2-4)) // a is the test function -test_eq($1 (({})), !($2-5)) -test_eq($1 (([])), !($2-6)) -test_eq($1 ((<>)), !($2-7)) -test_eq($1 (object_program(this_object())), !($2-8)) -]]) - -do_test_foop(intp,0) -do_test_foop(floatp,1) -do_test_foop(stringp,2) -do_test_foop(objectp,3) -do_test_foop(functionp,4) -do_test_foop(arrayp,5) -do_test_foop(mappingp,6) -do_test_foop(listp,7) -do_test_foop(programp,8) - -// add_efun -test_do(add_efun("foobar",lambda() { return 1; })) -test_any([[ -#if efun(foobar) -return 1; -#else -return 0; -#endif -]],1) -test_eq(foobar(),1) -test_do(add_efun("foobar")) -test_any([[ -#if efun(foobar) -return 1; -#else -return 0; -#endif -]],0) - -// - aggregate -test_true(arrayp(aggregate())) -test_eq(sizeof(aggregate()),0) -test_equal(aggregate(1,2,3,4),({1,2,3,4})) - -// - aggregate_list -test_true(listp(aggregate_list())) - -// - aggregate_mapping -test_true(listp(aggregate_list())) - -// - all_efuns -test_true(mappingp(all_efuns())) -test_true(all_efuns()["all_efuns"]) -test_eq(all_efuns()["all_efuns"],all_efuns) - -// - allocate -test_true(arrayp(allocate(0))) -test_equal(allocate(2),({0,0})) -test_false(allocate(2)==({0,0})) - -// - backtrace -test_true(arrayp(backtrace())) -test_eq(backtrace()[-1][2],a) - -// - call_function -test_eq(1,call_function(a)) -test_eq(1,call_function(lambda(int a){ return a; },1)) -test_eq(1,call_function(intp,1)) - -// - capitalize -test_eq(capitalize("fubar"),"Fubar") -test_eq(capitalize("FooBar"),"FooBar") -test_eq(capitalize("-"),"-") - -// - clone -// clone is already tested a lot by this script -test_true(objectp(clone(compile_string("int foo() { return 17; }")))) -test_eq(clone(compile_string("int foo() { return 17; }"))->foo(),17) - -// - combine_path -test_eq([[combine_path("/foo/bar/gazonk/","..")]],"/foo/bar") -test_eq([[combine_path("/.../","sune")]],"/.../sune") -test_eq([[combine_path("/","foo/.../sune")]],"/foo/.../sune") -test_eq([[combine_path("/./foo/bar//gazonk/","../")]],"/foo/bar/") -test_eq([[combine_path("/","/foo/./bar/gazonk/..")]],"/foo/bar") -test_eq([[combine_path("/","/foo/bar/gazonk/../../")]],"/foo/") -test_eq([[combine_path("/","/foo//bar/gazonk/../..")]],"/foo") -test_eq([[combine_path("/","/foo/bar/./gazonk/../../..")]],"/") -test_eq([[combine_path("/","/foo/../bar//./gazonk/../..")]],"/") -test_eq([[combine_path("/","/foo/././/bar/gazonk/../../../..")]],"/") - -// - compile_file -// FIXME: add tests for compile_file - -// - compile_string -// see test for clone() - -// - copy_value -test_eq(copy_value(1),1) -test_eq(copy_value(""),"") -test_eq(copy_value(1.0),1.0) -test_eq(copy_value(this_object()),this_object()) -test_eq(copy_value(a),a) -define(do_test_copy_value,[[ -test_any([[mixed x=$1; return x==x]],1) -test_any([[mixed x=$1; return copy_value(x)!=x]],1) -test_any([[mixed x=$1; return equal(copy_value(x),x)]],1)]]) -do_test_copy_value( ({1}) ) -do_test_copy_value( ([]) ) -do_test_copy_value( (<>) ) -do_test_copy_value( (< ([]), ({1}) ,"" , 1.0 >) ) - -// - crypt -test_true(stringp(crypt("hej"))) -test_true(crypt("hej",crypt("hej"))) - -// - ctime -test_true(stringp(ctime(0))) - -// - destruct -// FIXME put tests for destruct here. - -// - equal -// equl is already tested by this script - -// - exit -// FIXME put test for exit here - -// - explode -test_equal(({"a","b","c",}), explode("anna bnna c","nna ")) -test_equal(({"","",}),explode("hej","hej")) -test_equal(({"",}),explode("","hej")) - -// - fork() -// FIXME: add tests for fork - -// - function_name -test_eq(function_name(a),"a") -test_eq(function_name(function_name),0) - -// - function_object -test_eq(function_object(a),this_object()) -test_eq(function_name(function_object),0) - -// - get_function (actually in simulate.lpc) -test_eq(a,get_function(this_object(),"a")) -test_eq(a,this_object()->a) - -// - hash -test_true(intp(hash("foo"))) -test_true(intp(hash("foo",10))) -test_true(hash("foo",10)<10) -test_true(hash("bar",10)<10) -test_true(hash("gazonk",10)<10) -test_eq(hash("foobargazonk"),hash("foobargazonk")) - -// - implode -test_eq([[implode(({}),"")]],"") -test_eq([[implode(explode("foo","o"),"o")]],"foo") -test_eq([[implode(({"foo","bar"}),"-")]],"foo-bar") -test_eq([[implode(({"foo",0,"bar"}),"-")]],"foo-bar") -test_eq([[implode(({1.0,"foo",0,"bar",this_object(),([])}),"-")]],"foo-bar") -test_eq([[implode(({"f","o","o"}))]],"foo") - -// - indices -test_equal(indices("foo"),({0,1,2})) -test_equal(indices(({'f','o','o'})),({0,1,2})) -test_equal(sort_array(indices(([7:3,8:9,99:12]))),({7,8,99})) -test_equal(sort_array(indices((<7,8,99>))),({7,8,99})) - -// - lower_case -test_equal(lower_case("foo"),"foo") -test_equal(lower_case("Foo"),"foo") -test_equal(lower_case("Foo1234-*~\n"),"foo1234-*~\n") - -// - next_object -test_true(objectp(next_object())) -test_any(int e;object o=next_object(); for(e=0;e<1000 && o;e++) o=next_object(o); return o,0) - -// - object_program -test_true(programp(object_program(this_object()))) - -// - query_host_name -test_true(stringp(query_host_name())) - -// - query_num_arg -test_eq(lambda(int ... q) { return query_num_arg(); }(),0) -test_eq(lambda(int ... q) { return query_num_arg(); }(1),1) -test_eq(lambda(int ... q) { return query_num_arg(); }(1,1),2) -test_eq(lambda(int ... q) { return query_num_arg(); }(1,1,1),3) -test_eq(lambda(int ... q) { return query_num_arg(); }(1,1,1,1),4) - -// - random -test_any([[int e,d;for(e=0;e<1000;e++){d=random(10); if(d<0 || d>=10) return 0;} return 1]],1) - -// - replace -test_eq(replace("foobargazonk","o","-"),"f--bargaz-nk") -test_eq(replace("foobargazonk",({"o","a"}),({"()","<>"})),"f()()b<>rg<>z()nk") -test_eq(replace("f--barf--",({"f--","f--bar"}),({"f--bar","f--"})),"f--f--bar") -test_eq(replace("f--barf--",({"f--bar","f--"}),({"f--","f--bar"})),"f--f--bar") -test_equal(replace(({1,2,3,4,5,1,2,3,4}),3,-1),({1,2,-1,4,5,1,2,-1,4})) -test_equal(replace(([1:2,3:4,5:1,2:3]),3,-1),([1:2,3:4,5:1,2:-1])) - -// - reverse -test_eq(reverse("reverse"),"esrever") -test_eq(reverse(""),"") -test_eq(reverse("a"),"a") -test_equal(reverse(({1,5,9})),({9,5,1})) -test_equal(reverse(0x12345678),0x1e6a2c48) - -// - rusage -test_true(arrayp(rusage())) -test_true(sizeof(rusage())>0) - -// - search -test_eq(search("foolbar","gazonk"),-1) -test_eq(search("qowiueproqiuweproiwqueoplkjljlklksjjriwueproiuwerowieu","lkjljlklksjj"),24) -test_eq(search("lkjljlklksjjriwueproiuwerlskjdvlaskjfowieu","lkjljlklksjj"),0) -test_eq(search("aaaaaaaaaaaaaaaaaaaaaaaalkjljlklksjj","lkjljlklksjj"),24) -test_eq(search("foobargazonk","oo"),1) -test_eq(search("foobargazonk","o",3),9) -test_eq(search("foobargazonk","o",9),9) -test_eq(search("foobargazonk","o",10),-1) -test_eq(search("foobargazonk","x",9),-1) -test_eq(search(({56,8,2,6,2,7,3,56,7}),8),1) -test_eq(search(({56,8,2,6,2,7,3,56,7}),56,0),0) -test_eq(search(({56,8,2,6,2,7,3,56,7}),56,1),7) -test_eq(search(({56,8,2,6,2,7,3,56,7}),56,7),7) -test_eq(search(({56,8,2,6,2,7,3,56,7}),56,8),-1) -test_eq(search(({"foo"}),"foo"),0) -test_eq(search("fo-obar|gazonk"/"|","fo-obar"),0) -test_eq(search("fo-obar|gazonk"/"|","gazonk"),1) -test_eq(search(([1:2,3:4,5:6,7:8]),4),3) -test_true(zero_type(search(([1:2,3:4,5:6,7:8]),1))) -test_eq(search(([1:2,3:4,5:6,7:8]),8),7) - -// test large searches (find string, size, pattern) -define(test_search,[[ -test_eq(search(sprintf($1+"%'"+$3+"'*n",$2),$1),0) -test_eq(search(sprintf("%'"+$3+"'*n" ,$2),$1),-1) -test_eq(search(sprintf("%'"+$3+"'*n"+$1,$2),$1),$2) -test_eq(search(sprintf("%'"+$3+"'*n"+$1+"%'"+$3+"'*n",$2,$2),$1),$2) -]]) - -define(test_search2,[[dnl -test_search($1,$2,$3) -test_search($1,$2+1,$3) -test_search($1,$2+2,$3) -test_search($1,$2+3,$3) -]]) - -define(test_search3,[[dnl -test_search2($1,10,$2) -test_search2($1,1000,$2) -test_search2($1,100000,$2) -]]) - -define(test_search4,[[dnl -test_search3($1,"+-*") -test_search3($1,($1[0..strlen($1)-2])) -test_search3($1,($1[1..0x7fffffff])) -]]) - -test_search4("SUNE") -test_search4("-------------------+") -test_search4("+-------------------") -test_search4(sprintf("%'argel-bargel glop-glyf?'2000n")) - -// - sizeof -test_eq(sizeof("felbar"),6) -test_eq(sizeof(({"fulbar","gazonk",7})),3) -test_eq(sizeof(([8:3,6:6,7:0])),3) -test_eq(sizeof((<8,7,6,5,4,7>)),6) - -// - sum -test_eq(sum(1,1),2) -test_eq(sum(1,-2),-1) -test_eq(sum(-2,-2),-4) -test_eq(sum("hi","there"),"hithere") -test_eq(sum("human","number",666),"humannumber666") -test_eq(sum("human","number",666),"humannumber666") -test_eq(sum("human","number",666),"humannumber666") -test_eq(sum("human","number",666,111),"humannumber666111") -test_eq(sum("humannumber",sum(666+111)),"humannumber777") -test_eq(sum("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","x","y"),"abcdefghijklmnopqrstuvxy") -test_eq(sum(1.0+1.0),2.0) -test_eq(sum(1.0,-1.0),0.0) -test_eq(sum(-1.0,-1.0),-2.0) -test_equal(sum(({1,2,3}),({4,5,6})),({1,2,3,4,5,6})) -test_equal(sum((<1,2,3,4>),(<4,5,6>)),(<1,2,3,4,4,5,6>)) -test_equal(sum(([0:1,3:6]),([5:2,3:6])),([0:1,3:6,3:6,5:2])) - -// - this_object -test_true(objectp(this_object())) - -// - throw -test_eq(20,catch(throw(a()))) - -// - time -test_true(intp(time())) - -// - trace -test_do(trace(0)) -test_eq(trace(0),0) - -// - upper_case -test_equal(upper_case("fooq"),"FOOQ") -test_equal(upper_case("FooR"),"FOOR") -test_equal(upper_case("Foo1234-*~\n"),"FOO1234-*~\n") - -// - values -test_equal(values("foo"),({'f','o','o'})) -test_equal(values(({'f','o','o'})),({'f','o','o'})) -test_equal(sort_array(values(([7:3,8:9,99:12]))),({3,9,12})) -test_equal(values((<7,8,99>)),({1,1,1})) - -// - zero_type -test_eq(zero_type(0),0) -test_eq(zero_type(([])[7]),1) - -// - call_out, call_out_info, remove_call_out, find_call_out -test_do(call_out(a,100000)) -test_true(arrayp(call_out_info())) -test_true(sizeof(call_out_info()) > 0) -test_true(call_out_info()[-1][0] > 1) -test_eq(find_call_out(call_out_info()[-1][2]), call_out_info()[-1][0]) -test_eq(find_call_out(a),-1) -test_true(zero_type(find_call_out(a))) -test_do(remove_call_out(call_out_info()[-1][2])) -test_true(!sizeof(call_out_info()) || function_name(call_out_info()[-1][2])!="a") - -// m_delete -test_equal(([1:1]),m_delete(a(),0)) -test_equal(([1:1]),m_delete(([1:1,0:3]),0)) -test_any(mapping a=([1:1]); return a==m_delete(a,1),1) - -test_program(int b=10; mixed a() { return 1; }) -test_program(mixed b=10; mixed a() { return 1;}) -test_define_program(/test,[[int q,w,e,r,t; mixed foo() { return 10; }]]) - -test_program(inherit "/test"; mixed a() { return foo()==10; }) -test_program(inherit "/test"; mixed a() { return test::foo()==10; }) -test_program(inherit "/test" : bar; mixed a() { return bar::foo()==10; }) - -test_define_program(/test2,[[int z,x,c,v,b; mixed bar() { return 11; }]]) -test_program(inherit "/test"; inherit "/test2"; mixed a() { return foo()==10 && bar()==11; }) -test_program(inherit "/test2"; inherit "/test"; mixed a() { return foo()==10 && bar()==11; }) - -test_define_program(/test,[[int q,w,e,r; mixed t; mixed getw() { return w; } void setw(int _) { w=_; }]]) -test_define_program(/test2,[[int z,x,c,v,b; mixed getb() { return b; } void setb(int _) { b=_; }]]) - -test_program(inherit "/test"; inherit "/test2"; mixed a() { w=20; b=22; return getw()==20 && getb()==22; }) -test_program(inherit "/test"; inherit "/test2"; mixed a() { setw(20); setb(22); return w==20 && b==22; }) -test_program(inherit "/test2"; inherit "/test"; mixed a() { w=20; b=22; return getw()==20 && getb()==22; }) -test_program(inherit "/test2"; inherit "/test"; mixed a() { setw(20); setb(22); return w==20 && b==22; }) - - - }); - - for(e=start;e<sizeof(tests);e++) - { - string test; - int type; - object o; - mixed a,b; - - test=tests[e]; - type=test[0]; - test=test[1..strlen(test)-1]; - - if(verbose) - { - perror("Doing test "+(e+1)+"\n"); - if(verbose>1) - perror(test+"\n"); - } - - switch(type) - { - case 'c': - master()->set_inhibit_compile_errors(1); - if(catch(compile_string(test,"Test "+(e+1)))) - { - successes++; - }else{ - perror("Test "+(e+1)+" failed.\n"); - perror(test+"\n"); - errors++; - } - master()->set_inhibit_compile_errors(0); - break; - - case 'E': - master()->set_inhibit_compile_errors(1); - if(catch(clone(compile_string(test,"Test "+(e+1)))->a())) - { - successes++; - }else{ - perror("Test "+(e+1)+" failed.\n"); - perror(test+"\n"); - errors++; - } - master()->set_inhibit_compile_errors(0); - break; - - default: - o=clone(compile_string(test,"Test "+(e+1))); - - if(t) trace(t); - a=b=0; - if(functionp(o->a)) a=o->a(); - if(functionp(o->b)) b=o->b(); - if(t) trace(0); - switch(type) - { - case 'P': - b=compile_string(b,"Test "+(e+1)); - master()->add_precompiled_program(a,b); - successes++; - break; - - case 'f': - a=!a; - - case 't': - if(!a) - { - perror("Test "+(e+1)+" failed.\n"); - perror(test+"\n"); - errors++; - }else{ - successes++; - } - break; - - case 'd': - successes++; - break; - - case '=': - if(a!=b) - { - perror("Test "+(e+1)+" failed.\n"); - perror(test+"\n"); - perror(sprintf("o->a(): %O\n",a)); - perror(sprintf("o->b(): %O\n",b)); - errors++; - }else{ - successes++; - } - break; - - case 'e': - if(!equal(a,b)) - { - perror("Test "+(e+1)+" failed.\n"); - perror(test+"\n"); - perror(sprintf("o->a(): %O\n",a)); - perror(sprintf("o->b(): %O\n",b)); - errors++; - }else{ - successes++; - } - break; - - default: - perror("Unknown test type.\n"); - errors++; - } - } - if(fail && errors) - exit(1); - } - - if(errors + successes != sizeof(tests)) - { - perror("Errors + Successes != number of tests!\n"); - errors++; - } - if(errors || verbose) - { - perror("Failed tests: "+errors+".\n"); - } - - return errors; -} - -EOTESTS diff --git a/bin/export.lpc b/bin/export.lpc deleted file mode 100755 index 4e1fab45495b460aed1de3be5df037de4b35a0e8..0000000000000000000000000000000000000000 --- a/bin/export.lpc +++ /dev/null @@ -1,57 +0,0 @@ -#!/usr/local/bin/ulpc - -string *get_files(string path) -{ - string *files,tmp,*ret; - files=get_dir(path); - files-=({"CVS","RCS",".cvsignore"}); - ret=({}); - foreach(files,tmp) - { - if(tmp[-1]=='~') continue; - if(tmp[0]=='#' && tmp[-1]=='#') continue; - if(tmp[0]=='.' && tmp[1]=='#') continue; - - tmp=path+"/"+tmp; - if(file_size(tmp)==-2) - { - ret+=get_files(tmp); - }else{ - ret+=({tmp}); - } - } - return ret; -} - -int main(int argc, string *argv) -{ - mixed tmp; - int e; - string files; - string s=replace(version()," ","_"); - - tmp=explode(argv[0],"/"); - tmp=reverse(tmp); - e=search(tmp,"ulpc"); - if(e==-1) - { - perror("Couldn't find uLPC source dir.\n"); - perror("Use export.lpc <sourcedir>.\n"); - exit(1); - } - tmp=tmp[e+1..sizeof(tmp)-1]; - tmp=reverse(tmp); - cd(tmp*"/"); - perror("Sourcedir = "+tmp*"/"+"/ulpc\n"); - - files=sum(({ "ulpc/README" }), - get_files("ulpc/src"), - get_files("ulpc/doc"), - get_files("ulpc/lib"), - get_files("ulpc/bin")); - - perror("Creating "+s+".tar.gz:\n"); - system("tar cvzf ulpc/"+s+".tar.gz "+files*" "); - perror("Done.\n"); - return 0; -} diff --git a/bin/export.pike b/bin/export.pike new file mode 100755 index 0000000000000000000000000000000000000000..5ee029b84f63d0c5399952e2cc3120bd244dcdce --- /dev/null +++ b/bin/export.pike @@ -0,0 +1,88 @@ +#!/usr/local/bin/pike + +#include <simulate.h> + +string *get_files(string path) +{ + string *files,tmp,*ret; + files=get_dir(path); + files-=({"CVS","RCS",".cvsignore"}); + ret=({}); + foreach(files,tmp) + { + if(tmp[-1]=='~') continue; + if(tmp[0]=='#' && tmp[-1]=='#') continue; + if(tmp[0]=='.' && tmp[1]=='#') continue; + + tmp=path+"/"+tmp; + switch(tmp) + { + case "pike/src/modules/image": + case "pike/src/modules/spider": + case "pike/src/modules/pipe": + continue; + } + if(file_size(tmp)==-2) + { + ret+=get_files(tmp); + }else{ + ret+=({tmp}); + } + } + return ret; +} + +void fix_configure(string dir) +{ + int *config,*config_in; + config=file_stat(dir+"/configure"); + config_in=file_stat(dir+"/configure.in"); + + if(config_in) + { + if(!config || config_in[3] > config[3]) + { + perror("Fixing configure in "+dir+".\n"); + system("cd "+dir+" ; autoconf"); + } + } +} + +int main(int argc, string *argv) +{ + mixed tmp; + int e; + string *files; + string s=replace(version()," ","_"); + + tmp=explode(argv[0],"/"); + tmp=reverse(tmp); + e=search(tmp,"pike"); + if(e==-1) + { + perror("Couldn't find Pike source dir.\n"); + perror("Use export.pike <sourcedir>.\n"); + exit(1); + } + tmp=tmp[e+1..sizeof(tmp)-1]; + tmp=reverse(tmp); + cd(tmp*"/"); + perror("Sourcedir = "+tmp*"/"+"/pike\n"); + + fix_configure("pike/src"); + + foreach(get_dir("pike/src/modules") - ({"CVS","RCS"}), tmp) + if(file_size("pike/src/modules/"+tmp) == -2) + fix_configure("modules/"+tmp); + + files=sum(({ "pike/README" }), + get_files("pike/src"), + get_files("pike/doc"), + get_files("pike/lib"), + get_files("pike/bin")); + + perror("Creating "+s+".tar.gz:\n"); + system("tar cvzf pike/"+s+".tar.gz "+files*" "); + perror("Done.\n"); + return 0; +} diff --git a/bin/fixdepends.lpc b/bin/fixdepends.lpc deleted file mode 100755 index 5790241800e8886f2967550303dd3307c94416bf..0000000000000000000000000000000000000000 --- a/bin/fixdepends.lpc +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/local/bin/ulpc - -#define FILESET "a-zA-Z0-9./,_-" -#define DEPENDLINE "\n#Dependencies begin here, DO NOT REMOVE THIS LINE!!!!\n" - -int main(int argc, string *argv) -{ - string f,makefile,pre,file; - - if(argc<2) - { - perror("Usage: fixdepends <makefile>\n"); - exit(1); - } - - if(!file_stat(argv[1])) - { - perror("Makefile not found.\n"); - exit(1); - } - - // Read depends from stdin - f=clone((program)"/precompiled/file","stdin")->read(0x7fffffff); - makefile=read_bytes(argv[1]); - sscanf(makefile,"%s" DEPENDLINE,makefile); - mv(argv[1],argv[1]+"~"); - makefile+=DEPENDLINE; - while(strlen(f) && sscanf(f,"%[^" FILESET "]%s",pre,f)==2) - { - sscanf(f,"%[" FILESET "]%s",file,f); - makefile+=pre+(explode(file,"/")[-1]); // Basename - } - makefile+=f; - write_file(argv[1],makefile); -} diff --git a/bin/fixdepends.sh b/bin/fixdepends.sh new file mode 100755 index 0000000000000000000000000000000000000000..26306e0da5b857a5191ec23654a2b967430ef116 --- /dev/null +++ b/bin/fixdepends.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +cd $1 + +( + cat Makefile.src + echo "# Depencies begin here" + sed 's@[-/a-zA-Z0-9.,_]*/\([-a-zA-Z0-9.,_]*\)@\1@g' +) > Makefile.in + diff --git a/bin/hilfe.lpc b/bin/hilfe similarity index 77% rename from bin/hilfe.lpc rename to bin/hilfe index bce12e7987f0276ee61f9c86faa8edbb809aac81..b4f93e27640a4bf3b8c86cd955845feb0fd8ccc8 100755 --- a/bin/hilfe.lpc +++ b/bin/hilfe @@ -1,18 +1,21 @@ -#!/usr/local/bin/ulpc +#!/usr/local/bin/pike -/* H�bbes incremental LPC frontend - HiLfe */ +/* Incremental Pike evaluator */ + +#include <simulate.h> /* todo: * return (void)1; will give me problems. * strstr(string,string *) -> return first occurance of first string... - * + * inherit doesn't work + * preprocessor stuff */ #!define catch(X) ((X),0) #pragma all_inline -/* #define DEBUG */ +/* #define DEBUG */ mapping variables=([]); string *functions=({}); @@ -25,16 +28,16 @@ object eval(string f) string prog,file; object o; mixed err; - prog="#pragma unpragma_strict_types\n#pragma all_inline\n"+ - "static object ___hilfe=previous_object();\n"+ - "static mapping ___variables=___hilfe->query_variables();\n"+ - implode(map_array(m_indices(variables),lambda(string f) - { return sprintf("mixed %s=___variables[\"%s\"];",f,f); }),"\n")+ - "\nmapping query_variables() { return ([\n"+ - implode(map_array(m_indices(variables),lambda(string f) - { return sprintf(" \"%s\":%s,",f,f); }),"\n")+ - "\n ]);\n}\n"+ - implode(functions,"\n")+"\n"+ f+"\n"; + prog=("#pragma unpragma_strict_types\n#pragma all_inline\n"+ + "static object ___hilfe=previous_object();\n"+ + "static mapping ___variables=___hilfe->query_variables();\n"+ + map(indices(variables),lambda(string f) + { return sprintf("mixed %s=___variables[\"%s\"];",f,f); })*"\n"+ + "\nmapping query_variables() { return ([\n"+ + map(indices(variables),lambda(string f) + { return sprintf(" \"%s\":%s,",f,f); })*"\n"+ + "\n ]);\n}\n"+ + functions*"\n"+"\n"+ f+"\n"); #ifdef DEBUG write("program:"+prog); @@ -54,11 +57,7 @@ string input=""; string skipwhite(string f) { -// perror("skipwhite '"+f+"'\n"); -// trace(99); while(sscanf(f,"%*[ \r\n\t]%s",f) && sscanf(f,"/*%*s*/%s",f)); -// trace(0); -// perror("returned '"+f+"'\n"); return f; } @@ -113,14 +112,16 @@ int find_next_comma(string s) return 0; } -string get_name(string f) +string *get_name(string f) { int e,d; + string rest; f=skipwhite(f); if(sscanf(f,"*%s",f)) f=skipwhite(f); - sscanf(f,"%[a-zA-Z0-9_]",f); - return f; + sscanf(f,"%[a-zA-Z0-9_]%s",f,rest); + rest=skipwhite(rest); + return ({f,rest}); } string first_word=0; @@ -170,6 +171,13 @@ void cut_buffer(int where) #endif } +void print_version() +{ + write(version()+ + " Running Hilfe v1.4 (Incremental Pike Frontend)\n"); +} + + int do_parse() { string tmp; @@ -198,11 +206,11 @@ int do_parse() { case "quit": write("Exiting.\n"); - exit(1); + exit(0); case ".": clean_buffer(); write("Input buffer flushed.\n"); - break; + continue; case "new": this_object()->__INIT(); @@ -213,10 +221,26 @@ int do_parse() { write(sprintf("%-15s:%s\n",var,sprintf("%O",foo))); }, - m_indices(variables), - m_values(variables)); + indices(variables), + values(variables)); cut_buffer(4); continue; + + case "help": + print_version(); + write("Hilfe is a tool to evaluate Pike interactively and incrementally.\n" + "Any Pike function, expression or variable declaration can be intered\n" + "at the command line. There are also a few extra commands:\n" + " help - show this text\n" + " quit - exit this program\n" + " . - abort current input batch\n" + " dump - dump variables\n" + " new - clear all function and variables\n" + "See the Pike reference manual for more information.\n" + ); + cut_buffer(4); + continue; + } } } @@ -323,25 +347,30 @@ mixed parse_function(string fun) case "int": case "void": case "object": + case "array": case "mapping": case "string": case "list": case "float": case "mixed": + case "program": + case "function": /* parse function */ if(eq_pos!=-1) break; /* it's a variable */ sscanf(fun,first_word+"%s",name); - name=get_name(name); - - if(sscanf(fun,"%s"+name+"%s(",c,c) && skipwhite(c)=="") + + c=get_name(name); + name=c[0]; + c=c[1]; + + if(c[0]=='(') { int i; if((i=member_array(name,function_names))!=-1) { b=functions[i]; functions[i]=fun; - if(!eval("")) - functions[i]=b; + if(!eval("")) functions[i]=b; }else{ if(eval(fun)) { @@ -350,6 +379,8 @@ mixed parse_function(string fun) } } return 1; + }else{ + write("Syntax error.\n"); } } } @@ -386,15 +417,20 @@ mixed parse_statement(string ex) case "int": case "void": case "object": + case "array": case "mapping": case "string": case "list": case "float": case "mixed": + case "program": + case "function": /* parse variable def. */ sscanf(ex,first_word+"%s",b); b=skipwhite(b); - name=get_name(b); + c=get_name(b); + name=c[0]; + c=c[1]; #ifdef DEBUG write("Variable def.\n"); @@ -406,24 +442,25 @@ mixed parse_statement(string ex) string f; variables[name]=0; - if(sscanf(ex,"%s"+name+"%s=%s",c,f,c)==3 && skipwhite(f)=="") + if(sscanf(c,"=%s",c)) { #ifdef DEBUG write("Variable def. with assign. ("+name+")\n"); #endif if(e=find_next_comma(c)) + { return name+"="+c[0..e-1]+";\n"+ - first_word+" "+c[e+1..strlen(c)-1]; - else + first_word+" "+c[e+1..strlen(c)-1]; + }else{ return name+"="+c; + } #ifdef DEBUG write("Input buffer = '"+input+"'\n"); #endif }else{ - sscanf(b,"%s"+name+"%s",b,b); - sscanf(b,",%s",b); - return first_word+" "+b; + sscanf(c,",%s",c); + return first_word+" "+c; } } @@ -453,7 +490,7 @@ void stdin(string s) object foo; #ifdef DEBUG - write("input: "+code_value(s,1)+"\n"); + write("input: '"+code_value(s,1)+"'\n"); #endif s=skipwhite(s); @@ -464,8 +501,7 @@ void stdin(string s) s=s[2..strlen(s)-1]; } add_buffer(s); - if(!strlen(input)) - write("> "); +// if(!strlen(input)) write("> "); } void my_write(mixed x) @@ -473,27 +509,6 @@ void my_write(mixed x) write(sprintf("%O",x)); } -void read_input() -{ - string a,b; - object stdin_object; - - stdin_object=clone((program)"/precompiled/file","stdin"); - stdin_object->set_blocking(); - while(stdin_object) - { - a=stdin_object->read(1); - if(!stringp(a)) continue; - stdin_object->set_nonblocking(0,0,0); - b=stdin_object->read(100000); - if(stringp(b)) a+=b; - stdin_object->set_blocking(); - stdin(a); - } - - write("Terminal closed.\n"); -} - void signal_trap(int s) { clean_buffer(); @@ -502,14 +517,17 @@ void signal_trap(int s) void main(int argc,string *argv) { + string s; add_efun("write",my_write); - signal(signum("SIGINT"),signal_trap); - - write(version()+ - " Running Hilfe v1.2 (Hubbe's Incremental LPC FrontEnd)\n"); - write("> "); - read_input(); + print_version(); + while(s=readline(strlen(input) ? ">> " : "> ")) + { + signal(signum("SIGINT"),signal_trap); + stdin(s+"\n"); + signal(signum("SIGINT")); + } + write("Terminal closed.\n"); return 0; } diff --git a/bin/htmlify_docs.pike b/bin/htmlify_docs.pike new file mode 100644 index 0000000000000000000000000000000000000000..bd04cb12d142223ef42e5212f94dc15e39606955 --- /dev/null +++ b/bin/htmlify_docs.pike @@ -0,0 +1,785 @@ +#!/usr/local/bin/pike + +// Parse BMML (Black Magic Markup Language) to HTML +// Written by Fredrik Hubinette, dark sourceror and inventor of BMML + +#include <simulate.h> + +mapping efuns = all_efuns(); +mapping pages = ([]); +mapping short_descs = ([]); +mapping keywords = ([]); +mapping subpages = ([]); + +string new_path; +int writepages; +string docdir; + + +/* + * Implode an array of strings to an english 'list' + * ie. ({"foo","bar","gazonk"}) beomces "foo bar, gazonk" + */ +string implode_nicely(string *foo) +{ + switch(sizeof(foo)) + { + case 0: return ""; + case 1: return foo[0]; + default: return foo[0..sizeof(foo)-2]*", "+" and "+foo[-1]; + } +} + +/* + * Make a 'header' + */ +string smallcaps(string foo) +{ + string *ret; + ret=({"<b>"}); + foreach(explode(foo," "),foo) + { + ret+=({"<font size=+1>"+foo[0..0]+"</font><font size=-1>"+foo[1..0x7fffffff]+"</font>"}); + } + return implode(ret," ")+"</b>"; +} + +/* + * convert original path to internal format + */ +string fippel_path(string path) +{ + sscanf(path,"./%s",path); + path=replace(path,"/","_"); + if(path[strlen(path)-5..]==".bmml") path=path[..strlen(path)-6]; + if(path[strlen(path)-5..]!=".html") path+=".html"; + + return docdir+path; +} + +/* + * Three step conversion process... + */ +string even_more_magic(string block, int indent) +{ + if(-1==search(block,"\t")) + { + return replace(block,"\n","<br>\n"); + }else{ + int e,d; + mixed tmp,tmp2; + + tmp=explode(block,"\n")+({}); + for(e=0;e<sizeof(tmp);e++) + { + tmp[e]=explode(tmp[e],"\t"); + if(sscanf(tmp[e][0],"%*[ ]%s",tmp2) && tmp2=="") + { + int q; + for(q=e-1;q>0;q--) + { + if(!tmp[q]) continue; + + if(sizeof(tmp[q])>=sizeof(tmp[e])) + { + for(d=1;d<sizeof(tmp[e]);d++) + { + tmp[q][d]+=" "+tmp[e][d]; + } + tmp[e]=0; + } + break; + } + } + } + tmp-=({0}); + + for(e=0;e<sizeof(tmp);e++) + { + tmp[e]=implode(tmp[e]," </td><td> "); + } + + return "<table border=0 cellpadding=0 cellspacing=0>\n<tr valign=top><td>"+ + implode(tmp,"<br></td></tr>\n<tr valign=top><td>")+ + "<br></td></tr>\n</table>\n"; + } +} + +string more_magic(string s, int quote) +{ + int e; + string *tmp; + int *ilevel=({0}); + string output=""; + string accumulator=""; + + if(!quote && -1==search("\n"+s,"\n ") && -1==search(s,"\t")) + { + return s; + } + +#define FLUSH() output+=even_more_magic(accumulator,ilevel[-1]); accumulator="" +#define POP() output+="</dl>"; ilevel=ilevel[0..sizeof(ilevel)-2] + + tmp=explode(s,"\n"); + for(e=0;e<sizeof(tmp);e++) + { + string spaces, rest; + + sscanf(tmp[e],"%[ ]%s",spaces,rest); + if(strlen(spaces) > ilevel[-1]) + { + FLUSH(); + output+="<dl><dt><dd>"; + ilevel+=({ strlen(spaces) }); + } + else if(strlen(spaces) < ilevel[-1]) + { + FLUSH(); + while(strlen(spaces) < ilevel[-1] && strlen(spaces) <= ilevel[-2]) + { + POP(); + } + } + accumulator+=rest+"\n"; + } + + FLUSH(); + + while(sizeof(ilevel)>1) + { + POP(); + } + + return output; +} + +string magic(string s, int quote) +{ + string *ret; + ret=({}); + + foreach(explode(s,"\n\n"),s) + { + sscanf(s,"\t%s",s); + s=replace(s,"\n\t","\n"); + ret += ({ more_magic(s, quote) }); + } + + return implode(ret,"\n<p>"); +} + + +/* + * Magic to convert SYNTAX sections + */ +inherit "/precompiled/regexp" : lastident; +inherit "/precompiled/regexp" : megamagic; + +string syntax_magic(string s) +{ + string *tmp; + int e; + + while(tmp=megamagic::split(s)) + { + s=tmp[0]+"<I>"+tmp[1]+"</I>"+tmp[2]; + } + + tmp=explode(s,"\n"); + for(e=0;e<sizeof(tmp);e++) + { + string a,b; + if(sscanf(tmp[e],"%s(%s",a,b) && strlen(b)>1 && b[-1]==';' && b[-2]==')') + { + string *tmp2; + int d; + tmp2=explode(b[0..strlen(b)-3],","); + for(d=0;d<sizeof(tmp2);d++) + { + string *tmp3; +// perror("<"+tmp2[d]+">"); + if(tmp3=lastident::split(tmp2[d])) + { + tmp2[d]=tmp3[0]+"<I>"+tmp3[1]+"</I>"+tmp3[2]; + } + } + tmp[e]=a+"("+implode(tmp2,",")+");"; + } + } + s=implode(tmp,"\n"); + return "<tt>"+magic(s,1)+"</tt>"; +} + + +/* HTML quoting / unquoting */ + +string html_quote(string s) +{ + return replace(s,({"&","<",">"}),({"&","<",">"})); +} + +string html_unquote(string s) +{ + return replace(s,({"&","<",">"}),({"&","<",">"})); +} + +string mkdocument(string s,string title) +{ + return ("<html>"+ + "<title>"+ + html_quote(title)+ + "</title>"+ + "<body bgcolor=\"#A0E0C0\">"+ + s+ + "</body>"+ + "</html>"); +} + +string short(string s) +{ + return short_descs[s] ? " - "+short_descs[s] : ""; +} + + +inherit "/precompiled/regexp":is_example; + +list(string) indexes_done=(<>); +list(string) pages_done=(<>); + +void done(string a) +{ + pages_done[a]=1; +} + +string mkindex(string topic, int usehead) +{ + string head; + string a,ret; + ret=""; + + indexes_done[topic]=1; + + switch(topic) + { + case "pages": + head="<b>All pages:</b>\n"; + ret="<ul>\n"; + foreach(sort_array(m_indices(pages)),a) + { + ret+="<li><a href="+pages[a]+">"+a+"</a>"+short(a)+"\n"; + } + + ret+="</ul>\n"; + break; + + case "programs": + head="<b>Builtin programs:</b>\n"; + ret="<ul>\n"; + foreach(sort_array(m_indices(pages)),a) + { + if(a[0]!='/') continue; + done(a); + ret+="<li><a href="+pages[a]+">"+a+"</a>"+short(a)+"\n"; + } + + ret+="</ul>\n"; + break; + + case "examples": + head="<b>examples:</b>\n"; + ret="<ul>\n"; + foreach(sort_array(m_indices(pages)),a) + { + if(search(a,"example")==-1) continue; + done(a); + ret+="<li><a href="+pages[a]+">"+a+"</a>"+short(a)+"\n"; + } + + ret+="</ul>\n"; + break; + + case "other": + head="<b>Other pages</b>\n"; + ret="<ul>\n"; +// perror(sprintf("all pages: %O\n",sort(m_indices(pages)))); +// perror(sprintf("pages done: %O\n",sort(m_indices(pages_done)))); + foreach(sort_array(m_indices(pages) - indices(pages_done) ),a) + { + if(a[0..4]=="index") continue; + ret+="<li><a href="+pages[a]+">"+a+"</a>"+short(a)+"\n"; + } + ret+="</ul>\n"; + break; + + case "efuns": + head="<b>All builtin functions:</b>\n"; + ret="<ul>\n"; + foreach(sort_array(m_indices(all_efuns())),a) + { + a=html_quote(a); + done(a); + if(pages[a]) + { + ret+="<li><a href="+pages[a]+">"+a+"</a>"+short(a)+"\n"; + }else{ + if(writepages) + perror("Warning: no page for function: "+a+".\n"); + } + } + ret+="</ul>\n"; + break; + + default: + if(!keywords[topic]) + { + if(writepages) + perror("Unknown keyword "+topic+".\n"); + return ""; + } + + head="<a name="+topic+">"; + head+="<b>"+capitalize(topic)+"</a>"; + head+=short(topic); + head+="</b>\n"; + ret="<ul>\n"; + foreach(sort_array(keywords[topic]),a) + { + a=html_quote(a); + done(a); + ret+="<li><a href="+pages[a]+">"+a+"</a>"+ short(a) +"\n"; + } + ret+="</ul></a>\n"; + break; + } + + if(usehead) ret=head+ret; + + return ret; +} + +/* Convert a page */ +string convert_page(string path, string fname) +{ + string output, short; + int headno; + string cont, section, name, part; + + output=""; + + cont=read_bytes(path); + +// perror("foo: "+path[strlen(path)-5..]+".\n"); + if(sscanf(cont,"NAME\n\t%s - %s\n",name,short)) + { + int partno; + + cont=html_quote(cont); + path=fippel_path(path); + + short_descs[html_quote(name)]=short; + pages[html_quote(name)]=path; + + + string *parts=explode(cont,"============================================================================\n"); + for(partno=0;partno<sizeof(parts);partno++) + { + string part_name="error"; + string *sections; + string part; + int section; + + part=parts[partno]; + if(!strlen(part)) continue; + + sections=explode(part,"\n\n"); + + /* Merge sections that does not have a header together */ + for(section=0;section<sizeof(sections);section++) + { + if(!strlen(sections[section]) || + sections[section][0] < 'A' || + sections[section][0] > 'Z') + { + sections[section-1]+="\n\n"+sections[section]; + sections=sections[0..section-1]+sections[section+1..0x7fffffff]; + section--; + } + } + + for(headno=0;headno<sizeof(sections);headno++) + { + string type, rest; + mixed a, b; + sscanf(sections[headno],"%s\n%s",type,rest); + + switch(type) + { + case "NAME": + if(sscanf(rest,"\t%s - %s",part_name,b)!=2) + perror("Warning NAME section broken!\n"); + rest="\t<tt>"+part_name+"</tt> - "+b; + + if(partno) + { + subpages[fname+"->"+part_name]=path+"#"+part_name; + } + + case "RETURN VALUE": + case "RETURN VALUES": + case "DESCRIPTION": + case "NOTA BENE": + case "BUGS": + rest=magic(rest,0); + break; + + default: + perror("Warning: Unknown header: "+type+".\n"); + rest=magic(rest,0); + break; + + case "KEYWORDS": + a=replace(rest,({"\n"," ","\t"}),({"","",""}))/","; + b=({}); + foreach(a,a) + { + keywords[a] = ( keywords[a] || ({}) ) | ({ name }); + if(pages[a]) + { + b+=({ "<a href="+pages[a]+">"+a+"</a>" }); + }else{ + b+=({ a }); + } + } + rest=implode_nicely(b); + break; + + case "SEE ALSO": + rest=replace(rest,({"\n"," ","\t"}),({"","",""})); + a=rest/","; + b=({}); + foreach(a,a) + { + string tmp; + tmp=a; + if(a[0]!='`' && a[0]!='/') + a=explode(a,"/")[-1]; + if(pages[a]) + { + b+=({ "<a href="+pages[a]+">" + a + "</a>" }); + }else if(subpages[a]){ + b+=({ "<a href="+subpages[a]+">" + a + "</a>" }); + }else if(subpages[fname+"->"+a]){ + b+=({ "<a href="+subpages[name+"->"+a]+">" + a + "</a>" }); + }else{ + if(writepages) + perror(path+": Warning, unlinked SEE ALSO: "+a+"\n"); + b+=({ tmp }); + } + } + rest=implode_nicely(b); + break; + + case "SYNTAX": + case "SYNTAX EXAMPLE": + rest=syntax_magic(rest); + break; + + case "EXAMPLES": + case "EXAMPLE": + case "DIRECTIVE": + case "PREPROCESSOR DIRECTIVES": + rest="<tt>"+magic(rest,1)+"</tt>"; + break; + + case "RELATED FUNCTIONS": + a=name; + + sscanf(rest,"%*skeyword %[a-z/A-Z0-9]",a); + rest=mkindex(a, 0); + } + + sections[headno]="<dt>"+ + smallcaps(type)+ + "<dd>\n"+rest+"\n<p>"; + } + if(keywords[part_name]) + { + sections+=({"<dt>"+ + smallcaps("RELATED PAGES")+"\n"+ + mkindex(part_name,0)+"<p>"}); + } + parts[partno]="<dl>\n"+implode(sections,"\n")+"\n</dl>\n"; + if(part_name) + { + parts[partno]="<a name="+part_name+">\n"+ + parts[partno]+ + "\n</a>\n"; + } + } + output=mkdocument(implode(parts,"<hr noshade size=1>\n"),"Pike: "+name); + } + else if(path[strlen(path)-5..]==".bmml") + { + string *sections; + string title; + int section; + + pages[(path[..strlen(path)-6]/"/")[-1]]=fippel_path(path); + + cont=replace(cont,"$version",version()); + cont=html_quote(cont); + sections=explode(cont,"\n\n"); + + for(section=0;section<sizeof(sections);section++) + { + string tmp,pre,a,b; + tmp=sections[section]; + sscanf(tmp,"%[\t ]",pre); + + switch(pre) + { + case "": + title=tmp; + tmp="<h1><center>"+tmp+"</center></h1>"; + break; + + case " ": + sscanf(tmp," %s",tmp); + tmp="<h2>"+tmp+"</h2>"; + break; + + case " ": + sscanf(tmp," %s",tmp); + tmp=replace(tmp,"\n ","\n"); + tmp=more_magic(tmp,0); + break; + + case "\t": + sscanf(tmp,"\t%s %s",pre, a); + switch(pre) + { + case "KEYWORD_INDEX": + sscanf(a,"%s\n",a); + tmp=mkindex(a, 1); + break; + + case "KEYWORD_LIST": + sscanf(a,"%s\n",a); + tmp=mkindex(a, 0); + break; + + case "LINK": + sscanf(a,"%s %s",a,b); + done((a/"/")[-1]); + tmp="<a href="+fippel_path(a)+">"+b+"</a>"; + break; + + case "TAG": + pages[a]=fippel_path(path)+"#"+a; + done(a); + tmp="<a name="+a+">"; + break; + + default: + perror("Unknown directive: "+pre+".\n"); + } + + } + sections[section]=tmp; + } + cont=implode(sections,"\n<p>\n"); + + return mkdocument(cont, title || "Pike manual"); + } + else if(path[strlen(path)-5..]==".html") + { + pages[(path[..strlen(path)-6]/"/")[-1]]=fippel_path(path); + + if(sscanf(cont,"<title>%s</title>",part)) + short_descs[(path/"/")[-1]]=part; + output=cont; + } + else if(is_example::match(cont)) + { + /** Hmm, this looks like an example file to me... */ + string line,tmp; + int pre,p; + + pages[(path/"/")[-1]]=fippel_path(path); + + if(sscanf(cont,"%*[0-9.] %s\n",part)==2) + short_descs[(path/"/")[-1]]=part; + + tmp=""; + pre=2; + cont=html_quote(cont); + foreach(cont/"\n"+({"."}),line) + { + if(strlen(line)) + { + switch(line[0]) + { + case ' ': p=0; sscanf(line," %s",line); break; + case '\t': p=1; sscanf(line,"\t",line); break; + default: p=2; break; + } + + if(p!=pre) + { + switch(pre) + { + case 2: output+="<h2>"+tmp+"</h2>"; break; + case 1: + if(tmp[-1]=='\n' && tmp[-2]=='\n') + tmp=tmp[..strlen(tmp)-2]; + output+="<pre>\n"+tmp+"</pre>\n"; + break; + case 0: output+=replace(tmp,"\n\n","\n<p>\n"); break; + } + pre=p; + tmp=""; + } + } + tmp+=line+"\n"; + } + output=mkdocument(output,"Pike: "+ + replace(explode(fname,"/")[-1],"_"," ")); + } + else + { + if(writepages) + { + string tmp; + int l, i; + + foreach(cont/"\n", tmp) + { + if(is_example::match(tmp+"\n")) + { + l++; + }else{ + i++; + } + } + + if(l > i*2) + { + int err; + l=0; + foreach(cont/"\n", tmp) + { + l++; + if(!is_example::match(tmp+"\n")) + { + perror(path+":"+l+": not on example form.\n"); + if(++err == 5) break; + } + } + } + perror("Warning: not converting "+path+".\n"); + } + output=""; + } + return output; +} + + +void scanfiles(string path, string fname) +{ + string nf,np; + nf=convert_page(path, fname); + + if(nf && strlen(nf) && writepages) + { + np=combine_path(new_path,fippel_path(path)); +// write("Writing "+np+".\n"); + if(file_size(np)>=0) + rm (np); + write_file(np,nf); + } +} + +/** Traverse directory **/ +void traversedir(string path) +{ + string file; + foreach(get_dir(path) - ({"CVS","RCS",".cvsignore"}),file) + { + string tmp; + if(file[-1]=='~') continue; + if(file[0]=='#' && file[-1]=='#') continue; + if(file[0]=='.' && file[1]=='#') continue; + + tmp=path+"/"+file; + + if(file_size(tmp)==-2) + { + traversedir(tmp); + }else{ + scanfiles(tmp,file); + } + } +} + +void dodocs(string path, int module) +{ + cd(path); + perror("Doing "+path+"\n"); + if(!module) + { + docdir=""; + }else{ + docdir="module"+module; + if(sscanf(reverse(path),"cod/%s",docdir)) + { + sscanf(docdir,"%s/",docdir); + docdir=reverse(docdir); + } + docdir+="_"; + } + traversedir("."); +} + +int main(int argc, string *argv) +{ + string np; + int e; + + if(argc < 3) + { + perror("Usage: html_docs.pike to_path from_path [module_doc_path ...]\n"); + exit(0); + } + +// perror(sprintf("argv = %O\n",argv)); + + megamagic::create("^(.*)<([a-z_0-9]+)>(.*)$"); + lastident::create("^(.*[^<>a-z_0-9])([a-z_0-9]+)([^<>a-z_0-9]*)$"); + +#define BEGIN1 "[0-9]+(\\.[0-9]+)*(\\.|) " +#define BEGIN2 "\t" +#define BEGIN3 " " +#define LEND "[^\n]*" +#define LINE "(" BEGIN1 LEND ")|(" BEGIN2 LEND ")|(" BEGIN3 LEND ")|()\n" + + is_example::create("^(" LINE ")+$"); + + for(e=1;e<sizeof(argv);e++) + argv[e]=combine_path(getcwd(),argv[e]); + + new_path=argv[1]; + + write("Scanning pages for links and keywords.\n"); + writepages=0; + for(e=2;e<sizeof(argv);e++) dodocs(argv[e],e-2); + + write("Writing html files.\n"); + writepages=1; + for(e=2;e<sizeof(argv);e++) dodocs(argv[e],e-2); + + foreach(indices(keywords) - indices(indexes_done),np) + { + perror("Keywords never indexed: "+np+"\n"); + } +} diff --git a/bin/uhttpd.lpc b/bin/httpd.pike similarity index 93% rename from bin/uhttpd.lpc rename to bin/httpd.pike index 6a0df1a778919c6686e775990f421371cd5c9cd2..aaef220d0b3e21f0d5001c32a7d8336e9ff886a7 100755 --- a/bin/uhttpd.lpc +++ b/bin/httpd.pike @@ -1,16 +1,18 @@ -#!/usr/local/bin/ulpc +#!/usr/local/bin/pike /* A very small httpd capable of fetching files only. - * Written by Fredrik H�binette as a demonstration of uLPC. + * Written by Fredrik H�binette as a demonstration of Pike */ +#include <simulate.h> + inherit "/precompiled/port"; /* number of bytes to read for each write */ #define BLOCK 16060 /* Where do we have the html files ? */ -#define BASE "/home/hubbe/ulpc/src/" +#define BASE "/home/hubbe/pike/src/" /* File to return when we can't find the file requested */ #define NOFILE "/home/hubbe/www/html/nofile.html" diff --git a/bin/metatest b/bin/metatest new file mode 100755 index 0000000000000000000000000000000000000000..33067a90f38201caaf709d4dc93bb89220fda4b0 --- /dev/null +++ b/bin/metatest @@ -0,0 +1,45 @@ +#!/bin/sh + +SRCPATH=`dirname $0` +SRCPATH=`dirname $SRCPATH` + +case $SRCPATH in + /*) ;; + *) SRCPATH=`pwd`/$SRCPATH ;; +esac + +set -e +set -x + +docompile5() { + mkdir test1 + cd test1 + $SRCPATH/src/configure --cache-file ../testcache + + # Modify makefile to simplify debugging... + mv Makefile Makefile.orig + sed <Makefile.orig >Makefile "s/^DEBUGDEF=.*$/DEBUGDEF=$1/g" + + make + make verify + make verify PIKEOPTS=-d2 +# make verify PIKEOPTS=-d99 + cd .. + rm -rf test1 +} + + +docompile2() { + docompile5 "$1 -DDEBUG" + docompile5 "$1" +} + +docompile1() { + docompile2 "$1 -DALWAYS_GC" + docompile2 "$1 -DNO_GC" + docompile2 "$1" +} + + +docompile1 +rm testcache diff --git a/bin/mkpeep.pike b/bin/mkpeep.pike new file mode 100755 index 0000000000000000000000000000000000000000..1e0724034eab88e02629d4afa056d3bfaf84ed17 --- /dev/null +++ b/bin/mkpeep.pike @@ -0,0 +1,380 @@ +#!/usr/local/bin/pike + +#include <simulate.h> + +string skipwhite(string s) +{ +#if DEBUG > 9 + perror("skipwhite("+s+")\n"); +#endif + + sscanf(s,"%*[ \t\n]%s",s); + return s; +} + +/* Find the matching parenthesis */ +int find_end(string s) +{ + int e,parlvl=1; + +#if DEBUG > 8 + perror("find_end("+s+")\n"); +#endif + + for(e=1;e<strlen(s);e++) + { + switch(s[e]) + { + case '(': case '{': case '[': + parlvl++; break; + case ')': case '}': case ']': + parlvl--; + if(!parlvl) return e; + break; + } + } + perror("Syntax error.\n"); + exit(1); +} + + +/* Splitline into components */ +mixed split(string s) +{ + string *a,*b,tmp; + int i,e,opcodes; + string line=s; + opcodes=0; + +#ifdef DEBUG + perror("split("+s+")\n"); +#endif + + b=({}); + + s=skipwhite(s); + while(strlen(s)) + { + switch(s[0]) + { + /* Source / Target separator */ + case ':': + b+=({":"}); + s=s[1..]; + break; + + case '!': + b+=({"!"}); + s=s[1..]; + break; + + /* Identifier */ + case 'A'..'Z': + case 'a'..'z': + case '0'..'9': + case '_': + sscanf(s,"%[a-zA-Z0-9_]%s",tmp,s); + b+=({"F_"+tmp}); + break; + + /* argument */ + case '(': + i=find_end(s); + b+=({ s[0..i] }); + s=s[i+1..strlen(s)]; + break; + + /* condition */ + case '[': + i=find_end(s); + b+=({ s[0..i] }); + s=s[i+1..strlen(s)]; + break; + } + + s=skipwhite(s); + } + + int i=search(b, ":"); + if(i==-1) + { + perror("Syntax error.\n"); + return 0; + } + + a=b[..i-1]; + b=b[i+1..]; + + for(e=0;e<sizeof(a);e++) + if(a[e][0]=='F') + opcodes++; + + i=0; + for(e=0;e<sizeof(a);e++) + { + switch(a[e][0]) + { + case '(': + a[e]=a[e]+"==$"+i+"a"; + break; + + case '[': + a[e]=a[e][1..strlen(a[e])-2]; + break; + + case 'F': + i++; + a[e]=a[e]+"==$"+i+"o"; + break; + } + } + + + for(e=0;e<sizeof(a);e++) + { + if(a[e]=="!") + { + a[e+1]=replace(a[e+1],"==","!="); + a=a[..e-1]+a[e+1..]; + e--; + } + } + +#ifdef DEBUG + perror(sprintf("%O\n",({a,b}))); +#endif + + return ({a,b,opcodes, line}); +} + +/* Replace $[0-9]+(o|a) with something a C compiler can understand */ +string treat(string expr) +{ + int e; + string *tmp; + tmp=expr/"$"; + for(e=1;e<sizeof(tmp);e++) + { + string num, type, rest; + if(sscanf(tmp[e],"%d%c%s",num,type,rest)!=3) + { + perror("Syntax error.\n"); + exit(2); + } + num--; + switch(type) + { + case 'a': tmp[e]="argument("+num+")"+rest; break; + case 'o': tmp[e]="opcode("+num+")"+rest; break; + } + } + return implode(tmp,""); +} + +/* Dump C co(d|r)e */ +void dump2(mixed *data,int ind) +{ + int e,i,max,maxe; + mixed a,b,d,tmp; + string test; + int wrote_switch; + mapping foo; + mixed cons, var; + + foo=([]); + + while(1) + { + foo=([]); + + /* First we create a mapping: + * foo [ meta variable ] [ condition ] = ({ lines }); + */ + foreach(data,d) + { + a=d[0]; + b=d[1]; + for(e=0;e<sizeof(a);e++) + { + if(sscanf(a[e],"F_%[A-Z0-9_]==%s",cons,var)==2 || + sscanf(a[e],"(%d)==%s",cons,var)==2 || + sscanf(a[e],"%d==%s",cons,var)==2) + { + if(!foo[var]) foo[var]=([]); + if(!foo[var][a[e]]) foo[var][a[e]]=({}); + foo[var][a[e]]+=({d}); + } + } + } + + /* Check what variable has most values */ + max=maxe=e=0; + foreach(m_values(foo),d) + { + if(m_sizeof(d)>max) + { + max=m_sizeof(d); + maxe=e; + } + e++; + } + + /* If zero, done */ + if(max <= 1) break; + + test=m_indices(foo)[maxe]; + + wrote_switch++; + write(sprintf("%*nswitch(%s)\n",ind,treat(test))); + write(sprintf("%*n{\n",ind)); + + d=m_values(foo)[maxe]; + a=m_indices(d); + b=m_values(d); + + + /* foo: variable + * a[x] : condition + * b[x] : line + */ + + for(e=0;e<sizeof(a);e++) + { + /* The lines b[e] are removed from data as they + * will be treated below + */ + data-=b[e]; + + if(sscanf(a[e],"(%s)==%s",cons,var)!=2) + sscanf(a[e],"%s==%s",cons,var); + + write(sprintf("%*ncase %s:\n",ind,cons+"")); + + foreach(b[e],d) d[0]-=({a[e]}); + dump2(b[e],ind+2); + write(sprintf("%*n break;\n",ind)); + write("\n"); + } + + if(sizeof(data)) + write(sprintf("%*ndefault:\n",ind)); + ind+=2; + } + + /* Take care of whatever is left */ + if(sizeof(data)) + { + foreach(data,d) + { + mixed q; + + write(sprintf("%*n/* %s */\n",ind,d[3])); + + + if(sizeof(d[0])) + { + string test; + test=treat(implode(d[0]," && ")); + write(sprintf("%*nif(%s)\n",ind,test)); + } + write(sprintf("%*n{\n",ind)); + ind+=2; + + + for(i=0;i<sizeof(d[1]);i++) + { + if(i+1<sizeof(d[1]) && d[1][i+1][0]=='(') + { + string tmp=d[1][i+1]; + tmp=treat(tmp[1..strlen(tmp)-2]); + write(sprintf("%*nINT32 arg%d=%s;\n",ind,i,tmp)); + i++; + } + } + + if(sizeof(d[1])) + { + write(sprintf("%*ncopy_shared_string(current_file,instr(0)->file);\n",ind)); + write(sprintf("%*ncurrent_line=instr(0)->line;\n",ind)); + } + + write(sprintf("%*npop_n_opcodes(%d);\n",ind,d[2])); + + int q; + + for(i=0;i<sizeof(d[1]);i++) + { + if(i+1<sizeof(d[1]) && d[1][i+1][0]=='(') + { + write(sprintf("%*ninsert(%s,arg%d);\n",ind,d[1][i],i)); + i++; + }else{ + write(sprintf("%*ninsert2(%s);\n",ind,d[1][i])); + } + q++; + } + if(sizeof(d[1])) + { + if(q) + write(sprintf("%*nfifo_len+=%d;\n",ind,q)); + write(sprintf("%*nfree_string(current_file);\n",ind)); + write(sprintf("%*ndebug();\n",ind)); + } + write(sprintf("%*ncontinue;\n",ind)); + + ind-=2; + write(sprintf("%*n}\n",ind,test)); + } + } + + while(wrote_switch--) + { + ind-=2; + write(sprintf("%*n}\n",ind)); + } +} + + + +int main(int argc, string *argv) +{ + int e,max,maxe; + string f; + mapping foo=([]); + array(array(array(string))) data=({}); + + mapping tests=([]); + + f=read_bytes(argv[1]); + foreach(explode(f,"\n"),f) + { + string *a,*b; + mapping tmp; + + sscanf(f,"%s#",f); + if(!strlen(f)) continue; + data+=({split(f)}); + } + +// write(sprintf("%O\n",data)); + + write(" len=instrbuf.s.len/sizeof(p_instr);\n"); + write(" instructions=(p_instr *)instrbuf.s.str;\n"); + write(" instrbuf.s.str=0;\n"); + write(" fifo_len=0;\n"); + write(" init_bytecode();\n\n"); + write(" for(eye=0;eye<len;)\n {\n"); + write(" INT32 current_line;\n"); + write(" struct pike_string *current_file;\n"); + write("\n"); + + dump2(data,4); + + write(" advance();\n"); + write(" }\n"); + write(" for(eye=0;eye<len;eye++) free_string(instructions[eye].file);\n"); + write(" free((char *)instructions);\n"); + + return 0; +} + diff --git a/bin/rsif b/bin/rsif index 14055d9e6e1d5fc369e16dc4e5a4a95d38a3af34..c0c2cd9d70b2597e1077cd64843f2f57c1dccbe1 100755 --- a/bin/rsif +++ b/bin/rsif @@ -1,32 +1,37 @@ -#!/usr/local/bin/ulpc +#!/usr/local/bin/pike -int main(int argc,string *argv) +#include <simulate.h> + +int main(int argc, string *argv) { int i; string file; if(argc<4) { - write("Usage: rsif <from> <to> <files>\n"); - return 0; + perror("Usage: rsif <from> <to> <files>\n"); + return 1; } - for(i=3; i<sizeof(argv); i++) + for(i=3; i<argc; i++) { - if(file=read_bytes(argv[i])) + string file_contents; + if(file_contents=read_bytes(argv[i])) { - if(-1!=strstr(file,argv[1])) + if(-1!=strstr(file_contents,argv[1])) { write("Processing "+argv[i]+".\n"); - file=replace(file,argv[1],argv[2]); + file_contents=replace(file_contents,argv[1],argv[2]); if( mv(argv[i],argv[i]+"~") ) { - write_file(argv[i],file); + write_file(argv[i],file_contents); }else{ write("Failed to create backup file.\n"); } } } } + + return 0; } diff --git a/doc/builtin/_verify_internals b/doc/builtin/_verify_internals new file mode 100644 index 0000000000000000000000000000000000000000..0ace05f0d7621fb8e54eba1e2c0e331f6a565f68 --- /dev/null +++ b/doc/builtin/_verify_internals @@ -0,0 +1,13 @@ +NAME + _verify_internals - check Pike internals + +SYNTAX + void _verify_internals(); + +DESCRIPTION + This function goes through most of the internal Pike structures and + generates a fatal error if one of them is found to be out of order. + It is only used for debugging. + +KEYWORDS + debugging diff --git a/doc/builtin/add_constant b/doc/builtin/add_constant new file mode 100644 index 0000000000000000000000000000000000000000..a899245e570757b5bb0e23eefb376fc97daea9a6 --- /dev/null +++ b/doc/builtin/add_constant @@ -0,0 +1,28 @@ +NAME + add_constant - add new predefined functions or constants + +SYNTAX + void add_constant(string name, mixed value); + or + void add_constant(string name); + +DESCRIPTION + This function adds a new constant to Pike, it is often used to + add builin functions (efuns). All programs compiled after add_constant + function is called can access 'value' by the name given by 'name'. + If there is a constant called 'name' already, it will be replaced by + by the new definition. This will not affect already compiled programs. + + Calling add_constant without a value will remove that name from the list + of of constant. As with replacing, this will not affect already compiled + programs. + +EXAMPLES + add_constant("true",1); + add_constant("false",0); + add_constant("PI",4.0); + add_constant("sqr",lambda(mixed x) { return x * x; }); + add_constant("add_constant"); + +SEE ALSO + all_constants \ No newline at end of file diff --git a/doc/builtin/add_efun b/doc/builtin/add_efun deleted file mode 100644 index 8fc094a03d529e1381e2be1a92138882ed019270..0000000000000000000000000000000000000000 --- a/doc/builtin/add_efun +++ /dev/null @@ -1,28 +0,0 @@ -NAME - add_efun - add new predefined functions or constants - -SYNTAX - void add_efun(string name, mixed value); - or - void add_efun(string name); - -DESCRIPTION - This function adds a new constant to uLPC, it is often used to - add builin functions (efuns). All programs compiled after add_efun - function is called can access 'value' by the name given by 'name'. - If there is an efun called 'name' already, it will be replaced by - by the new definition. This will not affect already compiled programs. - - Calling add_efun without a value will remove that name from the list - of of efuns. As with replacing, this will not affect already compiled - programs. - -EXAMPLES - add_efun("true",1); - add_efun("false",0); - add_efun("PI",4.0); - add_efun("sqr",lambda(mixed x) { return x * x; }); - add_efun("add_efun"); - -SEE ALSO - all_efuns \ No newline at end of file diff --git a/doc/builtin/aggregage_multiset b/doc/builtin/aggregage_multiset new file mode 100644 index 0000000000000000000000000000000000000000..b00f928bb32159b0957585741a6058ceee3f34f2 --- /dev/null +++ b/doc/builtin/aggregage_multiset @@ -0,0 +1,23 @@ +NAME + aggregate_multiset - construct a multiset + +SYNTAX + multiset aggregate_multiset(mixed ... elems); + or + (< elem1, elem2, ... >) + +DESCRIPTION + Construct an multiset with the arguments as indexes. This function + could be written in Pike as: + + multiset aggregate(mixed ... elems) { return mkmultiset(elems); } + + The only problem is that mkmultiset is implemented using + aggregage_multiset... + +KEYWORDS + multiset + +SEE ALSO + sizeof, multisetp, mkmultiset + diff --git a/doc/builtin/aggregate b/doc/builtin/aggregate index 71bac1a02e341fdbd6e1f86bcb717840b5cce013..9177fdf2ea14f079588a16782a35ee95d249efec 100644 --- a/doc/builtin/aggregate +++ b/doc/builtin/aggregate @@ -8,7 +8,7 @@ SYNTAX DESCRIPTION Construct an array with the arguments as indices. This function - could be written in LPC as: + could be written in Pike as: mixed *aggregate(mixed ... elems) { return elems; } diff --git a/doc/builtin/aggregate_list b/doc/builtin/aggregate_list deleted file mode 100644 index 89131d1773e9510765afab641865a2a12b46ea00..0000000000000000000000000000000000000000 --- a/doc/builtin/aggregate_list +++ /dev/null @@ -1,19 +0,0 @@ -NAME - aggregate_list - construct a list - -SYNTAX - list aggregate_list(mixed ... elems); - or - (< elem1, elem2, ... >) - -DESCRIPTION - Construct an list with the arguments as indexes. This function - could be written in LPC as: - - list aggregate(mixed ... elems) { return mklist(elems); } - -KEYWORDS - list - -SEE ALSO - sizeof, listp, mklist diff --git a/doc/builtin/aggregate_mapping b/doc/builtin/aggregate_mapping index 1526e41be348392e8f6f37ab5cc9aa3df503f121..d98dd260aad91c46c611af3e7554a9983faff091 100644 --- a/doc/builtin/aggregate_mapping +++ b/doc/builtin/aggregate_mapping @@ -4,7 +4,7 @@ NAME SYNTAX mapping aggregate_mapping(mixed ... elems); or - (< key1:val1, key2:val2, ... >) + ([ key1:val1, key2:val2, ... ]) DESCRIPTION Groups the arguments together two and two to key-index pairs and @@ -12,7 +12,7 @@ DESCRIPTION preferable. KEYWORDS - list + mapping SEE ALSO sizeof, mappingp, mkmapping diff --git a/doc/builtin/alarm b/doc/builtin/alarm new file mode 100644 index 0000000000000000000000000000000000000000..233098d62e2e88c026bc71d2edbe7940e9ea07eb --- /dev/null +++ b/doc/builtin/alarm @@ -0,0 +1,21 @@ +NAME + alarm - set an alarm clock for delivery of a signal + +SYNTAX + int alarm(int seconds); + +DESCRIPTION + alarm arranges for a SIGALRM signal to be delivered to the + process in seconds seconds. + + If seconds is zero, no new alarm is scheduled. + + In any event any previously set alarm is cancelled. + +RETURN VALUE + alarm returns the number of seconds remaining until any + previously scheduled alarm was due to be delivered, or + zero if there was no previously scheduled alarm. + +SEE ALSO + signal diff --git a/doc/builtin/all_constants b/doc/builtin/all_constants new file mode 100644 index 0000000000000000000000000000000000000000..3b23672fa642bdbbea41572208f023df5224ec8a --- /dev/null +++ b/doc/builtin/all_constants @@ -0,0 +1,12 @@ +NAME + all_constants - return all predefined constants + +SYNTAX + mapping (string:mixed) all_constant(); + +DESCRIPTION + Return a mapping containing all constants, indexed on the names of the + constant, and with the value of the efun as argument. + +SEE ALSO + add_constant diff --git a/doc/builtin/all_efuns b/doc/builtin/all_efuns deleted file mode 100644 index b99b3c0c59b7d2f9976479b8b7048f4d991958d6..0000000000000000000000000000000000000000 --- a/doc/builtin/all_efuns +++ /dev/null @@ -1,12 +0,0 @@ -NAME - all_efuns - return all efuns - -SYNTAX - mapping (string:mixed) all_efuns(); - -DESCRIPTION - Return a mapping containing all efuns, indexed on the names of the - efuns, and with the value of the efun as argument. - -SEE ALSO - add_efun diff --git a/doc/builtin/allocate b/doc/builtin/allocate index 4e6c716d0f2372942242024b87d16876360a67a9..90ed148de5e920466efbab4cd726a3dbd9411468 100644 --- a/doc/builtin/allocate +++ b/doc/builtin/allocate @@ -2,21 +2,13 @@ NAME allocate - allocate an array SYNTAX - mixed *allocate(int size, [ string type ]); + mixed *allocate(int size); DESCRIPTION - Allocate an array of size elements. Optionally, write what type you - want to store in the array in the second argument as a string. - Note that the type given in this string should be simple, instead - of writing "int ***" just write "array". + Allocate an array of size elements and initialize them to zero. EXAMPLES mixed *a=allocate(17); - int *b=allocate(17, "int"); - int **c=allocate(17, "array"); - mapping *c=allocate(17, "mapping"); - array (list (int)) c=allocate(17, "list"); - array (string) c=allocate(17, "string"); NOTA BENE Arrays are dynamically allocated there is no need to declare them diff --git a/doc/builtin/arrayp b/doc/builtin/arrayp index c6b844e20d6e2973212def87f0a1cc11294ba06d..8f52f20bea98a9fe65b2f4e6b312e732c1d3d104 100644 --- a/doc/builtin/arrayp +++ b/doc/builtin/arrayp @@ -11,5 +11,5 @@ KEYWORDS array SEE ALSO - allocate, intp, programp, floatp, stringp, objectp, regexpp, - mappingp, listp, functionp + allocate, intp, programp, floatp, stringp, objectp, mappingp, + multisetp, functionp diff --git a/doc/builtin/backtrace b/doc/builtin/backtrace index 3d421acc48225eba49d1d07ba5f930cb323d894d..ce824d420da8d223128b70fcb2f08d2a0cbdb8af 100644 --- a/doc/builtin/backtrace +++ b/doc/builtin/backtrace @@ -10,9 +10,9 @@ DESCRIPTION in the stack. Each entry has this format: ({ - file, /* a string with the filename if known, else zero */ - function, /* The function-pointer to the called function */ - line, /* an integer containing the line if known, else zero */ + file, /* a string with the filename if known, else zero */ + function, /* The function-pointer to the called function */ + line, /* an integer containing the line if known, else zero */ }) The current call frame will be last in the array, and the one above diff --git a/doc/builtin/call_function b/doc/builtin/call_function index fb4eafb870b92945874481314daf1003494edc21..0af1d5b98a3321d77fe1c4660c451505bf354a96 100644 --- a/doc/builtin/call_function +++ b/doc/builtin/call_function @@ -12,5 +12,8 @@ DESCRIPTION you will never have to write call_function(), because you will use the second syntax instead. +KEYWORDS + function + SEE ALSO backtrace, get_function diff --git a/doc/builtin/call_out b/doc/builtin/call_out deleted file mode 100644 index 6eccf4ad52d699ec35fa1bbded0fbf4a5fd4886a..0000000000000000000000000000000000000000 --- a/doc/builtin/call_out +++ /dev/null @@ -1,12 +0,0 @@ -NAME - call_out - make a delayed call to a function - -SYNTAX - void call_out(function f, int delay, mixed ... args); - -DESCRIPTION - Call_out places a call to the function f with the argument args - in a queue to be called in about delay seconds. - -SEE ALSO - remove_call_out, find_call_out, call_out_info diff --git a/doc/builtin/catch b/doc/builtin/catch deleted file mode 100644 index 880abf2cca0600980e06afaac3b5354fe08db864..0000000000000000000000000000000000000000 --- a/doc/builtin/catch +++ /dev/null @@ -1,13 +0,0 @@ -NAME - catch - catch any errors that may occur. -SYNTAX - mixed catch(mixed expr); - -DESCRIPTION - Evaluate expr. If there is no error or throw 0 is returned. Otherwise - the value thrown will be returned. Driver errors such as 1/0 will - throw an array where the first index is a string describing the error - and the second the backtrace() at that point. - -SEE ALSO - throw diff --git a/doc/builtin/column b/doc/builtin/column new file mode 100644 index 0000000000000000000000000000000000000000..5beb87cc9856705184400a03ea483a4ac8d36c11 --- /dev/null +++ b/doc/builtin/column @@ -0,0 +1,20 @@ +NAME + column - extract a column + +SYNTAX + array column(mixed *data,mixed index) + +DESCRIPTION + This function is exactly equivialent to: + + map_array(index,lambda(mixed x,mixed y) { return x[y]; },data) + + Except of course it is a lot shorter and faster. + That is, it indexes every index in the array data on the value of + the argument index and returns an array with the results. + +KEYWORDS + array + +SEE ALSO + rows diff --git a/doc/builtin/combine_path b/doc/builtin/combine_path index 84cd9cb5b3325222f1037435970978b67f8cb46b..49043c3c7a45d64ad7bd119c3c3c074d4f70275c 100644 --- a/doc/builtin/combine_path +++ b/doc/builtin/combine_path @@ -17,7 +17,8 @@ EXAMPLES > combine_path("/foo/bar","./sune.c"); Result: /foo/bar/sune.c +KEYWORDS + file + SEE ALSO getcwd - - \ No newline at end of file diff --git a/doc/builtin/compile_file b/doc/builtin/compile_file index 2937c161d88be1f12a6b09628333211e9ca08820..eac5814db1f3d5a373487d57d7237fc1f49e8e29 100644 --- a/doc/builtin/compile_file +++ b/doc/builtin/compile_file @@ -5,7 +5,7 @@ SYNTAX program compile_file(string filename); DESCRIPTION - This function will compile the filename to an LPC program that can + This function will compile the filename to an Pike program that can later be used for cloning. KEYWORDS diff --git a/doc/builtin/compile_string b/doc/builtin/compile_string index 44a242b3779b470b4b80728153b12818d1d4ba46..e868132378eb873be0685dde37b8025773223d6d 100644 --- a/doc/builtin/compile_string +++ b/doc/builtin/compile_string @@ -5,7 +5,7 @@ SYNTAX program compile_string(string prog, string name); DESCRIPTION - Compile_string takes a complete LPC program as an argument in a the + Compile_string takes a complete Pike program as an argument in a the string prog and compiles it to clonable program. The second argument will be used as the file name of the program and will be used for error messages and such. diff --git a/doc/builtin/copy_value b/doc/builtin/copy_value index 2b831f50000c1a2d52802c80603d927038b132ac..9add80c8075fe832d6615afb46416f2588904f4d 100644 --- a/doc/builtin/copy_value +++ b/doc/builtin/copy_value @@ -6,7 +6,7 @@ SYNTAX DESCRIPTION Copy value will copy the value given to it recursively. If the result - value is changed destructively (only possible for lists, arrays and + value is changed destructively (only possible for multisets, arrays and mappings) the copied value will not be changed. The resulting value will always be equal to the copied (tested with the efun equal), but they may not the the same value. (tested with ==) diff --git a/doc/builtin/crypt b/doc/builtin/crypt index d4e0e5b68d63ac4f5b3a200f365df825f3f5d664..8add8594933781dec429aae95c9fa91fca4632e6 100644 --- a/doc/builtin/crypt +++ b/doc/builtin/crypt @@ -16,8 +16,10 @@ DESCRIPTION EXAMPLES To crypt a password use: - crypted_password = crypt(typed_password); + crypted_password = crypt(typed_password); To see if the same password was used again use: - matched = crypt(typed_password, crypted_password); + matched = crypt(typed_password, crypted_password); - \ No newline at end of file + +KEYWORDS + string diff --git a/doc/builtin/destruct b/doc/builtin/destruct index 6a3567e9dc4b49455d08965ecadfdfbe6306a5f7..22b2bfefc41cd3346501b205932206272d58912b 100644 --- a/doc/builtin/destruct +++ b/doc/builtin/destruct @@ -8,7 +8,7 @@ DESCRIPTION Destruct marks an object as destructed, all pointers and function pointers to this object will become zero. The destructed object will be freed from memory as soon as possible. This will also call - o->destroyed. + o->destroy. KEYWORDS object diff --git a/doc/builtin/equal b/doc/builtin/equal index 33bff042ca628fd75b42c2a605d91e0837bc82f3..4b24bab3b09e6f6cea52a590ddd20d1677097f0f 100644 --- a/doc/builtin/equal +++ b/doc/builtin/equal @@ -6,8 +6,8 @@ SYNTAX DESCRIPTION This function checks if the values a and b are equal. For all types but - arrays, lists and mappings, this operation is the same as doing a == b. - For arrays, mappings and lists however, their contents are checked + arrays, multisets and mappings, this operation is the same as doing a == b. + For arrays, mappings and multisets however, their contents are checked recursively, and if all their contents are the same and in the same place, they are considered equal. diff --git a/doc/builtin/exit b/doc/builtin/exit index 3079937ecda0707646e45e31ba9d0ecf8ce0007d..aa65252461f421e30021b03bc51d41561aaa2805 100644 --- a/doc/builtin/exit +++ b/doc/builtin/exit @@ -1,11 +1,11 @@ NAME - exit - exit LPC interpreter + exit - exit Pike interpreter SYNTAX void exit(int returncode); DESCRIPTION - This function exits the whole 'ulpc' program with the return code + This function exits the whole 'pike' program with the return code given. Using exit() with any other value than 0 indicates that something went wrong during execution. See your system manuals for more information about return codes. diff --git a/doc/builtin/find_call_out b/doc/builtin/find_call_out deleted file mode 100644 index 39e39cc45623d174d909bfd9f8c2b597b20ab876..0000000000000000000000000000000000000000 --- a/doc/builtin/find_call_out +++ /dev/null @@ -1,13 +0,0 @@ -NAME - find_call_out - find a call out in the queue - -SYNTAX - int find_call_out(function f); - -DESCRIPTION - This function searches the call out queue, and returns the time left - to this call out will be done in seconds. If no call is found, - zero_type(find_call_out(f)) will return 1. - -SEE ALSO - call_out, remove_call_out, call_out_info diff --git a/doc/builtin/floatp b/doc/builtin/floatp index 4dfdab9df7ba4d9fe0d3b5efd1b48b5c3e748ca1..a7f68dcf7beb606386c41af718eb2daf1eb76400 100644 --- a/doc/builtin/floatp +++ b/doc/builtin/floatp @@ -11,5 +11,5 @@ KEYWORDS float SEE ALSO - intp, programp, arrayp, stringp, objectp, regexpp, - mappingp, listp, functionp + intp, programp, arrayp, stringp, objectp, + mappingp, multisetp, functionp diff --git a/doc/builtin/functionp b/doc/builtin/functionp index b6996bfe700892b8117492e1e109f2c928878f43..8bd816f7e6a6275b6f88aa51844b5c06152bbd34 100644 --- a/doc/builtin/functionp +++ b/doc/builtin/functionp @@ -11,5 +11,5 @@ KEYWORDS function SEE ALSO - intp, programp, arrayp, stringp, objectp, regexpp, - mappingp, listp, floatp + intp, programp, arrayp, stringp, objectp, + mappingp, multisetp, floatp diff --git a/doc/builtin/gc b/doc/builtin/gc new file mode 100644 index 0000000000000000000000000000000000000000..fba644107b93ab614dbfdf60a79dee2b013bba29 --- /dev/null +++ b/doc/builtin/gc @@ -0,0 +1,17 @@ +NAME + gc - do garbage collection + +SYNTAX + int gc(); + +DESCRIPTION + This function checks all the memory for cyclic structures such + as arrays containing themselves and frees them if approperiate. + It also frees up destructed objects. It then returns how many + arrays/objects/programs/etc. it managed to free by doing this. + + Normally there is no need to call this function since Pike will + call it by itself every now and then. (Pike will try to predict + when 20% of all arrays/object/programs in memory is 'garbage' + and call this routine then.) + diff --git a/doc/builtin/glob b/doc/builtin/glob new file mode 100644 index 0000000000000000000000000000000000000000..a820278ff3ee4e737be4b0934a8af67f2563c89f --- /dev/null +++ b/doc/builtin/glob @@ -0,0 +1,17 @@ +NAME + glob - match strings against globs + +SYNTAX + int glob(string glob, string str); + or + string *glob(string glob, string *arr); + +DESCRIPTION + This function matches "globs". A in the glob string a question sign + matches any character and an asterisk matches any string. When + given two strings as argument a true/false value is returned + which reflects if the 'str' matches 'glob'. When given an array as + second argument, an array containing all matching strings is returned. + +SEE ALSO + sscanf, regexp diff --git a/doc/builtin/indices b/doc/builtin/indices index f2a1b630b15f916c9e53e572b1bc0f0cadcdbcbc..408d5058a7095a605232e24e63310d9b614869a5 100644 --- a/doc/builtin/indices +++ b/doc/builtin/indices @@ -2,16 +2,16 @@ NAME indices - return an array of all index possible for a value SYNTAX - mixed *indices(string|array|mapping|list|object foo); + mixed *indices(string|array|mapping|multiset|object foo); DESCRIPTION Indices returns an array of all values you can use as index when indexing foo. For strings and arrays this is simply an array of the - ascending numbers. For mappings and lists, the array may contain any + ascending numbers. For mappings and multisets, the array may contain any kind of value. For objects, the result is an array of strings. KEYWORDS - mapping, list + mapping, multiset SEE ALSO values diff --git a/doc/builtin/intp b/doc/builtin/intp index e04eeeb390c9418aed05a214adb24519d193880f..f8e1bd9ef542f12f6dfed6b9f5a24f9ac70d1007 100644 --- a/doc/builtin/intp +++ b/doc/builtin/intp @@ -11,5 +11,5 @@ KEYWORDS int SEE ALSO - arrayp, programp, floatp, stringp, objectp, regexpp, - mappingp, listp, functionp + arrayp, programp, floatp, stringp, objectp, + mappingp, multisetp, functionp diff --git a/doc/builtin/kill b/doc/builtin/kill index ad0dc868a479ef4db91f89e4edd5547a76de9b72..f0b207d61449f28d588cab5d11d4d271ce8c75d9 100644 --- a/doc/builtin/kill +++ b/doc/builtin/kill @@ -10,34 +10,34 @@ DESCRIPTION Some signals and their supposed purpose: - SIGHUP Hangup, sent to process when user logs out - SIGINT Interrupt, normally sent by ctrl-c - SIGQUIT Quit, sent by ctrl-\ - SIGILL Illegal instruction - SIGTRAP Trap, mostly used by debuggers - SIGABRT Aborts process, can be caught, used by uLPC whenever something - goes seriously wrong. - SIGBUS Bus error - SIGFPE Floating point error (such as division by zero) - SIGKILL Really kill a process, cannot be caught - SIGUSR1 Signal reserved for whatever you want to use it for. - SIGSEGV Segmentation fault, caused by accessing memory where you - shouldn't. Should never happen to uLPC. - SIGUSR2 Signal reserved for whatever you want to use it for. - SIGALRM Signal used for timer interrupts. - SIGTERM Termination signal - SIGSTKFLT Stack fault - SIGCHLD Child process died - SIGCONT Continue suspended - SIGSTOP Stop process - SIGSTP Suspend process - SIGTTIN tty input for background process - SIGTTOU tty output for background process - SIGXCPU Out of cpu - SIGXFSZ File size limit exceeded - SIGPROF Profile trap - SIGWINCH Window change signal - + SIGHUP Hangup, sent to process when user logs out + SIGINT Interrupt, normally sent by ctrl-c + SIGQUIT Quit, sent by ctrl-\ + SIGILL Illegal instruction + SIGTRAP Trap, mostly used by debuggers + SIGABRT Aborts process, can be caught, used by Pike whenever something + goes seriously wrong. + SIGBUS Bus error + SIGFPE Floating point error (such as division by zero) + SIGKILL Really kill a process, cannot be caught + SIGUSR1 Signal reserved for whatever you want to use it for. + SIGSEGV Segmentation fault, caused by accessing memory where you + shouldn't. Should never happen to Pike. + SIGUSR2 Signal reserved for whatever you want to use it for. + SIGALRM Signal used for timer interrupts. + SIGTERM Termination signal + SIGSTKFLT Stack fault + SIGCHLD Child process died + SIGCONT Continue suspended + SIGSTOP Stop process + SIGSTP Suspend process + SIGTTIN tty input for background process + SIGTTOU tty output for background process + SIGXCPU Out of cpu + SIGXFSZ File size limit exceeded + SIGPROF Profile trap + SIGWINCH Window change signal + Note that you have to use signame to translate the name of a signal to it's number. diff --git a/doc/builtin/listp b/doc/builtin/listp deleted file mode 100644 index 25fdf57cedb1369001f24dadd89633af1f8f9a11..0000000000000000000000000000000000000000 --- a/doc/builtin/listp +++ /dev/null @@ -1,15 +0,0 @@ -NAME - listp - is the argument an list? - -SYNTAX - int listp(mixed arg); - -DESCRIPTION - Returns 1 if arg is a list, zero otherwise. - -KEYWORDS - list - -SEE ALSO - intp, programp, arrayp, stringp, objectp, regexpp, - mappingp, floatp, functionp diff --git a/doc/builtin/localtime b/doc/builtin/localtime new file mode 100644 index 0000000000000000000000000000000000000000..99f5c20b01003dc808ea37cd273c9e22fffce26a --- /dev/null +++ b/doc/builtin/localtime @@ -0,0 +1,29 @@ +NAME + localtime - break down time() into intelligible components + +SYNTAX + mapping(string:int) localtime(int time); + +DESCRIPTION + Given a time represented as second since 1970, as returned by the + function time(), this function returns a mapping with the following + components: + + sec seconds over the minute 0 - 59 + min minutes over the hour 0 - 59 + hour what hour in the day 0 - 23 + mday day of the month 1 - 31 + mon what month 0 - 11 + year years since 1900 0 - + wday day of week (0=sunday) 0 - 6 + yday day of year 0 - 365 + isdst is daylight saving time 0/1 + timezone differance between + local time and UTC + + +NOTA BENE + The 'timezone' might not be available on all platforms. + +SEE ALSO + time \ No newline at end of file diff --git a/doc/builtin/mappingp b/doc/builtin/mappingp index 9eaa3b0e9147a0e7013c04bacd164a58b4ab7ca5..3df96de1b2991739a7af145c5cb768b608797886 100644 --- a/doc/builtin/mappingp +++ b/doc/builtin/mappingp @@ -11,5 +11,5 @@ KEYWORDS mapping SEE ALSO - intp, programp, arrayp, stringp, objectp, regexpp, - listp, floatp, functionp + intp, programp, arrayp, stringp, objectp, + multisetp, floatp, functionp diff --git a/doc/builtin/multisetp b/doc/builtin/multisetp new file mode 100644 index 0000000000000000000000000000000000000000..c55ff966974aa097121d327b851f410e2ec69fc5 --- /dev/null +++ b/doc/builtin/multisetp @@ -0,0 +1,15 @@ +NAME + multisetp - is the argument a multiset? + +SYNTAX + int multisetp(mixed arg); + +DESCRIPTION + Returns 1 if arg is a multiset, zero otherwise. + +KEYWORDS + multiset + +SEE ALSO + intp, programp, arrayp, stringp, objectp, + mappingp, floatp, functionp diff --git a/doc/builtin/object_program b/doc/builtin/object_program index 028e16e896685e455a0a6632583e533cc3630912..88f634f5600d3e9dd3e24dbf23014f1755c0b10b 100644 --- a/doc/builtin/object_program +++ b/doc/builtin/object_program @@ -7,7 +7,7 @@ SYNTAX DESCRIPTION This function returns the program from which o was cloned. -KEYWORD +KEYWORDS object SEE ALSO diff --git a/doc/builtin/objectp b/doc/builtin/objectp index d31cd55bc6956ec49735281ac909d4f7a4ccd87d..53dc755f75c5b2e4144a50720ef8c693dceb6dc5 100644 --- a/doc/builtin/objectp +++ b/doc/builtin/objectp @@ -11,5 +11,5 @@ KEYWORDS object SEE ALSO - intp, programp, floatp, stringp, arrayp, regexpp, - mappingp, listp, functionp + intp, programp, floatp, stringp, arrayp, + mappingp, multisetp, functionp diff --git a/doc/builtin/programp b/doc/builtin/programp index 16304dbca7086d2566222e36c5a8fa1ae4519b15..775349e56ecff549bfbc6f4ff4ce14d68434491b 100644 --- a/doc/builtin/programp +++ b/doc/builtin/programp @@ -11,5 +11,5 @@ KEYWORDS program SEE ALSO - intp, listp, arrayp, stringp, objectp, regexpp, + intp, multisetp, arrayp, stringp, objectp, mappingp, floatp, functionp diff --git a/doc/builtin/random_seed b/doc/builtin/random_seed index 2376a63edd32a62e8137158a199eaf9c6bc393dc..af23b2da3563992660db4dd60d6f8d92a122467f 100644 --- a/doc/builtin/random_seed +++ b/doc/builtin/random_seed @@ -8,7 +8,7 @@ DESCRIPTION This function sets the initial value for the random generator. EXAMPLE - uLPC v1.0E-13 Running Hilfe v1.2 (Hubbe's Incremental LPC FrontEnd) + Pike v1.0E-13 Running Hilfe v1.2 (Hubbe's Incremental Pike FrontEnd) > random_seed(17); Result: 0 > random(1000); diff --git a/doc/builtin/replace b/doc/builtin/replace index ea479ae070bb60a3b8fb89e57fe42fffd5d4cca7..14165f779e5aceff9c598b288d36f0406e68facf 100644 --- a/doc/builtin/replace +++ b/doc/builtin/replace @@ -14,17 +14,20 @@ DESCRIPTION This function can do several kinds replacement operations, the different syntaxes do different things as follow: - 1) string replace(string s, string from, string to); + string replace(string s, string from, string to); + When given strings as second and third argument, a copy of - s with every occurance of 'from' return 'to'. + s with every occurance of 'from' return 'to' is returned. + + string replace(string s, string *from, string *to); - 2) string replace(string s, string *from, string *to); When given arrays of strings as second and third argument, every occurance of from[0] in s is replaced by to[0], from[1] is replaced by to[1] and so on... - 3) array replace(array a, mixed from, mixed to); - 4) mapping replace(mapping a, mixed from, mixed to); + array replace(array a, mixed from, mixed to); + mapping replace(mapping a, mixed from, mixed to); + When the first argument is an array or mapping, the values in a are searched for values equal to from, which are replaced by to destructively. diff --git a/doc/builtin/rows b/doc/builtin/rows new file mode 100644 index 0000000000000000000000000000000000000000..4e6dfb6aeacf19aab793275aada90b60cebf6ff6 --- /dev/null +++ b/doc/builtin/rows @@ -0,0 +1,20 @@ +NAME + rows - select a set of rows from an array + +SYNTAX + array rows(mixed data, mixed *index) + +DESCRIPTION + This function is exactly equivialent to: + + map_array(index,lambda(mixed x,mixed y) { return y[x]; },data) + + Except of course it is a lot shorter and faster. + That is, it indexes data on every index in the array index and + returns an array with the results. + +KEYWORDS + array + +SEE ALSO + column diff --git a/doc/builtin/search b/doc/builtin/search index 1cbda53336226973ed5f8f8293d1b0551abac438..a73d65b0901cc36398048ee5e239a47f1b4ca45f 100644 --- a/doc/builtin/search +++ b/doc/builtin/search @@ -22,7 +22,7 @@ DESCRIPTION and zero_type() will return 1 for this zero. NOTA BENE - This function replaces strstr and member_array from LPC4. + This function replaces strstr and member_array from Pike4. KEYWORDS string, array, mapping diff --git a/doc/builtin/signal b/doc/builtin/signal index eadd0008fc23ede12d2b8f4361461f6796bcfde3..ef69cc0879bccf8979a2224c21f77edc082ead9b 100644 --- a/doc/builtin/signal +++ b/doc/builtin/signal @@ -9,8 +9,8 @@ SYNTAX DESCRIPTION This function allows you to trap a signal and have a function called when the process receives a signal. Although it IS possible to trap - SIGBUS, SIGSEGV etc. I advice you not to. uLPC should not receive any - such signals and if it does it is because of bugs in the uLPC + SIGBUS, SIGSEGV etc. I advice you not to. Pike should not receive any + such signals and if it does it is because of bugs in the Pike interperter. And all bugs should be reported, no matter how trifle. The callback will receive the signal number as the only argument. @@ -19,5 +19,7 @@ DESCRIPTION If no second argument is given, the signal handler for that signal is restored to the default handler. + If the second argument is zero, the signal will be completely ignored. + SEE ALSO kill, signame, signum diff --git a/doc/builtin/sizeof b/doc/builtin/sizeof index e1e2243586e89f0e8af85c78dd8603bdff802a49..945eaddabc233ffde94977283f43a550299fa559 100644 --- a/doc/builtin/sizeof +++ b/doc/builtin/sizeof @@ -1,8 +1,8 @@ NAME - sizeof - return the size of an array, string, list or mapping + sizeof - return the size of an array, string, multiset or mapping SYNTAX - int sizeof(string|list|mapping|array a); + int sizeof(string|multiset|mapping|array|object a); DESCRIPTION This function returns the number of indexes available in the argument @@ -10,4 +10,4 @@ DESCRIPTION size. KEYWORDS - string, list, mapping, array + string, multiset, mapping, array diff --git a/doc/builtin/sort b/doc/builtin/sort new file mode 100644 index 0000000000000000000000000000000000000000..c13208ada7c14bf8f3fa50d6724b3eb943fd16a1 --- /dev/null +++ b/doc/builtin/sort @@ -0,0 +1,24 @@ +NAME + sort - sort an array destructively + +SYNTAX + mixed *sort(array(mixed) index, array(mixed) ... data); + +DESCRIPTION + This function sorts the array 'index' destructively. That means + that the array itself is changed and returned, no copy is created. + If extra arguments are given, they are supposed to be arrays of the + same size. Each of these arrays will be modified in the same way as + 'index'. Ie. if index 3 is moved to position 0 in 'index' index 3 + will be moved to position 0 in all the other arrays as well. + + Sort can sort strings, integers and floats in ascending order. + Arrays will be sorted first on the first element of each array. + + Sort returns it's first argument. + +KEYWORDS + array + +SEE ALSO + reverse diff --git a/doc/builtin/sscanf b/doc/builtin/sscanf deleted file mode 100644 index af6bd6e990f8d376447ac5bb04ec9554460a7914..0000000000000000000000000000000000000000 --- a/doc/builtin/sscanf +++ /dev/null @@ -1,29 +0,0 @@ -NAME - sscanf - scan a string using a format string - -SYNTAX - int sscanf(string str, string fmt, mixed var1, mixed var2 ...); - -DESCRIPTION - Parse a string str using the format fmt. fmt can contain strings - separated by "%d,%s,%c and %f. Every % corresponds to one of var1, - var2... - - %d gives an integer - %f gives a float - %c matches one char but returns an integer - %s gives a string - %[set] matches a string containing a given set of characters. - (thos given inside the brackets) %[^set] means any character - ecept those inside brackets. %[0-9H] means any number or 'H'. - - If a * is put between the percent and the operator, the operator - will not only match it's argument, not assign any variables. - - Number of matched arguments is returned. - -KEYWORDS - string - -SEE ALSO - explode, sprintf diff --git a/doc/builtin/stringp b/doc/builtin/stringp index 15fa5d0eee1dcab2cf623e6a09e4fa00e71cb3cc..4939517064fa8f119d0d6c7f50b71e0de0c3a50e 100644 --- a/doc/builtin/stringp +++ b/doc/builtin/stringp @@ -11,5 +11,5 @@ KEYWORDS string SEE ALSO - intp, listp, arrayp, programp, objectp, regexpp, + intp, multisetp, arrayp, programp, objectp, mappingp, floatp, functionp diff --git a/doc/builtin/time b/doc/builtin/time index 242cdf7b8d3081ea835e000a80175212e84c9c79..57708ca8c7452e57e3c6733b072d1c6f7fb69e9a 100644 --- a/doc/builtin/time +++ b/doc/builtin/time @@ -11,7 +11,7 @@ DESCRIPTION The function ctime() converts this integer to a readable string. The second syntax does not call the system call time() as often, - but is only updated in the backed. (when lpc code isn't running) + but is only updated in the backed. (when pike code isn't running) SEE ALSO time diff --git a/doc/builtin/trace b/doc/builtin/trace index 7aafc67e1d9e6a990616e97450a4d5e85f8c1a95..d15fa53c5c34b54e3d3831af0a759acba4bdcbdd 100644 --- a/doc/builtin/trace +++ b/doc/builtin/trace @@ -7,7 +7,7 @@ SYNTAX DESCRIPTION This function affects the debug trace level. (also set by the -t command line option) The old level is returned. Trace level 1 or - higher means that calls to lpc functions are printed to stderr, + higher means that calls to pike functions are printed to stderr, level 2 or higer means calls to builtin functions are printed, 3 means every opcode interpreted is printed, 4 means arguments to these opcodes are printed as well. See the command lines options diff --git a/doc/builtin/ualarm b/doc/builtin/ualarm new file mode 100644 index 0000000000000000000000000000000000000000..8992a400f7baf35f79cd8a9174d06a4c569d3a31 --- /dev/null +++ b/doc/builtin/ualarm @@ -0,0 +1,21 @@ +NAME + ualarm - set an alarm clock for delivery of a signal + +SYNTAX + int ualarm(int useconds); + +DESCRIPTION + ualarm arranges for a SIGALRM signal to be delivered to the + process in useconds micro seconds. + + If useconds is zero, no new alarm is scheduled. + + In any event any previously set alarm is cancelled. + +RETURN VALUE + ualarm returns the number of microseconds seconds remaining + until any previously scheduled alarm was due to be delivered, or + zero if there was no previously scheduled alarm. + +SEE ALSO + signal diff --git a/doc/builtin/values b/doc/builtin/values index 6d3988656fcb646b0e0719585fc9eb447c76339a..ba9447c782e74f3c73a8872930accd8b4092833d 100644 --- a/doc/builtin/values +++ b/doc/builtin/values @@ -2,12 +2,12 @@ NAME values - return an array of all possible values from indexing SYNTAX - mixed *values(string|list|mapping|array|object foo); + mixed *values(string|multiset|mapping|array|object foo); DESCRIPTION Values return an array of all values you can get when indexing the value foo. For strings, an array of int with the ascii values of the - characters in the string is returned. For a list, an array filled with + characters in the string is returned. For a multiset, an array filled with ones is return. For mappings, objects and arrays, the returned array may contain any kind of value. diff --git a/doc/builtin/zero_type b/doc/builtin/zero_type index 6edca1ab16a6b3137e99afb945ba8b66600fc11a..36c31442a26bc66ef7b7d7e5f84acb6696b195a2 100644 --- a/doc/builtin/zero_type +++ b/doc/builtin/zero_type @@ -14,7 +14,7 @@ DESCRIPTION no such call_out could be found. Otherwize zero_type will return zero. KEYWORDS - int + int, mapping SEE ALSO find_call_out diff --git a/doc/files/exec b/doc/files/exec deleted file mode 100644 index aaf7732144bbdfd920d58ded1231bac0683d7dc5..0000000000000000000000000000000000000000 --- a/doc/files/exec +++ /dev/null @@ -1,22 +0,0 @@ -NAME - exec - execute a program - -SYNTAX - int exec(string ... args); - -DESCRIPTION - This function transforms the uLPC process into a process running - the program specified in args. The args will be sent as argv[] to - the new program. This function only returns if something went wrong - during exec(), and in that case it returns zero. - -NOTA BENE - The uLPC driver _dies_ when this function is called. You must use - fork() if you wish to execute a program and still run the uLPC - driver. - -EXAMPLE - exec("ls","-l"); - -SEE ALSO - files/fork, file->pipe diff --git a/doc/files/file_stat b/doc/files/file_stat deleted file mode 100644 index c911ac13547c680147c849b175e57872bf78c4f8..0000000000000000000000000000000000000000 --- a/doc/files/file_stat +++ /dev/null @@ -1,33 +0,0 @@ -NAME - file_stat - stat a file - -SYNTAX - int *file_stat(string file); - or - int *file_stat(string file, 1); - or - int *file->stat(); - -DESCRIPTION - file_stat returns an array of integers describing some properties - about the file. Currently file_stat return 5 entries: - ({ - mode, /* file mode, protection bits etc. etc. */ - size, /* file size for regular files, - * -2 for dirs, - * -3 for links, - * -4 for otherwise - */ - atime, /* last access time */ - mtime, /* last modify time */ - ctime, /* last status time change */ - uid, /* The user who owns this file */ - gid /* The group this file belongs to */ - }) - If you give 1 as a second argument, stat does not follow links. - You can never get -3 as size if you don't give a second argument. - - If there is no such file or directory, zero is returned. - -SEE ALSO - files/get_dir diff --git a/doc/files/perror b/doc/files/perror deleted file mode 100644 index cb6816e251ce2ee67b6288d7fd3cafb025f9eace..0000000000000000000000000000000000000000 --- a/doc/files/perror +++ /dev/null @@ -1,11 +0,0 @@ -NAME - perror - print error - -SYNTAX - void perror(string s); - -DESCRIPTION - Print a message to stderr. Stderr is normally the console, even if - the process output has been redirected to a file or pipe. - - diff --git a/doc/index.bmml b/doc/index.bmml new file mode 100644 index 0000000000000000000000000000000000000000..65a802045058d06a26d7ba4b495075506d8e6e7c --- /dev/null +++ b/doc/index.bmml @@ -0,0 +1,75 @@ +$version manual + + This manual is far from complete, it still needs a lot of work to cover + all the aspects required of a good manual. However, I hope that it is + still useful in it's present state. + + Getting started + + For now this section is made up of example code with line by line + explanations. If there is a word you don't understand I suggest you + look it up in the index first time you encouter it because it might + be essential to understanding that piece of code. + + KEYWORD_LIST examples + + TAG control + + Control structures + + Control structures groups code into blocks and they control the order in + which statements are executed. Control structures in Pike are basically + the same as those in C, with a few exceptions. + + KEYWORD_LIST control + + TAG types + + Types + + Data is stored in different ways, integers (eg. 1, 2, 3, 4 etc.) are + are stored in one way, real numbers (1.0, 1.1, etc.) in another. Each + different way get its own name. Pike types are part of what makes Pike + a powerful language. They make it easy to handle data without worrying + about memory management and other programming obstacles. + + KEYWORD_LIST types + + TAG pike + + Pike and object orientation + + This section is about the more fundamental workings of Pike, such as + how Pike compiles code and object orientation. + + KEYWORD_LIST pike + + Builtin functions + + Pike has a wide range of builtin functions. Most of these are implemented + in C, but some are implemented in Pike using the add_constant function. + + LINK pike/efuns Here's a list of all built-in functions. + + TAG operators + + LINK operators/operators Operators + + Pike operators behave much like the onces in C, but have many many additional + features. Most of this added functionality is related to the new data types. + + Keyword index + + The rest of the written documentation is gathered here, without much + thought about order. Hopefully you should be able to use this section + anyway once you've looked at the sections above. + + TAG file + + KEYWORD_INDEX file + + KEYWORD_INDEX programs + + KEYWORD_INDEX other + + LINK pike/all Here's a list of all pages. diff --git a/doc/lpc/control_structures b/doc/lpc/control_structures deleted file mode 100755 index ff95a39ba1ba1bd0c582abfa40b9999cfebf0d15..0000000000000000000000000000000000000000 --- a/doc/lpc/control_structures +++ /dev/null @@ -1,184 +0,0 @@ -Control statements in uLPC: - - In all the following examples <statement> is either a single expression - or function call or it's a block of statements enclosed in { } - - An expression is considered false in lpc _only_ if it es equal to the - number zero, in all other caseses it is consider true. - -::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - -STATEMENT - if - else - run on condition - -SYNOPSIS - if( expression ) <statement> - or - if( expression ) <statement> else <statement> - -DESCRIPTION - If is the simplest of all control structures, in the first form - it runs the statement if the expression is true and in the second - form it runs the first statement if the expression is true and the - second if it is false. - - -::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - -STATEMENT - for - general loop statement - -SYNOPSIS - for ( expression1 ; expression2 ; expression3 ) <statement> - -DESCRIPTION - the above statement is exactly equal to: - - expression1; - while( expression2 ) - { - <statement> - expression3; - } - -EXAMPLE - int e; - for(e=0;e<10;e++) write(e+"\n"); - -SEE ALSO - while - -::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - -STATEMENT - foreach - loop over an array - -SYNOPSIS - foreach ( array, variable ) statement - -DESCRIPTION - For each element in array, set variable to that value and execute - 'statement'. - -EXAMPLE - string word; - foreach( explode(sentence," "), word) foo(word); - -::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - -STATEMENT - while - execute a statement while an expression is true - -SYNOPSIS - while( expression ) <statement> - -DESCRIPTION - While runns the statement until the expression is false. The - expression is evaluated once for every loop. If the expression is - false the first time the statement is never executed. - -SEE ALSO - for, do - while - -::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - -STATEMENT - do - while - execute a statement while an expression true - -SYNOPSIS - do <statement> while ( expression ); - -DESCRIPTION - do - while only differs from the ordinary while-loop in that it does - _not_ evaluate the expression until after the statement has been - executed once. Thus it always runs the statement once. - -SEE ALSO - do - while - -::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - -STATEMENT - switch - case - Complicated conditional statement - -SYNOPSIS - switch( expression ) - { - case constant1: - <statement1> - - case constant2: - <statement2> - break; - - case constant3..constant4: - <statement4> - berak; - - default: - <statement3> - } - -DESCRIPTION - Switch evaluates the expression give and then executes one or more - statement accordingly to the result. If the result is equal to - constant1 then statement1 will be executed, please observe that - the second case-statement dos _not_ abort the execution in any way - instead statement2 will also be executed. After that break will - cause execution to continue after the after the last } in the - switch statement. If the result is equal to constant2 only - statement2 will be executed. If expression <= consant3 and - expression >= constant4, statement4 will be executed. In all other - cases statement3 is executed because it is 'default'. Please note - that the expression and constants can be any type that can be - written as a constant. Arrays, mappings and lists have little or - no use though. - -::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - -STATEMENT - break - break a loop or switch - -SYNOPSIS - break; - -DESCRIPTION - Break jumps directly out of any loop or switch statement, it is - a very vital part of every switch statement. - -SEE ALSO - do - while, while, for, switch - -::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - -STATEMENT - continue - continue a loop - -SYNOPSIS - continue; - -DESCRIPTION - Continue work similarly to break only it does't finish the loop, - it just aborts the rest of this turn in the loop. - -BUGS - Don't use it in conjunction with the switch-statement. - -SEE ALSO - do - while, while, for - -::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - -STATEMENT - return - return from a function - -SYNOPSIS - return; - or - return expression; - -DESCRIPTION - Return jumps directly out of a function returning the given value to - the calling function. If no expression is given, 0 is returned. - -::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: diff --git a/doc/lpc/hilfe.hilfe b/doc/lpc/hilfe.hilfe deleted file mode 100755 index d6004024760ab9e06193ce4aa0bb90b16ed55adb..0000000000000000000000000000000000000000 --- a/doc/lpc/hilfe.hilfe +++ /dev/null @@ -1,55 +0,0 @@ -NAME - Hilfe - Hubbe's Incremental LPC FrontEnd - -SYNTAX - $ hilfe - or - $ ulpc -Cstay hilfe - -DESCRIPTION - Hilfe is a LPC-script that supplies an incremental environment for - LPC. It allowes you to evaluate LPC 'on the fly'. If you're running - UNIX, you only have to write 'hilfe' to start it, otherwise you will - have to write 'driver -Cstay hilfe' to run it. If you don't know what - 'incremeantal' means in this context, ask you local LISP junkie. - - Hilfe has the following commands: - - quit - exit hilfe - new - clear all variables and function definition - dump - dump all current variables - . - clear input buffer - - Hilfe parses a subset of LPC, there many things it doesn't handle. Here - is a list of what you can do: - - Define a function: - <type> <name>( <arguments> ) { <statements > } - Note that hilfe simulates a function defenition by defining a variable - and setting it to the function pointer. Therefor actual typechecking is - almost nil. Also note that hilfe doesn't recognize type modifiers such - as static, private, varargs etc. - - Declare one or many global variables: - <type> <name> [=<value>], <name> [=value>] ..... ; - Hilfe simulates variable handling, and typechecking is almost nil, - therefor all global variables are declared as mixed, whatever the - <type> may be. - - Evaluate a statement: - <statement> ; - Statements include the following examples: - for(e=0;e<10;e++) ; - - e=10; - - write(e); - - if(foo) return bar; else return gazonk; - - Statements beginning with for, while, switch, if, do or return will - not automatically return anything, and no result will be printed. - - -SEE ALSO - script_mode diff --git a/doc/lpc/reserved b/doc/lpc/reserved deleted file mode 100644 index bb53824df56e0b39f4614df0a75333f25dbec724..0000000000000000000000000000000000000000 --- a/doc/lpc/reserved +++ /dev/null @@ -1,5 +0,0 @@ -RESERVED WORDS - array break case catch continue default do efun else float for foreach - function gauge if inherit inline int lambda list mapping mixed nomask - object private program protected public return sscanf static string - switch varargs void while diff --git a/doc/manual/example1 b/doc/manual/example1 new file mode 100644 index 0000000000000000000000000000000000000000..93f79c3a5ab63b6bfd2b372e44ad6cde050bbda6 --- /dev/null +++ b/doc/manual/example1 @@ -0,0 +1,141 @@ +1. Let's write a small Pike program: + + int main() + { + write("hello world\n"); + return 0; + } + + Let's call this file hello_world.pike, and then we try to run it: + + $ pike hello_world.pike + hello world + $ + +1.1 Pretty simple, Let's see what everything means: + + int main() + + This begins the function main. Before the function name the type of value + it returns is declared, in this case 'int'. The empty space between the + parethesis indicates that this function takes no arguments. The function + main is special in the sense that it is the first function called when + your program starts. Everything your program does should start in main. + + { + write("hello world\n"); + return 0; + } + + This is the body of the function. The brackets group together a series of + statements into a block which will be executed when this function is called. + The statements aer separated by semi-colons. + + write("hello world\n"); + + The first statement is a call to the builtin function write. This will + execute the code in the function write with the arguments as input data. + In this case, the constant string "hello world\n" is sent. write() then of + course writes this string to stdout when executed. + + return 0; + + This statement aborts the function and returns the value zero. Any statements + following the return statements (not that there are any in this example) + will not be executed. + +1.2 Improving hello_world.pike + Typing 'pike hello_world.pike' to run our program may seem a bit unpractical, + fortunately, UNIX provides us with a way of automating this somewhat. + If we modify hello_world.pike to look like this: + + #!/usr/local/bin/pike + + int main() + { + write("hello world\n"); + } + + And then we tell UNIX that hello_world.pike is executable: + + $ chmod +x hello_world.pike + + Now we can run hello_world.pike without having to bother with running pike: + + $ ./hello_wold.pike + hello world + $ + + NB. The hash bang (#!) must be absolutely first in the file, no empty + lines or whitespaces can precede it for this to work. The file after + the hash bang must also be the complete filename to the pike binary, + and it may not exceed 30 characters. + +1.3 A better hello_world.pike + Now, wouldn't it be nice if it said "Hello world!" instead of "hello world" ? + But of course we don't want to make our program incompatible with the old + version. Someone might NEED the program to work the same as before. + Therefore we'll add a command line option that will make it type the old + "hello world". This is what it could look like: + + #!/usr/local/bin/pike + + int main(int argc, string *argv) + { + if(argc > 1 && argv[1]=="--traditional") + { + write("hello world\n"); // old stype + }else{ + write("Hello world!\n"); // new style + } + return 0; + } + + Let's run it: + + $ chmod +x hello_world.pike + $ ./hello_world.pike + Hello world! + $ ./hello_world.pike --traditional + hello world + $ + + What's been added? + + int main(int argc, string *argv) + + Here the space between the parentesis has been filled. What it means + is that main now takes two arguments. One is called argc, and is of the + type 'int'. The other is called 'argv' and is a 'string *'. The star + means that the argument is an array, in this case an array of strings. + + The arguments to main are taken from the command line when the Pike program + is executed. The first argument, argc, is how many words were written on + the command line (including the command itself) and argv is an array formed + by these words. + + if(argc > 1 && argv[1] == "--traditional") + { + write("hello world\n"); // old stype + }else{ + write("Hello world!\n"); // new style + } + + This is an if-else statement, it will execute what's between the first set + of brackets if the expression between the parenthesis evaluate to something + other than zero. Otherwise what's between the second set of brackets will + be executed. Let's look at that expression: + + argc > 1 && argv[1] == "--traditional" + + Loosely translated, this means: argc is greater than one and the second + element in the array argv is equal to the string "--traditional". + + Also note the comments: + + write("hello world\n"); // old stype + + The // begins a comment which continues to the end of the line. + Comments lets you type in text in the program which will be ignored by the + computer. This is to inform whoever might read your code (like yourself) of + what the program does to make it easier to understand. diff --git a/doc/manual/example2 b/doc/manual/example2 new file mode 100644 index 0000000000000000000000000000000000000000..322d32ff877dd1873ee9a53deb647eb59a5498d8 --- /dev/null +++ b/doc/manual/example2 @@ -0,0 +1,152 @@ +2. Now we will look at a slightly more useful example: + + #!/usr/local/bin/pike + + #include <simulate.h> + + int main(int argc,string *argv) + { + int i; + string file_contents; + + if(argc<4) + { + perror("Usage: rsif <from> <to> <files>\n"); + return 1; + } + + for(i=3; i<argc; i++) + { + if(file_contents=read_bytes(argv[i])) + { + if(-1!=strstr(file_contents,argv[1])) + { + write("Processing "+argv[i]+".\n"); + file_contents=replace(file_contents,argv[1],argv[2]); + + if( mv(argv[i],argv[i]+"~") ) + { + write_file(argv[i],file_contents); + }else{ + write("Failed to create backup file.\n"); + } + } + } + } + + return 0; + } + + This program is called 'rsif' and comes with the Pike distribution. + What it does is that it takes two strings and a bunch of files and + replaces every occurance of the first string with the second one in + each of these files. As you might have guessed 'rsif' is short for + Replace String In File. Line by line, this is how the program works: + + #!/usr/local/bin/pike + + Make UNIX run pike to interpret this program. Interpret in this case + means to read the program, convert it to an internal representation and + then run the instructions in this internal representation. Note that Pike + does not use the same low-level representation as for example C does, + instead it uses a simple and compact representation which are parsed by + a C program which actually implements the instructions in that + representation. + + #include <simulate.h> + + This includes a lot of useful functions such as read_bytes. + + int main(int argc,string *argv) + { + + Start the function main, it will return an int, and take the command line + arguments into the parameters argc and argv. + + int i; + string file_contents; + + Declare two temporary variables to use later. The first one 'i' is an + integer, and the second one 'file_contents' is a string. + + if(argc<4) + { + perror("Usage: rsif <from> <to> <files>\n"); + return 1; + } + + If argc is lesser than four it means that the program received less than + three arguments. Since rsif needs at least three arguments we write how + to use rsif to stderr (Standard error channel) using the function perror + and then exit this function with the return value 1. Nothing after the + return will be executed if argc is lesser than 4. + + + for(i=3; i<argc; i++) + { + + This statement starts a loop. (Loop means code repetition) It will first + set i to three, then execute everything within the brackets for as long as + i is lesser than argc. After each time the block between the brackets the + final statement, i++, will be executed. ++ is the increment operator, it + will increase i by one. + + if(file_contents=read_bytes(argv[i])) + { + + Look closely, the experssion in this if-statement is not a comparison, it + is in fact an assignment. Thus file will be assigned the value returned by + read_bytes. When an assignment is used as an expression it has the same + value as the left hand side of the assignment. (in this case the return + value from read_bytes) So what this does is: it reads the contents of the + file with the filename taken from argv[i] and assigns the contents to the + variable file. If there is no file with that name, zero will be returned + and then the block within the brackets will not be executed. + + if(-1!=strstr(file_contents,argv[1])) + { + + The function strstr searches for a string in in a string and returns the + first position where it is found and -1 if not. This if statement simply + checks if argv[1] (the 'from' string) is present in the file. If it is + not we won't need to do anything more about this file. The != operator + means 'not equal to'. + + write("Processing "+argv[i]+".\n"); + + Write that we are processing this file to stdout. Stdout means + "Standard output channel" and is normally your screen unless you 'redirect' + it to somewhere else. + + file_contents=replace(file_contents,argv[1],argv[2]); + + Call the builtin function replace and replace all occurances of the 'from' + string with the 'to' string and assign the new result to the variable + 'file_contents'. + + if( mv(argv[i],argv[i]+"~") ) + { + Try moving the file argv[i] to a backup file by adding a tilde to the end + of the name. Then choose action depending on weather it worked or not. + + write_file(argv[i],file_contents); + + If it worked we re-create the file argv[i] by writing the string + 'file_contents' to it. + + }else{ + write("Failed to create backup file.\n"); + + If the mv didn't work we write a message stating so to stdout. + + } + } + } + } + + return 0; + } + + + Then we end all the blocks and return zero. A return value of zero from main + indicates success, 1 or more means failiure. diff --git a/doc/manual/example3 b/doc/manual/example3 new file mode 100644 index 0000000000000000000000000000000000000000..dc999bcb74ff524a0a31687a8973a27b842e5038 --- /dev/null +++ b/doc/manual/example3 @@ -0,0 +1,312 @@ +3. This example is a very simple www-server. + + For you who are not familiar with WWW (World Wide Web), it works by using + client program which will fetch files from remote servers when asked. + Usually by clicking a pitcure or text. This example is a program for the + server which will send files to any computer that requests them. The + protocol used to send the file is called HTTP. (HyperText Transfer Protocol) + + Usually WWW involves HTML. HTML (HyperText Markup Language) is a way to + write documents with embedded pictures and links to other pages. These + links are normally displayed underlined and if you click them your WWW- + browser will load whatever document that link leads to. + + #!/usr/local/bin/pike + + /* A very small httpd capable of fetching files only. + * Written by Fredrik H�binette as a demonstration of Pike. + */ + + A comment, /* begins the comment, and */ ends it. + + inherit "/precompiled/port"; + + Inherit copies all the functionality of /precompiled/port into this program. + /precompiled/port makes it possible to bind a TCP (Transmission Control + Protocol, the internet stanard for computer communication) socket to accept + incoming connections. A socket is simply a number to separate communications + to and from different programs on the same computer. + + Next are some constants that will affect how uHTTPD will operate. This uses + the preprocessor directive #define. The preprocessor is the first stage in + the compiling process and can make textual processing of the code before + it is compiled. As an example, after the first define below, all occurances + of 'BLOCK' will be replaced with 16060. + + /* Amount of data moved in one operation */ + #define BLOCK 16060 + + /* Where do we have the html files ? */ + #define BASE "/home/hubbe/pike/src/" + + /* File to return when we can't find the file requested */ + #define NOFILE "/home/hubbe/www/html/nofile.html" + + /* Port to open */ + #define PORT 1905 + + A port is a destination for a TCP connection. It is simply a number on the + local computer. 1905 is not the standard port for HTTP connections though, + which means that if you want to access this WWW server from a browser you + need to specify the port like this: http://my.host.my.domain:1905/ + + Next we declare a global variable of the type program called output_class, + and then we use the class construct to assign a program to it. class {} + defines a clonable program. (or class for you C++ freaks) + + program output_class=class + { + inherit "/precompiled/file" : socket; + inherit "/precompiled/file" : file; + + Our new class inherits /precompile/file twice. To be able to separate them + they are then named 'socket' and 'file'. + + int offset=0; + + Then there is a global variable called offset which is initalized to zero. + (each instance of this class will have it's own instance of this variable, + so it is not truly global, but..) + Note that the initalization is done when the class is cloned. (or + instanciated if you prefer C++ terminology) + + + Next we define the function write_callback(). Later the program will go + into a 'waiting' state, until something is received to process, or until + there is buffer space available to write output to. When that happens a + callback will be called to do this. The write_callback() is called when + there is buffer space available. In the following lines 'void' means that + it does not return a value. Write callback will be used further down as a + callback and will be called whenever there is room in the socket output + buffer. + + void write_callback() + { + int written; + string data; + + The following line means: call seek in the inherited program 'file'. + + file::seek(offset); + + Move the file pointer to the where we want to the position we want to read + from. The file pointer is simply a location in the file, usually it is where + the last read() ended and the next will begin. seek() can move this pointer + to where we want it though. + + data=file::read(BLOCK); + + Read BLOCK (16060) bytes from the file. If there are less that that left to + read only that many bytes will be returned. + + if(strlen(data)) + { + + If we managed to read someting... + + written=socket::write(data); + + ... we try to write it to the socket. + + if(written >= 0) + { + offset+=written; + return; + } + + Update offset if we managed to write to the socket without errors. + + werror("Error: "+socket::errno()+".\n"); + } + + If something went wront during writing, or there was nothing left to read + we destruct this instance of this class. + + destruct(this_object()); + } + + That was the end of write_callback() + + + Next we need a variable to buffer the input received in. We initialize it + to an empty string. + + string input=""; + + And then we define the function that will be called when there is something + in the socket input buffer. The first argument 'id' is declared as mixed, + which means that it can contain any type of value. The second argument is + the contents of the input buffer. + + void read_callback(mixed id,string data) + { + string cmd; + + input+=data; + + Append data to the string input. Then we check if we have received a + a complete line yet. If so we parse this and start ouputting the file. + + if(sscanf(input,"%s %s%*[\012\015 \t]",cmd,input)) + { + + This sscanf is pretty complicated, but in essense it means: put the + first word in 'input' in 'cmd' and the second in 'input' and return 2 + if successfull, 0 otherwise. + + if(cmd!="GET") + { + werror("Only method GET is supported.\n"); + destruct(this_object()); + return; + } + + If the first word isn't GET print an error message and terminate + this instance of the program. (and thus the connection) + + sscanf(input,"%*[/]%s",input); + + Remove the leading slash. + + input=combine_path(BASE,input); + + Combine the requested file with the base of the HTML tree, this gives + us a full filename beginning with a slash. The HTML tree is the + directory on the server in which the HTML files are located. Normally + all files in this directory can be accessed by anybody by using a WWW + browser. So if a user requests 'index.html' then that file name is first + added to BASE (/home/hubbe/www/html/ in this case) and if that file exists + it will be returned to the browser. + + if(!file::open(input,"r")) + { + + Try opening the file in read-only mode. If this fails, try opening NOFILE + instead. Opening the file will enable us to read it later. + + if(!file::open(NOFILE,"r")) + { + + If this fails too. Write an error message and destruct this object. + + werror("Couldn't find default file.\n"); + destruct(this_object()); + return; + } + } + + Ok, now we set up the socket so we can write the data back. + + socket::set_buffer(65536,"w"); + + Set the buffer size to 64 kilobytes. + + socket::set_nonblocking(0,write_callback,0); + + Make it so that write_callback is called when it is time to write more + data to the socket. + + write_callback(); + + Jump-start the writing. + } + } + + That was the end of read_callback(). + + + This function is called if the connection is closed while we are reading + from the socket. + void selfdestruct() { destruct(this_object()); } + + + This function is called when the program is instanciated. It is used + to set up data the way we want it. Extra arguments to clone() will be + sent to this function. In this case it is the object representing the + new connection. + + void create(object f) + { + socket::assign(f); + + We insert the data from the file f into 'socket'. + + socket::set_nonblocking(read_callback,0,selfdestruct); + + Then we set up the callback functions and sets the file nonblocking. + Nonblocking mode means that read() and write() will rather return that + wait for I/O to finish. Then we sit back and wait for read_callback to + be called. + + } + + End of create() + + }; + + End of the new class. + + + Next we define the function called when someone connects. + + void accept_callback() + { + object tmp_output; + + This creates a local variable of type 'object'. An object variable can + contain a clone of any program. Pike does not consider clones of different + programs different types. This also means that function calls to objects + have to be resolved at run time. + + tmp_output=accept(); + + The function accept clones a /precompiled/file and makes this equal to the + newly connected socket. + + if(!tmp_output) return; + + If it failed we just return. + + clone(output_class, tmp_output); + + Otherwise we clone an instanec of 'output_class' and let it take care of the + connection. Each clone of output_class will have it's own set of global + variables, which will enable many connections to be active at the same + time without data being mixed up. Note that the programs will not actually + run simulataneously though. + + destruct(tmp_output); + + Destruct the object returned by accept(), output_class has already copied + the contents of this object. + + } + + + Then there is main, the function that gets it all started. + + int main(int argc, string *argv) + { + werror("Starting minimal httpd\n"); + + Write an encouraging message to stderr. + + if(!bind(PORT, accept_callback)) + { + werror("Failed to open socket (already bound?)\n"); + return 17; + } + + + Bind PORT and set it up to call accept_callback as soon as someone connects + to it. If the bind() fails we write an error message and return the 17 to + indicate failiure. + + return - 17; /* Keep going */ + + If everything went ok, we return -17, any negative value returned by main() + means that the program WONT exit, it will hang around waiting for events + instead. (like someone connecting) + } + + End of uhttpd.pike diff --git a/doc/manual/i-overview.html b/doc/manual/i-overview.html deleted file mode 100644 index 006c42110fc7b5dd17798b44fe1d51b6186ff43c..0000000000000000000000000000000000000000 --- a/doc/manual/i-overview.html +++ /dev/null @@ -1,88 +0,0 @@ -<h1>Design overview</h1> - -In this document, we will describe how �LPC works and why it was made that -way. Examples in this chapgter will be in C because �LPC is written in C, -so some knowledge of C syntax and semantics is required. - -<p>As mentioned earlier, �LPC is interpreted. To be more precise the �LPC -interpreter compiles �LPC source into <b>byte-code</b>. <b>Byte-code</b> can -be compared to machine language, which the �LPC interpreter will later -execute. For instance, our simple "Hello world" program would roughly -compile to the following bytecode: - -<pre> - mark - push "Hello world\n" - write -</pre> - -<p>For now we don't have to know how these instructions are stored, -instead we will concentrate at what these instructions do. But first -we have to know about the two stacks that �LPC uses. One is a stack of -values each can hold an �LPC value of any type. You could say that it -is an mixed * to use �LPC terminology. This stack hold local -variables, function arguments and much more. This stack will be -refered to as the <b>value stack</b> so not to confuse it with the -<b>marker stack</b>. The marker stack can only hold pointers to -elements in the first stack and is used to remember the start of an -argument list. - -<p>What <b>mark</b> does is that it pushes the number of elements on the -value stack onto the marker stack. Then <b>push</b> will push the string -"Hello world\n" onto the value stack. Then <b>write</b> will take the top -value from the marker stack and the differance between this value and the -number of values on the value stack will tell <b>write</b> how many -arguments it has received. Write will then write the string to stdout and -remove all it's arguments from the stack. - -<p>All functions in �LPC receives their arguments on the stack like this, -builtin and user-defined. - -<h2>The value stack</h2> - -As mentioned the value stack is an array of elements that can hold any value. -Each of these elements is a 'struct svalue' which looks like this: - -<pre> - struct svalue - { - short type; - short subtype; - union anything; - }; -</pre> - -<p>The type is a number representing the type, defines like T_ARRAY -or T_STRING are made to specify which type has which number. The subtype -field is not used by most types and can be ignored for now. The 'union -anything' is a union that can contain a float, integer or a pointer to -a struct containing additional data. - -<p> ... (To be continued) - -<h2>The different types (draft)</h2> - -<dl> -<dt>Integers and Floats -<dd>Integers and Floats are stored directly in the union. -<dt>Strings -<dd>For string values, the union contains a pointer to a struct lpc_string, -this struct is a part of a shared string table. That means that all equal -strings actually point to the same struct. This makes string comparison very -fast, but creating new strings somewhat slow. -<dt>Arrays -<dd>In an array value, the union contains a pointer to a struct array, which -in it's turn contains a number of struct svalues. -<dt>Mappings -<dd>Mappings are structs which contains one pointer to an array of indices -and one pointer to an array of values. These two arrays are sorted so that -lookup can use a binary search algorithm for speed. -<dt>Lists -<dd>Lists works just like mappings, except there is no value array. -<dt>Objects -<dd>Objects are merely structs containing a pointer to the program for this -object and any global variables needed this object needs. -<dt>Programs -<dd>Programs are pointers to a 'struct program'. This struct contains the -<b>byte-code</b> and additional information needed by the interpreter. -</ul> \ No newline at end of file diff --git a/doc/manual/index.html b/doc/manual/index.html deleted file mode 100644 index 13d0a9c00e3263b528ecde1610aef806ab2e4646..0000000000000000000000000000000000000000 --- a/doc/manual/index.html +++ /dev/null @@ -1,75 +0,0 @@ -<h1>The �LPC Programming Language</h1> -<h2>by Lars Aronsson and Fredrik H�binette</h2> - -<h3>What is this?</h3> - -�LPC (Micro L.P.C., sometimes written ulpc or uLPC) is an interpreted, -object-oriented programming language for flexible and yet efficient -application development and prototyping. It features multiple -inheritance, data abstraction, advanced built-in datatypes, such as -associative arrays, dynamic arrays and multi-sets, and high-level -character string and array operations. - -<p>The following documents describe the language: - -<dl> -<dt>�LPC Tutorial -<dt>�LPC Language Reference Manual -<dt>The Design and Implementation of �LPC -</dl> - -<h3>�LPC Tutorial</h3> - -<blockquote><i>This is an introduction to programming in the �LPC -language. Some previous programming experience is -required.</i></blockquote> - -<dl> -<dt><a href="t-hello.html">Hello world</a> -<dt>Variables and Loops -<dt>Strings -<dt>Arrays -<dt>Using files -<dt>Objects and Inheritance -<dt>Spinner -<dt>Appendix A: Where and how to get �LPC -<dt>Appendix B: How to Install the �LPC Distribution -</dl> - -<h3>�LPC Language Reference Manual</h3> - -<blockquote><i>This document describes the details of the �LPC -programming language, in a somewhat semi-cryptic way.</i></blockquote> - -<dl> -<dt>Introduction -<dt>Lexical Conventions -<dt>Syntax Notation -<dt>Identifiers -<dt>Objects and Lvalues -<dt>Type conversion -<dt>Expressions -<dt>Declarations -<dt>Statements -<dt>External Declarations -<dt>Scope and Binding -<dt>Preprocessor -<dt>Grammar -<dt>Standard Library -</dl> - - -<h3>The Design and Implementation of �LPC</h3> - - -<blockquote><i>This document describes the inner workings of the �LPC -implementation, and some of the design decisions we have made. This -can be interesting if you are into computer science, if you have found -strange behavior, or if you want to add your own modules in C that -become part of the �LPC language.</i></blockquote> - -<dl> -<dt>Overview -<dt>Adding Modules to �LPC -<dt>Some Design Decisions -</dl> diff --git a/doc/manual/t-hello.html b/doc/manual/t-hello.html deleted file mode 100644 index 93075cfdaa658cde9154e13d7e34a0e4d8b131c1..0000000000000000000000000000000000000000 --- a/doc/manual/t-hello.html +++ /dev/null @@ -1,66 +0,0 @@ -<h1>Hello world!</h1> - -In this chapter, you will learn to write a complete program in the -�LPC language. All this program does is to print "Hello world!" on -your screen. You can then make additions and changes to the program, -as you learn to handle more features of the language in the following -chapters. - -<p>This is typical for how you develop programs in �LPC: step by step, -making them more advanced, adding functionality, as you go. Since -�LPC is an interpreted language, you don't get lagged by frequent -recompilations. You just change the program, and it is ready to run. - -<p>Enough said! Let's take a look at the program now: - -<pre> - #!/usr/local/bin/ulpc - - int main(int argc, string *argv) - { - write ("Hello world!\n"); - return 0; - } -</pre> - -<p>That's all there is! Use your favorite text editor and save the -results in a file called <b>hello.lpc</b>. - -<p>We are not quite ready to run yet. First, you must use the -<b>chmod</b> command to make your program executable. You only have -to do this once for each program. Here, the dollar sign is your UNIX -prompt, which could also be any odd character (such as % or #). - -<pre> - $ chmod +x hello.lpc - $ hello.lpc - Hello world! - $ -</pre> - -<p>Obviously, our program is a success! Let's try and understand why. - -<p>The first line of <b>hello.lpc</b> starts with the two characters -<b>#!</b> (hash bang) followed by a file name. This is a UNIX trick to -make script programs executable. Normally, scripts are written in -shell commands, awk or perl. All script programs need an interpreter -to read the script commands and execute them. The "hash bang" tells -UNIX that the this is a script file and that the file name of an -interpreter follows. For example, shell scripts use a UNIX shell -/bin/sh as their interpreter, so their first line should be #!/bin/sh. - -<dl> -<dt>NOTE: - -<dd>For this to work properly, the "hash bang" (#!) must be the first -two characters of the file. There must not be any white space before -or empty line above them! - -</dl> - -<p>For �LPC programs, the interpreter is the <b>ulpc</b> program, -which we shall assume is installed in <b>/usr/local/bin</b> -directory. Turn to appendices A and B if this program is not -properly installed on your computer. - -<p>The next few lines of the program ... (to be continued) diff --git a/doc/manual/tutorial b/doc/manual/tutorial new file mode 100644 index 0000000000000000000000000000000000000000..11e863c818e1770b33a666a47b393e2e2433b931 --- /dev/null +++ b/doc/manual/tutorial @@ -0,0 +1,149 @@ +Contents + +BEGIN(What is Pike) +{ + BEGIN(Introduction) + { + Pike (Micro L.P.C., sometimes written pike or Pike) is an interpreted, + object-oriented programming language for flexible and yet efficient + application development and prototyping. It features multiple + inheritance, data abstraction, advanced built-in datatypes, such as + associative arrays, dynamic arrays and multi-sets, and high-level + character string and array operations. + } + + BEGIN(Pike vs. C and C++) + { + Pike syntax is very similar to C. Some things has also been borrowed + from C++. The certainly biggest differance is that Pike is interpreted. + This gives Pike some advantages, but also some disadvantages compared + to C: + + LIST(Advantages:) + { + No compilation times + Powerful data types + } + } + + BEGIN(Data types) + BEGIN(Object orientation) +} + +BEGIN(Getting started) +{ + BEGIN(A short example) + { + Pike + { + #!/usr/local/bin/pike + + int main() + { + write("hello world\n"); + } + } + + + Assume this file is called 'hello_world.pike', then this might be seen + at your unix prompt: + + PRE + { + $ ./hello_world.pike + hello world + $ + } + } + + BEGIN(Line by line) + { + The first line is a unix-trick which causes /usr/local/bin/pike to run + the hello world program for you when you type it's name at the unix + prompt. + + + } + + BEGIN(variables) + BEGIN(loops) +} + +BEGIN(Program structure) +{ + BEGIN(functions) + BEGIN(Loops) + { + BEGIN(while) + BEGIN(for) + BEGIN(do-while) + BEGIN(foreach) + } + BEGIN(Skips and Jumps) + { + BEGIN(if) + BEGIN(switch) + BEGIN(continue) + BEGIN(break) + } +} + +BEGIN(objects and programs) +{ + BEGIN(variable spaces) + + BEGIN(inheritance) + { + BEGIN(multiple inheritance) + } +} + + +BEGIN(data types) +{ + BEGIN(int) + { + Ints, or <integers> are simple whole numbers 0, 1, 2 ... They are fast + and used for all arethmics where fractions of numbers aren't needed. + } + BEGIN(float) + { + Floats can be used to represent any number, not just whole numbers. + Floats are slower than integers and can not be used where a whole + number is expected. (When indexing an array for instance.) Floats + are commonly used for mathematical calulations such as averages and + trigonometrics. + } + BEGIN(string) + { + Strings hold text, or more precicely; sequences of 8-bit characters. + Strings can be manipulated in many ways, the simples of which is + <indexing>; picking out the ascii value of one of the characters in + the string. + } + BEGIN(array) + { + Arrays simply hold values. + } + BEGIN(mapping) + { + Mappings, or associative arrays, work similar to arrays, but can be + indexed on any type of value, not just integers. + } + BEGIN(multiset) + { + A multiset is essentially what mathematicians call a 'set'. It is a bunch + of values without any particular order. Arrays could replace multisets + in all respects but one: multisets are much faster. + } + BEGIN(object) + { + Objects hold data. + } + BEGIN(program) + { + Programs are the templates for objects. + } +} + + diff --git a/doc/manual/ulpc-inside3.gif b/doc/manual/ulpc-inside3.gif deleted file mode 100644 index 393280fb4cc558a7bc7d72cb080e6aaffd09cbe4..0000000000000000000000000000000000000000 Binary files a/doc/manual/ulpc-inside3.gif and /dev/null differ diff --git a/doc/operators/addition b/doc/operators/addition deleted file mode 100644 index 984838a5221c6a5e2084b3051d88bb44180a06cd..0000000000000000000000000000000000000000 --- a/doc/operators/addition +++ /dev/null @@ -1,24 +0,0 @@ -NAME - addition - add things together - -SYNTAX - a + b - or - mixed sum(mixed ...) - -DESCRIPTION - For ints and floats this operator simply adds the two operators - together. For strings and arrays, concatenation is done. For lists - and mapping this creates a new list with all indices and data as - in a and b. Note that this can cause a list or mapping to contain - several equal indices. Also, when adding a string to an int or float - the number is converted to a printable string first. - -EXAMPLES - "a"+10 returns "a10" - 10+20 returns 30 - ({1})+({2}) returns ({1,2}) - (<1>)+(<1>) returns (<1,1>) - -SEE ALSO - subtraction, efun/sum, multiplication diff --git a/doc/operators/and b/doc/operators/and new file mode 100644 index 0000000000000000000000000000000000000000..6ec0f9676f74782530d86ca6c587b02ff5bb099c --- /dev/null +++ b/doc/operators/and @@ -0,0 +1,24 @@ +NAME + `& - intersection + +SYNTAX + a & b + or + mixed `&(mixed ... args) + +DESCRIPTION + This operator does logical intersections. For ints this means + bitwise and. + + Arrays and multisets are treated as sets, so intersecting two arrays + will result in an array with containing all values present in all + arguments. + + For mappings, the intersection will be done on the indexes solely, + however, the values will be taken from the rightmost mapping. + +KEYWORDS + operators + +SEE ALSO + `|, `^, && diff --git a/doc/operators/complement b/doc/operators/complement new file mode 100644 index 0000000000000000000000000000000000000000..d3d04130464495000dbedb6b56888c979358b174 --- /dev/null +++ b/doc/operators/complement @@ -0,0 +1,17 @@ +NAME + `~ - bitwise complement + +SYNTAX + ~ a + or + int `~(int a) + +DESCRIPTION + This operator inverses all bits in an integer and returns the + new integer. + +KEYWORDS + operators + +SEE ALSO + `&, `|, `^ \ No newline at end of file diff --git a/doc/operators/divide b/doc/operators/divide new file mode 100644 index 0000000000000000000000000000000000000000..b4e22ae6b3acebf55ef2b518481ce8002e4a67c1 --- /dev/null +++ b/doc/operators/divide @@ -0,0 +1,31 @@ +NAME + `/ - division + +SYNTAX + a / b + or + int `/(int a, int b) + or + float `/(int|float a,int|float b) + or + string* `/(string a,string b) + +DESCRIPTION + For ints and floats, this operator simply divide its arguments. + If the arguments are strings, the first string will be divided + at every occurance of the second string. The resulting pieces + are then returned in the form of an array. + +EXAMPLES + 2/2 returns 1 + 3/2 returns 1 + 2.0/2.0 returns 1.0 + 2.0/2 returns 1.0 + "foo"/"o" returns ({"f","",""}) + `/(2,2) returns 1 + +KEYWORDS + operators + +SEE ALSO + `*, `% diff --git a/doc/operators/index b/doc/operators/index new file mode 100644 index 0000000000000000000000000000000000000000..3e1a2479a2fde84cee484415ef0d078ace79fb14 --- /dev/null +++ b/doc/operators/index @@ -0,0 +1,53 @@ +NAME + index - get/set an element in an array/string/mapping/object + +SYNTAX + a [ b ] + or + a [ b ] = c + or + a -> b + +DESCRIPTION + This operator does a lookup in 'a' to find the element named 'b' in + 'a'. The last syntax (a->b) is equal to a [ "b" ]. Different usage + applies to different types. + + Strings With strings, the index operator can only be used to get values + not change them. The index must be an integer, and the return + value will be the ascii value of the corresponding character + in the string. The first character is numbered 0. + Arrays As with strings, arrays can only be indexed on integers. + However, values can also be changed by using indexing on the + left side of an assignment. The values in the array can have + any type. As with strings, the first index is 0. + Mappings Mappings can be indexed on any type of value, quite + often they are indexed on strings. Values can be changed + as with arrays. Mappings do not have a fixed size, nor do they + have a specific order in which the values are stored. If you + attempt to set a value in a mapping that does not already + exists, the mapping will grow to include the new value. + There is no 'first' index for mappings. + Multisets Multisets can be also be indexed on any value, but the return + value only reflects a true/false status depending on weather + that index was present in the multiset. As with mappings, multisets + will grow when you try to set a value in it that is does not + already exists. However multisets will only grow if the inserted + 'c' is nonzero. + Object Objects can only be indexed on strings. It then gets/sets the + value of the variable with that name. If the 'variable' isn't + a variable at all, but a function it will return a pointer to + that function but you can't change it. + +EXAMPLES + "foobar"[2] returns 111 /* ascii for 'o' */ + "foobar"[0] returns 102 /* ascii for 'f' */ + ({1,2,3})[1] returns 2 + ([1:2})[1] returns 2 + (<1,2,3>)[2] returns 1 + +KEYWORDS + operators + +SEE ALSO + index diff --git a/doc/operators/is_equal b/doc/operators/is_equal new file mode 100644 index 0000000000000000000000000000000000000000..27e2062c3e6889fba869cb2baa1f098c2447dd43 --- /dev/null +++ b/doc/operators/is_equal @@ -0,0 +1,19 @@ +NAME + `== - compare values + +SYNTAX + a == b + or + int `==(mixed a, mixed b) + +DESCRIPTION + This operator compares two values and returns 1 if they are the same, + 0 otherwise. Note that pointer equivialenec is required for arrays, + objects, programs, mappings and multisets. (Thus it is not enough that + two arrays LOOK alike, it must be the same array.) + +KEYWORDS + operators + +SEE ALSO + `!=, `<, `>, `<=, `>=, efuns/equal diff --git a/doc/operators/is_greater_or_equal b/doc/operators/is_greater_or_equal new file mode 100644 index 0000000000000000000000000000000000000000..ad0f6ab81d9ffcb122a2263db3857fd9cd9e09b2 --- /dev/null +++ b/doc/operators/is_greater_or_equal @@ -0,0 +1,17 @@ +NAME + `>= - is greater than or equal to? + +SYNTAX + a >= b + or + int `>=(int|float|string a,int|float|string b) + +DESCRIPTION + This operator compares two values and returns 1 if the first one + is greater than or equal to the second one. + +KEYWORDS + operators + +SEE ALSO + `!=, `==, `>, `<, `<= diff --git a/doc/operators/is_greater_than b/doc/operators/is_greater_than new file mode 100644 index 0000000000000000000000000000000000000000..3dc0726f9d35936a3b3d0667caf9e061ed1dea3f --- /dev/null +++ b/doc/operators/is_greater_than @@ -0,0 +1,17 @@ +NAME + `> - is lesser than? + +SYNTAX + a > b + or + int `>(int|float|string a,int|float|string b) + +DESCRIPTION + This operator compares two values and returns 1 if the first one + is greater than the second one. + +KEYWORDS + operators + +SEE ALSO + `!=, `==, `<, `<=, `>= diff --git a/doc/operators/is_lesser_or_equal b/doc/operators/is_lesser_or_equal new file mode 100644 index 0000000000000000000000000000000000000000..a15902e21fbd9ea89a56705797d30b281519168e --- /dev/null +++ b/doc/operators/is_lesser_or_equal @@ -0,0 +1,17 @@ +NAME + `<= - is lesser or equal than? + +SYNTAX + a <= b + or + int `<=(int|float|string a,int|float|string b) + +DESCRIPTION + This operator compares two values and returns 1 if the first one + is lesser than or equal to the second one. + +KEYWORDS + operators + +SEE ALSO + `!=, `==, `>, `<, `>= diff --git a/doc/operators/is_lesser_than b/doc/operators/is_lesser_than new file mode 100644 index 0000000000000000000000000000000000000000..0c40c489442fd6ff09ed7b932de83032454d8ea7 --- /dev/null +++ b/doc/operators/is_lesser_than @@ -0,0 +1,17 @@ +NAME + `< - is lesser than? + +SYNTAX + a < b + or + int `<(int|float|string a,int|float|string b) + +DESCRIPTION + This operator compares two values and returns 1 if the first one + is lesser than the second one. + +KEYWORDS + operators + +SEE ALSO + `!=, `==, `>, `<=, `>= diff --git a/doc/operators/logical_and b/doc/operators/logical_and new file mode 100644 index 0000000000000000000000000000000000000000..fcd4f4d037b03bea0dfb5cea0b8a0b199c735ae2 --- /dev/null +++ b/doc/operators/logical_and @@ -0,0 +1,17 @@ +NAME + && - logical and + +SYNTAX + a && b + + +DESCRIPTION + This operator does logical 'and' between expressions. It first + evaluates a and returns zero if a is zero. Otherwise it returns + b. Note that b is not evaluated at all if a returns zero. + +KEYWORDS + operators + +SEE ALSO + `&, || diff --git a/doc/operators/logical_or b/doc/operators/logical_or new file mode 100644 index 0000000000000000000000000000000000000000..b7ade5bb1c35cea01206a54c12de314a8576de30 --- /dev/null +++ b/doc/operators/logical_or @@ -0,0 +1,17 @@ +NAME + || - logical or + +SYNTAX + a || b + + +DESCRIPTION + This operator does logical 'or' between expressions. It first + evaluates a and returns that if a is non-zero. Otherwise it + returns b. Note that b is not evaluated at all if a is non-zero. + +KEYWORDS + operators + +SEE ALSO + `|, && diff --git a/doc/operators/minus b/doc/operators/minus new file mode 100644 index 0000000000000000000000000000000000000000..4e0463575c29ebf2d6107df90ade5987036af1f7 --- /dev/null +++ b/doc/operators/minus @@ -0,0 +1,36 @@ +NAME + `- - subtract/negate + +SYNTAX + - a + or + `-(mixed a); + or + a - b + or + mixed `-(mixed a, mixed b) + +DESCRIPTION + This is the negation and subtraction operator, for ints and floats + the operation should be obvious. + + For arrays, an array containing all elements present in a and not in + b is returne. The order of the remaining values from a will be kept. + + For multisets, the same operation is done as for arrays, except order is + of course not considered. + + For mappings, a mapping is returned with every key-index pair from + a whos index is not present as an index in b. + +EXAMPLES + 5-10 returns -5 + 10-2.0 returns 8.0 + ({1,2})-({2}) returns ({1}) + ([1:2,2:1])-([1:0]) returns ([2:1]) + +KEYWORDS + operators + +SEE ALSO + `+ diff --git a/doc/operators/modulo b/doc/operators/modulo new file mode 100644 index 0000000000000000000000000000000000000000..b9d4eec9c73c06ba702b5cc5b11d72a752a2fdb8 --- /dev/null +++ b/doc/operators/modulo @@ -0,0 +1,26 @@ +NAME + `% - modulo + +SYNTAX + a % b + or + int `%(int a, int b) + or + float `%(int|float a,int|float b) + +DESCRIPTION + This operator computes the rest of a division. For integers, this + is the same as same as computing a-(a/b)*a. For floats, modulo is + interpreted as a-floor(a/b)*a + + +EXAMPLES + 9%3 returns 0 + 10%3 returns 1 + 2%0.3 returns 0.2 + +KEYWORDS + operators + +SEE ALSO + `/, `* diff --git a/doc/operators/mult b/doc/operators/mult new file mode 100644 index 0000000000000000000000000000000000000000..8a5c81631c0ec77cf06451673c53c5d43bba1172 --- /dev/null +++ b/doc/operators/mult @@ -0,0 +1,30 @@ +NAME + `* - multiplication + +SYNTAX + a * b + or + int `*(int ... args) + or + float `*(int|float ... args) + or + string `*(string *strings, string delimeter) + +DESCRIPTION + For ints and floats, this operator simply multiplies its arguments. + If the first argument is an array, and the second a string, all + strings in the arrays will be concatenated, with the delimiter in + between each string and the result will be returned. + +EXAMPLES + 2*2 returns 4 + 2.0*2.0 returns 4.0 + 2.0*2 returns 4.0 + ({"f","",""})*"o") Returns "foo" + `*(2,2,2) returns 8 + +KEYWORDS + operators + +SEE ALSO + `/ diff --git a/doc/operators/not b/doc/operators/not new file mode 100644 index 0000000000000000000000000000000000000000..9f51725779b7fe5812876695df16949ee29a1ba9 --- /dev/null +++ b/doc/operators/not @@ -0,0 +1,13 @@ +NAME + `! - is not true + +SYNTAX + ! a + or + int `!(mixed a) + +DESCRIPTION + Returns 1 if a is zero, 0 otherwise. + +KEYWORDS + operators diff --git a/doc/operators/not_equal b/doc/operators/not_equal new file mode 100644 index 0000000000000000000000000000000000000000..0422fba8237c961a33b2ba4dcefac425d9b4455b --- /dev/null +++ b/doc/operators/not_equal @@ -0,0 +1,19 @@ +NAME + `!= - check if not equal + +SYNTAX + a != b + or + int `!=(mixed a, mixed b) + +DESCRIPTION + This operator compares two values and returns 0 if they are the same, + 1 otherwise. Note that pointer equivialenec is required for arrays, + objects, programs, mappings and multisets. (Thus it is not enough that + two arrays LOOK alike, it must be the same array.) + +KEYWORDS + operators + +SEE ALSO + `==, `<, `>, `<=, `>=, efuns/equal diff --git a/doc/operators/operators b/doc/operators/operators new file mode 100644 index 0000000000000000000000000000000000000000..c96bbf1a85176a20c2fda19374def6836d8b1621 --- /dev/null +++ b/doc/operators/operators @@ -0,0 +1,105 @@ +NAME + operators - arethmics and other stuff + +DESCRIPTION + Pike has the following operators: + + a(args) function call + a[b..c] range + a[b] index + --a pre decrement + a-- post decrement + ++a pre increment + a++ post increment + (type)a cast + ~a complement + !a not + -a negate + a/b divide + a%b modulo + a*b multiply + a-b subtract + a+b add + >> shift right + << shift left + a>b greater than? + a<b lesser than? + a>=b greater or equal than? + a<=b lesser or equal than? + a!=b not equal to? + a==b equal to? + a&b intersection + a^b xor (symmetric differance) + a|b union + a&&b logical and + a||b logical or + a?b:c condition + a=b assignment + + The ones at the top of the list are parsed before operators lower + down on the list. This means that a|b&c means a|(b&c) not (a|b)&c. + Look at the individual pages for fuller explanations of what they do. + + Then there is also the @ "splice" operator which can only be used in + argument lists. + + Arguments to operators are always computed from left to right. + + Many (but not all) of these operators can also be used as by prepending + with a ` sign. For instance `+(a,b) is the same as a+b. These functions + are called "operator functions" and the following are currently + available: + + `== `!= `! `< `<= `> `>= `+ `- `& `| `^ `<< `>> `* `/ `% `~ + + These operator functions are basically "efuns", but beware, if you + re-define the `+ function a+b will also be redefined. + + On top of all this, many operators can also be overloaded. Overloading + an operator lets you specify how operators works on your objects. + To overload an operator you simply put the corresponding operator + function as a method in your object. An example: + + > program nine=class { + int `+(int arg) { return arg+9; } + }; + Result: program + > clone(nine)+1; + Result: 10 + > + + This little example defines a program that works almost like the number + nine. As you can see, clone(nine)+1 is the same as clone(nine)->`+(1) + in this case, and that is the whole point of operator overloading. + Note however that it would not have worked to write 1+clone(nine) + because operator overloading only works if the first argument is the + object with the overloaded function. Well, almost anyway, the operators + <, >, <=, >= can check both sides. In fact, the methods `<= and `>= + will never be called since Pike will translate a<=b to !(a>b). + + These are the operators you can overload: + + `== also overloads `!= + `! This is also used by if-statements to find out if the object + in question is 'true' or not. + `< also overloads `>= + `> also overloads `<= + `+ + `- + `& + `| + `^ + `<< + `>> + `* + `/ + `% + `~ + + If you also define a function __hash to return an integer, which + must be equal for all objects where `== is true you can index mappings + on the contents of your objects rather than on the object itself. + More details about this will come later. + +SEE ALSO + /precompiled/mpz diff --git a/doc/operators/or b/doc/operators/or new file mode 100644 index 0000000000000000000000000000000000000000..30bd76e0c73c9b17f5ad56608a0b6292df36d9a8 --- /dev/null +++ b/doc/operators/or @@ -0,0 +1,24 @@ +NAME + `| - union + +SYNTAX + a | b + or + mixed `|(mixed ... args) + +DESCRIPTION + This operator does logical unions. For ints this means bitwise or. + + Arrays and multisets are treated as sets, so doing a union on two arrays + will result in an array with containing all values present in either + array. Although values present in both ararys will only be present + once in the result. + + For mappings, the intersection will be done on the indexes solely, + however, the values will be taken from the rightmost mapping. + +KEYWORDS + operators + +SEE ALSO + `&, `^, || diff --git a/doc/operators/plus b/doc/operators/plus new file mode 100644 index 0000000000000000000000000000000000000000..9ad78ab9c6860d274dbc69af6c52e475c742bd5e --- /dev/null +++ b/doc/operators/plus @@ -0,0 +1,28 @@ +NAME + `+ - add things together + +SYNTAX + a + b + or + mixed `+(mixed ... args) + +DESCRIPTION + For ints and floats this operator simply adds the two operators + together. For strings and arrays, concatenation is done. For multisets + and mapping this creates a new multiset/mapping with all indices and data as + in a and b. Note that this can cause a multiset to contain + several equal indices. Also, when adding a string to an int or float + the number is converted to a printable string first. + +EXAMPLES + "a"+10 returns "a10" + 10+20 returns 30 + ({1})+({2}) returns ({1,2}) + (<1>)+(<1>) returns (<1,1>) + `+(2,2,2) returns 6 + +KEYWORDS + operators + +SEE ALSO + `-, `* diff --git a/doc/operators/range b/doc/operators/range new file mode 100644 index 0000000000000000000000000000000000000000..9159afaefb72c7ac09b3f3795b6edd1e840ee6f6 --- /dev/null +++ b/doc/operators/range @@ -0,0 +1,30 @@ +NAME + range - cut a slice of an array or string + +SYNTAX + a [ b .. c ] + or + a [ .. c ] + or + a [ b .. ] + +DESCRIPTION + This operator cuts out a piece of an array or string. If a is an array + a[b..c] will return an array containing a[b], a[b+1], a[b+2] to a[c]. + Given a string about the same thing will happen, except the the result + will be a string of course. If b is omitted, everything from the + beginning up to and including c will be included. If c is omitted + the result will include everything from (and including) b to the end. + +EXAMPLES + "foobar"[0..2] returns "foo" + "foobar"[3..5] returns "bar" + ({1,2,3})[..1] returns ({1,2}) + ({1,2,3})[1..] returns ({2,3}) + ({1,2,3})[..] returns ({1,2,3}) + +KEYWORDS + operators + +SEE ALSO + index diff --git a/doc/operators/shift_left b/doc/operators/shift_left new file mode 100644 index 0000000000000000000000000000000000000000..7de5c8782a45860a812a012ddaff11cb2a75f9c2 --- /dev/null +++ b/doc/operators/shift_left @@ -0,0 +1,17 @@ +NAME + `<< - shift left + +SYNTAX + a << b + or + int `<<(int a, int b) + +DESCRIPTION + This operator shift the integer a b steps left. This is equal to + multiplying a by 2 b times. + +KEYWORDS + operators + +SEE ALSO + `>> diff --git a/doc/operators/shift_right b/doc/operators/shift_right new file mode 100644 index 0000000000000000000000000000000000000000..8de24822ce2c6d5046f92cd8814fc27774c11341 --- /dev/null +++ b/doc/operators/shift_right @@ -0,0 +1,17 @@ +NAME + `>> - shift right + +SYNTAX + a >> b + or + int `>>(int a, int b) + +DESCRIPTION + This operator shift the integer a b steps right. This is equal to + dividing a by 2 b times. + +KEYWORDS + operators + +SEE ALSO + `<< diff --git a/doc/operators/xor b/doc/operators/xor new file mode 100644 index 0000000000000000000000000000000000000000..ef717833d2019b4025e03fa465dab6b55f76eda9 --- /dev/null +++ b/doc/operators/xor @@ -0,0 +1,24 @@ +NAME + `^ - exclusive or + +SYNTAX + a ^ b + or + mixed `^(mixed ... args) + +DESCRIPTION + This operator does logical exclusive or operations For ints this means + bitwise xor. + + Arrays and multisets are treated as sets, so xoring two arrays will + result in an array with containing all values present in either but + not both arrays. + + For mappings, the intersection will be done on the indexes solely, + however, the values will be taken from the rightmost mapping. + +KEYWORDS + operators + +SEE ALSO + `|, `& diff --git a/doc/pike/all.bmml b/doc/pike/all.bmml new file mode 100644 index 0000000000000000000000000000000000000000..7cc63c0a90648db778812c05c45be913e701aeee --- /dev/null +++ b/doc/pike/all.bmml @@ -0,0 +1,3 @@ +All Pike manual pages: + + KEYWORD_LIST pages diff --git a/doc/pike/cast b/doc/pike/cast new file mode 100644 index 0000000000000000000000000000000000000000..7eef957713fb3d4bbcaca3472890e8a86217db11 --- /dev/null +++ b/doc/pike/cast @@ -0,0 +1,45 @@ +NAME + cast - convert one type to another + +SYNTAX + ( <type> ) <expression> + +DESCRIPTION + Casts convert types, in most cases it just tells the compiler what + type the expression has, but it can also be used to actually convert + the value of the expression into something else. + + Casting from float or int to string will convert the given number + into a decimal ascii string representation. + + Casting from string to float or int will do the opposite. IE. + Read a decimal number from the string and return that. + + Casting from string to program will call cast_to_program in the + master object and request a program to return. The standard master + object will consider the string a file name and compile the program + given by that string. It will then put the program in a chache in + case you cast the same string to a program again later. + + Castring from string to object will call cast_to_object in the + master object and request an object to return. The standard master + object will consider the string a file name, cast it to a program + and return a clone of that file. If the same cast is attempted again + later, the _same_ object will be returned. + + When casting an object, the method o->cast will be called with a string + with the name of the type as argument. o->cast can then return any + value. + + In all other cases, casts are just compiler hints. + +EXAMPLES + (program)"/precompiled/file" // returns the file program + (object)"/precompiled/file" // returns a clone of the file program + (int)(object)"/precompiled/mpz" // returns 0 + +KEYWORDS + pike + +SEE ALSO + compile_file, sscanf diff --git a/doc/lpc/catch b/doc/pike/catch similarity index 100% rename from doc/lpc/catch rename to doc/pike/catch diff --git a/doc/lpc/class b/doc/pike/class similarity index 85% rename from doc/lpc/class rename to doc/pike/class index e2e8144133c9c008e9da18edc1678c4a08dec68d..0f170dd9353e1c22433fb63951d7d99cc69a335e 100644 --- a/doc/lpc/class +++ b/doc/pike/class @@ -1,5 +1,5 @@ NAME - class + class - define a inlined program SYNTAX class { program definition } @@ -14,5 +14,8 @@ EXAMPLE complex->r=1.0; complex->i=1.0; +KEYWORDS + pike + SEE ALSO inherit, lambda diff --git a/doc/lpc/command_line_options b/doc/pike/command_line_options similarity index 82% rename from doc/lpc/command_line_options rename to doc/pike/command_line_options index 8e39eb6ced8f08e81c5a4adc974f9d4d9cad0d51..4a6d16a814564081dc8cb6a8cdc5fd1e4877fd66 100644 --- a/doc/lpc/command_line_options +++ b/doc/pike/command_line_options @@ -1,11 +1,11 @@ -These options can be specified on the command line to uLPC: +These options can be specified on the command line to Pike: -D<define> Predefine a precompiler macro -D<define>=<value> Predefine a precompiler macro with a speciefied value -m<master> Use this file as master object. - You can also use the environment variable LPC_MASTER + You can also use the environment variable Pike_MASTER to specify this. -d increase debug level by 1 @@ -26,4 +26,4 @@ These options can be specified on the command line to uLPC: -a<number> set asdebug This controls debug output for the code generator. - +-s<number> Set evaluator stack size. diff --git a/doc/pike/control_structures/break b/doc/pike/control_structures/break new file mode 100644 index 0000000000000000000000000000000000000000..28d3743f1c3f97648a6431db49bff4d400f353bd --- /dev/null +++ b/doc/pike/control_structures/break @@ -0,0 +1,15 @@ +NAME + break - break a loop or switch + +SYNTAX + break + +DESCRIPTION + Break jumps directly out of any loop or switch statement, it is + a very vital part of every switch statement. + +KEYWORDS + control + +SEE ALSO + do-while, while, for, switch diff --git a/doc/pike/control_structures/catch b/doc/pike/control_structures/catch new file mode 100644 index 0000000000000000000000000000000000000000..66467304ca753db0d36b09f0e6f542d270596039 --- /dev/null +++ b/doc/pike/control_structures/catch @@ -0,0 +1,18 @@ +NAME + catch - catch errors + +SYNTAX + catch { commands } + or + catch ( expression ) + +DESCRIPTION + catch traps exceptions such as run time errors or calls to throw() and + returns the argument given to throw. For a run time error, this value + is ({ "error message", backtrace }) + +KEYWORDS + control + +SEE ALSO + builtin/throw diff --git a/doc/pike/control_structures/continue b/doc/pike/control_structures/continue new file mode 100644 index 0000000000000000000000000000000000000000..6326b87f81072b33ec981bea9514ab615b585985 --- /dev/null +++ b/doc/pike/control_structures/continue @@ -0,0 +1,15 @@ +NAME + continue - continue a loop + +SYNTAX + continue + +DESCRIPTION + Continue work similarly to break only it does't finish the loop, + it just aborts the rest of this turn in the loop. + +KEYWORDS + control + +SEE ALSO + do-while, while, for diff --git a/doc/pike/control_structures/do-while b/doc/pike/control_structures/do-while new file mode 100644 index 0000000000000000000000000000000000000000..12a91e91f1e034d658f28f5f6e8ba48da86e5d0b --- /dev/null +++ b/doc/pike/control_structures/do-while @@ -0,0 +1,24 @@ +NAME + do-while - execute a statement while an expression is true + +SYNTAX + do <statement> while ( expression ); + +DESCRIPTION + do - while only differs from the ordinary while-loop in that it does + _not_ evaluate the expression until after the statement has been + executed once. Thus it always runs the statement once. + +EXAMPLE + int i=circular_buffer_pos; + do + { + write(circular_buffer[i]); + i=(i+1) % sizeof(circular_buffer); + }while(i != circular_buffer_pos); + +KEYWORDS + control + +SEE ALSO + do - while diff --git a/doc/pike/control_structures/for b/doc/pike/control_structures/for new file mode 100644 index 0000000000000000000000000000000000000000..54a2c1883a3cf0046b57f5524ee805ee3ea28b85 --- /dev/null +++ b/doc/pike/control_structures/for @@ -0,0 +1,28 @@ +NAME + for - generic loop statement + +SYNTAX + for ( expression1 ; expression2 ; expression3 ) <statement> + +DESCRIPTION + the above statement is exactly equal to: + + expression1; + while( expression2 ) + { + <statement> + expression3; + } + + Except when using 'continue'. When using continue in <statement> + expresstion3 will not be called. + +EXAMPLE + int e; + for(e=0;e<10;e++) write(e+"\n"); + +KEYWORDS + control + +SEE ALSO + while, break, continue diff --git a/doc/pike/control_structures/foreach b/doc/pike/control_structures/foreach new file mode 100644 index 0000000000000000000000000000000000000000..d934abc05ebabd6e1002097456b47e9d7abef602 --- /dev/null +++ b/doc/pike/control_structures/foreach @@ -0,0 +1,19 @@ +NAME + foreach - loop over an array + +SYNTAX + foreach ( array, variable ) statement + +DESCRIPTION + For each element in array, set variable to that value and execute + 'statement'. + +EXAMPLE + string word; + foreach( explode(sentence," "), word) foo(word); + +KEYWORDS + control + +SEE ALSO + for, while diff --git a/doc/pike/control_structures/if-else b/doc/pike/control_structures/if-else new file mode 100644 index 0000000000000000000000000000000000000000..d19e638c3270e30dd7fafc9e7b0e74aad7f169bb --- /dev/null +++ b/doc/pike/control_structures/if-else @@ -0,0 +1,19 @@ +NAME + if-else - run on condition + +SYNTAX + if( expression ) <statement> + or + if( expression ) <statement> else <statement> + +DESCRIPTION + If is the simplest of all control structures, in the first form + it runs the statement if the expression is true and in the second + form it runs the first statement if the expression is true and the + second if it is false. + +KEYWORDS + control + +SEE ALSO + switch diff --git a/doc/pike/control_structures/return b/doc/pike/control_structures/return new file mode 100644 index 0000000000000000000000000000000000000000..43ac6e834bc02ddad0c315e4ded3a65e6eacf005 --- /dev/null +++ b/doc/pike/control_structures/return @@ -0,0 +1,14 @@ +NAME + return - return from a function + +SYNTAX + return + or + return <expression> + +DESCRIPTION + Return jumps directly out of a function returning the given value to + the calling function. If no expression is given, 0 is returned. + +KEYWORDS + control diff --git a/doc/pike/control_structures/switch b/doc/pike/control_structures/switch new file mode 100644 index 0000000000000000000000000000000000000000..79b4b54d595df8cf9c81d90c81fd54f3c65b033e --- /dev/null +++ b/doc/pike/control_structures/switch @@ -0,0 +1,41 @@ +NAME + switch - Complicated conditional statement + +SYNTAX + switch( expression ) + { + case constant1: + <statement1> + + case constant2: + <statement2> + break; + + case constant3..constant4: + <statement4> + break; + + default: + <statement3> + } + +DESCRIPTION + Switch evaluates the expression give and then executes one or more + statement accordingly to the result. If the result is equal to + constant1 then statement1 will be executed, please observe that + the second case-statement dos _not_ abort the execution in any way + instead statement2 will also be executed. After that break will + cause execution to continue after the after the last } in the + switch statement. If the result is equal to constant2 only + statement2 will be executed. If expression <= consant3 and + expression >= constant4, statement4 will be executed. In all other + cases statement3 is executed because it is 'default'. Please note + that the expression and constants can be any type that can be + written as a constant. Arrays, mappings and multisets have little or + no use though. + +KEYWORDS + control + +SEE ALSO + if-else, break diff --git a/doc/pike/control_structures/while b/doc/pike/control_structures/while new file mode 100644 index 0000000000000000000000000000000000000000..0d2c2068d0dccfabbe47bdf548b73be903cbf144 --- /dev/null +++ b/doc/pike/control_structures/while @@ -0,0 +1,16 @@ +NAME + while - execute a statement while an expression is true + +SYNTAX + while( expression ) <statement> + +DESCRIPTION + While runns the statement until the expression is false. The + expression is evaluated once for every loop. If the expression is + false the first time the statement is never executed. + +KEYWORDS + control + +SEE ALSO + for, do-while diff --git a/doc/pike/efuns.bmml b/doc/pike/efuns.bmml new file mode 100644 index 0000000000000000000000000000000000000000..e035e385c912a1b2b3c63c6d8408714014305189 --- /dev/null +++ b/doc/pike/efuns.bmml @@ -0,0 +1,3 @@ +All builtin functions: + + KEYWORD_INDEX efuns diff --git a/doc/pike/functions b/doc/pike/functions new file mode 100644 index 0000000000000000000000000000000000000000..7787cae69ce4a50a0df091954608bba3e8cceadb --- /dev/null +++ b/doc/pike/functions @@ -0,0 +1,75 @@ +NAME + functions - how to write a function + +SYNTAX + modifier type function_name (argument_specification) + { + /* function body */ + } + +DESCRIPTION + A function is basically a piece of code which takes some data + does some things, and hands some data back. Data sent to a + a function is called an 'argument'. + + This defines a function called 'function_name' returning the type + 'type'. The argument_specification is a comma separated list of + arguments. Each argument is specified with a type, whitespace and + the name of the argument. The last argument may have ... before + the name to indicate that that argument shall contain an array of + the rest of the arguments given by the caller. Note that using + ... automatically makes an the variable an array, so writing + + int foo(int * ... ints); + + means that 'ints' is an array of arrays of integers. Which might not + be what you want. + + The modifiers can be zero or more of: static, no_mask, varargs, inline + and private. Varargs means that it is ok to call the function with + less arguments that would otherwise be needed. Inline means that + the function may be inlined in other code. Inline also makes the + function no_mask. Static means that the function can not be called + from other objects. Private means that the function can not be accessed + from programs that inherits this program. + + Some times you need to use a function before it is defined, then you + can write a 'forward declaration' of the function. This is done by + copying the function definition up until (but not including) the '{' + and putting a semicolon after it. The forward declaration should be + put before the use of the function of course. + + Function definitions and forward declarations are toplevel constructs, + they can not be written inside functions or expressions. + +EXAMPLES + /* Forward declare foobar as taking an array of int as argument + *and returning an int + */ + static int foobar(int *a); + + /* This function takes a format string and any number of integers + * as argument and returns a string + */ + string dofobar(string format ,int ... rest) + { + return sprintf(format, foobar(rest)); + } + + /* Define foobar */ + static int foobar(int *a) + { + int e, ret; + ret=1; + + for(e=0;e<sizeof(a);e++) + ret*=a[e]; + + return ret; + } + +KEYWORDS + pike + +SEE ALSO + lambda, return, modifier diff --git a/doc/pike/gauge b/doc/pike/gauge new file mode 100644 index 0000000000000000000000000000000000000000..f352e3dda97c725ba03236a2924892888499a73f --- /dev/null +++ b/doc/pike/gauge @@ -0,0 +1,15 @@ +NAME + gauge - measure system time + +SYNTAX + gauge { commands } + or + gauge ( expression ) + +DESCRIPTION + Gauge measure how much cpu time is used to execute the commands + given as arguments. The number of milliseconds used is returned + as an integer. + +SEE ALSO + catch, builtin/rusage diff --git a/doc/lpc/hilfe b/doc/pike/hilfe old mode 100755 new mode 100644 similarity index 76% rename from doc/lpc/hilfe rename to doc/pike/hilfe index ffb96fbba95233ce6c754c7687559b2b9a563d45..6e3b94f7ad4922953242bed6cb113d1c34021697 --- a/doc/lpc/hilfe +++ b/doc/pike/hilfe @@ -1,14 +1,14 @@ NAME - hilfe - Hubbe's Incremental LPC FrontEnd + hilfe - Hubbe's Incremental Pike FrontEnd SYNTAX $ hilfe or - $ ulpc -Cstay hilfe + $ pike -Cstay hilfe DESCRIPTION - Hilfe is a LPC-script that supplies an incremental environment for - LPC. It allowes you to evaluate LPC 'on the fly'. If you're running + Hilfe is a Pike-script that supplies an incremental environment for + Pike. It allowes you to evaluate Pike 'on the fly'. If you're running UNIX, you only have to write 'hilfe' to start it, otherwise you will have to write 'driver -Cstay hilfe' to run it. If you don't know what 'incremeantal' means in this context, ask you local LISP junkie. @@ -20,7 +20,7 @@ DESCRIPTION dump - dump all current variables . - clear input buffer - Hilfe parses a subset of LPC, there many things it doesn't handle. Here + Hilfe parses a subset of Pike, there many things it doesn't handle. Here is a list of what you can do: Define a function: @@ -39,17 +39,14 @@ DESCRIPTION Evaluate a statement: <statement> ; Statements include the following examples: - for(e=0;e<10;e++) ; - - e=10; - write(e); + for(e=0;e<10;e++) ; - if(foo) return bar; else return gazonk; + e=10; - Statements beginning with for, while, switch, if, do or return will - not automatically return anything, and no result will be printed. + write(e); + if(foo) return bar; else return gazonk; -SEE ALSO - script_mode + Statements beginning with for, while, switch, if, do or return will + not automatically return anything, and no result will be printed. diff --git a/doc/lpc/how_to_make_modules b/doc/pike/how_to_make_modules similarity index 80% rename from doc/lpc/how_to_make_modules rename to doc/pike/how_to_make_modules index 0aa7589bb7efec6c2b783334532c218e036223b5..b182b2ed610851abb45d407c2430db90c3276909 100644 --- a/doc/lpc/how_to_make_modules +++ b/doc/pike/how_to_make_modules @@ -1,5 +1,5 @@ This file describes briefly how to add modules with functions and programs -written in C to uLPC. +written in C to Pike. 1) decide upon a name for your module 2) create a dir with this name in src/modules @@ -10,13 +10,13 @@ written in C to uLPC. Your module needs to contain a few functions: init_<module name>_efuns() This function is meant to add any efuns this module wants to add, - normally this function is called before any lpc is compiled, but + normally this function is called before any pike is compiled, but in the future modules might be loaded dynamically, and then this will be called when the module is loaded. init_<module name>_programs() This is called after all modules has been inited and the master has - been compiled, this allows this function to call lpc functions and - and add LPC programs with C functions to the pool of precompiled + been compiled, this allows this function to call pike functions and + and add Pike programs with C functions to the pool of precompiled programs. (see src/modules/files/file.c for an example) exit_<module name>() This is called when the module is unloaded, it must free any memory @@ -25,7 +25,6 @@ written in C to uLPC. There will be other required functions in the future, for instanece there will be an garbage_collect_<module name>(). - For now you will have to look at the file module to see how C programs - and efuns are added. - + For now you will have to look at the file module to see how C programs, + efuns and other constants are added. diff --git a/doc/pike/inherit b/doc/pike/inherit new file mode 100644 index 0000000000000000000000000000000000000000..3987ca680754e875f1982635506650cf616299f6 --- /dev/null +++ b/doc/pike/inherit @@ -0,0 +1,52 @@ +NAME + inherit - use definitions from another program + +SYNTAX + inherit "<program name>"; + or + inherit "<program name>" : local_name; + +DESCRIPTION + Inherit copies the global identifiers (functions and global variables) + from the named program. These functions and variables can then be + used as if they were defined in this program. All the inherited + identifiers that was no declared as no_mask in the inherited program + can be also be redefined. The redefinition will not only + affect functions following the redefinition, but all functions in + this program, including the inherited ones. + + Even if an identifier is redefined you can still access the original + though. Prepending the identifier name with :: will return the original + identifier, OR an array of all inherited identifiers with that name. + + You can also use the local_name to access a specific identifier, just + prepend it like 'local_name::identifier'. This will return the named + identifer in the program inherited with the given local_name. If no + local_name was given to inherit , the last part of the path in the + program name will be used as local_name. + + Inherit calls master()->cast_to_program(<program name>) to get the + program to inherit. For this reason there can be no inherits in the + master object. + + Inherit is not an expression or statement, it is a toplevel construct + and must not be written inside a function body. + +EXAMPLES + /* This is file hworld.pike */ + int hello_world() { write("Hello world.\n"); } + + /* This is the file hello_world.pike */ + inherit "hworld.pike"; + + int main() + { + hello_world(); + exit(0); + } + +KEYWORDS + pike + +SEE ALSO + class diff --git a/doc/pike/lambda b/doc/pike/lambda new file mode 100644 index 0000000000000000000000000000000000000000..44a5fed2e315d84ae98b4074f3f608d8b5364737 --- /dev/null +++ b/doc/pike/lambda @@ -0,0 +1,45 @@ +NAME + lambda - write nameless functions + +SYNTAX + lambda(<argument specifications>) { <code> } + +DESCRIPTION + Lambda let's you write a function as a value to a function call + or anywhere where you can enter an expression. Using lambda is + basically the same as defining the function before the current + function with a temporary name and then use the name instead. + +EXAMPLES + /* These two lettersort routines are equal */ + string *lettersort(string *words) + { + return sort_array(lettersort, lambda(string a,string b) + { + return a < b; + }); + } + + int tmp_cmp_fun(string a, string b) + { + return a < b; + } + + string *lettersort(string *words) + { + return sort_array(lettersort, tmp_cmp_fun); + } + +NOTA BENE + function_name() will return something for lambda functions, + what it returns is unspecified though. + +BUGS + confuses the hell out of C indent programs + +KEYWORDS + pike + +SEE ALSO + class, function + diff --git a/doc/pike/modifier b/doc/pike/modifier new file mode 100644 index 0000000000000000000000000000000000000000..8b4c92de10ae312417380ddcecda6c9baa1552df --- /dev/null +++ b/doc/pike/modifier @@ -0,0 +1,17 @@ +NAME + modifier - modify function / variable definitions + +DESCRIPTION + Modifiers makes it possible to give functions and gobal variables + certain characteristics. A list of modifiers follows: + + static make this identifier unavailable by indexing + inline allow inlining this function + private hide this identifier to inheriting programs + nomask don't allow this identifier to be re-defined + +KEYWORDS + pike + +SEE ALSO + functions, variables \ No newline at end of file diff --git a/doc/lpc/preprocessor b/doc/pike/preprocessor similarity index 73% rename from doc/lpc/preprocessor rename to doc/pike/preprocessor index 4a3bd37c59c44ff0c1ed92c01bf1e8f267533e11..0ec76429a6c005e8cc0b6fa9ce6a698fd4f10e11 100644 --- a/doc/lpc/preprocessor +++ b/doc/pike/preprocessor @@ -1,56 +1,72 @@ +NAME + preprocessor - textually process code before compiling + DESCRIPTION - �LPC has a builtin C-style preprocessor. It works similar to old + Pike has a builtin C-style preprocessor. It works similar to old C preprocessors but has a few extra features. This file describes the different preprocessor directives. PREPROCESSOR DIRECTIVES - #! - #define - #elif - #else - #elseif - #endif - #error - #if - #ifdef - #ifndef - #include - #line - #pragma - #undef - ----------------------------------------------------------------------------- + #! + #define + #elif + #else + #elseif + #endif + #error + #if + #ifdef + #ifndef + #include + #line + #pragma + #undef + +KEYWORDS + pike + +============================================================================ DIRECTIVE #! DESCRIPTION This directive is in effect a comment statement, since the preprocessor will ignore everything to the end of the line. - This is used to write unix type scripts in �LPC by starting + This is used to write unix type scripts in Pike by starting the script with - #!/usr/local/bin/ulpc ----------------------------------------------------------------------------- + #!/usr/local/bin/pike +============================================================================ DIRECTIVE #define DESCRIPTION The simplest way to use define is to write - - #define <identifier> <replacement string> + + #define <identifier> <replacement string> which will cause all subsequent occurances of 'identifier' to be replaced with the replacement string. Define also has the capability to use arguments, thus a line like - #define <identifier>(arg1, arg2) <replacement string> + #define <identifier>(arg1, arg2) <replacement string> would cause identifer to be a macro. All occurances of 'identifier(something1,something2d)' would be replaced with the replacement string. And in the replacement string, arg1 and arg2 will be replaced with something1 and something2. ----------------------------------------------------------------------------- + +BUGS + Note that it is not a good idea to do something like this: + + #define foo bar // a comment + + The comment will be included in the define, and thus inserted in the + code. This will have the effect that the rest of the line will be + ignored when the word foo is used. Not exactly what you might expect. + +============================================================================ DIRECTIVE #undef @@ -65,7 +81,7 @@ EXAMPLES #undef foo #define foo(bar) gazonk bar #undef foo ----------------------------------------------------------------------------- +============================================================================ DIRECTIVE #if #elif @@ -85,13 +101,13 @@ DESCRIPTION Expressions given to #if, #elif or #endif are special, all identifiers evaluate to zero unless they are defined to something else. Integers, - strings and floats are the only types that can be used, but all lpc + strings and floats are the only types that can be used, but all pike operators can be used on these types. - Also, two special functions can be used, defined() and efun(). + Also, two special functions can be used, defined() and constant(). defined(<identifer>) expands to '1' if the identifier is defined, - '0' otherwise. efun(<identifier>) expands to '1' if identifer is - an efun, '0' otherwise. + '0' otherwise. constant(<identifier>) expands to '1' if identifer is + an predefined constant (with add_constant), '0' otherwise. EXAMPLES #if 1 @@ -108,22 +124,22 @@ EXAMPLES write("default"); #endif - #if !efun(write_file) - inherit "simulate.lpc" + #if !constant(write_file) + inherit "simulate.pike" #endif ----------------------------------------------------------------------------- +============================================================================ DIRECTIVE #error DESCRIPTION This directive causes a compiler error, it can be used to notify - the user that certain efuns are missing and similar things. + the user that certain functions are missing and similar things. EXAMPLES - #if !efun(write_file) - #error Move object is missing + #if !constant(write_file) + #error write_file efun is missing #endif ----------------------------------------------------------------------------- +============================================================================ DIRECTIVE #include @@ -134,7 +150,7 @@ DESCRIPTION EXAMPLES #include "foo.h" ----------------------------------------------------------------------------- +============================================================================ DIRECTIVE #line @@ -144,12 +160,12 @@ DESCRIPTION compiler that we are compiling another file. The directive takes the line number first, and optionally, the file afterwards. - This can also be used when generating lpc from something else, to + This can also be used when generating pike from something else, to tell teh compiler where the code originally originated from. EXAMPLES #line 4 "foo.cf" /* The next line was generated from 4 in foo.cf */ ----------------------------------------------------------------------------- +============================================================================ DIRECTIVE #pragma @@ -157,4 +173,4 @@ DESCRIPTION This is a generic directive for flags to the compiler. Currently, the only flag available is 'all_inline' which is the same as adding the modifier 'inline' to all functions that follows. ----------------------------------------------------------------------------- +============================================================================ diff --git a/doc/pike/reserved.bmml b/doc/pike/reserved.bmml new file mode 100644 index 0000000000000000000000000000000000000000..7db35007f8111888d7347efef75256c2fe0f2db7 --- /dev/null +++ b/doc/pike/reserved.bmml @@ -0,0 +1,6 @@ +Reserved Words + + array break case catch continue default do else float for foreach + function gauge if inherit inline int lambda mapping mixed multiset nomask + object predef private program protected public return sscanf static string + switch typeof varargs void while diff --git a/doc/pike/sscanf b/doc/pike/sscanf new file mode 100644 index 0000000000000000000000000000000000000000..2ddc785129269f37308fc9be1fd8aec2b482a6df --- /dev/null +++ b/doc/pike/sscanf @@ -0,0 +1,35 @@ +NAME + sscanf - scan a string using a format string + +SYNTAX + int sscanf(string str, string fmt, mixed var1, mixed var2 ...); + +DESCRIPTION + Parse a string str using the format fmt. fmt can contain strings + separated by "%d,%s,%c and %f. Every % corresponds to one of var1, + var2... + + %d gives an integer + %o gives an octal integer + %x gives a hexadecimal integer + %D gives an integer that is either octal (leading zero), + hexadecimal (leading 0x) or decimal. + %f gives a float + %c matches one char and returns it as an integer + %2c matches two chars and returns them as an integer (short) + %s gives a string + %5s gives a string of 5 characters (5 can be any number) + %[set] matches a string containing a given set of characters. + (thos given inside the brackets) %[^set] means any character + ecept those inside brackets. %[0-9H] means any number or 'H'. + + If a * is put between the percent and the operator, the operator + will not only match it's argument, not assign any variables. + + Number of matched arguments is returned. + +KEYWORDS + string + +SEE ALSO + explode, sprintf diff --git a/doc/pike/typeof b/doc/pike/typeof new file mode 100644 index 0000000000000000000000000000000000000000..78ccd6e4ee20c6725cd8f7afb04683e9aa75dfc4 --- /dev/null +++ b/doc/pike/typeof @@ -0,0 +1,21 @@ +NAME + typeof - check return type of expression + +SYNTAX + typeof ( expression ) + +DESCRIPTION + This is a not really a function even if it looks like it, it returns + a human readable (almost) representation of the type that the + expression would return without actually evaluating it. + The representation is in the form of a string. + +EXAMPLE + > typeof(`sizeof); + Result: function(object | mapping | array | multiset | string : int) + > typeof(sizeof(({}))); + Result: int + > + +KEYWORDS + pike diff --git a/doc/pike/variables b/doc/pike/variables new file mode 100644 index 0000000000000000000000000000000000000000..56f54040739798173d91f776d01306206a36deb6 --- /dev/null +++ b/doc/pike/variables @@ -0,0 +1,35 @@ +NAME + variables - how to declare a variable + +SYNTAX + modifier type variable_name_list; + +DESCRIPTION + This is how you declare a global variable. Local variables are defined + in the same way, but you may not use any modifiers for local variables. + The variable_name_list is a comma separated list of the variables + to declare as the type 'type'. Note that '*' binds to the variable + names, not the type. This means that: + + int * i,j; + + Declares i as an array of int, but j will be declared as int. To + declare both i and j as arrays of int you have to write. + + int * i, * j; + + or + + array(int) i,j; + + Modifiers can be zero or more of: static, no_mask and private. + Private means that the variable can not be accessed from programs + that inherit this program. Static means that it can not be accessed + from other objects with the index operator. No_mask means that it + can not be redefined in inheriting programs. + +KEYWORDS + pike + +SEE ALSO + functions diff --git a/doc/simulated/PI b/doc/simulated/PI index 4723df2dc24b7f0e8a4dc5241f20aaa2c48cedc4..b4828c600fe8a113a106b30a7b90a2cf1d947d05 100644 --- a/doc/simulated/PI +++ b/doc/simulated/PI @@ -2,7 +2,12 @@ NAME PI - pi SYNTAX + #include <simulate.h> + PI DESCRIPTION - This is not a function, it is a constant added by simulate.lpc. + This is not a function, it is a constant added by simulate.pike. + +KEYWORDS + float diff --git a/doc/simulated/add_efun b/doc/simulated/add_efun new file mode 100644 index 0000000000000000000000000000000000000000..4ccfe6f2945984ce08049f15e024de1185dbf3d1 --- /dev/null +++ b/doc/simulated/add_efun @@ -0,0 +1,15 @@ +NAME + add_efun - add an efun or constant + +SYNTAX + #include <simulate.h> + + void add_efun(string func_name, mixed function) + or + void add_efun(string func_name) + +DESCRIPTION + This function is the same as add_constant. + +SEE ALSO + builtin/add_constant diff --git a/doc/simulated/aggregage_list b/doc/simulated/aggregage_list new file mode 100644 index 0000000000000000000000000000000000000000..8ebb81efedcb4e2c0299d0de3849e48d16e95acf --- /dev/null +++ b/doc/simulated/aggregage_list @@ -0,0 +1,13 @@ +NAME + aggregage_list - aggregate a multiset + +SYNTAX + #include <simulate.h> + + multiset aggregage_list(mixed ... args); + +DESCRIPTION + This function is exactly the same as aggregate_multiset. + +SEE ALSO + builtin/aggregate_multiset diff --git a/doc/simulated/all_efuns b/doc/simulated/all_efuns new file mode 100644 index 0000000000000000000000000000000000000000..d436be0c309eba9d774033505d0a0cc58ffd7ed5 --- /dev/null +++ b/doc/simulated/all_efuns @@ -0,0 +1,13 @@ +NAME + all_efuns - return all 'efuns' + +SYNTAX + #include <simulate.h> + + mapping all_efuns(); + +DESCRIPTION + This function is the same as all_constants. + +SEE ALSO + all_constants diff --git a/doc/simulated/capitalize b/doc/simulated/capitalize index afcd237894ec7ce38b3d5870a49fa2b600c29cb4..10b360340101031dd17ae8f823f882fba9a3be45 100644 --- a/doc/simulated/capitalize +++ b/doc/simulated/capitalize @@ -2,11 +2,16 @@ NAME capitalize - capitalize a string SYNTAX + #include <simulate.h> + string capitalize(string str) DESCRIPTION Convert the first character in str to upper case, and return the new string. +KEYWORDS + string + SEE ALSO builtin/lower_case, builtin/upper_case diff --git a/doc/simulated/code_value b/doc/simulated/code_value deleted file mode 100644 index fed893a6ad83de68fbbebe85abd16290f3bf5219..0000000000000000000000000000000000000000 --- a/doc/simulated/code_value +++ /dev/null @@ -1,10 +0,0 @@ -NAME - code_value - code a value into a string. - -SYNTAX - string code_value(mixed v); - -DESCRIPTION - Return a string that contains an almost readable representation of the value v. - - \ No newline at end of file diff --git a/doc/simulated/describe_backtrace b/doc/simulated/describe_backtrace index d69999c3ea5612cf07a14f71f55cafc6530ace31..e0e89c1de8f8af3800366544345ad5d503e0e032 100644 --- a/doc/simulated/describe_backtrace +++ b/doc/simulated/describe_backtrace @@ -2,6 +2,8 @@ NAME describe_backtrace - make a backtrace readable SYNTAX + #include <simulate.h> + string describe_backtrace(mixed **backtrace); DESCRIPTION diff --git a/doc/simulated/exec b/doc/simulated/exec index e04e69621e88ad7b66693fac4ab2687f401da201..ef2397aad600443ab4f3d0854eae39c8e9aaf2f4 100644 --- a/doc/simulated/exec +++ b/doc/simulated/exec @@ -2,10 +2,12 @@ NAME exec - simple way to use exece() SYNTAX + #include <process.h> + int exec(string file, string ... args); DESCRIPTION - This function destroys the uLPC parser and runs the program + This function destroys the Pike parser and runs the program 'file' instead with the arguments. If no there are no '/' in the filename, the variable PATH will be consulted when looking for the program. This function does not return except when diff --git a/doc/builtin/explode b/doc/simulated/explode similarity index 90% rename from doc/builtin/explode rename to doc/simulated/explode index 5c211fd74b80b30084debabd3ef2277f4bf5cde6..45a64030b0c0e5348f5f0f3ee47ed8e010ea7de3 100644 --- a/doc/builtin/explode +++ b/doc/simulated/explode @@ -2,9 +2,9 @@ NAME explode - explode a string on a delimeter SYNTAX + #include <simulate.h> + string *explode(string victim, string delimeter); - or - victim / delimiter DESCRIPTION Explode divides the string called victim at every occurance of @@ -12,6 +12,8 @@ DESCRIPTION If delimeter is an empty string, victim will be divided into strings of length 1. + Explode is the same as division. + EXAMPLES > explode("foobar","o"); Result: ({ "f", "", "bar" }) @@ -26,4 +28,4 @@ KEYWORDS string SEE ALSO - implode + implode, `/ diff --git a/doc/simulated/file_size b/doc/simulated/file_size index 05a07d0ea2f9d0633afc13798d948fb9943e1e07..cf2ca7ea165c1d19026760e4539fbee4e5b2739f 100644 --- a/doc/simulated/file_size +++ b/doc/simulated/file_size @@ -2,6 +2,8 @@ NAME file_size - return the size of a file in bytes SYNTAX + #include <simulate.h> + int file_size(string file); DESCRIPTION @@ -9,5 +11,8 @@ DESCRIPTION does not exist, or that it is not readable by you. Size -2 indicates that it is a directory. +KEYWORDS + file + SEE ALSO write_file, read_bytes diff --git a/doc/simulated/filter b/doc/simulated/filter new file mode 100644 index 0000000000000000000000000000000000000000..4b3ed8fc092996ab0a5bb794591647a8bae98d08 --- /dev/null +++ b/doc/simulated/filter @@ -0,0 +1,30 @@ +NAME + filter - filter an array or mapping through a function + +SYNTAX + #include <array.h> + + mixed *filter(mixed arr,function fun,mixed ... args); + or + mixed *filter(object *arr,string fun,mixed ... args); + or + mixed *filter(function *arr,-1,mixed ... args); + +DESCRIPTION + First syntax: + Filter array returns an array holding the items of arr for which + fun returns true. + + Second syntax: + Filter array calls fun in all the objects in the array arr, and + return all objects that returned true. + + Third syntax: + Filter array calls all functionpointers in the array arr, and + return all that returned true. + +KEYWORDS + array + +SEE ALSO + sum_arrays, map diff --git a/doc/simulated/filter_array b/doc/simulated/filter_array index bda384c9cd1474387fb7ecac63ed6a6966b45b41..2c5f2a7dd0e3be4d6aa3e5cd21fd34c509fa8265 100644 --- a/doc/simulated/filter_array +++ b/doc/simulated/filter_array @@ -2,6 +2,8 @@ NAME filter_array - filter an array through a function SYNTAX + #include <simulate.h> + mixed *filter_array(mixed *arr,function fun,mixed ... args); or mixed *filter_array(object *arr,string fun,mixed ... args); @@ -9,17 +11,10 @@ SYNTAX mixed *filter_array(function *arr,-1,mixed ... args); DESCRIPTION - First syntax: - Filter array returns an array holding the items of arr for which - fun returns true. - - Second syntax: - Filter array calls fun in all the objects in the array arr, and - return all objects that returned true. + Filter array is the same function as filter. - Third syntax: - Filter array calls all functionpointers in the array arr, and - return all that returned true. +KEYWORDS + array SEE ALSO - sum_arrays, map_array + sum_arrays, map_array, filter diff --git a/doc/simulated/get_function b/doc/simulated/get_function index 581ec53314245155078bca6dd2efcb8e662611c2..0dbfde627c92f407e7e9269eb39a8573a81d83fb 100644 --- a/doc/simulated/get_function +++ b/doc/simulated/get_function @@ -2,7 +2,12 @@ NAME get_function - fetch a function from an object SYNTAX + #include <simulate.h> + function get_function(object o, string name); DESCRIPTION Defined as: return o[name]; + +KEYWORDS + function diff --git a/doc/builtin/implode b/doc/simulated/implode similarity index 71% rename from doc/builtin/implode rename to doc/simulated/implode index 9c603bae541e05449b8df5e037391166acb160ae..c70a79be49ae5adffa2c830e78060402f60cd711 100644 --- a/doc/builtin/implode +++ b/doc/simulated/implode @@ -2,20 +2,21 @@ NAME implode - implode an array of strings SYNTAX + #include <simulate.h> + string implode(string *a, string delimeter); or a * delimeter DESCRIPTION This function is the inverse of explode. It contatenates all the - strings in a with a delimeter in between each. If no delimeter is - given, an empty string will be used. + strings in a with a delimeter in between each. + + This function is the same as multiplication. EXAMPLES > implode( ({ "foo","bar","gazonk"}), "-" ); Result: foo-bar-gazonk - > implode( ({ "f","o","o" }) ); - Result: foo > ({ "a","b","c" })*" and "; Result: a and b and c > diff --git a/doc/simulated/l_sizeof b/doc/simulated/l_sizeof index d8daf84a539f843ee58929a3b7bbff71da22b9f8..c6ecc996e72b5db35972b443efb49286e30411d7 100644 --- a/doc/simulated/l_sizeof +++ b/doc/simulated/l_sizeof @@ -1,11 +1,16 @@ NAME - l_sizeof - Return the size of a list + l_sizeof - Return the size of a multiset SYNTAX - int l_sizeof(list m); + #include <simulate.h> + + int l_sizeof(multiset m); DESCRIPTION - This function is equal to builtin/sizeof. + This function is equal to sizeof. + +KEYWORDS + multiset SEE ALSO builtin/sizeof \ No newline at end of file diff --git a/doc/simulated/listp b/doc/simulated/listp new file mode 100644 index 0000000000000000000000000000000000000000..ad855533f39c1a93d5e84937b79fc4fb91cd7f38 --- /dev/null +++ b/doc/simulated/listp @@ -0,0 +1,13 @@ +NAME + listp - is the argument a list? (multiset) + +SYNTAX + #include <simulate.h> + + int listp(mixed l) + +DESCRIPTION + This function is the same as multisetp. + +SEE ALSO + builtin/multisetp diff --git a/doc/simulated/m_indices b/doc/simulated/m_indices index 657023deb87a61f21bf43924e616bc77affa6fb5..8d91aee4e52c10878b6a996d2077686bac5a5e82 100644 --- a/doc/simulated/m_indices +++ b/doc/simulated/m_indices @@ -2,10 +2,15 @@ NAME m_indices - return all indices from a mapping SYNTAX + #include <simulate.h> + mixed *m_indices(mapping m); DESCRIPTION - This function is equal to builtin/indices + This function is equal to indices + +KEYWORDS + mapping SEE ALSO builtin/indices diff --git a/doc/simulated/m_sizeof b/doc/simulated/m_sizeof index 63db3ea12ed25d3fd7f840cf6642609fa6173567..3f8265eb3c4b30cf7d11246678ae58d16f8d5e31 100644 --- a/doc/simulated/m_sizeof +++ b/doc/simulated/m_sizeof @@ -2,10 +2,15 @@ NAME m_sizeof - Return the size of a mapping SYNTAX + #include <simulate.h> + int m_sizeof(mapping m); DESCRIPTION - This function is equal to builtin/sizeof. + This function is equal to sizeof. + +KEYWORDS + mapping SEE ALSO builtin/sizeof \ No newline at end of file diff --git a/doc/simulated/m_values b/doc/simulated/m_values index 95175ccd02da3e4623ced667358f3176fa4f0536..fff446084734f558ef7c5608cb954bb471abfbb8 100644 --- a/doc/simulated/m_values +++ b/doc/simulated/m_values @@ -2,10 +2,15 @@ NAME m_values - return all values from a mapping SYNTAX + #include <simulate.h> + mixed *m_values(mapping m); DESCRIPTION - This function is equal to builtin/values + This function is equal to values + +KEYWORDS + mapping SEE ALSO builtin/values diff --git a/doc/simulated/map b/doc/simulated/map new file mode 100644 index 0000000000000000000000000000000000000000..aadc04d8ca2c1f5276352bd9e74d79631996f648 --- /dev/null +++ b/doc/simulated/map @@ -0,0 +1,28 @@ +NAME + map - map an array or mapping over a function + +SYNTAX + mixed *map(mixed arr,function fun,mixed ... args); + or + mixed *map(object *arr,string fun,mixed ... args); + or + mixed *map(function *arr,-1,mixed ... arg); + +DESCRIPTION + First syntax: + Map array returns an array holding the items of arr mapped thrugh + the function fun. ie. arr[x]=fun(arr[x], @args) for all x. + + Second syntax: + Map array calls function fun in all objects in the array arr. + ie. arr[x]=arr[x]->fun(@ args); + + Third syntax: + Map array calls the functions in the array arr: + arr[x]=arr[x]->fun(@ args); + +KEYWORDS + array + +SEE ALSO + sum_arrays, filter diff --git a/doc/simulated/map_array b/doc/simulated/map_array index be8fe70b5cdb09951a3f2b1ef26e71acab9799ff..cf280bea71e3141d66c3f741ec3eda654872912e 100644 --- a/doc/simulated/map_array +++ b/doc/simulated/map_array @@ -9,17 +9,10 @@ SYNTAX mixed *map_array(function *arr,-1,mixed ... arg); DESCRIPTION - First syntax: - Map array returns an array holding the items of arr mapped thrugh - the function fun. ie. arr[x]=fun(arr[x], @args) for all x. + This function is the same as map. - Second syntax: - Map array calls function fun in all objects in the array arr. - ie. arr[x]=arr[x]->fun(@ args); - - Third syntax: - Map array calls the functions in the array arr: - arr[x]=arr[x]->fun(@ args); +KEYWORDS + array SEE ALSO - sum_arrays, filter_array + filter_array, sum_arrays, map diff --git a/doc/simulated/master b/doc/simulated/master index f0594d1aa6cd145451a2d0ba0a63b79b1f84e794..7015cbfaee58d4890cf7fc2ac56e6f5a749630b6 100644 --- a/doc/simulated/master +++ b/doc/simulated/master @@ -6,3 +6,6 @@ SYNTAX DESCRIPTION Master is added by the master object to make it easier to access it. + +KEYWORDS + object diff --git a/doc/simulated/member_array b/doc/simulated/member_array index 0abc1df604599a81795b1a5be2a4ed75e89147b3..d6ba57281cdae36f1ff1318ca2dfcd5c70879bc0 100644 --- a/doc/simulated/member_array +++ b/doc/simulated/member_array @@ -2,8 +2,13 @@ NAME member_array - find first occurance of a value in an array SYNTAX + #include <simulate.h> + int member_array(mixed item, mixed *arr); DESCRIPTION Returns the index of the first occurence of item in array arr. If not found, then -1 is returned. + +KEYWORDS + array diff --git a/doc/simulated/mklist b/doc/simulated/mklist index 2629ce1573a41e3859ea91fcb785d1a502778b23..0f34ee8d37255fa2240aa85b81c76bd374cd2ea7 100644 --- a/doc/simulated/mklist +++ b/doc/simulated/mklist @@ -1,11 +1,13 @@ NAME - mklist - make a list + mklist - make a multiset SYNTAX - list mklist(mixed *a) + #include <simulate.h> + + multiset mklist(mixed *a) DESCRIPTION - This function creates a list from an array. + This function creates a multiset from an array. EXAMPLE > mklist( ({1,2,3}) ); @@ -15,5 +17,8 @@ EXAMPLE 3 >) +KEYWORDS + multiset + SEE ALSO - builtin/aggregate_list \ No newline at end of file + builtin/aggregate_multiset \ No newline at end of file diff --git a/doc/simulated/mkmultiset b/doc/simulated/mkmultiset new file mode 100644 index 0000000000000000000000000000000000000000..4453892210081f6913bdf545e6378505332bc53e --- /dev/null +++ b/doc/simulated/mkmultiset @@ -0,0 +1,22 @@ +NAME + mkmultiset - make a multiset + +SYNTAX + multiset mkmultiset(mixed *a) + +DESCRIPTION + This function creates a multiset from an array. + +EXAMPLE + > mkmultiset( ({1,2,3}) ); + Result: (< /* 3 elements */ + 1, + 2, + 3 + >) + +KEYWORDS + multiset + +SEE ALSO + builtin/aggregate_multiset diff --git a/doc/simulated/perror b/doc/simulated/perror new file mode 100644 index 0000000000000000000000000000000000000000..861271568eaa41ee9f815354d44553a3f215a90b --- /dev/null +++ b/doc/simulated/perror @@ -0,0 +1,18 @@ +NAME + perror - print error + +SYNTAX + #include <stdio.h> + + void perror(string s); + +DESCRIPTION + This function prints a message to stderr along with a description + of what went wrong if available. It uses the system errno to find + out what went wrong, so it is only applicable to IO errors. + +KEYWORDS + file + +SEE ALSO + werror \ No newline at end of file diff --git a/doc/simulated/popen b/doc/simulated/popen index aa07f6cee9d4d0111eb9654974d62920f8232c4b..2d6dee0275632aaf212b875ef327e08b2e4e354e 100644 --- a/doc/simulated/popen +++ b/doc/simulated/popen @@ -2,6 +2,8 @@ NAME popen - pipe open SYNTAX + #include <process.h> + string popen(string cmd); DESCRIPTION diff --git a/doc/simulated/previous_object b/doc/simulated/previous_object index 2d246a69ce3911cef1b752a550996ddb8d2e61fd..868061efaa7cec21b0d06d58cffe3abb9da04b9c 100644 --- a/doc/simulated/previous_object +++ b/doc/simulated/previous_object @@ -2,6 +2,8 @@ NAME previous_object - return the calling object SYNTAX + #include <simulate.h> + object previous_object(); DESCRIPTION diff --git a/doc/simulated/putenv b/doc/simulated/putenv new file mode 100644 index 0000000000000000000000000000000000000000..5e1dbdb206b60b7929ce64a0ae21ee5360ddf366 --- /dev/null +++ b/doc/simulated/putenv @@ -0,0 +1,11 @@ +NAME + putenv - put environment variable + +SYNTAX + void putenv(string varname, string value); + +DESCRIPTION + This function sets the environment variable 'varname' to 'value'. + +SEE ALSO + getenv, exece diff --git a/doc/simulated/read_bytes b/doc/simulated/read_bytes index 95e5e32adaf15cfa5bc6c1f5888e992460fdcb17..2e33d0312550d88a4d4d0dea7472f31bfb6cc89b 100644 --- a/doc/simulated/read_bytes +++ b/doc/simulated/read_bytes @@ -2,12 +2,17 @@ NAME read_bytes - read a number of bytes into a string from a file SYNTAX + #include <simulate.h> + string read_bytes(string file,int start,int len); DESCRIPTION Read len number of bytes from file file staring at byte start and return it as a string. +KEYWORDS + file + SEE ALSO write_file diff --git a/doc/simulated/regexp b/doc/simulated/regexp index 05f14528ed31e0ba4340800b870b25097e4c4b4e..2aa7171ed2b83a2792d2535d6cfba3cfd6da3232 100644 --- a/doc/simulated/regexp +++ b/doc/simulated/regexp @@ -2,10 +2,15 @@ NAME regexp - filter an array through a regexp SYNTAX + #include <simulate.h> + string *regexp(string *arr, string reg); DESCRIPTION Return those strings in arr that matches the regexp in reg. +KEYWORDS + string + SEE ALSO regexp/regexp diff --git a/doc/simulated/search_array b/doc/simulated/search_array index 98468d9533e0286af4ab12909af7e9d36622f0c4..f4ae391c4bf882b06819b6563c351ec26175ed8c 100644 --- a/doc/simulated/search_array +++ b/doc/simulated/search_array @@ -2,6 +2,8 @@ NAME search_array - search for something in an array SYNTAX + #include <array.h> + int search_array(mixed *arr,function fun,mixed arg, ...); or int search_array(object *arr,string fun,mixed arg, ...); @@ -13,5 +15,8 @@ DESCRIPTION first call that returned true instead or returning an array of the returned values. If no call returns true, -1 is returned. +KEYWORDS + array + SEE ALSO sum_arrays, filter_array, member_array diff --git a/doc/simulated/sort_array b/doc/simulated/sort_array index f50e9753c17e1832ac04027b5a15eaea2758ecdc..f47ec013429e2747480cad7fa5b0a23a95d29a31 100644 --- a/doc/simulated/sort_array +++ b/doc/simulated/sort_array @@ -2,6 +2,8 @@ NAME sort_array - sort an array SYNTAX + #include <array.h> + mixed *sort_array(mixed *arr,function fun,mixed ... args); DESCRIPTION @@ -11,5 +13,8 @@ DESCRIPTION sent as 3rd, 4th etc. argument to fun. If fun is omitted, < is unsed instead. +KEYWORDS + array + SEE ALSO map_array, filter_array diff --git a/doc/simulated/spawn b/doc/simulated/spawn index c04ee827b704eeaefcea24604338f3695f1be996..5391e35709e186dba9d39684e17f4754e10dd5a1 100644 --- a/doc/simulated/spawn +++ b/doc/simulated/spawn @@ -2,6 +2,8 @@ NAME spawn - spawn a process SYNTAX + #include <process.h> + int spawn(string cmd); or int spawn(string cmd, object stdin); @@ -17,6 +19,6 @@ DESCRIPTION should go. SEE ALSO - popen, files/fork, files/exec, files/files->pipe, - files/files->dup2 + popen, files/fork, files/exec, files/file->pipe, + files/file->dup2 diff --git a/doc/simulated/strlen b/doc/simulated/strlen index 905b99604702356d501b9bbbfc1c848772402b78..a76e3bc0e14d30b567b6bd9bf15699cf5cd933cb 100644 --- a/doc/simulated/strlen +++ b/doc/simulated/strlen @@ -2,10 +2,15 @@ NAME strlen - Return the length of a string SYNTAX + #include <simulate.h> + int strlen(string s); DESCRIPTION - This function is equal to builtin/sizeof. + This function is equal to sizeof. + +KEYWORDS + string SEE ALSO builtin/sizeof \ No newline at end of file diff --git a/doc/simulated/strstr b/doc/simulated/strstr index 08bd1463faee02d0ec7d8c6d0d2c3725e2abb2e9..82f4d026db65e040d6bf3b82ef9cf84e3b34acf8 100644 --- a/doc/simulated/strstr +++ b/doc/simulated/strstr @@ -2,11 +2,16 @@ NAME strstr - find a string inside a string SYNTAX + #include <simulate.h> + int strstr(string str1,string str2); DESCRIPTION Return the position of str2 in str1, if str2 can't be found in str1 -1 is returned. +KEYWORDS + string + SEE ALSO builtin/sscanf, builtin/explode diff --git a/doc/builtin/sum b/doc/simulated/sum similarity index 79% rename from doc/builtin/sum rename to doc/simulated/sum index 2179b3c5ccb86fe3de0790bcfb8cfc74e4bcab19..a4c75bbc8fa508044026cdd689d15f79a021c018 100644 --- a/doc/builtin/sum +++ b/doc/simulated/sum @@ -2,6 +2,8 @@ NAME sum - add values together SYNTAX + #include <simulate.h> + int sum(int ... i); or float sum(float ... f); @@ -12,7 +14,7 @@ SYNTAX or mapping sum(mapping ... m); or - list sum(list ... l); + list sum(multiset ... l); DESCRIPTION This function does exactly the same thing as adding all the arguments @@ -20,4 +22,4 @@ DESCRIPTION the summation operator. KEYWORDS - int, float, string, array, mapping, list + int, float, string, array, mapping, multiset diff --git a/doc/simulated/sum_arrays b/doc/simulated/sum_arrays index 7c9bfb881e5f475a8599ec50b9364846e758b864..b749a6583cf88f63de7e38c5a2ddb6ed541cb57e 100644 --- a/doc/simulated/sum_arrays +++ b/doc/simulated/sum_arrays @@ -2,23 +2,28 @@ NAME sum_arrays - map any number of arrays over a function. SYNTAX + #include <array.h> + mixed *sum_arrays(function fun,mixed *arr1,...); DESCRIPTION Works like this: - mixed *sum_arrays(function fun,mixed *arr1,...) - { - int e; + mixed *sum_arrays(function fun,mixed *arr1,...) + { + int e; mixed *res=allocate(sizeof(arr1)); - for(e=0;e<sizeof(arr1);e++) - { + for(e=0;e<sizeof(arr1);e++) + { res[e]=fun(arr1[e],arr2[e],...); - } + } return res; - } + } Simple ehh? +KEYWORDS + array + SEE ALSO map_array, filter_array, search_array diff --git a/doc/simulated/system b/doc/simulated/system index 9c94ce88d687a028c8f7b084d08b7ffddc79b676..567dfbaecadd0a6d14200f1544ead35267dece2d 100644 --- a/doc/simulated/system +++ b/doc/simulated/system @@ -2,6 +2,8 @@ NAME system - run an external program SYNTAX + #include <process.h> + void system(string cmd); DESCRIPTION diff --git a/doc/simulated/this_function b/doc/simulated/this_function index ee659e954558a44fe4b56eccd015a70f0148e2d2..6aac86684a928bc021b8197c548b05d55dd4762c 100644 --- a/doc/simulated/this_function +++ b/doc/simulated/this_function @@ -2,12 +2,17 @@ NAME this_function - return a functionpointer to the current function SYNTAX + #include <simulate.h> + function this_function(); DESCRIPTION Returns a functionpointer to the current function, useful for making recursive lambda-functions. +KEYWORDS + function + SEE ALSO builtin/get_function, builtin/function_name, builtin/function_object, builtin/backtrace diff --git a/doc/simulated/version b/doc/simulated/version index 40ebab06a7b1974b4df323f523b83e573b2cf5a3..adc6a557a9554ccf315aa177d639b9d96c18c6f6 100644 --- a/doc/simulated/version +++ b/doc/simulated/version @@ -5,8 +5,8 @@ SYNTAX string version(); DESCRIPTION - This function returns a brief information about the uLPC version. + This function returns a brief information about the Pike version. EXAMPLE > version(); - Result: uLPC v1.0E-13 + Result: Pike v1.0E-13 diff --git a/doc/simulated/write b/doc/simulated/write index ca53e553db5e132d683ce1b7084098a67f703b7b..00d4f9817f42c902f7c0f83f2a922ff2b9326c0b 100644 --- a/doc/simulated/write +++ b/doc/simulated/write @@ -9,4 +9,4 @@ DESCRIPTION /precompiled/file SEE ALSO - builtin/perror + builtin/werror diff --git a/doc/simulated/write_file b/doc/simulated/write_file index 04e7c1fa84a83a4a2c20e1a1147c6d8ba5ba1600..7f7bccb28e6f8210e773811261be57de121ff93f 100644 --- a/doc/simulated/write_file +++ b/doc/simulated/write_file @@ -2,10 +2,15 @@ NAME write_file - append a string to a file SYNTAX + #include <simulate.h> + int write_file(string file, string str) DESCRIPTION Append the string str onto the file file. Returns number of bytes written. +KEYWORDS + file + SEE ALSO - read_file + read_bytes diff --git a/doc/types/array b/doc/types/array index 5576582658305a0b4a37925179b31c811b6fa470..01d6323d63156d217ca9bd7b90e45679a8490e85 100644 --- a/doc/types/array +++ b/doc/types/array @@ -7,12 +7,17 @@ SYNTAX EXAMPLE DESCRIPTION Arrays are basically a place to store a number of other values. - Arrays in lpc are allocated blocks of values. They are dynamically + Arrays in pike are allocated blocks of values. They are dynamically allocated and does not need to be declared as in C. The values in the array can be set when creating the array as in the first construction or anytime afterwards like this: arr[index]=data where - index is an integer greater or equal to 0 and smaller than the array - size. Note that arrays are shared and use reference counts to keep + index is an integer. Index is normally 0 <= index < sizeof(arr), and + refers to the corresponding element in the array. If index is less + than zero, it is the same as doing arr[sizeof(arr)+index]. This + means that negative index will index the array from the end rather + than from the beginning. + + Note that arrays are shared and use reference counts to keep track of their references. This will have the effect that you can have two variables pointing to the same array, and when you change an index in in it, both variables will show the change. @@ -20,27 +25,30 @@ DESCRIPTION Here follows a list of operators that applies to arrays: In this list a and b is used to represent an array expression: - a + b : summation ( ({1}) + ({2}) returns ({1,2}) ) - a - b : subtraction, returns a copy of a with all values that are - present in b removed, ( ({1, 2, 3}) - ({2}) returns ({1,3}) ) - a & b : intersection, return an array with all values that are - present in both a and b - a | b : union, return an array with all values that are present in - a or b, differs from summation in that values that are - present in both a and b are only returned once. - a ^ b : xor, return an array with all values that are present in - a or b but not in both. - a * c : multiplication (c is a string) same thing as implode(a,c) - a == b : returns 1 if a is the same array as b, same size and values - is not enough. - a != b : returns 0 if a is the same array as b, same size and values - is not enough. - ! a : boolean not, returns 0 - a[c] : indexing, returns element c in the array (c is an int) - a[c]=d : setting, sets element c in the array to d (c is an int) - a[c..d]: range (c & d are ints) returns an array containing a pice of - the array a. The piece starts at element c and ends (and - includes) element d. + a + b summation ( ({1}) + ({2}) returns ({1,2}) ) + a - b subtraction, returns a copy of a with all values that are + present in b removed, ( ({1, 2, 3}) - ({2}) returns ({1,3}) ) + a & b intersection, return an array with all values that are + present in both a and b + a | b union, return an array with all values that are present in + a or b, differs from summation in that values that are + present in both a and b are only returned once. + a ^ b xor, return an array with all values that are present in + a or b but not in both. + a * c multiplication (c is a string) same thing as implode(a,c) + a == b returns 1 if a is the same array as b, same size and values + is not enough. + a != b returns 0 if a is the same array as b, same size and values + is not enough. + ! a boolean not, returns 0 + a[c] indexing, returns element c in the array (c is an int) + a[c]=d setting, sets element c in the array to d (c is an int) + a[c..d] range (c & d are ints) returns an array containing a pice of + the array a. The piece starts at element c and ends (and + includes) element d. + +KEYWORDS + types SEE ALSO - mapping, list, builtin/allocate, builtin/sizeof, builtin/values + mapping, multiset, builtin/allocate, builtin/sizeof diff --git a/doc/types/float b/doc/types/float index 4b27d692e488067820e8f1332269bfc3c5e9228f..3ce15fac72454f7209ccb69c82c0a9417635e86e 100644 --- a/doc/types/float +++ b/doc/types/float @@ -13,22 +13,25 @@ DESCRIPTION A list of operators that applies to floats follows: In this list a and b is used to represent a float expression: - a + b : summation - a - b : subtraction - a * b : multiplication - a / b : integer division - a % b : modulo ( same thing as a - floor( a / b ) * b ) - - a : negation - a == b : return 1 if a is equal to b, 0 otherwise - a != b : return 0 if a is equal to b, 1 otherwise - a < b : returns 1 if a is lesser than b, 0 otherwise - a <= b : returns 1 if a is lesser or equal to b, 0 otherwise - a > b : returns 1 if a is greater than b, 0 otherwise - a >= b : returns 1 if a is greater or equal to b, 0 otherwise + a + b summation + a - b subtraction + a * b multiplication + a / b division + a % b modulo ( same thing as a - floor( a / b ) * b ) + - a negation + a == b return 1 if a is equal to b, 0 otherwise + a != b return 0 if a is equal to b, 1 otherwise + a < b returns 1 if a is lesser than b, 0 otherwise + a <= b returns 1 if a is lesser or equal to b, 0 otherwise + a > b returns 1 if a is greater than b, 0 otherwise + a >= b returns 1 if a is greater or equal to b, 0 otherwise NOTA BENE floats and ints cannot be used together, they have to be cast to the same type first. +KEYWORDS + types + SEE ALSO - float, modules/math + math/sin, math/cos, math/tan, math/sqrt diff --git a/doc/types/function b/doc/types/function index d0db01411fa9efab5c95aad728467e50fcb2e246..f90318276923c589087442e52af58decc47c0708 100644 --- a/doc/types/function +++ b/doc/types/function @@ -13,6 +13,9 @@ DESCRIPTION become 0. If you try to call a functionpointer that has is 0 then 0 will be returned. +KEYWORDS + types + SEE ALSO object, builtin/call_function, builtin/functionp, builtin/function_object, builtin/function_name diff --git a/doc/types/int b/doc/types/int index b4fa8802006134ab230ade4acc0f9ed35f06b3c4..13014a0eb0f3224fb1f6d6aded6bfb7e263d75cf 100644 --- a/doc/types/int +++ b/doc/types/int @@ -14,23 +14,26 @@ DESCRIPTION In this list a and b is used to represent an integer expression: - a + b : summation - a - b : subtraction - a * b : multiplication - a / b : integer division - a % b : modulo ( same thing as a - ( a / b ) * b ) - a | b : bitwise or - a & b : bitwise and - a ^ b : bitwise xor - ! a : boolean not, returns 1 if a is zero 0 otherwise - ~ a : bitwise complement - - a : negation - a == b : return 1 if a is equal to b, 0 otherwise - a != b : return 0 if a is equal to b, 1 otherwise - a < b : returns 1 if a is lesser than b, 0 otherwise - a <= b : returns 1 if a is lesser or equal to b, 0 otherwise - a > b : returns 1 if a is greater than b, 0 otherwise - a >= b : returns 1 if a is greater or equal to b, 0 otherwise + a + b summation + a - b subtraction + a * b multiplication + a / b integer division + a % b modulo ( same thing as a - ( a / b ) * b ) + a | b bitwise or + a & b bitwise and + a ^ b bitwise xor + ! a boolean not, returns 1 if a is zero 0 otherwise + ~ a bitwise complement + - a negation + a == b return 1 if a is equal to b, 0 otherwise + a != b return 0 if a is equal to b, 1 otherwise + a < b returns 1 if a is lesser than b, 0 otherwise + a <= b returns 1 if a is lesser or equal to b, 0 otherwise + a > b returns 1 if a is greater than b, 0 otherwise + a >= b returns 1 if a is greater or equal to b, 0 otherwise + +KEYWORDS + types SEE ALSO float diff --git a/doc/types/list b/doc/types/list deleted file mode 100644 index ceee09092588b4dbfc2b9c51057fa9713395143f..0000000000000000000000000000000000000000 --- a/doc/types/list +++ /dev/null @@ -1,35 +0,0 @@ -NAME - list - a set of values - -SYNTAX EXAMPLE - (< 1, 7, 8, 9 >) - -DESCRIPTION - A list is basically a mapping without data values, when indexing a - list 1 willl be returned if the index is present, zero otherwise. - - Here follows a list of operators that applies to lists: - In this list a and b is used to represent a list expression: - - a + b : summation ( (<1>) + (<2>) returns (<1,2>) ) - a - b : subtraction, returns a copy of a with all values that are - present in b removed. - a & b : intersection, return a list with all values that are - present in both a & b. - a | b : union, return a list with all values that are present in - a or b, differs from summation in that values that are - present in both a and b are only returned once. - a ^ b : xor, return a list with all indices that are present in - a or b but not in both. - a == b : returns 1 if a is the same list as b, same size and values - is not enough. - a != b : returns 1 if a is the same list as b, same size and values - is not enough. - ! a : boolean not, returns 0 - a[c] : indexing, returns 1 c is present in the list a. - a[c]=d : setting, if d is true, c is added to the list if it is not - present already. If d is false, it is removed if it is - present. - -SEE ALSO - mapping, array, builtin/indices, builtin/sizeof diff --git a/doc/types/mapping b/doc/types/mapping index a4db94328fcece0b7bd992edce591c435589de42..4f571a3f7a71fa87f647d7580c369f5734bdb856 100644 --- a/doc/types/mapping +++ b/doc/types/mapping @@ -16,29 +16,33 @@ DESCRIPTION Here follows a list of operators that applies to mappings: In this list a and b is used to represent a mapping expression: - a + b : summation ( ([1:1]) + ([2:2,2:2]) returns ([1:1,2:2]) ) - a - b : subtraction, returns a copy of a with all pairs whos - index is present in b removed. - a & b : intersection, return a mapping with all indices that are - present in both a and b, if an index is present in both - a & b the data for that index will be taken from b. - a | b : union, return a mapping with all values that are present in - a or b, differs from summation in that values that are - present in both a and b are only returned once, as with - intersection, data will be taken from b when possible. - a ^ b : xor, return a mapping with all indices that are present in - a or b but not in both. - a == b : returns 1 if a is the same mapping as b, same size, indices - and values is not enough, 0 otherwise. - a != b : returns 0 if a is the same mapping as b, same size, indices - and values is not enough, 1 otherwise. - ! a : boolean not, returns 0 - a[c] : indexing, returns the value associated with the value c - in the mapping a. If there is no index c in the mapping - zero will be returned. (With zero type = 1) - a[c]=d : setting, this associates d with c in the mapping, the index - c will be added to the mapping automatically if it isn't - already there. + a + b summation ( ([1:1]) + ([2:2,2:2]) returns ([1:1,2:2,2:2]) ) + a - b subtraction, returns a copy of a with all pairs whos + index is present in b removed. + a & b intersection, return a mapping with all indices that are + resent in both a and b, if an index is present in both + a & b the data for that index will be taken from b. + a | b union, return a mapping with all values that are present in + a or b, differs from summation in that values that are + present in both a and b are only returned once, as with + intersection, data will be taken from b when possible. + a ^ b xor, return a mapping with all indices that are present in + a or b but not in both. + a == b returns 1 if a is the same mapping as b, same size, indices + and values is not enough, 0 otherwise. + a != b returns 0 if a is the same mapping as b, same size, indices + and values is not enough, 1 otherwise. + ! a boolean not, returns 0 + a[c] indexing, returns the value associated with the value c + in the mapping a. If there is no index c in the mapping + zero will be returned. (With zero_type = 1) + a[c]=d setting, this associates d with c in the mapping, the index + c will be added to the mapping automatically if it isn't + already there. + +KEYWORDS + types SEE ALSO - array, list, builtin/sizeof, builtin/indices, builtin/values + array, multiset, builtin/sizeof, builtin/indices, builtin/values, + builtin/zero_type diff --git a/doc/types/mixed b/doc/types/mixed new file mode 100644 index 0000000000000000000000000000000000000000..6f620ced154f892cd10dd7bb8254a5cd0e5a3de0 --- /dev/null +++ b/doc/types/mixed @@ -0,0 +1,15 @@ +NAME + mixed - any type + +DESCRIPTION + This is not really a type. But this keyword can be used to specify + that a variable, argument or return type can be of any type. + +EXAMPLES + mixed i=1; + mixed j="foo"; + mixed foo() { return "bar"; } + mixed bar() { return ({}); } + +KEYWORDS + types diff --git a/doc/types/multiset b/doc/types/multiset new file mode 100644 index 0000000000000000000000000000000000000000..a1a9cbd9e2d14842ba3a5212918447893beabe40 --- /dev/null +++ b/doc/types/multiset @@ -0,0 +1,38 @@ +NAME + multiset - a set of values + +SYNTAX EXAMPLE + (< 1, 7, 8, 9 >) + +DESCRIPTION + A multiset is basically a mapping without data values, when indexing a + multiset 1 willl be returned if the index is present, zero otherwise. + + Here follows a list of operators that applies to multisets: + In this list a and b is used to represent a multiset expression: + + a + b summation ( (<1>) + (<2>) returns (<1,2>) ) + a - b subtraction, returns a copy of a with all values that are + present in b removed. + a & b intersection, return a multiset with all values that are + present in both a & b. + a | b union, return a multiset with all values that are present in + a or b, differs from summation in that values that are + present in both a and b are only returned once. + a ^ b xor, return a multiset with all indices that are present in + a or b but not in both. + a == b returns 1 if a is the same multiset as b, same size and values + is not enough. + a != b returns 1 if a is the same multiset as b, same size and values + is not enough. + ! a boolean not, returns 0 + a[c] indexing, returns 1 c is present in the multiset a. + a[c]=d setting, if d is true, c is added to the multiset if it is not + present already. If d is false, it is removed if it is + present. + +KEYWORDS + types + +SEE ALSO + mapping, array, builtin/indices, builtin/sizeof diff --git a/doc/types/object b/doc/types/object index 7c3a1873c8c72e03f27764f528a800655df3b738..c96f0de705be25882cbc1ed64da260706e9870f5 100644 --- a/doc/types/object +++ b/doc/types/object @@ -10,13 +10,16 @@ DESCRIPTION In this list, o and o2 are used to represent object expressions, and s is a string expression: - o[s] : indexing, returns the identifier named s in the object o, - an identifier is a global variable or a function. - o[s]=c : This sets the global variable s int the object o to c, - if s is a function however, an error is produced. - o -> foo : same as o["foo"] - o == o2 : return 1 if o and o2 are the same object - o != o2 : return 0 if o and o2 are the same object + o[s] indexing, returns the identifier named s in the object o, + an identifier is a global variable or a function. + o[s]=c This sets the global variable s int the object o to c, + if s is a function however, an error is produced. + o->foo same as o["foo"] + o == o2 return 1 if o and o2 are the same object + o != o2 return 0 if o and o2 are the same object + +KEYWORDS + types SEE ALSO program, function, builtin/clone, builtin/destruct diff --git a/doc/types/program b/doc/types/program index e48520b314514d74092850ac032d00d3c13751aa..76f32cbd5360ccbb00482db68b8e508909baa4b1 100644 --- a/doc/types/program +++ b/doc/types/program @@ -8,6 +8,14 @@ DESCRIPTION arguments to clone() and the only operators that applies to programs are == and !=. +NOTA BENE + In Pike the term 'program' is somewhat confusing, becuase it is used + both to reference a complete runnable software package, and to a + structure in Pike containing code. + +KEYWORDS + types + SEE ALSO object, function, builtin/compile_file, builtin/compile_string, builtin/clone diff --git a/doc/types/string b/doc/types/string index b69fb8053b1c55ececb896e065812780bd61453a..1c56bff1e067d8fb7f1d36976eb16b121a4ce967 100644 --- a/doc/types/string +++ b/doc/types/string @@ -5,30 +5,47 @@ SYNTAX EXAMPLE "foo" DESCRIPTION - This type can contain a string, or list of characters, strings can - contain any character, even null characters. Strings are a basic - type in LPC, as opposed to C where strings are represented by an + This type can contan text. ie. a word, a sentence, or a book. Note + that this is not simply the letters A to Z, special characters, + null characters, newlines can all be stored in a string. Any 8-bit + character in fact. Strings are a basic + type in Pike, as opposed to C where strings are represented by an array of char. This means that you cannot set individual characters in a string with the index operator for instance. In fact, there are no functions that alters strings destructively. Also, all strings are 'shared', that means that if the same string is used in several places, only one will be stored in memory. + When writing a string in a program, you enclose it in doublequotes. + To write special characters you need to use one of the following + syntaxes: + + \n newline + \r carriage return + \t tab + \b backspace + \" " + \\ \ + A list of operators that applies to strings follow: In this list a and b is used to represent a string expression: - a + b : summation ( "a"+"b" returns "ab") - a - b : subtraction ( same as replace(a,b,"") ) - a / b : division ( same thing as explode(a,b) ) - ! a : boolean not, returns 0 - - The following operators compare two string alphabetically: - a == b : return 1 if a is equal to b, 0 otherwise - a != b : return 0 if a is equal to b, 1 otherwise - a < b : returns 1 if a is lesser than b, 0 otherwise - a <= b : returns 1 if a is lesser or equal to b, 0 otherwise - a > b : returns 1 if a is greater than b, 0 otherwise - a >= b : returns 1 if a is greater or equal to b, 0 otherwise + a + b summation ( "a"+"b" returns "ab") + a - b subtraction ( same as replace(a,b,"") ) + a / b division ( same thing as explode(a,b) ) + ! a boolean not, returns 0 + + The following operators compare two string alphabetically: + + a == b return 1 if a is equal to b, 0 otherwise + a != b return 0 if a is equal to b, 1 otherwise + a < b returns 1 if a is lesser than b, 0 otherwise + a <= b returns 1 if a is lesser or equal to b, 0 otherwise + a > b returns 1 if a is greater than b, 0 otherwise + a >= b returns 1 if a is greater or equal to b, 0 otherwise + +KEYWORDS + types SEE ALSO builtin/indices, builtin/values, builtin/sscanf, builtin/sprintf, diff --git a/lib/.cvsignore b/lib/.cvsignore deleted file mode 100644 index 298950205d93f944a78a322543bcd84f565624b3..0000000000000000000000000000000000000000 --- a/lib/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -.cvsignore -testsuite.lpc diff --git a/lib/.gitignore b/lib/.gitignore deleted file mode 100644 index 672ccd1bfa226493edc47e2b7c1b4058c650a9e6..0000000000000000000000000000000000000000 --- a/lib/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/.cvsignore -/testsuite.lpc diff --git a/lib/include/array.h b/lib/include/array.h new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/lib/include/array.pre.pike b/lib/include/array.pre.pike new file mode 100644 index 0000000000000000000000000000000000000000..8c458f765ac680aa1f4b1ab1c11630147aafa1fb --- /dev/null +++ b/lib/include/array.pre.pike @@ -0,0 +1,169 @@ +#define error(X) throw( ({ (X), backtrace()[0..sizeof(backtrace())-2] }) ) + +mixed map(mixed arr, mixed fun, mixed ... args) +{ + int e; + mixed *ret; + + if(mappingp(arr)) + return mkmapping(indices(arr),map(values(arr),fun,@args)); + + if(intp(fun)) + return arr(@args); + + if(stringp(fun)) + return column(arr, fun)(@args); + + if(functionp(fun)) + { + ret=allocate(sizeof(arr)); + for(e=0;e<sizeof(arr);e++) + ret[e]=fun(arr[e],@args); + return ret; + } + + error("Bad argument 2 to map_array().\n"); +} + +mixed filter(mixed arr, mixed fun, mixed ... args) +{ + int e; + mixed *ret; + + if(mappingp(arr)) + { + mixed *i, *v, r; + i=indices(arr); + ret=map(v=values(arr),fun,@args); + r=([]); + for(e=0;e<sizeof(ret);e++) if(ret[e]) r[i[e]]=v[e]; + + return ret; + }else{ + int d; + ret=map(arr,fun,@args); + for(e=0;e<sizeof(arr);e++) if(ret[e]) ret[d++]=arr[e]; + + return ret[..d-1]; + } +} + + +int search_array(mixed *arr, mixed fun, mixed ... args) +{ + int e; + + if(stringp(fun)) + { + for(e=0;e<sizeof(arr);e++) + if(arr[e][fun](@args)) + return e; + return -1; + } + else if(functionp(fun)) + { + for(e=0;e<sizeof(arr);e++) + if(fun(arr[e],@args)) + return e; + return -1; + } + else if(intp(fun)) + { + for(e=0;e<sizeof(arr);e++) + if(arr[e](@args)) + return e; + return -1; + } + else + { + error("Bad argument 2 to filter().\n"); + } +} + +mixed *sum_arrays(function foo, mixed * ... args) +{ + mixed *ret; + int e,d; + ret=allocate(sizeof(args[0])); + for(e=0;e<sizeof(args[0]);e++) + ret[e]=foo(@ column(args, e)); + return ret; +} + +varargs mixed *sort_array(array foo,function cmp, mixed ... args) +{ + array bar,tmp; + int len,start; + int length; + int foop, fooend, barp, barend; + + if(!cmp || cmp==`>) + { + foo+=({}); + sort(foo); + return foo; + } + + if(cmp == `<) + { + foo+=({}); + sort(foo); + reverse(foo); + return foo; + } + + length=sizeof(foo); + + foo+=({}); + bar=allocate(length); + + for(len=1;len<length;len*=2) + { + start=0; + while(start+len < length) + { + foop=start; + barp=start+len; + fooend=barp; + barend=barp+len; + if(barend > length) barend=length; + + while(1) + { + if(cmp(foo[foop],foo[barp],@args) <= 0) + { + bar[start++]=foo[foop++]; + if(foop == fooend) + { + while(barp < barend) bar[start++]=foo[barp++]; + break; + } + }else{ + bar[start++]=foo[barp++]; + if(barp == barend) + { + while(foop < fooend) bar[start++]=foo[foop++]; + break; + } + } + } + } + while(start < length) bar[start]=foo[start++]; + + tmp=foo; + foo=bar; + bar=tmp; + } + + return foo; +} + + +void create() +{ + add_constant("filter",filter); + add_constant("map",map); + add_constant("sum_arrays",sum_arrays); + add_constant("search_array",search_array); + add_constant("sort_array",sort_array); +} diff --git a/lib/include/process.h b/lib/include/process.h new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/lib/include/process.pre.pike b/lib/include/process.pre.pike new file mode 100644 index 0000000000000000000000000000000000000000..881a83b3c5286163c3c06108398b1d1df9d545a3 --- /dev/null +++ b/lib/include/process.pre.pike @@ -0,0 +1,95 @@ +#define error(X) throw( ({ (X), backtrace()[0..sizeof(backtrace())-2] }) ) +inherit "/precompiled/file"; + +varargs int exec(string file,string ... foo) +{ + string path; + if(search(file,"/")) + return exece(combine_path(getcwd(),file),foo,getenv()); + + path=getenv("PATH"); + + foreach(path/":",path) + if(file_stat(path=combine_path(path,file))) + return exece(path, foo,getenv()); + + return 69; +} + +varargs int spawn(string s,object stdin,object stdout,object stderr) +{ + object p; + int pid; + string t; + + if(pid=fork()) + { + return pid; + }else{ + program f=(program)"/precompiled/file"; + if(stdin) + stdin->dup2(clone(f,"stdin")); + + if(stdout) + stdout->dup2(clone(f,"stdout")); + + if(stderr) + stderr->dup2(clone(f,"stderr")); + + exec("/bin/sh","-c",s); + exit(69); + } +} + +string popen(string s) +{ + object p; + string t; + + p=file::pipe(); + if(!p) error("Popen failed. (couldn't create pipe)\n"); + spawn(s,0,p,0); + destruct(p); + + t=read(0x7fffffff); + if(!t) + { + int e; + e=errno(); + close(); + error("Popen failed with error "+e+".\n"); + }else{ + close(); + } + return t; +} + +void system(string s) +{ + object p; + int pid; + string t; + + p=file::pipe(); + if(!p) error("System() failed.\n"); + p->set_close_on_exec(0); + if(pid=fork()) + { + destruct(p); + /* Nothing will ever be written here, we are just waiting for it + * to close + */ + file::read(1); + }else{ + exec("/bin/sh","-c",s); + exit(69); + } +} + +void create() +{ + add_constant("system",system); + add_constant("exec",exec); + add_constant("spawn",spawn); + add_constant("popen",popen); +} diff --git a/lib/include/simulate.h b/lib/include/simulate.h new file mode 100644 index 0000000000000000000000000000000000000000..073621eead80e52fbb1dc09c5176b6aeb58600c5 --- /dev/null +++ b/lib/include/simulate.h @@ -0,0 +1,3 @@ +#define list multiset +#define perror(X) werror(X) +#define efun predef diff --git a/lib/include/simulate.pre.pike b/lib/include/simulate.pre.pike new file mode 100644 index 0000000000000000000000000000000000000000..d9607e0b072e34ffb830f8b9d97e7d13db6e6cb6 --- /dev/null +++ b/lib/include/simulate.pre.pike @@ -0,0 +1,135 @@ +#include <process.h> +#include <array.h> + +#define error(X) throw( ({ (X), backtrace()[0..sizeof(backtrace())-2] }) ) + +inherit "/precompiled/file"; +inherit "/precompiled/regexp"; + +string read_bytes(string filename,void|int start,void|int len) +{ + string ret; + if(!open(filename,"r")) + error("Couldn't open file "+filename+".\n"); + + switch(query_num_arg()) + { + case 1: + case 2: + len=0x7fffffff; + case 3: + seek(start); + } + ret=read(len); + close(); + return ret; +} + +int write_file(string filename,string what) +{ + int ret; + if(!open(filename,"awc")) + error("Couldn't open file "+filename+".\n"); + + ret=write(what); + close(); + return ret; +} + +int file_size(string s) +{ + int *stat; + stat=file_stat(s); + if(!stat) return -1; + return stat[1]; +} + +mixed *sum_arrays(function foo, mixed * ... args) +{ + mixed *ret; + int e,d; + ret=allocate(sizeof(args[0])); + for(e=0;e<sizeof(args[0]);e++) + ret[e]=foo(@ column(args, e)); + return ret; +} + +varargs int member_array(mixed needle,mixed *haystack,int start) +{ + return search(haystack,needle,start); +} + +object previous_object() +{ + int e; + mixed **trace; + object o,ret; + trace=backtrace(); + o=function_object(trace[-2][2]); + for(e=sizeof(trace)-3;e>=0;e--) + { + if(!trace[1][2]) continue; + ret=function_object(trace[1][2]); + if(o!=ret) return ret; + } + return 0; +} + +function this_function() +{ + return backtrace()[-2][2]; +} + +string capitalize(string s) +{ + return upper_case(s[0..0])+s[1..sizeof(s)]; +} + +function get_function(object o, string a) +{ + mixed ret; + ret=o[a]; + return functionp(ret) ? ret : 0; +} + +string *regexp(string *s, string reg) +{ + + regexp::create(reg); + s=filter(s,match); + regexp::create(); /* Free compiled regexp */ + return s; +} + +void create() +{ + add_constant("PI",3.1415926535897932384626433832795080); + add_constant("capitalize",capitalize); + add_constant("explode",`/); + add_constant("file_size",file_size); + add_constant("all_efuns",all_constants); + + add_constant("filter",filter); + add_constant("map_array",map); + + add_constant("get_function",get_function); + add_constant("implode",`*); + add_constant("m_indices",indices); + add_constant("m_sizeof",sizeof); + add_constant("m_values",values); + add_constant("member_array",member_array); + add_constant("previous_object",previous_object); + add_constant("read_bytes",read_bytes); + add_constant("regexp",regexp); + add_constant("strstr",search); + add_constant("sum",`+); + add_constant("sum_arrays",sum_arrays); + add_constant("this_function",this_function); + add_constant("write_file",write_file); + add_constant("add_efun",add_constant); + + add_constant("l_sizeof",sizeof); + add_constant("listp",multisetp); + add_constant("mklist",mkmultiset); + add_constant("aggregage_list",aggregate_multiset); +} diff --git a/lib/include/stdio.h b/lib/include/stdio.h new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/lib/include/stdio.pre.pike b/lib/include/stdio.pre.pike new file mode 100644 index 0000000000000000000000000000000000000000..eb0cc07ef02d694ea2364f1d03c2b4ee2e7782a7 --- /dev/null +++ b/lib/include/stdio.pre.pike @@ -0,0 +1,16 @@ +inherit "/precompiled/file"; + +void perror(string s) +{ +#if efun(strerror) + write(s+": "+strerror(errno())+"\n"); +#else + write(s+": errno: "+errno()+"\n"); +#endif +} + +void create() +{ + file::create("stderr"); + add_constant("perror",perror); +} \ No newline at end of file diff --git a/lib/master.lpc b/lib/master.pike similarity index 67% rename from lib/master.lpc rename to lib/master.pike index 975afdbd8c7a3370e2617f9be5ceb4045aa641f6..99aca576f10eec9418ded77a6fec1bdb223b5179 100644 --- a/lib/master.lpc +++ b/lib/master.pike @@ -1,5 +1,7 @@ string describe_backtrace(mixed *trace); +string pike_library_path; + /* This function is called when an error occurs that is not caught * with catch(). It's argument consists of: * ({ error_string, backtrace }) where backtrace is the output from the @@ -7,9 +9,8 @@ string describe_backtrace(mixed *trace); */ void handle_error(mixed *trace) { - efun::trace(0); -// perror(sprintf("trace=%O\n",trace)); - perror(describe_backtrace(trace)); + predef::trace(0); + werror(describe_backtrace(trace)); } /* Note that create is called before add_precompiled_program @@ -17,22 +18,27 @@ void handle_error(mixed *trace) void create() { /* make ourselves known */ - add_efun("describe_backtrace",describe_backtrace); - add_efun("master",lambda() { return this_object(); }); + add_constant("master",lambda() { return this_object(); }); + add_constant("describe_backtrace",describe_backtrace); + add_constant("version",lambda() { return "Pike v0.1"; }); + add_constant("mkmultiset",lambda(mixed *a) { return aggregate_multiset(@a); }); + add_constant("strlen",sizeof); + random_seed(time() + (getpid() * 0x11111111)); } mapping (string:program) programs=([]); /* This function is called whenever a module has built a clonable program - * with functions written in C and wants to notify the LPC part about + * with functions written in C and wants to notify the Pike part about * this. It also supplies a suggested name for the program. */ void add_precompiled_program(string name, program p) { -// perror("Precompiled: "+name+"\n"); programs[name]=p; -// perror(sprintf("programs =\n%O\n",programs)); + + if(sscanf(name,"/precompiled/%s",name)) + add_constant(upper_case(name[..0])+name[1..],p); } /* This function is called when the driver wants to cast a string @@ -46,19 +52,15 @@ program cast_to_program(string pname) if(pname[0]!='/') pname=combine_path(getcwd(),pname); - if(pname[sizeof(pname)-3..sizeof(pname)]==".lpc") + if(pname[sizeof(pname)-3..sizeof(pname)]==".pike") pname=pname[0..sizeof(pname)-4]; -// perror("Searching for "+pname+"\n"); -// perror(sprintf("in %O\n",programs)); if(ret=programs[pname]) return ret; -// perror("Didn't find it\n"); - if(file_stat(pname)) ret=compile_file(pname); else - ret=compile_file(pname+".lpc"); + ret=compile_file(pname+".pike"); return programs[pname]=ret; } @@ -78,12 +80,12 @@ program handle_inherit(string pname, string current_file) string *tmp; p=cast_to_program(pname); if(p) return p; - tmp=explode(current_file,"/"); + tmp=current_file/"/"; tmp[-1]=pname; - return cast_to_program(implode(tmp,"/")); + return cast_to_program(tmp*"/"); } -mapping (string:object) objects=(["/master.lpc":this_object()]); +mapping (string:object) objects=(["/master.pike":this_object()]); /* This function is called when the drivers wants to cast a string * to an object because of an implict or explicit cast. This function @@ -96,7 +98,7 @@ object cast_to_object(string oname) if(oname[0]=='/') oname=combine_path(getcwd(),oname); - if(oname[sizeof(oname)-3..sizeof(oname)]==".lpc") + if(oname[sizeof(oname)-3..sizeof(oname)]==".pike") oname=oname[0..sizeof(oname)-4]; if(ret=objects[oname]) return ret; @@ -112,6 +114,11 @@ varargs mixed getenv(string s) return environment[s]; } +void putenv(string var, string val) +{ + environment[var]=val; +} + /* This function is called when all the driver is done with all setup * of modules, efuns, tables etc. etc. and is ready to start executing * _real_ programs. It receives the arguments not meant for the driver @@ -126,40 +133,27 @@ void _main(string *argv, string *env) string *q; foreach(env,a) if(sscanf(a,"%s=%s",a,b)) environment[a]=b; - add_efun("getenv",getenv); - - add_efun("write",clone(cast_to_program("/precompiled/file"),"stdout")->write); + add_constant("getenv",getenv); + add_constant("putenv",putenv); -// terminal->set_nonblocking(test,0,0); -// write("Gurka.\n"); -// return; + add_constant("write",clone(cast_to_program("/precompiled/file"),"stdout")->write); -// script=clone((program)"/precompiled/file"); -// script->popen(({"ls"})); -// write(script->read(10000000)); - -// script->close(); - -// perror(sprintf("%O\n",backtrace()[-1])); a=backtrace()[-1][0]; q=a/"/"; - q[-1]="simulate.lpc"; -// perror(sprintf("%O\n",q)); -// perror(sprintf("%O\n",q*"/")); - clone(compile_file(q*"/")); + pike_library_path = q[0..sizeof(q)-2] * "/"; -// perror(sprintf("All efuns:\n%O\n",all_efuns())); +// clone(compile_file(pike_library_path+"/simulate.pike")); if(!sizeof(argv)) { - perror("Usage: ulpc [-driver options] script [script arguments]\n"); + werror("Usage: pike [-driver options] script [script arguments]\n"); exit(1); } script=(object)argv[0]; if(!script->main) { - perror("Error: "+argv[0]+" has no main().\n"); + werror("Error: "+argv[0]+" has no main().\n"); exit(1); } @@ -167,11 +161,11 @@ void _main(string *argv, string *env) if(i >=0) exit(i); } -int inhibit_compile_errors; +mixed inhibit_compile_errors; -void set_inhibit_compile_errors(int i) +void set_inhibit_compile_errors(mixed f) { - inhibit_compile_errors=i; + inhibit_compile_errors=f; } /* @@ -183,7 +177,13 @@ void set_inhibit_compile_errors(int i) void compile_error(string file,int line,string err) { if(!inhibit_compile_errors) - perror(sprintf("%s:%d:%s\n",file,line,err)); + { + werror(sprintf("%s:%d:%s\n",file,line,err)); + } + else if(functionp(inhibit_compile_errors)) + { + inhibit_compile_errors(file,line,err); + } } /* This function is called whenever an #include directive is encountered @@ -192,25 +192,52 @@ void compile_error(string file,int line,string err) * Note that previous_object cannot be trusted in ths function, because * the compiler calls this function. */ -string handle_include(string f, string current_file) +string handle_include(string f, + string current_file, + int local_include) { string *tmp, path; -/* perror("Handle include: "+f+"\n"); */ - tmp=explode(current_file, "/"); - tmp[-1]=f; - path=combine_path(getcwd(),implode(tmp,"/")); - if(file_stat(path)) return path; - - if(path=getenv("LPC_INCLUDE_PATH")) + if(local_include) { - foreach(explode(path,":"), path) + tmp=current_file/"/"; + tmp[-1]=f; + path=combine_path(getcwd(),tmp*"/"); + if(!file_stat(path)) return 0; + } + else + { + if(path=getenv("PIKE_INCLUDE_PATH")) + { + foreach(path/":", path) + { + path=combine_path(path,f); + if(file_stat(path)) + break; + else + path=0; + } + } + + if(!path) { - path=combine_path(path,f); - if(file_stat(path)) return path; + path=combine_path(pike_library_path+"/include",f); + if(!file_stat(path)) path=0; } } - return 0; + + if(path) + { + /* Handle preload */ + + if(path[-1]=='h' && path[-2]=='.' && + file_stat(path[0..sizeof(path)-2]+"pre.pike")) + { + cast_to_object(path[0..sizeof(path)-2]+"pre.pike"); + } + } + + return path; } /* It is possible that this should be a real efun, @@ -236,7 +263,7 @@ string describe_backtrace(mixed *trace) }else{ for(e=0;e<sizeof(trace);e++) { - mixed *tmp; + mixed tmp; string row; tmp=trace[e]; diff --git a/lib/simulate.lpc b/lib/simulate.lpc deleted file mode 100644 index 4a4d9f9753598e95a134914becfaa9f0d0f4e841..0000000000000000000000000000000000000000 --- a/lib/simulate.lpc +++ /dev/null @@ -1,372 +0,0 @@ -inherit "/precompiled/file"; -inherit "/precompiled/regexp"; - -#define error(X) throw( ({ (X), backtrace()[0..sizeof(backtrace())-2] }) ) - -string current_file, current_mode; - -static int open(string file, string how) -{ - if(file == current_file && how == current_mode) - { - seek(0); - return 1; - }else{ - if(file::open(file,how)) - { - current_file=file; - current_mode=how; - return 1; - }else{ - current_file=current_mode=0; - return 1; - } - } -} - -string read_bytes(string filename,void|int start,void|int len) -{ - if(!open(filename,"r")) - error("Couldn't open file "+filename+".\n"); - - switch(query_num_arg()) - { - case 1: - case 2: - len=0x7fffffff; - case 3: - seek(start); - } - return read(len); -} - -int write_file(string filename,string what) -{ - if(!open(filename,"wc")) - error("Couldn't open file "+filename+".\n"); - - seek(-1); - return write(what); -} - -mixed *map_array(mixed *arr, mixed fun, mixed ... args) -{ - int e; - mixed *ret; - - if(intp(fun)) - return arr(@args); - - ret=allocate(sizeof(arr)); - if(stringp(fun)) - { - for(e=0;e<sizeof(arr);e++) - ret[e]=arr[e][fun](@args); - } - else if(functionp(fun)) - { - for(e=0;e<sizeof(arr);e++) - ret[e]=fun(arr[e],@args); - }else{ - error("Bad argument 2 to map_array().\n"); - } - return ret; -} - -mixed *filter_array(mixed *arr, mixed fun, mixed ... args) -{ - int e,d; - mixed *ret; - - ret=allocate(sizeof(arr)); - if(stringp(fun)) - { - for(e=0;e<sizeof(arr);e++) - if(arr[e][fun](@args)) - ret[d++]=arr[e]; - } - else if(functionp(fun)) - { - for(e=0;e<sizeof(arr);e++) - if(fun(arr[e],@args)) - ret[d++]=arr[e]; - } - else if(intp(fun)) - { - for(e=0;e<sizeof(arr);e++) - if(arr[e](@args)) - ret[d++]=arr[e]; - } - else - { - error("Bad argument 2 to filter_array().\n"); - } - - return ret[0..d-1]; -} - -int search_array(mixed *arr, mixed fun, mixed ... args) -{ - int e; - - if(stringp(fun)) - { - for(e=0;e<sizeof(arr);e++) - if(arr[e][fun](@args)) - return e; - return -1; - } - else if(functionp(fun)) - { - for(e=0;e<sizeof(arr);e++) - if(fun(arr[e],@args)) - return e; - return -1; - } - else if(intp(fun)) - { - for(e=0;e<sizeof(arr);e++) - if(arr[e](@args)) - return e; - return -1; - } - else - { - error("Bad argument 2 to filter_array().\n"); - } -} - -varargs int exec(string file,string ... foo) -{ - string path; - if(search(file,"/")) - return exece(combine_path(getcwd(),file),foo); - - path=getenv("PATH"); - - foreach(path/":",path) - if(file_stat(path=combine_path(path,file))) - return exece(path, foo); - - return 69; -} - - -varargs int spawn(string s,object stdin,object stdout,object stderr) -{ - object p; - int pid; - string t; - - if(pid=fork()) - { - return pid; - }else{ - program f=(program)"/precompiled/file"; - if(stdin) - stdin->dup2(clone(f,"stdin")); - - if(stdout) - stdout->dup2(clone(f,"stdout")); - - if(stderr) - stderr->dup2(clone(f,"stderr")); - - exec("/bin/sh","-c",s); - exit(69); - } -} - -string popen(string s) -{ - object p; - string t; - - current_file=current_mode=0; - - p=file::pipe(); - if(!p) error("Popen failed. (couldn't create pipe)\n"); - spawn(s,0,p,0); - destruct(p); - - t=read(0x7fffffff); - if(!t) - { - int e; - e=errno(); - close(); - error("Popen failed with error "+e+".\n"); - }else{ - close(); - } - return t; -} - -void system(string s) -{ - object p; - int pid; - string t; - - current_file=current_mode=0; - - p=file::pipe(); - p->set_close_on_exec(0); - if(!p) error("System failed.\n"); - if(pid=fork()) - { - destruct(p); - /* Nothing will ever be written here, we are just waiting for it - * to close - */ - file::read(1); - }else{ - exec("/bin/sh","-c",s); - exit(69); - } -} - -int file_size(string s) -{ - int *stat; - stat=file_stat(s); - if(!stat) return -1; - return stat[1]; -} - -varargs string code_value(mixed s,int a) -{ - s=sprintf("%O",s); - if(a) s=replace(s,({"\n","\"","\\"}),({"\\n","\\\"","\\\\"})); - return s; -} - -mixed *sum_arrays(function foo, mixed * ... args) -{ - mixed *tmp,*ret; - int e,d; - tmp=allocate(sizeof(args)); - ret=allocate(sizeof(args[0])); - for(e=0;e<sizeof(args[0]);e++) - { - for(d=0;d<sizeof(args);d++) tmp[d]=args[d][e]; - ret[e]=foo(@tmp); - } - return ret; -} - -varargs int member_array(mixed needle,mixed *haystack,int start) -{ - return search(haystack,needle,start); -} - -object previous_object() -{ - int e; - mixed **trace; - object o,ret; - trace=backtrace(); - o=function_object(trace[-2][2]); - for(e=sizeof(trace)-3;e>=0;e--) - { - if(!trace[1][2]) continue; - ret=function_object(trace[1][2]); - if(o!=ret) return ret; - } - return 0; -} - -function this_function() -{ - return backtrace()[-2][2]; -} - -varargs mixed *sort_array(array foo,function cmp,mixed ... args) -{ - int ap,bp,retp; - mixed *a,*b,*ret; - - if(sizeof(foo)<2) return copy_value(foo); - - if(!cmp) cmp=lambda(mixed a,mixed b) { return a > b; }; - - a=sort_array(foo[0..sizeof(foo)/2-1],cmp,@args); - b=sort_array(foo[sizeof(foo)/2..sizeof(foo)],cmp,@args); - ret=allocate(sizeof(foo)); - - while(1) - { - if(cmp(a[ap],b[bp],@args) <= 0) - { - ret[retp++]=a[ap++]; - if(ap == sizeof(a)) - { - while(bp < sizeof(b)) ret[retp++]=b[bp++]; - return ret; - } - }else{ - ret[retp++]=b[bp++]; - if(bp == sizeof(b)) - { - while(ap < sizeof(a)) ret[retp++]=a[ap++]; - return ret; - } - } - } -} - -string capitalize(string s) -{ - return upper_case(s[0..0])+s[1..sizeof(s)]; -} - -function get_function(object o, string a) -{ - mixed ret; - ret=o[a]; - return functionp(ret) ? ret : 0; -} - -string *regexp(string *s, string reg) -{ - regexp::create(reg); - return filter_array(s,match); - regexp::create(); /* Free compiled regexp */ -} - -list mklist(mixed *a) -{ - return aggregate_list(@a); -} - -void create() -{ - add_efun("PI",3.1415926535897932384626433832795080); - add_efun("capitalize",capitalize); - add_efun("code_value",code_value); - add_efun("file_size",file_size); - add_efun("filter_array",filter_array); - add_efun("l_sizeof",sizeof); - add_efun("m_indices",indices); - add_efun("m_sizeof",sizeof); - add_efun("m_values",values); - add_efun("map_array",map_array); - add_efun("member_array",member_array); - add_efun("mklist",mklist); - add_efun("popen",popen); - add_efun("spawn",spawn); - add_efun("system",system); - add_efun("previous_object",previous_object); - add_efun("read_bytes",read_bytes); - add_efun("search_array",search_array); - add_efun("sort_array",sort_array); - add_efun("strlen",sizeof); - add_efun("strstr",search); - add_efun("sum_arrays",sum_arrays); - add_efun("this_function",this_function); - add_efun("version",lambda() { return "uLPC v1.6E-12"; }); - add_efun("write_file",write_file); - add_efun("get_function",get_function); - add_efun("regexp",regexp); -} - diff --git a/lib/testsuite.lpc b/lib/testsuite.lpc deleted file mode 100644 index 592d25c2db38aeec30eca1adb1d5a9335e974deb..0000000000000000000000000000000000000000 --- a/lib/testsuite.lpc +++ /dev/null @@ -1,12950 +0,0 @@ -#!ulpc -int main(int argc, string *argv) -{ - - int e, verbose, successes, errors, t; - string *tests; - program testprogram; - int start, fail; - - for(e=1;e<argc;e++) - { - switch(argv[e]) - { - case "-h": - case "--help": - perror("Usage: "+argv[e]+" [-v | --verbose] [-h | --help] [-t <testno>]\n"); - return 0; - - case "-v": - case "--verbose": - verbose++; - break; - - case "-s": - case "--start-test": - sscanf(argv[++e],"%d",start); - start--; - break; - - case "-f": - case "--fail": - fail++; - break; - - - case "-t": - case "--trace": - t++; - break; - - default: - perror("Unnown argument "+argv[e]+" (try "+argv[0]+" --help for more info).\n"); - - } - } - - tests = ({ - - -// signum, signame - "=mixed a() { return signum(\"SIGKILL\"); }\n"+ // test 1 - "mixed b() { return 9; }", - "=mixed a() { return signum(\"SIGINT\"); }\n"+ // test 2 - "mixed b() { return 2; }", - "=mixed a() { return signame(9); }\n"+ // test 3 - "mixed b() { return \"SIGKILL\"; }", - "=mixed a() { return signame(2); }\n"+ // test 4 - "mixed b() { return \"SIGINT\"; }", - -// kill, signal, getpid - "tmixed a() { return intp(getpid()); }", // test 5 - "dmixed a() { signal(signum(\"SIGUSR1\"),lambda() { add_efun(\"AFJLLAF\",17); }); }\n", // test 6 - "dmixed a() { kill(getpid(),signum(\"SIGUSR1\")); }\n", // test 7 - "=mixed a() { return AFJLLAF; }\n"+ // test 8 - "mixed b() { return 17; }", - "dmixed a() { add_efun(\"AFJLLAF\"); }\n", // test 9 - "dmixed a() { signal(signum(\"SIGUSR1\")); }\n", // test 10 - -// class - "tmixed a() { return programp(class {}); }", // test 11 - "tmixed a() { return functionp(clone(class { int foo() { return 1; }})->foo); }", // test 12 - "tmixed a() { return clone(class { int foo() { return 1; }})->foo(); }", // test 13 - "tmixed a() { return clone(class { int i=1; })->i; }", // test 14 - "fmixed a() { return clone(class { int foo() { return 1; }})->bar; }", // test 15 - "=mixed a() { return clone(clone(class { program foo=class { int i=20; }; })->foo)->i; }\n"+ // test 16 - "mixed b() { return 20; }", - -// Not yet cataloged - "=mixed a() { int i=10; { int i; } return i; }\n"+ // test 17 - "mixed b() { return 10; }", - "t\n"+"void foo(int a ,int b); function(int,int:void) a() { return foo; }\n", // test 18 - "t\n"+"void foo(int a, int ... b); function(int,int ...:void) a() { return foo; }\n", // test 19 - "t\n"+"void foo(); function(:void) a() { return foo; }\n", // test 20 - "cmixed a() { } void foo(); function(:string) a() { return foo;; }\n", // test 21 - - "dmixed a() { int p; foreach(({1,2,3,4,5}),p) random_seed(p); }\n", // test 22 - "=mixed a() { return random_seed(17),random(20000); }\n"+ // test 23 - "mixed b() { return random_seed(17),random(20000); }", - "=mixed a() { return random_seed(18),random(20000); }\n"+ // test 24 - "mixed b() { return random_seed(18),random(20000); }", - "=mixed a() { return random_seed(19),random(20000); }\n"+ // test 25 - "mixed b() { return random_seed(19),random(20000); }", - "dmixed a() { lambda(){return;}(); }\n", // test 26 - "dmixed a() { sleep(1); }\n", // test 27 - "cmixed a() { } int foo() { return; }\n", // test 28; - "cmixed a() { } void foo() { return 1; }\n", // test 29; - "emixed a() { return ({ lambda() { return 3; } , lambda() { return 7; }, lambda() { return 9; } })(); }\n"+ // test 30 - "mixed b() { return ({ 3,7,9 }); }", - "tmixed a() { return stringp(sprintf(\"%O\",({1,2,\"foo\"}))); }", // test 31 - "tmixed a() { return stringp(sprintf(\"%O\",([1:2,\"foo\":\"bar\"]))); }", // test 32 - "=mixed a() { int *a=({10}); a[0]++; return a[0]; }\n"+ // test 33 - "mixed b() { return 11; }", - "=mixed a() { mapping a=([10:11]); a[10]++; return a[10]; }\n"+ // test 34 - "mixed b() { return 12; }", - "=mixed a() { int e; object o=clone((program)\"/precompiled/file\"); if(!o->open(\"conftest.h\",\"wct\")) return -1; e=o->write(\"return 17;\\n\"); if(!o->close()) return -1; return e; }\n"+ // test 35 - "mixed b() { return 11; }", - "emixed a() { return mkmapping( ({3,6,2}), ({\"3\",\"6\",\"2\"})); }\n"+ // test 36 - "mixed b() { return ([3:\"3\", 6:\"6\", 2:\"2\"]); }", - "emixed a() { return sum(([3:\"3\", 6:\"6\", 2:\"2\"])); }\n"+ // test 37 - "mixed b() { return ([3:\"3\", 6:\"6\", 2:\"2\"]); }", - "tmixed a() { return sum(([3:\"3\", 6:\"6\", 2:\"2\"])) != ([3:\"3\", 6:\"6\", 2:\"2\"]); }", // test 38 - "=mixed a() { \n#include \"conftest.h\"\n; }\n"+ // test 39 - "mixed b() { return 17; }", - "=mixed a() { \n#include <conftest.h>\n; }\n"+ // test 40 - "mixed b() { return 17; }", - "tmixed a() { return intp(__LINE__); }", // test 41 - "tmixed a() { return stringp(__FILE__); }", // test 42 - "tmixed a() { return stringp(__DATE__); }", // test 43 - "tmixed a() { return stringp(__TIME__); }", // test 44 - "tmixed a() { return efun::stringp(\"\"); }", // test 45 - "emixed a() { return \"a,b,4,7,8s,asfd,a,d,f\" / \",\"; }\n"+ // test 46 - "mixed b() { return \"a,b,4,7,8s,asfd,a,d,f\" / \",\"; }", - "=mixed a() { string *a=\"a,b\"/\",\"; a[0]=\"c\"; return equal(a,({\"c\",\"b\"})); }\n"+ // test 47 - "mixed b() { return 1; }", - "tmixed a() { return 0||1; }", // test 48 - "tmixed a() { return 1||0; }", // test 49 - "tmixed a() { return !0||!0; }", // test 50 - "tmixed a() { return !0&&!0; }", // test 51 - "=mixed a() { mixed a=1; a+=1; return a; }\n"+ // test 52 - "mixed b() { return 2; }", - "=mixed a() { mixed a=1; a-=1; return a; }\n"+ // test 53 - "mixed b() { return 0; }", - "emixed a() { return \"abcd\"/\"\" - indices(\"abcd\"); }\n"+ // test 54 - "mixed b() { return ({\"a\",\"b\",\"c\",\"d\"}); }", - "emixed a() { return \"abcd\"/\"\" & indices(\"abcd\"); }\n"+ // test 55 - "mixed b() { return ({}); }", - "=mixed a() { return sizeof(\"abcd\"/\"\" & \"de\"/\"\"); }\n"+ // test 56 - "mixed b() { return 1; }", - "emixed a() { return ({0,0,0,0,0}); }\n"+ // test 57 - "mixed b() { return ({0,0,0,0,0}); }", - "emixed a() { return ({0,0,0,0,0}); }\n"+ // test 58 - "mixed b() { return allocate(5,\"object\"); }", - "emixed a() { return mkmapping(\"abcd\"/\"\",\"jklm\"/\"\") | mkmapping(\"jclm\"/\"\",\"alcd\"/\"\"); }\n"+ // test 59 - "mixed b() { return mkmapping(\"abcdjlm\"/\"\",\"jklmacd\"/\"\"); }", - "t\n"+"int foo() { return 17;} mixed a() { return foo() == 17; }\n", // test 60 - "=mixed a() { mixed a; a=2; a=a*3; return a; }\n"+ // test 61 - "mixed b() { return 6; }", - "=mixed a() { mixed a = ({1}); a=a+({2}); return equal(a,({1,2})); }\n"+ // test 62 - "mixed b() { return 1; }", - "Pstring a() { return \"/test\"; }\n"+ // test 63 - "string b() { return \"int foo() { return 17; }\"; }", - "=mixed a() { function bar=clone((program)\"/test\")->foo; return bar(); }\n"+ // test 64 - "mixed b() { return 17; }", - "=mixed a() { return popen(\"echo foo\"); }\n"+ // test 65 - "mixed b() { return \"foo\\n\"; }", - -// sscanf - "=mixed a() { mixed a; return sscanf(\"11\",\"%d\",a); }\n"+ // test 66 - "mixed b() { return 1; }", - "=mixed a() { mixed a; sscanf(\"11\",\"%d\",a); return a; }\n"+ // test 67 - "mixed b() { return 11; }", - "=mixed a() { mixed a,b; return sscanf(\"11foo\",\"%dfoo\",a); }\n"+ // test 68 - "mixed b() { return 1; }", - "=mixed a() { mixed a,b; sscanf(\"11foo\",\"%dfoo\",a); return a; }\n"+ // test 69 - "mixed b() { return 11; }", - "=mixed a() { mixed a,b; return sscanf(\"11foo\",\"%d%s\",a,b); }\n"+ // test 70 - "mixed b() { return 2; }", - "=mixed a() { mixed a,b; sscanf(\"11foo\",\"%d%s\",a,b); return b; }\n"+ // test 71 - "mixed b() { return \"foo\"; }", - "=mixed a() { mixed a,b; return sscanf(\"foo\",\"%c%s\",b,a); }\n"+ // test 72 - "mixed b() { return 2; }", - "=mixed a() { mixed a,b; sscanf(\"foo\",\"%c%s\",b,a); return b; }\n"+ // test 73 - "mixed b() { return 'f'; }", - "=mixed a() { mixed a,b; sscanf(\"foo\",\"%c%s\",b,a); return a; }\n"+ // test 74 - "mixed b() { return \"oo\"; }", - "=mixed a() { mixed a,b; return sscanf(\"1.0\",\"%f\",a); }\n"+ // test 75 - "mixed b() { return 1; }", - "=mixed a() { mixed a,b; sscanf(\"1.0\",\"%f\",a); return a; }\n"+ // test 76 - "mixed b() { return 1.0; }", - "=mixed a() { mixed a,b; sscanf(\"abcdeFGji\",\"%[a-z]%s\",a,b); return a; }\n"+ // test 77 - "mixed b() { return \"abcde\"; }", - "=mixed a() { mixed a,b; sscanf(\"abcdeFGji\",\"%[a-z]%s\",a,b); return b; }\n"+ // test 78 - "mixed b() { return \"FGji\"; }", - - "=mixed a() { mixed a,b; return sscanf(\"foo-%-bar\",\"%s-%%-%s\",a,b);; }\n"+ // test 79 - "mixed b() { return 2; }", - "=mixed a() { mixed a,b; sscanf(\"foo-%-bar\",\"%s-%%-%s\",a,b); return a; }\n"+ // test 80 - "mixed b() { return \"foo\"; }", - "=mixed a() { mixed a,b; sscanf(\"foo-%-bar\",\"%s-%%-%s\",a,b); return b; }\n"+ // test 81 - "mixed b() { return \"bar\"; }", - -// Basics - "tmixed a() { return 1; }", // test 82 - "tmixed a() { return \"\"; }", // test 83 - "tmixed a() { return !0; }", // test 84 - "tmixed a() { return !(!1); }", // test 85 - "tmixed a() { return this_object(); }", // test 86 - "tmixed a() { return a; }", // test 87 // a is the test function - "tmixed a() { return 0.0; }", // test 88 - "tmixed a() { return ([]); }", // test 89 - "tmixed a() { return ({}); }", // test 90 - "tmixed a() { return (<>); }", // test 91 - "tmixed a() { return object_program(this_object()); }", // test 92 - -// testing ! - "emixed a() { return !\"\"; }\n"+ // test 93 - "mixed b() { return 0; }", - "emixed a() { return !this_object(); }\n"+ // test 94 - "mixed b() { return 0; }", - "emixed a() { return !this_function(); }\n"+ // test 95 - "mixed b() { return 0; }", - -// testing == - "tmixed a() { return 1==1; }", // test 96 - "tmixed a() { return !(1==2); }", // test 97 - "tmixed a() { return \"\"==\"\"; }", // test 98 - "tmixed a() { return !(\"\"==\"foo\"); }", // test 99 - "tmixed a() { return this_object()==this_object(); }", // test 100 -// "tmixed a() { return this_function()==main; }", // test 101 - "tmixed a() { return 2.0==2.0; }", // test 102 - "tmixed a() { return ({})==({}); }", // test 103 - -// testing != - "tmixed a() { return ({1})!=({1}); }", // test 104 - "tmixed a() { return 1!=2; }", // test 105 - "tmixed a() { return !(1==2); }", // test 106 - "tmixed a() { return !(\"\"!=\"\"); }", // test 107 - "tmixed a() { return \"\"!=\"foo\"; }", // test 108 - -// testing < > <= >= - - - - - "tmixed a() { return 1<2; }", // test 109 - "tmixed a() { return !(1>2); }", // test 110 - "tmixed a() { return 2>1; }", // test 111 - "tmixed a() { return !(2<1); }", // test 112 - "tmixed a() { return 1<=2; }", // test 113 - "tmixed a() { return !(1>=2); }", // test 114 - "tmixed a() { return 2>=1; }", // test 115 - "tmixed a() { return !(2<=1); }", // test 116 - "tmixed a() { return 2<=2; }", // test 117 - "tmixed a() { return 1>=1; }", // test 118 - - "tmixed a() { return 1.0<2.0; }", // test 119 - "tmixed a() { return !(1.0>2.0); }", // test 120 - "tmixed a() { return 2.0>1.0; }", // test 121 - "tmixed a() { return !(2.0<1.0); }", // test 122 - "tmixed a() { return 1.0<=2.0; }", // test 123 - "tmixed a() { return !(1.0>=2.0); }", // test 124 - "tmixed a() { return 2.0>=1.0; }", // test 125 - "tmixed a() { return !(2.0<=1.0); }", // test 126 - "tmixed a() { return 2.0<=2.0; }", // test 127 - "tmixed a() { return 1.0>=1.0; }", // test 128 - - "tmixed a() { return \"a\"<\"b\"; }", // test 129 - "tmixed a() { return !(\"a\">\"b\"); }", // test 130 - "tmixed a() { return \"b\">\"a\"; }", // test 131 - "tmixed a() { return !(\"b\"<\"a\"); }", // test 132 - "tmixed a() { return \"a\"<=\"b\"; }", // test 133 - "tmixed a() { return !(\"a\">=\"b\"); }", // test 134 - "tmixed a() { return \"b\">=\"a\"; }", // test 135 - "tmixed a() { return !(\"b\"<=\"a\"); }", // test 136 - "tmixed a() { return \"b\"<=\"b\"; }", // test 137 - "tmixed a() { return \"a\">=\"a\"; }", // test 138 - - "tmixed a() { return \"\"<\"b\"; }", // test 139 - "tmixed a() { return !(\"\">\"b\"); }", // test 140 - "tmixed a() { return \"b\">\"\"; }", // test 141 - "tmixed a() { return !(\"b\"<\"\"); }", // test 142 - "tmixed a() { return \"\"<=\"b\"; }", // test 143 - "tmixed a() { return !(\"\">=\"b\"); }", // test 144 - "tmixed a() { return \"b\">=\"\"; }", // test 145 - "tmixed a() { return !(\"b\"<=\"\"); }", // test 146 - "tmixed a() { return \"b\"<=\"b\"; }", // test 147 - "tmixed a() { return \"\">=\"\"; }", // test 148 - -// hex construction - "=mixed a() { return 0; }\n"+ // test 149 - "mixed b() { return 0x0; }", - "=mixed a() { return 1; }\n"+ // test 150 - "mixed b() { return 0x1; }", - "=mixed a() { return 10; }\n"+ // test 151 - "mixed b() { return 0xa; }", - "=mixed a() { return 16; }\n"+ // test 152 - "mixed b() { return 0x10; }", - "=mixed a() { return 65535; }\n"+ // test 153 - "mixed b() { return 0xffff; }", - "=mixed a() { return 17*257*65537; }\n"+ // test 154 - "mixed b() { return 0x11111111; }", - -// octal construction - "=mixed a() { return 0; }\n"+ // test 155 - "mixed b() { return 00; }", - "=mixed a() { return 1; }\n"+ // test 156 - "mixed b() { return 01; }", - "=mixed a() { return 8; }\n"+ // test 157 - "mixed b() { return 010; }", - "=mixed a() { return 64; }\n"+ // test 158 - "mixed b() { return 0100; }", - "=mixed a() { return 1073741824; }\n"+ // test 159 - "mixed b() { return 010000000000; }", - "=mixed a() { return (8+1)*(8*8+1)*(8*8*8*8+1); }\n"+ // test 160 - "mixed b() { return 011111111; }", - -// string construction tests - "=mixed a() { return 16; }\n"+ // test 161 - "mixed b() { return \"\\20\"[0]; }", - "=mixed a() { return 16; }\n"+ // test 162 - "mixed b() { return \"\\020\"[0]; }", - "=mixed a() { return 255; }\n"+ // test 163 - "mixed b() { return \"\\377\"[0]; }", - "=mixed a() { return 4; }\n"+ // test 164 - "mixed b() { return '\\4'; }", - "tmixed a() { return \"\\r\"[0]!='r'; }", // test 165 - "=mixed a() { return \"\\r\"[0]; }\n"+ // test 166 - "mixed b() { return '\\r'; }", - "=mixed a() { return \"\\n\"[0]; }\n"+ // test 167 - "mixed b() { return '\\n'; }", - -// testing + - "=mixed a() { return 1+1; }\n"+ // test 168 - "mixed b() { return 2; }", - "=mixed a() { return 1+(-2); }\n"+ // test 169 - "mixed b() { return -1; }", - "=mixed a() { return (-2)+(-2); }\n"+ // test 170 - "mixed b() { return -4; }", - "=mixed a() { return \"hi\"+\"there\"; }\n"+ // test 171 - "mixed b() { return \"hithere\"; }", - "=mixed a() { return \"human\"+\"number\"+666; }\n"+ // test 172 - "mixed b() { return \"humannumber666\"; }", - "=mixed a() { return \"human\"+(\"number\"+666); }\n"+ // test 173 - "mixed b() { return \"humannumber666\"; }", - "=mixed a() { return (\"human\"+\"number\")+666; }\n"+ // test 174 - "mixed b() { return \"humannumber666\"; }", - "=mixed a() { return (\"human\"+\"number\")+666+111; }\n"+ // test 175 - "mixed b() { return \"humannumber666111\"; }", - "=mixed a() { return \"humannumber\"+(666+111); }\n"+ // test 176 - "mixed b() { return \"humannumber777\"; }", - "=mixed a() { return \"a\"+\"b\"+\"c\"+\"d\"+\"e\"+\"f\"+\"g\"+\"h\"+\"i\"+\"j\"+\"k\"+\"l\"+\"m\"+\"n\"+\"o\"+\"p\"+\"q\"+\"r\"+\"s\"+\"t\"+\"u\"+\"v\"+\"x\"+\"y\"; }\n"+ // test 177 - "mixed b() { return \"abcdefghijklmnopqrstuvxy\"; }", - "=mixed a() { return 1.0+1.0; }\n"+ // test 178 - "mixed b() { return 2.0; }", - "=mixed a() { return 1.0+(-1.0); }\n"+ // test 179 - "mixed b() { return 0.0; }", - "=mixed a() { return (-1.0)+(-1.0); }\n"+ // test 180 - "mixed b() { return -2.0; }", - "emixed a() { return ({1,2,3})+({4,5,6}); }\n"+ // test 181 - "mixed b() { return ({1,2,3,4,5,6}); }", - "emixed a() { return (<1,2,3,4>)+(<4,5,6>); }\n"+ // test 182 - "mixed b() { return (<1,2,3,4,4,5,6>); }", - "emixed a() { return ([0:1,3:6])+([5:2,3:6]); }\n"+ // test 183 - "mixed b() { return ([0:1,3:6,3:6,5:2]); }", - "Emixed a() { return this_object() + this_object(); }\n", // test 184 - -// testing - - "=mixed a() { return 10-3; }\n"+ // test 185 - "mixed b() { return 7; }", - "=mixed a() { return 3-10; }\n"+ // test 186 - "mixed b() { return -7; }", - "=mixed a() { return 10.0-3.0; }\n"+ // test 187 - "mixed b() { return 7.0; }", - "=mixed a() { return 3.0-10.0; }\n"+ // test 188 - "mixed b() { return -7.0; }", - "=mixed a() { return \"foobargazonk\"-\"o\"; }\n"+ // test 189 - "mixed b() { return \"fbargaznk\"; }", - "emixed a() { return ({\"foo\",\"bar\",\"gazonk\"})-({\"foo\",\"gazonk\"}); }\n"+ // test 190 - "mixed b() { return ({\"bar\"}); }", - "emixed a() { return ({\"c\",\"foo\",\"bar\",\"gazonk\",\"a\",\"b\",})-({\"foo\",\"gazonk\"}); }\n"+ // test 191 - "mixed b() { return ({\"c\",\"bar\",\"a\",\"b\"}); }", - "emixed a() { return (<\"foo\",\"bar\",\"gazonk\">)-(<\"foo\",\"gazonk\">); }\n"+ // test 192 - "mixed b() { return (<\"bar\">); }", - "emixed a() { return ([\"foo\":3,\"bar\":4,\"gazonk\":5])-([\"foo\":3,\"gazonk\":8]); }\n"+ // test 193 - "mixed b() { return ([\"bar\":4]); }", - -// testing ~ - "=mixed a() { return -1-4; }\n"+ // test 194 - "mixed b() { return ~4; }", - "=mixed a() { return -1-627893874; }\n"+ // test 195 - "mixed b() { return ~627893874; }", - -// testing * - "=mixed a() { return 3*4; }\n"+ // test 196 - "mixed b() { return 12; }", - "=mixed a() { return 4*3; }\n"+ // test 197 - "mixed b() { return 12; }", - "=mixed a() { return 2*2*2*2*2; }\n"+ // test 198 - "mixed b() { return 32; }", - "=mixed a() { return 3.0*4.0; }\n"+ // test 199 - "mixed b() { return 12.0; }", - "=mixed a() { return 4.0*3.0; }\n"+ // test 200 - "mixed b() { return 12.0; }", - "=mixed a() { return 2.0*2.0*2.0*2.0*2.0; }\n"+ // test 201 - "mixed b() { return 32.0; }", - "=mixed a() { return ({\"foo\",\"bar\",\"gazonk\"})*\"-\"; }\n"+ // test 202 - "mixed b() { return \"foo-bar-gazonk\"; }", - -// testing / - "=mixed a() { return 12/3; }\n"+ // test 203 - "mixed b() { return 4; }", - "=mixed a() { return 13/3; }\n"+ // test 204 - "mixed b() { return 4; }", - "=mixed a() { return 14/3; }\n"+ // test 205 - "mixed b() { return 4; }", - "=mixed a() { return 15/3; }\n"+ // test 206 - "mixed b() { return 5; }", - "Emixed a() { return 15/0; }\n", // test 207 - "=mixed a() { return 12.0/3.0; }\n"+ // test 208 - "mixed b() { return 4.0; }", - "=mixed a() { return 14.0/4.0; }\n"+ // test 209 - "mixed b() { return 3.5; }", - "=mixed a() { return 15.0/3.0; }\n"+ // test 210 - "mixed b() { return 5.0; }", - "Emixed a() { return 15.0/0.0; }\n", // test 211 - "emixed a() { return \"foo-bar-gazonk\"/\"-\"; }\n"+ // test 212 - "mixed b() { return ({\"foo\",\"bar\",\"gazonk\"}); }", - "emixed a() { return \"foobargazonk\"/\"\"; }\n"+ // test 213 - "mixed b() { return ({\"f\",\"o\",\"o\",\"b\",\"a\",\"r\",\"g\",\"a\",\"z\",\"o\",\"n\",\"k\"}); }", - -// testing % - "=mixed a() { return 12%3; }\n"+ // test 214 - "mixed b() { return 0; }", - "=mixed a() { return 13%3; }\n"+ // test 215 - "mixed b() { return 1; }", - "=mixed a() { return 14%3; }\n"+ // test 216 - "mixed b() { return 2; }", - "=mixed a() { return 15%3; }\n"+ // test 217 - "mixed b() { return 0; }", - "Emixed a() { return 15 % 0; }\n", // test 218 - "=mixed a() { return 12.0 % 3.0; }\n"+ // test 219 - "mixed b() { return 0.0; }", - "=mixed a() { return 13.0 % 3.0; }\n"+ // test 220 - "mixed b() { return 1.0; }", - "=mixed a() { return 14.0 % 3.0; }\n"+ // test 221 - "mixed b() { return 2.0; }", - "=mixed a() { return 14.5 % 3.0; }\n"+ // test 222 - "mixed b() { return 2.5; }", - "=mixed a() { return 15.0 % 3.0; }\n"+ // test 223 - "mixed b() { return 0.0; }", - "Emixed a() { return 15.0 % 0.0; }\n", // test 224 - -// testing && - "=mixed a() { return 0 && 1; }\n"+ // test 225 - "mixed b() { return 0; }", - "=mixed a() { return 1 && 0; }\n"+ // test 226 - "mixed b() { return 0; }", - "=mixed a() { return 0 && 0; }\n"+ // test 227 - "mixed b() { return 0; }", - "=mixed a() { return 1 && 1; }\n"+ // test 228 - "mixed b() { return 1; }", - "=mixed a() { return 78 && 1; }\n"+ // test 229 - "mixed b() { return 1; }", - "=mixed a() { return 78 && 99; }\n"+ // test 230 - "mixed b() { return 99; }", - "=mixed a() { return 78 && 99; }\n"+ // test 231 - "mixed b() { return 99; }", - -// testing || - "=mixed a() { return 0 || 1; }\n"+ // test 232 - "mixed b() { return 1; }", - "=mixed a() { return 1 || 0; }\n"+ // test 233 - "mixed b() { return 1; }", - "=mixed a() { return 0 || 0; }\n"+ // test 234 - "mixed b() { return 0; }", - "=mixed a() { return 1 || 1; }\n"+ // test 235 - "mixed b() { return 1; }", - "=mixed a() { return 78 || 1; }\n"+ // test 236 - "mixed b() { return 78; }", - "=mixed a() { return 78 || 0; }\n"+ // test 237 - "mixed b() { return 78; }", - -// testing | - "=mixed a() { return 0 | 0; }\n"+ // test 238 - "mixed b() { return 0; }", - "=mixed a() { return 1 | 1; }\n"+ // test 239 - "mixed b() { return 1; }", - "=mixed a() { return 4 | 1; }\n"+ // test 240 - "mixed b() { return 5; }", - "=mixed a() { return 1 | 9; }\n"+ // test 241 - "mixed b() { return 9; }", - "emixed a() { return sort_array(({1,2,3,4,4}) | ({3,5,6})); }\n"+ // test 242 - "mixed b() { return ({1,2,3,4,4,5,6}); }", - "emixed a() { return (<4,5,6>) | (<5,5,5>); }\n"+ // test 243 - "mixed b() { return (<4,5,5,5,6>) ; }", - "emixed a() { return ([-4:8,8:7]) | ([3:3,8:3]); }\n"+ // test 244 - "mixed b() { return ([-4:8,8:3,3:3]) ; }", - -// testing & - "=mixed a() { return 0 & 0; }\n"+ // test 245 - "mixed b() { return 0; }", - "=mixed a() { return 1 & 1; }\n"+ // test 246 - "mixed b() { return 1; }", - "=mixed a() { return 4 & 1; }\n"+ // test 247 - "mixed b() { return 0; }", - "=mixed a() { return 1 & 9; }\n"+ // test 248 - "mixed b() { return 1; }", - "emixed a() { return ({1,2,3,4,4}) & ({3,5,6}); }\n"+ // test 249 - "mixed b() { return ({3}); }", - "emixed a() { return (<4,5,6>) & (<5,5,5>); }\n"+ // test 250 - "mixed b() { return (<5>) ; }", - "emixed a() { return ([-4:8,8:7]) & ([3:3,8:3]); }\n"+ // test 251 - "mixed b() { return ([8:3]) ; }", - -// testing ^ - "=mixed a() { return 0 ^ 0; }\n"+ // test 252 - "mixed b() { return 0; }", - "=mixed a() { return 1 ^ 1; }\n"+ // test 253 - "mixed b() { return 0; }", - "=mixed a() { return 4 ^ 1; }\n"+ // test 254 - "mixed b() { return 5; }", - "=mixed a() { return 1 ^ 9; }\n"+ // test 255 - "mixed b() { return 8; }", - "emixed a() { return ({1,2,3,4,4}) ^ ({3,5,6}); }\n"+ // test 256 - "mixed b() { return ({1,2,4,4,5,6}); }", - "emixed a() { return (<4,5,6>) ^ (<5,5,5>); }\n"+ // test 257 - "mixed b() { return (<4,5,5,6>) ; }", - "emixed a() { return ([-4:8,8:7]) ^ ([3:3,8:3]); }\n"+ // test 258 - "mixed b() { return ([-4:8,3:3]) ; }", - -// testing << - "=mixed a() { return 1<<0; }\n"+ // test 259 - "mixed b() { return 1; }", - "=mixed a() { return 1<<1; }\n"+ // test 260 - "mixed b() { return 2; }", - "=mixed a() { return 1<<10; }\n"+ // test 261 - "mixed b() { return 1024; }", - "=mixed a() { return 5<<3; }\n"+ // test 262 - "mixed b() { return 40; }", - -// testing >> - "=mixed a() { return 9>>2; }\n"+ // test 263 - "mixed b() { return 2; }", - "=mixed a() { return 1>>1; }\n"+ // test 264 - "mixed b() { return 0; }", - "=mixed a() { return 1024>>10; }\n"+ // test 265 - "mixed b() { return 1; }", - "=mixed a() { return 47>>3; }\n"+ // test 266 - "mixed b() { return 5; }", - -// testing ? : - "tmixed a() { return 0?0:1; }", // test 267 - "tmixed a() { return 1?1:0; }", // test 268 - "tmixed a() { return \"\"?1:0; }", // test 269 - "tmixed a() { return !0?1:0; }", // test 270 - "tmixed a() { return !(!1)?1:0; }", // test 271 - "tmixed a() { return this_object()?1:0; }", // test 272 - "tmixed a() { return a?1:0; }", // test 273 // a is the test function - "tmixed a() { return 0.0?1:0; }", // test 274 - "tmixed a() { return ([])?1:0; }", // test 275 - "tmixed a() { return ({})?1:0; }", // test 276 - "tmixed a() { return (<>)?1:0; }", // test 277 - "tmixed a() { return object_program(this_object())?1:0; }", // test 278 - -// testing indexing - "=mixed a() { return \"foo\"[0]; }\n"+ // test 279 - "mixed b() { return 'f'; }", - "=mixed a() { return \"foo\"[1]; }\n"+ // test 280 - "mixed b() { return 'o'; }", - "=mixed a() { return \"foo\"[2]; }\n"+ // test 281 - "mixed b() { return 'o'; }", - "=mixed a() { return \"foo\"[-1]; }\n"+ // test 282 - "mixed b() { return 'o'; }", - "=mixed a() { return \"foo\"[-2]; }\n"+ // test 283 - "mixed b() { return 'o'; }", - "=mixed a() { return \"foo\"[-3]; }\n"+ // test 284 - "mixed b() { return 'f'; }", - "=mixed a() { return ({'f','o','o'})[0]; }\n"+ // test 285 - "mixed b() { return 'f'; }", - "=mixed a() { return ({'f','o','o'})[1]; }\n"+ // test 286 - "mixed b() { return 'o'; }", - "=mixed a() { return ({'f','o','o'})[2]; }\n"+ // test 287 - "mixed b() { return 'o'; }", - "=mixed a() { return ({'f','o','o'})[-1]; }\n"+ // test 288 - "mixed b() { return 'o'; }", - "=mixed a() { return ({'f','o','o'})[-2]; }\n"+ // test 289 - "mixed b() { return 'o'; }", - "=mixed a() { return ({'f','o','o'})[-3]; }\n"+ // test 290 - "mixed b() { return 'f'; }", - "=mixed a() { return ([0:'f',1:'o',2:'o'])[0]; }\n"+ // test 291 - "mixed b() { return 'f'; }", - "=mixed a() { return ([0:'f',1:'o',2:'o'])[1]; }\n"+ // test 292 - "mixed b() { return 'o'; }", - "=mixed a() { return ([0:'f',1:'o',2:'o'])[2]; }\n"+ // test 293 - "mixed b() { return 'o'; }", - "=mixed a() { return ([0:'f',1:'o',2:'o'])[3]; }\n"+ // test 294 - "mixed b() { return 0; }", - "=mixed a() { return ([0:'f',1:'o',2:'o'])[-1]; }\n"+ // test 295 - "mixed b() { return 0; }", - "=mixed a() { return (<'f','o','o'>)['o']; }\n"+ // test 296 - "mixed b() { return 1; }", - "=mixed a() { return (<'f','o','o'>)['f']; }\n"+ // test 297 - "mixed b() { return 1; }", - "=mixed a() { return (<'f','o','o'>)['b']; }\n"+ // test 298 - "mixed b() { return 0; }", - "=mixed a() { return (<'f','o','o'>)[-1]; }\n"+ // test 299 - "mixed b() { return 0; }", - -// index assigning - "=mixed a() { mixed a=({1}); a[0]=2; return equal(a,({2})); }\n"+ // test 300 - "mixed b() { return 1; }", - "=mixed a() { mixed a=(<1>); a[1]=2; return equal(a,(<1>)); }\n"+ // test 301 - "mixed b() { return 1; }", - "=mixed a() { mixed a=(<1>); a[0]=2; return equal(a,(<1,0>)); }\n"+ // test 302 - "mixed b() { return 1; }", - "=mixed a() { mixed a=(<1>); a[1]=0; return equal(a,(<>)); }\n"+ // test 303 - "mixed b() { return 1; }", - "=mixed a() { mixed a=(<1>); a[0]=0; return equal(a,(<1>)); }\n"+ // test 304 - "mixed b() { return 1; }", - "=mixed a() { mixed a=([1:1]); a[0]=0; return equal(a,([1:1,0:0])); }\n"+ // test 305 - "mixed b() { return 1; }", - "=mixed a() { mixed a=([1:1]); a[1]=0; return equal(a,([1:0])); }\n"+ // test 306 - "mixed b() { return 1; }", - - "Pstring a() { return \"/test\"; }\n"+ // test 307 - "string b() { return \"public int q,w,e,r; mixed t; mixed getw() { return w; } void setw(int _) { w=_; }\"; }", - "=mixed a() { return clone((program)\"/test\")->q; }\n"+ // test 308 - "mixed b() { return 0; }", - "=mixed a() { return clone((program)\"/test\")->w; }\n"+ // test 309 - "mixed b() { return 0; }", - "=mixed a() { return clone((program)\"/test\")->e; }\n"+ // test 310 - "mixed b() { return 0; }", - "=mixed a() { return clone((program)\"/test\")->r; }\n"+ // test 311 - "mixed b() { return 0; }", - "=mixed a() { return clone((program)\"/test\")->getw(); }\n"+ // test 312 - "mixed b() { return 0; }", - "=mixed a() { object o=clone((program)\"/test\"); o->setw(17); return o->w; }\n"+ // test 313 - "mixed b() { return 17; }", - "=mixed a() { object o=clone((program)\"/test\"); o->w=17; return o->getw(); }\n"+ // test 314 - "mixed b() { return 17; }", - - "=mixed a() { return clone((program)\"/test\")[\"q\"]; }\n"+ // test 315 - "mixed b() { return 0; }", - "=mixed a() { return clone((program)\"/test\")[\"w\"]; }\n"+ // test 316 - "mixed b() { return 0; }", - "=mixed a() { return clone((program)\"/test\")[\"e\"]; }\n"+ // test 317 - "mixed b() { return 0; }", - "=mixed a() { return clone((program)\"/test\")[\"r\"]; }\n"+ // test 318 - "mixed b() { return 0; }", - "=mixed a() { return clone((program)\"/test\")[\"getw\"](); }\n"+ // test 319 - "mixed b() { return 0; }", - "=mixed a() { object o=clone((program)\"/test\"); o[\"setw\"](17); return o[\"w\"]; }\n"+ // test 320 - "mixed b() { return 17; }", - "=mixed a() { object o=clone((program)\"/test\"); o[\"w\"]=17; return o[\"getw\"](); }\n"+ // test 321 - "mixed b() { return 17; }", - -// testing range - "=mixed a() { return \"foObar\"[0..0]; }\n"+ // test 322 - "mixed b() { return \"f\"; }", - "=mixed a() { return \"foobargazonk\"[3..5]; }\n"+ // test 323 - "mixed b() { return \"bar\"; }", - "=mixed a() { return \"foo\"[1..10]; }\n"+ // test 324 - "mixed b() { return \"oo\"; }", - "=mixed a() { return \"foo\"[-100..0]; }\n"+ // test 325 - "mixed b() { return \"f\"; }", - "=mixed a() { return \"foo\"[-100..100]; }\n"+ // test 326 - "mixed b() { return \"foo\"; }", - "=mixed a() { return \"foo\"[1..0]; }\n"+ // test 327 - "mixed b() { return \"\"; }", - "=mixed a() { return \"foo\"[0..-100]; }\n"+ // test 328 - "mixed b() { return \"\"; }", - "emixed a() { return ({1,2,3})[0..0]; }\n"+ // test 329 - "mixed b() { return ({1}); }", - "emixed a() { return ({1,2,3})[1..2]; }\n"+ // test 330 - "mixed b() { return ({2,3}); }", - "emixed a() { return ({1,2,3})[2..10]; }\n"+ // test 331 - "mixed b() { return ({3}); }", - "emixed a() { return ({1,2,3})[-100..0]; }\n"+ // test 332 - "mixed b() { return ({1}); }", - "emixed a() { return ({1,2,3})[-100..100]; }\n"+ // test 333 - "mixed b() { return ({1,2,3}); }", - "emixed a() { return ({1,2,3})[1..0]; }\n"+ // test 334 - "mixed b() { return ({}); }", - "emixed a() { return ({1,2,3})[0..-100]; }\n"+ // test 335 - "mixed b() { return ({}); }", - -// testing @ - "emixed a() { return ({1,2,3}); }\n"+ // test 336 - "mixed b() { return lambda(mixed ... x) { return x; }(@a()); }", - "emixed a() { return explode(\"foo\",\"\"); }\n"+ // test 337 - "mixed b() { return lambda(mixed ... x) { return x; }(@a()); }", - "=mixed a() { mixed *a=({1,2,3}); return lambda(mixed ... x) { return x; }(@a) !=a; }\n"+ // test 338 - "mixed b() { return 1; }", - -// testing += - "=mixed a() { int a=1; a+=10; return a; }\n"+ // test 339 - "mixed b() { return 11; }", -// testing -= - "=mixed a() { int a=1; a-=10; return a; }\n"+ // test 340 - "mixed b() { return -9; }", -// testing &= - "=mixed a() { int a=3; a&=10; return a; }\n"+ // test 341 - "mixed b() { return 2; }", -// testing |= - "=mixed a() { int a=3; a|=10; return a; }\n"+ // test 342 - "mixed b() { return 11; }", -// testing ^= - "=mixed a() { int a=3; a^=10; return a; }\n"+ // test 343 - "mixed b() { return 9; }", -// testing <<= - "=mixed a() { int a=3; a<<=2; return a; }\n"+ // test 344 - "mixed b() { return 12; }", -// testing <<= - "=mixed a() { int a=12; a>>=2; return a; }\n"+ // test 345 - "mixed b() { return 3; }", -// testing *= - "=mixed a() { int a=12; a*=2; return a; }\n"+ // test 346 - "mixed b() { return 24; }", -// testing /= - "=mixed a() { int a=12; a/=2; return a; }\n"+ // test 347 - "mixed b() { return 6; }", -// testing %= - "=mixed a() { int a=12; a%=7; return a; }\n"+ // test 348 - "mixed b() { return 5; }", - -// testing control structs - "=mixed a() { return 1; }\n"+ // test 349 - "mixed b() { return 1; }", - "=mixed a() { return lambda(){return 1;} (); }\n"+ // test 350 - "mixed b() { return 1 ; }", - "=mixed a() { if(0) return 0; else return 1; }\n"+ // test 351 - "mixed b() { return 1; }", - "=mixed a() { if(0) return 0; return 1; }\n"+ // test 352 - "mixed b() { return 1; }", - "=mixed a() { if(1) return 1; else return 0; }\n"+ // test 353 - "mixed b() { return 1; }", - "=mixed a() { if(\"\") return 1; else return 0; }\n"+ // test 354 - "mixed b() { return 1; }", - "=mixed a() { if(!0) return 1; else return 0; }\n"+ // test 355 - "mixed b() { return 1; }", - "=mixed a() { if(!(!1)) return 1; else return 0; }\n"+ // test 356 - "mixed b() { return 1; }", - "=mixed a() { if(this_object()) return 1; else return 0; }\n"+ // test 357 - "mixed b() { return 1; }", - "=mixed a() { if(a) return 1; else return 0; }\n"+ // test 358 - "mixed b() { return 1; }", "=mixed a() { if(0.0) return 1; else return 0; }\n"+ // test 359 - "mixed b() { return 1; }", - "=mixed a() { if(([])) return 1; else return 0; }\n"+ // test 360 - "mixed b() { return 1; }", - "=mixed a() { if(({})) return 1; else return 0; }\n"+ // test 361 - "mixed b() { return 1; }", - "=mixed a() { if((<>)) return 1; else return 0; }\n"+ // test 362 - "mixed b() { return 1; }", - "=mixed a() { if(object_program(this_object())) return 1; else return 0; }\n"+ // test 363 - "mixed b() { return 1; }", - -// break - "=mixed a() { while(1) break; return 1; }\n"+ // test 364 - "mixed b() { return 1; }", - "=mixed a() { while(1) if(1) break; return 1; }\n"+ // test 365 - "mixed b() { return 1; }", - -// for - "=mixed a() { int e; for(e=0;e<10;e++) break; return e; }\n"+ // test 366 - "mixed b() { return 0; }", - "=mixed a() { int e; for(e=0;e<10;e++) continue; return e; }\n"+ // test 367 - "mixed b() { return 10; }", - "=mixed a() { int e;string t=\"\"; for(e=0;e<10;e++) t+=e; return t; }\n"+ // test 368 - "mixed b() { return \"0123456789\"; }", - "=mixed a() { int e;string t=\"\"; for(e=0;e>-10;e--) t+=e; return t; }\n"+ // test 369 - "mixed b() { return \"0-1-2-3-4-5-6-7-8-9\"; }", - -// foreach - "=mixed a() { int e;string t=\"\"; foreach(({7,6,3,8}),e) t+=e; return t; }\n"+ // test 370 - "mixed b() { return \"7638\"; }", - "=mixed a() { string s;if(1) foreach(({}),s); else foreach(({}),s); return 1; }\n"+ // test 371 - "mixed b() { return 1; }", - -// do-whilte - "=mixed a() { int e;string t=\"\"; e=0; do{ t+=e; }while(++e<6); return t; }\n"+ // test 372 - "mixed b() { return \"012345\";; }", - -// while - "=mixed a() { int e;string t=\"\"; e=8; while(--e) t+=e; return t; }\n"+ // test 373 - "mixed b() { return \"7654321\";; }", - "=mixed a() { int e;string t=\"\"; e=8; while(e--) t+=e; return t; }\n"+ // test 374 - "mixed b() { return \"76543210\";; }", - "=mixed a() { int e;string t=\"\"; e=0; while(++e<6) t+=e; return t; }\n"+ // test 375 - "mixed b() { return \"12345\";; }", - "=mixed a() { int e=1;string t=\"\"; while(e<20){t+=e;e*=2;} return t; }\n"+ // test 376 - "mixed b() { return \"124816\";; }", - -// Switch - "=mixed a() { switch(\"\") { case 0: case \"gazonk\": return 0; } return 1; }\n"+ // test 377 - "mixed b() { return 1; }", - "=mixed a() { switch(\"\") { case \"gazonk\": case 0: return 0; } return 1; }\n"+ // test 378 - "mixed b() { return 1; }", - "=mixed a() { switch(0) { case 0: case \"gazonk\": return 0; } return 1; }\n"+ // test 379 - "mixed b() { return 0; }", - "=mixed a() { switch(\"gazonk\") { case \"gazonk\": case 0: return 0; } return 1; }\n"+ // test 380 - "mixed b() { return 0; }", - "=mixed a() { switch(0) { case \"\": } return 1; }\n"+ // test 381 - "mixed b() { return 1; }", - "=mixed a() { switch(1) { case 1: return 1; default: } return 0; }\n"+ // test 382 - "mixed b() { return 1; }", - "=mixed a() { switch(2) { case 1: return 0; default: return 1;} return 0; }\n"+ // test 383 - "mixed b() { return 1; }", - "=mixed a() { switch(1) { default: return 0; case 1: return 1; } return 0; }\n"+ // test 384 - "mixed b() { return 1; }", - "=mixed a() { switch(2) { default: return 1; case 1: return 0; } return 0; }\n"+ // test 385 - "mixed b() { return 1; }", - "=mixed a() { switch(0) { case \"apa\": case 1.0: return 0; } return 1; }\n"+ // test 386 - "mixed b() { return 1; }", - "=mixed a() { switch(\"apa\") { case \"apa\": return 1; case 1.0: } return 0; }\n"+ // test 387 - "mixed b() { return 1; }", - "=mixed a() { switch(1.0) { case \"apa\": return 0; case 1.0: return 1; } return 0; }\n"+ // test 388 - "mixed b() { return 1; }", - "=mixed a() { switch(\"sune\") { case \"gunnel\": return 0; case \"gunnar\": return 1; case \"sune\": case \"gusten\": return 0; } return 0; }\n"+ // test 389 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"a\": return 1; case \"b\": case \"c\": case \"d\": case 'a': case '1': case '0': default: } return 0; }\n"+ // test 390 - "mixed b() { return 1; }", - "=mixed a() { switch(\"b\") { case \"a\": return 0; case \"b\": return 1; case \"c\": case \"d\": case 'a': case '1': case '0': default: } return 0; }\n"+ // test 391 - "mixed b() { return 1; }", - "=mixed a() { switch(\"c\") { case \"a\": case \"b\": return 0; case \"c\": return 1; case \"d\": case 'a': case '1': case '0': default: } return 0; }\n"+ // test 392 - "mixed b() { return 1; }", - "=mixed a() { switch(\"d\") { case \"a\": case \"b\": case \"c\": return 0; case \"d\": return 1; case 'a': case '1': case '0': default: } return 0; }\n"+ // test 393 - "mixed b() { return 1; }", - "=mixed a() { switch('a') { case \"a\": case \"b\": case \"c\": case \"d\": return 0; case 'a': return 1; case '1': case '0': default: } return 0; }\n"+ // test 394 - "mixed b() { return 1; }", - "=mixed a() { switch('1') { case \"a\": case \"b\": case \"c\": case \"d\": case 'a': return 0; case '1': return 1; case '0': default: } return 0; }\n"+ // test 395 - "mixed b() { return 1; }", - "=mixed a() { switch('0') { case \"a\": case \"b\": case \"c\": case \"d\": case 'a': case '1': return 0; case '0': return 1; default: } return 0; }\n"+ // test 396 - "mixed b() { return 1; }", - "=mixed a() { switch(\"a\") { case \"a\": return 1; case \"b\": return 2; case \"c\": return 3; case \"d\": return 4; case 'a': return 5; case '1': return 6; case '0': return 7; default: return 8; } return 9; }\n"+ // test 397 - "mixed b() { return 1; }", - "=mixed a() { switch(\"b\") { case \"a\": return 1; case \"b\": return 2; case \"c\": return 3; case \"d\": return 4; case 'a': return 5; case '1': return 6; case '0': return 7; default: return 8; } return 9; }\n"+ // test 398 - "mixed b() { return 2; }", - "=mixed a() { switch(\"c\") { case \"a\": return 1; case \"b\": return 2; case \"c\": return 3; case \"d\": return 4; case 'a': return 5; case '1': return 6; case '0': return 7; default: return 8; } return 9; }\n"+ // test 399 - "mixed b() { return 3; }", - "=mixed a() { switch(\"d\") { case \"a\": return 1; case \"b\": return 2; case \"c\": return 3; case \"d\": return 4; case 'a': return 5; case '1': return 6; case '0': return 7; default: return 8; } return 9; }\n"+ // test 400 - "mixed b() { return 4; }", - "=mixed a() { switch('a') { case \"a\": return 1; case \"b\": return 2; case \"c\": return 3; case \"d\": return 4; case 'a': return 5; case '1': return 6; case '0': return 7; default: return 8; } return 9; }\n"+ // test 401 - "mixed b() { return 5; }", - "=mixed a() { switch('1') { case \"a\": return 1; case \"b\": return 2; case \"c\": return 3; case \"d\": return 4; case 'a': return 5; case '1': return 6; case '0': return 7; default: return 8; } return 9; }\n"+ // test 402 - "mixed b() { return 6; }", - "=mixed a() { switch('0') { case \"a\": return 1; case \"b\": return 2; case \"c\": return 3; case \"d\": return 4; case 'a': return 5; case '1': return 6; case '0': return 7; default: return 8; } return 9; }\n"+ // test 403 - "mixed b() { return 7; }", - "=mixed a() { switch('9') { case \"a\": return 1; case \"b\": return 2; case \"c\": return 3; case \"d\": return 4; case 'a': return 5; case '1': return 6; case '0': return 7; default: return 8; } return 9; }\n"+ // test 404 - "mixed b() { return 8; }", - - - - - - - - - - - - - - - - - - "=mixed a() { switch(17) { case 18: return 2; case 19: return 3; case 20: return 4; case 21: return 5; } return 0; }\n"+ // test 405 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { default: return 0; case 18: return 2; case 19: return 3; case 20: return 4; case 21: return 5; } return -1; }\n"+ // test 406 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 18: return 2; default: return 0; case 19: return 3; case 20: return 4; case 21: return 5; } return -1; }\n"+ // test 407 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 18: return 2; case 19: return 3; default: return 0; case 20: return 4; case 21: return 5; } return -1; }\n"+ // test 408 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 18: return 2; case 19: return 3; case 20: return 4; default: return 0; case 21: return 5; } return -1; }\n"+ // test 409 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 18: return 2; case 19: return 3; case 20: return 4; case 21: return 5; default: return 0; } return -1; }\n"+ // test 410 - "mixed b() { return 0; }", - - - "=mixed a() { switch(17) { case 18: return 2; case 19: return 3; case 21: return 5; case 20: return 4; } return 0; }\n"+ // test 411 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { default: return 0; case 18: return 2; case 19: return 3; case 21: return 5; case 20: return 4; } return -1; }\n"+ // test 412 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 18: return 2; default: return 0; case 19: return 3; case 21: return 5; case 20: return 4; } return -1; }\n"+ // test 413 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 18: return 2; case 19: return 3; default: return 0; case 21: return 5; case 20: return 4; } return -1; }\n"+ // test 414 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 18: return 2; case 19: return 3; case 21: return 5; default: return 0; case 20: return 4; } return -1; }\n"+ // test 415 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 18: return 2; case 19: return 3; case 21: return 5; case 20: return 4; default: return 0; } return -1; }\n"+ // test 416 - "mixed b() { return 0; }", - - - - - "=mixed a() { switch(17) { case 18: return 2; case 20: return 4; case 19: return 3; case 21: return 5; } return 0; }\n"+ // test 417 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { default: return 0; case 18: return 2; case 20: return 4; case 19: return 3; case 21: return 5; } return -1; }\n"+ // test 418 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 18: return 2; default: return 0; case 20: return 4; case 19: return 3; case 21: return 5; } return -1; }\n"+ // test 419 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 18: return 2; case 20: return 4; default: return 0; case 19: return 3; case 21: return 5; } return -1; }\n"+ // test 420 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 18: return 2; case 20: return 4; case 19: return 3; default: return 0; case 21: return 5; } return -1; }\n"+ // test 421 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 18: return 2; case 20: return 4; case 19: return 3; case 21: return 5; default: return 0; } return -1; }\n"+ // test 422 - "mixed b() { return 0; }", - - - "=mixed a() { switch(17) { case 18: return 2; case 20: return 4; case 21: return 5; case 19: return 3; } return 0; }\n"+ // test 423 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { default: return 0; case 18: return 2; case 20: return 4; case 21: return 5; case 19: return 3; } return -1; }\n"+ // test 424 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 18: return 2; default: return 0; case 20: return 4; case 21: return 5; case 19: return 3; } return -1; }\n"+ // test 425 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 18: return 2; case 20: return 4; default: return 0; case 21: return 5; case 19: return 3; } return -1; }\n"+ // test 426 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 18: return 2; case 20: return 4; case 21: return 5; default: return 0; case 19: return 3; } return -1; }\n"+ // test 427 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 18: return 2; case 20: return 4; case 21: return 5; case 19: return 3; default: return 0; } return -1; }\n"+ // test 428 - "mixed b() { return 0; }", - - - - - "=mixed a() { switch(17) { case 18: return 2; case 21: return 5; case 20: return 4; case 19: return 3; } return 0; }\n"+ // test 429 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { default: return 0; case 18: return 2; case 21: return 5; case 20: return 4; case 19: return 3; } return -1; }\n"+ // test 430 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 18: return 2; default: return 0; case 21: return 5; case 20: return 4; case 19: return 3; } return -1; }\n"+ // test 431 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 18: return 2; case 21: return 5; default: return 0; case 20: return 4; case 19: return 3; } return -1; }\n"+ // test 432 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 18: return 2; case 21: return 5; case 20: return 4; default: return 0; case 19: return 3; } return -1; }\n"+ // test 433 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 18: return 2; case 21: return 5; case 20: return 4; case 19: return 3; default: return 0; } return -1; }\n"+ // test 434 - "mixed b() { return 0; }", - - - "=mixed a() { switch(17) { case 18: return 2; case 21: return 5; case 19: return 3; case 20: return 4; } return 0; }\n"+ // test 435 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { default: return 0; case 18: return 2; case 21: return 5; case 19: return 3; case 20: return 4; } return -1; }\n"+ // test 436 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 18: return 2; default: return 0; case 21: return 5; case 19: return 3; case 20: return 4; } return -1; }\n"+ // test 437 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 18: return 2; case 21: return 5; default: return 0; case 19: return 3; case 20: return 4; } return -1; }\n"+ // test 438 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 18: return 2; case 21: return 5; case 19: return 3; default: return 0; case 20: return 4; } return -1; }\n"+ // test 439 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 18: return 2; case 21: return 5; case 19: return 3; case 20: return 4; default: return 0; } return -1; }\n"+ // test 440 - "mixed b() { return 0; }", - - - - - - - "=mixed a() { switch(17) { case 19: return 3; case 18: return 2; case 20: return 4; case 21: return 5; } return 0; }\n"+ // test 441 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { default: return 0; case 19: return 3; case 18: return 2; case 20: return 4; case 21: return 5; } return -1; }\n"+ // test 442 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 19: return 3; default: return 0; case 18: return 2; case 20: return 4; case 21: return 5; } return -1; }\n"+ // test 443 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 19: return 3; case 18: return 2; default: return 0; case 20: return 4; case 21: return 5; } return -1; }\n"+ // test 444 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 19: return 3; case 18: return 2; case 20: return 4; default: return 0; case 21: return 5; } return -1; }\n"+ // test 445 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 19: return 3; case 18: return 2; case 20: return 4; case 21: return 5; default: return 0; } return -1; }\n"+ // test 446 - "mixed b() { return 0; }", - - - "=mixed a() { switch(17) { case 19: return 3; case 18: return 2; case 21: return 5; case 20: return 4; } return 0; }\n"+ // test 447 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { default: return 0; case 19: return 3; case 18: return 2; case 21: return 5; case 20: return 4; } return -1; }\n"+ // test 448 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 19: return 3; default: return 0; case 18: return 2; case 21: return 5; case 20: return 4; } return -1; }\n"+ // test 449 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 19: return 3; case 18: return 2; default: return 0; case 21: return 5; case 20: return 4; } return -1; }\n"+ // test 450 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 19: return 3; case 18: return 2; case 21: return 5; default: return 0; case 20: return 4; } return -1; }\n"+ // test 451 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 19: return 3; case 18: return 2; case 21: return 5; case 20: return 4; default: return 0; } return -1; }\n"+ // test 452 - "mixed b() { return 0; }", - - - - - "=mixed a() { switch(17) { case 19: return 3; case 20: return 4; case 18: return 2; case 21: return 5; } return 0; }\n"+ // test 453 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { default: return 0; case 19: return 3; case 20: return 4; case 18: return 2; case 21: return 5; } return -1; }\n"+ // test 454 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 19: return 3; default: return 0; case 20: return 4; case 18: return 2; case 21: return 5; } return -1; }\n"+ // test 455 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 19: return 3; case 20: return 4; default: return 0; case 18: return 2; case 21: return 5; } return -1; }\n"+ // test 456 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 19: return 3; case 20: return 4; case 18: return 2; default: return 0; case 21: return 5; } return -1; }\n"+ // test 457 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 19: return 3; case 20: return 4; case 18: return 2; case 21: return 5; default: return 0; } return -1; }\n"+ // test 458 - "mixed b() { return 0; }", - - - "=mixed a() { switch(17) { case 19: return 3; case 20: return 4; case 21: return 5; case 18: return 2; } return 0; }\n"+ // test 459 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { default: return 0; case 19: return 3; case 20: return 4; case 21: return 5; case 18: return 2; } return -1; }\n"+ // test 460 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 19: return 3; default: return 0; case 20: return 4; case 21: return 5; case 18: return 2; } return -1; }\n"+ // test 461 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 19: return 3; case 20: return 4; default: return 0; case 21: return 5; case 18: return 2; } return -1; }\n"+ // test 462 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 19: return 3; case 20: return 4; case 21: return 5; default: return 0; case 18: return 2; } return -1; }\n"+ // test 463 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 19: return 3; case 20: return 4; case 21: return 5; case 18: return 2; default: return 0; } return -1; }\n"+ // test 464 - "mixed b() { return 0; }", - - - - - "=mixed a() { switch(17) { case 19: return 3; case 21: return 5; case 20: return 4; case 18: return 2; } return 0; }\n"+ // test 465 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { default: return 0; case 19: return 3; case 21: return 5; case 20: return 4; case 18: return 2; } return -1; }\n"+ // test 466 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 19: return 3; default: return 0; case 21: return 5; case 20: return 4; case 18: return 2; } return -1; }\n"+ // test 467 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 19: return 3; case 21: return 5; default: return 0; case 20: return 4; case 18: return 2; } return -1; }\n"+ // test 468 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 19: return 3; case 21: return 5; case 20: return 4; default: return 0; case 18: return 2; } return -1; }\n"+ // test 469 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 19: return 3; case 21: return 5; case 20: return 4; case 18: return 2; default: return 0; } return -1; }\n"+ // test 470 - "mixed b() { return 0; }", - - - "=mixed a() { switch(17) { case 19: return 3; case 21: return 5; case 18: return 2; case 20: return 4; } return 0; }\n"+ // test 471 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { default: return 0; case 19: return 3; case 21: return 5; case 18: return 2; case 20: return 4; } return -1; }\n"+ // test 472 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 19: return 3; default: return 0; case 21: return 5; case 18: return 2; case 20: return 4; } return -1; }\n"+ // test 473 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 19: return 3; case 21: return 5; default: return 0; case 18: return 2; case 20: return 4; } return -1; }\n"+ // test 474 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 19: return 3; case 21: return 5; case 18: return 2; default: return 0; case 20: return 4; } return -1; }\n"+ // test 475 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 19: return 3; case 21: return 5; case 18: return 2; case 20: return 4; default: return 0; } return -1; }\n"+ // test 476 - "mixed b() { return 0; }", - - - - - - - "=mixed a() { switch(17) { case 20: return 4; case 19: return 3; case 18: return 2; case 21: return 5; } return 0; }\n"+ // test 477 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { default: return 0; case 20: return 4; case 19: return 3; case 18: return 2; case 21: return 5; } return -1; }\n"+ // test 478 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 20: return 4; default: return 0; case 19: return 3; case 18: return 2; case 21: return 5; } return -1; }\n"+ // test 479 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 20: return 4; case 19: return 3; default: return 0; case 18: return 2; case 21: return 5; } return -1; }\n"+ // test 480 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 20: return 4; case 19: return 3; case 18: return 2; default: return 0; case 21: return 5; } return -1; }\n"+ // test 481 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 20: return 4; case 19: return 3; case 18: return 2; case 21: return 5; default: return 0; } return -1; }\n"+ // test 482 - "mixed b() { return 0; }", - - - "=mixed a() { switch(17) { case 20: return 4; case 19: return 3; case 21: return 5; case 18: return 2; } return 0; }\n"+ // test 483 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { default: return 0; case 20: return 4; case 19: return 3; case 21: return 5; case 18: return 2; } return -1; }\n"+ // test 484 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 20: return 4; default: return 0; case 19: return 3; case 21: return 5; case 18: return 2; } return -1; }\n"+ // test 485 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 20: return 4; case 19: return 3; default: return 0; case 21: return 5; case 18: return 2; } return -1; }\n"+ // test 486 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 20: return 4; case 19: return 3; case 21: return 5; default: return 0; case 18: return 2; } return -1; }\n"+ // test 487 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 20: return 4; case 19: return 3; case 21: return 5; case 18: return 2; default: return 0; } return -1; }\n"+ // test 488 - "mixed b() { return 0; }", - - - - - "=mixed a() { switch(17) { case 20: return 4; case 18: return 2; case 19: return 3; case 21: return 5; } return 0; }\n"+ // test 489 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { default: return 0; case 20: return 4; case 18: return 2; case 19: return 3; case 21: return 5; } return -1; }\n"+ // test 490 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 20: return 4; default: return 0; case 18: return 2; case 19: return 3; case 21: return 5; } return -1; }\n"+ // test 491 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 20: return 4; case 18: return 2; default: return 0; case 19: return 3; case 21: return 5; } return -1; }\n"+ // test 492 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 20: return 4; case 18: return 2; case 19: return 3; default: return 0; case 21: return 5; } return -1; }\n"+ // test 493 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 20: return 4; case 18: return 2; case 19: return 3; case 21: return 5; default: return 0; } return -1; }\n"+ // test 494 - "mixed b() { return 0; }", - - - "=mixed a() { switch(17) { case 20: return 4; case 18: return 2; case 21: return 5; case 19: return 3; } return 0; }\n"+ // test 495 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { default: return 0; case 20: return 4; case 18: return 2; case 21: return 5; case 19: return 3; } return -1; }\n"+ // test 496 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 20: return 4; default: return 0; case 18: return 2; case 21: return 5; case 19: return 3; } return -1; }\n"+ // test 497 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 20: return 4; case 18: return 2; default: return 0; case 21: return 5; case 19: return 3; } return -1; }\n"+ // test 498 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 20: return 4; case 18: return 2; case 21: return 5; default: return 0; case 19: return 3; } return -1; }\n"+ // test 499 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 20: return 4; case 18: return 2; case 21: return 5; case 19: return 3; default: return 0; } return -1; }\n"+ // test 500 - "mixed b() { return 0; }", - - - - - "=mixed a() { switch(17) { case 20: return 4; case 21: return 5; case 18: return 2; case 19: return 3; } return 0; }\n"+ // test 501 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { default: return 0; case 20: return 4; case 21: return 5; case 18: return 2; case 19: return 3; } return -1; }\n"+ // test 502 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 20: return 4; default: return 0; case 21: return 5; case 18: return 2; case 19: return 3; } return -1; }\n"+ // test 503 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 20: return 4; case 21: return 5; default: return 0; case 18: return 2; case 19: return 3; } return -1; }\n"+ // test 504 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 20: return 4; case 21: return 5; case 18: return 2; default: return 0; case 19: return 3; } return -1; }\n"+ // test 505 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 20: return 4; case 21: return 5; case 18: return 2; case 19: return 3; default: return 0; } return -1; }\n"+ // test 506 - "mixed b() { return 0; }", - - - "=mixed a() { switch(17) { case 20: return 4; case 21: return 5; case 19: return 3; case 18: return 2; } return 0; }\n"+ // test 507 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { default: return 0; case 20: return 4; case 21: return 5; case 19: return 3; case 18: return 2; } return -1; }\n"+ // test 508 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 20: return 4; default: return 0; case 21: return 5; case 19: return 3; case 18: return 2; } return -1; }\n"+ // test 509 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 20: return 4; case 21: return 5; default: return 0; case 19: return 3; case 18: return 2; } return -1; }\n"+ // test 510 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 20: return 4; case 21: return 5; case 19: return 3; default: return 0; case 18: return 2; } return -1; }\n"+ // test 511 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 20: return 4; case 21: return 5; case 19: return 3; case 18: return 2; default: return 0; } return -1; }\n"+ // test 512 - "mixed b() { return 0; }", - - - - - - - "=mixed a() { switch(17) { case 21: return 5; case 19: return 3; case 20: return 4; case 18: return 2; } return 0; }\n"+ // test 513 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { default: return 0; case 21: return 5; case 19: return 3; case 20: return 4; case 18: return 2; } return -1; }\n"+ // test 514 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 21: return 5; default: return 0; case 19: return 3; case 20: return 4; case 18: return 2; } return -1; }\n"+ // test 515 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 21: return 5; case 19: return 3; default: return 0; case 20: return 4; case 18: return 2; } return -1; }\n"+ // test 516 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 21: return 5; case 19: return 3; case 20: return 4; default: return 0; case 18: return 2; } return -1; }\n"+ // test 517 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 21: return 5; case 19: return 3; case 20: return 4; case 18: return 2; default: return 0; } return -1; }\n"+ // test 518 - "mixed b() { return 0; }", - - - "=mixed a() { switch(17) { case 21: return 5; case 19: return 3; case 18: return 2; case 20: return 4; } return 0; }\n"+ // test 519 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { default: return 0; case 21: return 5; case 19: return 3; case 18: return 2; case 20: return 4; } return -1; }\n"+ // test 520 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 21: return 5; default: return 0; case 19: return 3; case 18: return 2; case 20: return 4; } return -1; }\n"+ // test 521 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 21: return 5; case 19: return 3; default: return 0; case 18: return 2; case 20: return 4; } return -1; }\n"+ // test 522 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 21: return 5; case 19: return 3; case 18: return 2; default: return 0; case 20: return 4; } return -1; }\n"+ // test 523 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 21: return 5; case 19: return 3; case 18: return 2; case 20: return 4; default: return 0; } return -1; }\n"+ // test 524 - "mixed b() { return 0; }", - - - - - "=mixed a() { switch(17) { case 21: return 5; case 20: return 4; case 19: return 3; case 18: return 2; } return 0; }\n"+ // test 525 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { default: return 0; case 21: return 5; case 20: return 4; case 19: return 3; case 18: return 2; } return -1; }\n"+ // test 526 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 21: return 5; default: return 0; case 20: return 4; case 19: return 3; case 18: return 2; } return -1; }\n"+ // test 527 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 21: return 5; case 20: return 4; default: return 0; case 19: return 3; case 18: return 2; } return -1; }\n"+ // test 528 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 21: return 5; case 20: return 4; case 19: return 3; default: return 0; case 18: return 2; } return -1; }\n"+ // test 529 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 21: return 5; case 20: return 4; case 19: return 3; case 18: return 2; default: return 0; } return -1; }\n"+ // test 530 - "mixed b() { return 0; }", - - - "=mixed a() { switch(17) { case 21: return 5; case 20: return 4; case 18: return 2; case 19: return 3; } return 0; }\n"+ // test 531 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { default: return 0; case 21: return 5; case 20: return 4; case 18: return 2; case 19: return 3; } return -1; }\n"+ // test 532 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 21: return 5; default: return 0; case 20: return 4; case 18: return 2; case 19: return 3; } return -1; }\n"+ // test 533 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 21: return 5; case 20: return 4; default: return 0; case 18: return 2; case 19: return 3; } return -1; }\n"+ // test 534 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 21: return 5; case 20: return 4; case 18: return 2; default: return 0; case 19: return 3; } return -1; }\n"+ // test 535 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 21: return 5; case 20: return 4; case 18: return 2; case 19: return 3; default: return 0; } return -1; }\n"+ // test 536 - "mixed b() { return 0; }", - - - - - "=mixed a() { switch(17) { case 21: return 5; case 18: return 2; case 20: return 4; case 19: return 3; } return 0; }\n"+ // test 537 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { default: return 0; case 21: return 5; case 18: return 2; case 20: return 4; case 19: return 3; } return -1; }\n"+ // test 538 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 21: return 5; default: return 0; case 18: return 2; case 20: return 4; case 19: return 3; } return -1; }\n"+ // test 539 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 21: return 5; case 18: return 2; default: return 0; case 20: return 4; case 19: return 3; } return -1; }\n"+ // test 540 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 21: return 5; case 18: return 2; case 20: return 4; default: return 0; case 19: return 3; } return -1; }\n"+ // test 541 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 21: return 5; case 18: return 2; case 20: return 4; case 19: return 3; default: return 0; } return -1; }\n"+ // test 542 - "mixed b() { return 0; }", - - - "=mixed a() { switch(17) { case 21: return 5; case 18: return 2; case 19: return 3; case 20: return 4; } return 0; }\n"+ // test 543 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { default: return 0; case 21: return 5; case 18: return 2; case 19: return 3; case 20: return 4; } return -1; }\n"+ // test 544 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 21: return 5; default: return 0; case 18: return 2; case 19: return 3; case 20: return 4; } return -1; }\n"+ // test 545 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 21: return 5; case 18: return 2; default: return 0; case 19: return 3; case 20: return 4; } return -1; }\n"+ // test 546 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 21: return 5; case 18: return 2; case 19: return 3; default: return 0; case 20: return 4; } return -1; }\n"+ // test 547 - "mixed b() { return 0; }", - "=mixed a() { switch(17) { case 21: return 5; case 18: return 2; case 19: return 3; case 20: return 4; default: return 0; } return -1; }\n"+ // test 548 - "mixed b() { return 0; }", - - - - - - - - - "=mixed a() { switch(18) { case 18: return 2; case 19: return 3; case 20: return 4; case 21: return 5; } return 0; }\n"+ // test 549 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { default: return 0; case 18: return 2; case 19: return 3; case 20: return 4; case 21: return 5; } return -1; }\n"+ // test 550 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 18: return 2; default: return 0; case 19: return 3; case 20: return 4; case 21: return 5; } return -1; }\n"+ // test 551 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 18: return 2; case 19: return 3; default: return 0; case 20: return 4; case 21: return 5; } return -1; }\n"+ // test 552 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 18: return 2; case 19: return 3; case 20: return 4; default: return 0; case 21: return 5; } return -1; }\n"+ // test 553 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 18: return 2; case 19: return 3; case 20: return 4; case 21: return 5; default: return 0; } return -1; }\n"+ // test 554 - "mixed b() { return 2; }", - - - "=mixed a() { switch(18) { case 18: return 2; case 19: return 3; case 21: return 5; case 20: return 4; } return 0; }\n"+ // test 555 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { default: return 0; case 18: return 2; case 19: return 3; case 21: return 5; case 20: return 4; } return -1; }\n"+ // test 556 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 18: return 2; default: return 0; case 19: return 3; case 21: return 5; case 20: return 4; } return -1; }\n"+ // test 557 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 18: return 2; case 19: return 3; default: return 0; case 21: return 5; case 20: return 4; } return -1; }\n"+ // test 558 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 18: return 2; case 19: return 3; case 21: return 5; default: return 0; case 20: return 4; } return -1; }\n"+ // test 559 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 18: return 2; case 19: return 3; case 21: return 5; case 20: return 4; default: return 0; } return -1; }\n"+ // test 560 - "mixed b() { return 2; }", - - - - - "=mixed a() { switch(18) { case 18: return 2; case 20: return 4; case 19: return 3; case 21: return 5; } return 0; }\n"+ // test 561 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { default: return 0; case 18: return 2; case 20: return 4; case 19: return 3; case 21: return 5; } return -1; }\n"+ // test 562 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 18: return 2; default: return 0; case 20: return 4; case 19: return 3; case 21: return 5; } return -1; }\n"+ // test 563 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 18: return 2; case 20: return 4; default: return 0; case 19: return 3; case 21: return 5; } return -1; }\n"+ // test 564 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 18: return 2; case 20: return 4; case 19: return 3; default: return 0; case 21: return 5; } return -1; }\n"+ // test 565 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 18: return 2; case 20: return 4; case 19: return 3; case 21: return 5; default: return 0; } return -1; }\n"+ // test 566 - "mixed b() { return 2; }", - - - "=mixed a() { switch(18) { case 18: return 2; case 20: return 4; case 21: return 5; case 19: return 3; } return 0; }\n"+ // test 567 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { default: return 0; case 18: return 2; case 20: return 4; case 21: return 5; case 19: return 3; } return -1; }\n"+ // test 568 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 18: return 2; default: return 0; case 20: return 4; case 21: return 5; case 19: return 3; } return -1; }\n"+ // test 569 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 18: return 2; case 20: return 4; default: return 0; case 21: return 5; case 19: return 3; } return -1; }\n"+ // test 570 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 18: return 2; case 20: return 4; case 21: return 5; default: return 0; case 19: return 3; } return -1; }\n"+ // test 571 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 18: return 2; case 20: return 4; case 21: return 5; case 19: return 3; default: return 0; } return -1; }\n"+ // test 572 - "mixed b() { return 2; }", - - - - - "=mixed a() { switch(18) { case 18: return 2; case 21: return 5; case 20: return 4; case 19: return 3; } return 0; }\n"+ // test 573 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { default: return 0; case 18: return 2; case 21: return 5; case 20: return 4; case 19: return 3; } return -1; }\n"+ // test 574 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 18: return 2; default: return 0; case 21: return 5; case 20: return 4; case 19: return 3; } return -1; }\n"+ // test 575 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 18: return 2; case 21: return 5; default: return 0; case 20: return 4; case 19: return 3; } return -1; }\n"+ // test 576 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 18: return 2; case 21: return 5; case 20: return 4; default: return 0; case 19: return 3; } return -1; }\n"+ // test 577 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 18: return 2; case 21: return 5; case 20: return 4; case 19: return 3; default: return 0; } return -1; }\n"+ // test 578 - "mixed b() { return 2; }", - - - "=mixed a() { switch(18) { case 18: return 2; case 21: return 5; case 19: return 3; case 20: return 4; } return 0; }\n"+ // test 579 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { default: return 0; case 18: return 2; case 21: return 5; case 19: return 3; case 20: return 4; } return -1; }\n"+ // test 580 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 18: return 2; default: return 0; case 21: return 5; case 19: return 3; case 20: return 4; } return -1; }\n"+ // test 581 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 18: return 2; case 21: return 5; default: return 0; case 19: return 3; case 20: return 4; } return -1; }\n"+ // test 582 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 18: return 2; case 21: return 5; case 19: return 3; default: return 0; case 20: return 4; } return -1; }\n"+ // test 583 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 18: return 2; case 21: return 5; case 19: return 3; case 20: return 4; default: return 0; } return -1; }\n"+ // test 584 - "mixed b() { return 2; }", - - - - - - - "=mixed a() { switch(18) { case 19: return 3; case 18: return 2; case 20: return 4; case 21: return 5; } return 0; }\n"+ // test 585 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { default: return 0; case 19: return 3; case 18: return 2; case 20: return 4; case 21: return 5; } return -1; }\n"+ // test 586 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 19: return 3; default: return 0; case 18: return 2; case 20: return 4; case 21: return 5; } return -1; }\n"+ // test 587 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 19: return 3; case 18: return 2; default: return 0; case 20: return 4; case 21: return 5; } return -1; }\n"+ // test 588 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 19: return 3; case 18: return 2; case 20: return 4; default: return 0; case 21: return 5; } return -1; }\n"+ // test 589 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 19: return 3; case 18: return 2; case 20: return 4; case 21: return 5; default: return 0; } return -1; }\n"+ // test 590 - "mixed b() { return 2; }", - - - "=mixed a() { switch(18) { case 19: return 3; case 18: return 2; case 21: return 5; case 20: return 4; } return 0; }\n"+ // test 591 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { default: return 0; case 19: return 3; case 18: return 2; case 21: return 5; case 20: return 4; } return -1; }\n"+ // test 592 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 19: return 3; default: return 0; case 18: return 2; case 21: return 5; case 20: return 4; } return -1; }\n"+ // test 593 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 19: return 3; case 18: return 2; default: return 0; case 21: return 5; case 20: return 4; } return -1; }\n"+ // test 594 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 19: return 3; case 18: return 2; case 21: return 5; default: return 0; case 20: return 4; } return -1; }\n"+ // test 595 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 19: return 3; case 18: return 2; case 21: return 5; case 20: return 4; default: return 0; } return -1; }\n"+ // test 596 - "mixed b() { return 2; }", - - - - - "=mixed a() { switch(18) { case 19: return 3; case 20: return 4; case 18: return 2; case 21: return 5; } return 0; }\n"+ // test 597 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { default: return 0; case 19: return 3; case 20: return 4; case 18: return 2; case 21: return 5; } return -1; }\n"+ // test 598 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 19: return 3; default: return 0; case 20: return 4; case 18: return 2; case 21: return 5; } return -1; }\n"+ // test 599 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 19: return 3; case 20: return 4; default: return 0; case 18: return 2; case 21: return 5; } return -1; }\n"+ // test 600 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 19: return 3; case 20: return 4; case 18: return 2; default: return 0; case 21: return 5; } return -1; }\n"+ // test 601 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 19: return 3; case 20: return 4; case 18: return 2; case 21: return 5; default: return 0; } return -1; }\n"+ // test 602 - "mixed b() { return 2; }", - - - "=mixed a() { switch(18) { case 19: return 3; case 20: return 4; case 21: return 5; case 18: return 2; } return 0; }\n"+ // test 603 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { default: return 0; case 19: return 3; case 20: return 4; case 21: return 5; case 18: return 2; } return -1; }\n"+ // test 604 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 19: return 3; default: return 0; case 20: return 4; case 21: return 5; case 18: return 2; } return -1; }\n"+ // test 605 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 19: return 3; case 20: return 4; default: return 0; case 21: return 5; case 18: return 2; } return -1; }\n"+ // test 606 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 19: return 3; case 20: return 4; case 21: return 5; default: return 0; case 18: return 2; } return -1; }\n"+ // test 607 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 19: return 3; case 20: return 4; case 21: return 5; case 18: return 2; default: return 0; } return -1; }\n"+ // test 608 - "mixed b() { return 2; }", - - - - - "=mixed a() { switch(18) { case 19: return 3; case 21: return 5; case 20: return 4; case 18: return 2; } return 0; }\n"+ // test 609 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { default: return 0; case 19: return 3; case 21: return 5; case 20: return 4; case 18: return 2; } return -1; }\n"+ // test 610 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 19: return 3; default: return 0; case 21: return 5; case 20: return 4; case 18: return 2; } return -1; }\n"+ // test 611 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 19: return 3; case 21: return 5; default: return 0; case 20: return 4; case 18: return 2; } return -1; }\n"+ // test 612 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 19: return 3; case 21: return 5; case 20: return 4; default: return 0; case 18: return 2; } return -1; }\n"+ // test 613 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 19: return 3; case 21: return 5; case 20: return 4; case 18: return 2; default: return 0; } return -1; }\n"+ // test 614 - "mixed b() { return 2; }", - - - "=mixed a() { switch(18) { case 19: return 3; case 21: return 5; case 18: return 2; case 20: return 4; } return 0; }\n"+ // test 615 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { default: return 0; case 19: return 3; case 21: return 5; case 18: return 2; case 20: return 4; } return -1; }\n"+ // test 616 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 19: return 3; default: return 0; case 21: return 5; case 18: return 2; case 20: return 4; } return -1; }\n"+ // test 617 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 19: return 3; case 21: return 5; default: return 0; case 18: return 2; case 20: return 4; } return -1; }\n"+ // test 618 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 19: return 3; case 21: return 5; case 18: return 2; default: return 0; case 20: return 4; } return -1; }\n"+ // test 619 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 19: return 3; case 21: return 5; case 18: return 2; case 20: return 4; default: return 0; } return -1; }\n"+ // test 620 - "mixed b() { return 2; }", - - - - - - - "=mixed a() { switch(18) { case 20: return 4; case 19: return 3; case 18: return 2; case 21: return 5; } return 0; }\n"+ // test 621 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { default: return 0; case 20: return 4; case 19: return 3; case 18: return 2; case 21: return 5; } return -1; }\n"+ // test 622 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 20: return 4; default: return 0; case 19: return 3; case 18: return 2; case 21: return 5; } return -1; }\n"+ // test 623 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 20: return 4; case 19: return 3; default: return 0; case 18: return 2; case 21: return 5; } return -1; }\n"+ // test 624 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 20: return 4; case 19: return 3; case 18: return 2; default: return 0; case 21: return 5; } return -1; }\n"+ // test 625 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 20: return 4; case 19: return 3; case 18: return 2; case 21: return 5; default: return 0; } return -1; }\n"+ // test 626 - "mixed b() { return 2; }", - - - "=mixed a() { switch(18) { case 20: return 4; case 19: return 3; case 21: return 5; case 18: return 2; } return 0; }\n"+ // test 627 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { default: return 0; case 20: return 4; case 19: return 3; case 21: return 5; case 18: return 2; } return -1; }\n"+ // test 628 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 20: return 4; default: return 0; case 19: return 3; case 21: return 5; case 18: return 2; } return -1; }\n"+ // test 629 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 20: return 4; case 19: return 3; default: return 0; case 21: return 5; case 18: return 2; } return -1; }\n"+ // test 630 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 20: return 4; case 19: return 3; case 21: return 5; default: return 0; case 18: return 2; } return -1; }\n"+ // test 631 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 20: return 4; case 19: return 3; case 21: return 5; case 18: return 2; default: return 0; } return -1; }\n"+ // test 632 - "mixed b() { return 2; }", - - - - - "=mixed a() { switch(18) { case 20: return 4; case 18: return 2; case 19: return 3; case 21: return 5; } return 0; }\n"+ // test 633 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { default: return 0; case 20: return 4; case 18: return 2; case 19: return 3; case 21: return 5; } return -1; }\n"+ // test 634 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 20: return 4; default: return 0; case 18: return 2; case 19: return 3; case 21: return 5; } return -1; }\n"+ // test 635 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 20: return 4; case 18: return 2; default: return 0; case 19: return 3; case 21: return 5; } return -1; }\n"+ // test 636 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 20: return 4; case 18: return 2; case 19: return 3; default: return 0; case 21: return 5; } return -1; }\n"+ // test 637 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 20: return 4; case 18: return 2; case 19: return 3; case 21: return 5; default: return 0; } return -1; }\n"+ // test 638 - "mixed b() { return 2; }", - - - "=mixed a() { switch(18) { case 20: return 4; case 18: return 2; case 21: return 5; case 19: return 3; } return 0; }\n"+ // test 639 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { default: return 0; case 20: return 4; case 18: return 2; case 21: return 5; case 19: return 3; } return -1; }\n"+ // test 640 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 20: return 4; default: return 0; case 18: return 2; case 21: return 5; case 19: return 3; } return -1; }\n"+ // test 641 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 20: return 4; case 18: return 2; default: return 0; case 21: return 5; case 19: return 3; } return -1; }\n"+ // test 642 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 20: return 4; case 18: return 2; case 21: return 5; default: return 0; case 19: return 3; } return -1; }\n"+ // test 643 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 20: return 4; case 18: return 2; case 21: return 5; case 19: return 3; default: return 0; } return -1; }\n"+ // test 644 - "mixed b() { return 2; }", - - - - - "=mixed a() { switch(18) { case 20: return 4; case 21: return 5; case 18: return 2; case 19: return 3; } return 0; }\n"+ // test 645 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { default: return 0; case 20: return 4; case 21: return 5; case 18: return 2; case 19: return 3; } return -1; }\n"+ // test 646 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 20: return 4; default: return 0; case 21: return 5; case 18: return 2; case 19: return 3; } return -1; }\n"+ // test 647 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 20: return 4; case 21: return 5; default: return 0; case 18: return 2; case 19: return 3; } return -1; }\n"+ // test 648 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 20: return 4; case 21: return 5; case 18: return 2; default: return 0; case 19: return 3; } return -1; }\n"+ // test 649 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 20: return 4; case 21: return 5; case 18: return 2; case 19: return 3; default: return 0; } return -1; }\n"+ // test 650 - "mixed b() { return 2; }", - - - "=mixed a() { switch(18) { case 20: return 4; case 21: return 5; case 19: return 3; case 18: return 2; } return 0; }\n"+ // test 651 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { default: return 0; case 20: return 4; case 21: return 5; case 19: return 3; case 18: return 2; } return -1; }\n"+ // test 652 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 20: return 4; default: return 0; case 21: return 5; case 19: return 3; case 18: return 2; } return -1; }\n"+ // test 653 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 20: return 4; case 21: return 5; default: return 0; case 19: return 3; case 18: return 2; } return -1; }\n"+ // test 654 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 20: return 4; case 21: return 5; case 19: return 3; default: return 0; case 18: return 2; } return -1; }\n"+ // test 655 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 20: return 4; case 21: return 5; case 19: return 3; case 18: return 2; default: return 0; } return -1; }\n"+ // test 656 - "mixed b() { return 2; }", - - - - - - - "=mixed a() { switch(18) { case 21: return 5; case 19: return 3; case 20: return 4; case 18: return 2; } return 0; }\n"+ // test 657 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { default: return 0; case 21: return 5; case 19: return 3; case 20: return 4; case 18: return 2; } return -1; }\n"+ // test 658 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 21: return 5; default: return 0; case 19: return 3; case 20: return 4; case 18: return 2; } return -1; }\n"+ // test 659 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 21: return 5; case 19: return 3; default: return 0; case 20: return 4; case 18: return 2; } return -1; }\n"+ // test 660 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 21: return 5; case 19: return 3; case 20: return 4; default: return 0; case 18: return 2; } return -1; }\n"+ // test 661 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 21: return 5; case 19: return 3; case 20: return 4; case 18: return 2; default: return 0; } return -1; }\n"+ // test 662 - "mixed b() { return 2; }", - - - "=mixed a() { switch(18) { case 21: return 5; case 19: return 3; case 18: return 2; case 20: return 4; } return 0; }\n"+ // test 663 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { default: return 0; case 21: return 5; case 19: return 3; case 18: return 2; case 20: return 4; } return -1; }\n"+ // test 664 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 21: return 5; default: return 0; case 19: return 3; case 18: return 2; case 20: return 4; } return -1; }\n"+ // test 665 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 21: return 5; case 19: return 3; default: return 0; case 18: return 2; case 20: return 4; } return -1; }\n"+ // test 666 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 21: return 5; case 19: return 3; case 18: return 2; default: return 0; case 20: return 4; } return -1; }\n"+ // test 667 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 21: return 5; case 19: return 3; case 18: return 2; case 20: return 4; default: return 0; } return -1; }\n"+ // test 668 - "mixed b() { return 2; }", - - - - - "=mixed a() { switch(18) { case 21: return 5; case 20: return 4; case 19: return 3; case 18: return 2; } return 0; }\n"+ // test 669 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { default: return 0; case 21: return 5; case 20: return 4; case 19: return 3; case 18: return 2; } return -1; }\n"+ // test 670 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 21: return 5; default: return 0; case 20: return 4; case 19: return 3; case 18: return 2; } return -1; }\n"+ // test 671 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 21: return 5; case 20: return 4; default: return 0; case 19: return 3; case 18: return 2; } return -1; }\n"+ // test 672 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 21: return 5; case 20: return 4; case 19: return 3; default: return 0; case 18: return 2; } return -1; }\n"+ // test 673 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 21: return 5; case 20: return 4; case 19: return 3; case 18: return 2; default: return 0; } return -1; }\n"+ // test 674 - "mixed b() { return 2; }", - - - "=mixed a() { switch(18) { case 21: return 5; case 20: return 4; case 18: return 2; case 19: return 3; } return 0; }\n"+ // test 675 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { default: return 0; case 21: return 5; case 20: return 4; case 18: return 2; case 19: return 3; } return -1; }\n"+ // test 676 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 21: return 5; default: return 0; case 20: return 4; case 18: return 2; case 19: return 3; } return -1; }\n"+ // test 677 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 21: return 5; case 20: return 4; default: return 0; case 18: return 2; case 19: return 3; } return -1; }\n"+ // test 678 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 21: return 5; case 20: return 4; case 18: return 2; default: return 0; case 19: return 3; } return -1; }\n"+ // test 679 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 21: return 5; case 20: return 4; case 18: return 2; case 19: return 3; default: return 0; } return -1; }\n"+ // test 680 - "mixed b() { return 2; }", - - - - - "=mixed a() { switch(18) { case 21: return 5; case 18: return 2; case 20: return 4; case 19: return 3; } return 0; }\n"+ // test 681 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { default: return 0; case 21: return 5; case 18: return 2; case 20: return 4; case 19: return 3; } return -1; }\n"+ // test 682 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 21: return 5; default: return 0; case 18: return 2; case 20: return 4; case 19: return 3; } return -1; }\n"+ // test 683 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 21: return 5; case 18: return 2; default: return 0; case 20: return 4; case 19: return 3; } return -1; }\n"+ // test 684 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 21: return 5; case 18: return 2; case 20: return 4; default: return 0; case 19: return 3; } return -1; }\n"+ // test 685 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 21: return 5; case 18: return 2; case 20: return 4; case 19: return 3; default: return 0; } return -1; }\n"+ // test 686 - "mixed b() { return 2; }", - - - "=mixed a() { switch(18) { case 21: return 5; case 18: return 2; case 19: return 3; case 20: return 4; } return 0; }\n"+ // test 687 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { default: return 0; case 21: return 5; case 18: return 2; case 19: return 3; case 20: return 4; } return -1; }\n"+ // test 688 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 21: return 5; default: return 0; case 18: return 2; case 19: return 3; case 20: return 4; } return -1; }\n"+ // test 689 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 21: return 5; case 18: return 2; default: return 0; case 19: return 3; case 20: return 4; } return -1; }\n"+ // test 690 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 21: return 5; case 18: return 2; case 19: return 3; default: return 0; case 20: return 4; } return -1; }\n"+ // test 691 - "mixed b() { return 2; }", - "=mixed a() { switch(18) { case 21: return 5; case 18: return 2; case 19: return 3; case 20: return 4; default: return 0; } return -1; }\n"+ // test 692 - "mixed b() { return 2; }", - - - - - - - - - "=mixed a() { switch(19) { case 18: return 2; case 19: return 3; case 20: return 4; case 21: return 5; } return 0; }\n"+ // test 693 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { default: return 0; case 18: return 2; case 19: return 3; case 20: return 4; case 21: return 5; } return -1; }\n"+ // test 694 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 18: return 2; default: return 0; case 19: return 3; case 20: return 4; case 21: return 5; } return -1; }\n"+ // test 695 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 18: return 2; case 19: return 3; default: return 0; case 20: return 4; case 21: return 5; } return -1; }\n"+ // test 696 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 18: return 2; case 19: return 3; case 20: return 4; default: return 0; case 21: return 5; } return -1; }\n"+ // test 697 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 18: return 2; case 19: return 3; case 20: return 4; case 21: return 5; default: return 0; } return -1; }\n"+ // test 698 - "mixed b() { return 3; }", - - - "=mixed a() { switch(19) { case 18: return 2; case 19: return 3; case 21: return 5; case 20: return 4; } return 0; }\n"+ // test 699 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { default: return 0; case 18: return 2; case 19: return 3; case 21: return 5; case 20: return 4; } return -1; }\n"+ // test 700 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 18: return 2; default: return 0; case 19: return 3; case 21: return 5; case 20: return 4; } return -1; }\n"+ // test 701 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 18: return 2; case 19: return 3; default: return 0; case 21: return 5; case 20: return 4; } return -1; }\n"+ // test 702 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 18: return 2; case 19: return 3; case 21: return 5; default: return 0; case 20: return 4; } return -1; }\n"+ // test 703 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 18: return 2; case 19: return 3; case 21: return 5; case 20: return 4; default: return 0; } return -1; }\n"+ // test 704 - "mixed b() { return 3; }", - - - - - "=mixed a() { switch(19) { case 18: return 2; case 20: return 4; case 19: return 3; case 21: return 5; } return 0; }\n"+ // test 705 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { default: return 0; case 18: return 2; case 20: return 4; case 19: return 3; case 21: return 5; } return -1; }\n"+ // test 706 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 18: return 2; default: return 0; case 20: return 4; case 19: return 3; case 21: return 5; } return -1; }\n"+ // test 707 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 18: return 2; case 20: return 4; default: return 0; case 19: return 3; case 21: return 5; } return -1; }\n"+ // test 708 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 18: return 2; case 20: return 4; case 19: return 3; default: return 0; case 21: return 5; } return -1; }\n"+ // test 709 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 18: return 2; case 20: return 4; case 19: return 3; case 21: return 5; default: return 0; } return -1; }\n"+ // test 710 - "mixed b() { return 3; }", - - - "=mixed a() { switch(19) { case 18: return 2; case 20: return 4; case 21: return 5; case 19: return 3; } return 0; }\n"+ // test 711 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { default: return 0; case 18: return 2; case 20: return 4; case 21: return 5; case 19: return 3; } return -1; }\n"+ // test 712 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 18: return 2; default: return 0; case 20: return 4; case 21: return 5; case 19: return 3; } return -1; }\n"+ // test 713 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 18: return 2; case 20: return 4; default: return 0; case 21: return 5; case 19: return 3; } return -1; }\n"+ // test 714 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 18: return 2; case 20: return 4; case 21: return 5; default: return 0; case 19: return 3; } return -1; }\n"+ // test 715 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 18: return 2; case 20: return 4; case 21: return 5; case 19: return 3; default: return 0; } return -1; }\n"+ // test 716 - "mixed b() { return 3; }", - - - - - "=mixed a() { switch(19) { case 18: return 2; case 21: return 5; case 20: return 4; case 19: return 3; } return 0; }\n"+ // test 717 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { default: return 0; case 18: return 2; case 21: return 5; case 20: return 4; case 19: return 3; } return -1; }\n"+ // test 718 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 18: return 2; default: return 0; case 21: return 5; case 20: return 4; case 19: return 3; } return -1; }\n"+ // test 719 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 18: return 2; case 21: return 5; default: return 0; case 20: return 4; case 19: return 3; } return -1; }\n"+ // test 720 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 18: return 2; case 21: return 5; case 20: return 4; default: return 0; case 19: return 3; } return -1; }\n"+ // test 721 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 18: return 2; case 21: return 5; case 20: return 4; case 19: return 3; default: return 0; } return -1; }\n"+ // test 722 - "mixed b() { return 3; }", - - - "=mixed a() { switch(19) { case 18: return 2; case 21: return 5; case 19: return 3; case 20: return 4; } return 0; }\n"+ // test 723 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { default: return 0; case 18: return 2; case 21: return 5; case 19: return 3; case 20: return 4; } return -1; }\n"+ // test 724 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 18: return 2; default: return 0; case 21: return 5; case 19: return 3; case 20: return 4; } return -1; }\n"+ // test 725 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 18: return 2; case 21: return 5; default: return 0; case 19: return 3; case 20: return 4; } return -1; }\n"+ // test 726 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 18: return 2; case 21: return 5; case 19: return 3; default: return 0; case 20: return 4; } return -1; }\n"+ // test 727 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 18: return 2; case 21: return 5; case 19: return 3; case 20: return 4; default: return 0; } return -1; }\n"+ // test 728 - "mixed b() { return 3; }", - - - - - - - "=mixed a() { switch(19) { case 19: return 3; case 18: return 2; case 20: return 4; case 21: return 5; } return 0; }\n"+ // test 729 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { default: return 0; case 19: return 3; case 18: return 2; case 20: return 4; case 21: return 5; } return -1; }\n"+ // test 730 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 19: return 3; default: return 0; case 18: return 2; case 20: return 4; case 21: return 5; } return -1; }\n"+ // test 731 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 19: return 3; case 18: return 2; default: return 0; case 20: return 4; case 21: return 5; } return -1; }\n"+ // test 732 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 19: return 3; case 18: return 2; case 20: return 4; default: return 0; case 21: return 5; } return -1; }\n"+ // test 733 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 19: return 3; case 18: return 2; case 20: return 4; case 21: return 5; default: return 0; } return -1; }\n"+ // test 734 - "mixed b() { return 3; }", - - - "=mixed a() { switch(19) { case 19: return 3; case 18: return 2; case 21: return 5; case 20: return 4; } return 0; }\n"+ // test 735 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { default: return 0; case 19: return 3; case 18: return 2; case 21: return 5; case 20: return 4; } return -1; }\n"+ // test 736 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 19: return 3; default: return 0; case 18: return 2; case 21: return 5; case 20: return 4; } return -1; }\n"+ // test 737 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 19: return 3; case 18: return 2; default: return 0; case 21: return 5; case 20: return 4; } return -1; }\n"+ // test 738 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 19: return 3; case 18: return 2; case 21: return 5; default: return 0; case 20: return 4; } return -1; }\n"+ // test 739 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 19: return 3; case 18: return 2; case 21: return 5; case 20: return 4; default: return 0; } return -1; }\n"+ // test 740 - "mixed b() { return 3; }", - - - - - "=mixed a() { switch(19) { case 19: return 3; case 20: return 4; case 18: return 2; case 21: return 5; } return 0; }\n"+ // test 741 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { default: return 0; case 19: return 3; case 20: return 4; case 18: return 2; case 21: return 5; } return -1; }\n"+ // test 742 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 19: return 3; default: return 0; case 20: return 4; case 18: return 2; case 21: return 5; } return -1; }\n"+ // test 743 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 19: return 3; case 20: return 4; default: return 0; case 18: return 2; case 21: return 5; } return -1; }\n"+ // test 744 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 19: return 3; case 20: return 4; case 18: return 2; default: return 0; case 21: return 5; } return -1; }\n"+ // test 745 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 19: return 3; case 20: return 4; case 18: return 2; case 21: return 5; default: return 0; } return -1; }\n"+ // test 746 - "mixed b() { return 3; }", - - - "=mixed a() { switch(19) { case 19: return 3; case 20: return 4; case 21: return 5; case 18: return 2; } return 0; }\n"+ // test 747 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { default: return 0; case 19: return 3; case 20: return 4; case 21: return 5; case 18: return 2; } return -1; }\n"+ // test 748 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 19: return 3; default: return 0; case 20: return 4; case 21: return 5; case 18: return 2; } return -1; }\n"+ // test 749 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 19: return 3; case 20: return 4; default: return 0; case 21: return 5; case 18: return 2; } return -1; }\n"+ // test 750 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 19: return 3; case 20: return 4; case 21: return 5; default: return 0; case 18: return 2; } return -1; }\n"+ // test 751 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 19: return 3; case 20: return 4; case 21: return 5; case 18: return 2; default: return 0; } return -1; }\n"+ // test 752 - "mixed b() { return 3; }", - - - - - "=mixed a() { switch(19) { case 19: return 3; case 21: return 5; case 20: return 4; case 18: return 2; } return 0; }\n"+ // test 753 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { default: return 0; case 19: return 3; case 21: return 5; case 20: return 4; case 18: return 2; } return -1; }\n"+ // test 754 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 19: return 3; default: return 0; case 21: return 5; case 20: return 4; case 18: return 2; } return -1; }\n"+ // test 755 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 19: return 3; case 21: return 5; default: return 0; case 20: return 4; case 18: return 2; } return -1; }\n"+ // test 756 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 19: return 3; case 21: return 5; case 20: return 4; default: return 0; case 18: return 2; } return -1; }\n"+ // test 757 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 19: return 3; case 21: return 5; case 20: return 4; case 18: return 2; default: return 0; } return -1; }\n"+ // test 758 - "mixed b() { return 3; }", - - - "=mixed a() { switch(19) { case 19: return 3; case 21: return 5; case 18: return 2; case 20: return 4; } return 0; }\n"+ // test 759 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { default: return 0; case 19: return 3; case 21: return 5; case 18: return 2; case 20: return 4; } return -1; }\n"+ // test 760 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 19: return 3; default: return 0; case 21: return 5; case 18: return 2; case 20: return 4; } return -1; }\n"+ // test 761 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 19: return 3; case 21: return 5; default: return 0; case 18: return 2; case 20: return 4; } return -1; }\n"+ // test 762 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 19: return 3; case 21: return 5; case 18: return 2; default: return 0; case 20: return 4; } return -1; }\n"+ // test 763 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 19: return 3; case 21: return 5; case 18: return 2; case 20: return 4; default: return 0; } return -1; }\n"+ // test 764 - "mixed b() { return 3; }", - - - - - - - "=mixed a() { switch(19) { case 20: return 4; case 19: return 3; case 18: return 2; case 21: return 5; } return 0; }\n"+ // test 765 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { default: return 0; case 20: return 4; case 19: return 3; case 18: return 2; case 21: return 5; } return -1; }\n"+ // test 766 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 20: return 4; default: return 0; case 19: return 3; case 18: return 2; case 21: return 5; } return -1; }\n"+ // test 767 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 20: return 4; case 19: return 3; default: return 0; case 18: return 2; case 21: return 5; } return -1; }\n"+ // test 768 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 20: return 4; case 19: return 3; case 18: return 2; default: return 0; case 21: return 5; } return -1; }\n"+ // test 769 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 20: return 4; case 19: return 3; case 18: return 2; case 21: return 5; default: return 0; } return -1; }\n"+ // test 770 - "mixed b() { return 3; }", - - - "=mixed a() { switch(19) { case 20: return 4; case 19: return 3; case 21: return 5; case 18: return 2; } return 0; }\n"+ // test 771 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { default: return 0; case 20: return 4; case 19: return 3; case 21: return 5; case 18: return 2; } return -1; }\n"+ // test 772 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 20: return 4; default: return 0; case 19: return 3; case 21: return 5; case 18: return 2; } return -1; }\n"+ // test 773 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 20: return 4; case 19: return 3; default: return 0; case 21: return 5; case 18: return 2; } return -1; }\n"+ // test 774 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 20: return 4; case 19: return 3; case 21: return 5; default: return 0; case 18: return 2; } return -1; }\n"+ // test 775 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 20: return 4; case 19: return 3; case 21: return 5; case 18: return 2; default: return 0; } return -1; }\n"+ // test 776 - "mixed b() { return 3; }", - - - - - "=mixed a() { switch(19) { case 20: return 4; case 18: return 2; case 19: return 3; case 21: return 5; } return 0; }\n"+ // test 777 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { default: return 0; case 20: return 4; case 18: return 2; case 19: return 3; case 21: return 5; } return -1; }\n"+ // test 778 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 20: return 4; default: return 0; case 18: return 2; case 19: return 3; case 21: return 5; } return -1; }\n"+ // test 779 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 20: return 4; case 18: return 2; default: return 0; case 19: return 3; case 21: return 5; } return -1; }\n"+ // test 780 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 20: return 4; case 18: return 2; case 19: return 3; default: return 0; case 21: return 5; } return -1; }\n"+ // test 781 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 20: return 4; case 18: return 2; case 19: return 3; case 21: return 5; default: return 0; } return -1; }\n"+ // test 782 - "mixed b() { return 3; }", - - - "=mixed a() { switch(19) { case 20: return 4; case 18: return 2; case 21: return 5; case 19: return 3; } return 0; }\n"+ // test 783 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { default: return 0; case 20: return 4; case 18: return 2; case 21: return 5; case 19: return 3; } return -1; }\n"+ // test 784 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 20: return 4; default: return 0; case 18: return 2; case 21: return 5; case 19: return 3; } return -1; }\n"+ // test 785 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 20: return 4; case 18: return 2; default: return 0; case 21: return 5; case 19: return 3; } return -1; }\n"+ // test 786 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 20: return 4; case 18: return 2; case 21: return 5; default: return 0; case 19: return 3; } return -1; }\n"+ // test 787 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 20: return 4; case 18: return 2; case 21: return 5; case 19: return 3; default: return 0; } return -1; }\n"+ // test 788 - "mixed b() { return 3; }", - - - - - "=mixed a() { switch(19) { case 20: return 4; case 21: return 5; case 18: return 2; case 19: return 3; } return 0; }\n"+ // test 789 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { default: return 0; case 20: return 4; case 21: return 5; case 18: return 2; case 19: return 3; } return -1; }\n"+ // test 790 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 20: return 4; default: return 0; case 21: return 5; case 18: return 2; case 19: return 3; } return -1; }\n"+ // test 791 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 20: return 4; case 21: return 5; default: return 0; case 18: return 2; case 19: return 3; } return -1; }\n"+ // test 792 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 20: return 4; case 21: return 5; case 18: return 2; default: return 0; case 19: return 3; } return -1; }\n"+ // test 793 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 20: return 4; case 21: return 5; case 18: return 2; case 19: return 3; default: return 0; } return -1; }\n"+ // test 794 - "mixed b() { return 3; }", - - - "=mixed a() { switch(19) { case 20: return 4; case 21: return 5; case 19: return 3; case 18: return 2; } return 0; }\n"+ // test 795 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { default: return 0; case 20: return 4; case 21: return 5; case 19: return 3; case 18: return 2; } return -1; }\n"+ // test 796 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 20: return 4; default: return 0; case 21: return 5; case 19: return 3; case 18: return 2; } return -1; }\n"+ // test 797 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 20: return 4; case 21: return 5; default: return 0; case 19: return 3; case 18: return 2; } return -1; }\n"+ // test 798 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 20: return 4; case 21: return 5; case 19: return 3; default: return 0; case 18: return 2; } return -1; }\n"+ // test 799 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 20: return 4; case 21: return 5; case 19: return 3; case 18: return 2; default: return 0; } return -1; }\n"+ // test 800 - "mixed b() { return 3; }", - - - - - - - "=mixed a() { switch(19) { case 21: return 5; case 19: return 3; case 20: return 4; case 18: return 2; } return 0; }\n"+ // test 801 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { default: return 0; case 21: return 5; case 19: return 3; case 20: return 4; case 18: return 2; } return -1; }\n"+ // test 802 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 21: return 5; default: return 0; case 19: return 3; case 20: return 4; case 18: return 2; } return -1; }\n"+ // test 803 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 21: return 5; case 19: return 3; default: return 0; case 20: return 4; case 18: return 2; } return -1; }\n"+ // test 804 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 21: return 5; case 19: return 3; case 20: return 4; default: return 0; case 18: return 2; } return -1; }\n"+ // test 805 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 21: return 5; case 19: return 3; case 20: return 4; case 18: return 2; default: return 0; } return -1; }\n"+ // test 806 - "mixed b() { return 3; }", - - - "=mixed a() { switch(19) { case 21: return 5; case 19: return 3; case 18: return 2; case 20: return 4; } return 0; }\n"+ // test 807 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { default: return 0; case 21: return 5; case 19: return 3; case 18: return 2; case 20: return 4; } return -1; }\n"+ // test 808 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 21: return 5; default: return 0; case 19: return 3; case 18: return 2; case 20: return 4; } return -1; }\n"+ // test 809 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 21: return 5; case 19: return 3; default: return 0; case 18: return 2; case 20: return 4; } return -1; }\n"+ // test 810 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 21: return 5; case 19: return 3; case 18: return 2; default: return 0; case 20: return 4; } return -1; }\n"+ // test 811 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 21: return 5; case 19: return 3; case 18: return 2; case 20: return 4; default: return 0; } return -1; }\n"+ // test 812 - "mixed b() { return 3; }", - - - - - "=mixed a() { switch(19) { case 21: return 5; case 20: return 4; case 19: return 3; case 18: return 2; } return 0; }\n"+ // test 813 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { default: return 0; case 21: return 5; case 20: return 4; case 19: return 3; case 18: return 2; } return -1; }\n"+ // test 814 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 21: return 5; default: return 0; case 20: return 4; case 19: return 3; case 18: return 2; } return -1; }\n"+ // test 815 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 21: return 5; case 20: return 4; default: return 0; case 19: return 3; case 18: return 2; } return -1; }\n"+ // test 816 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 21: return 5; case 20: return 4; case 19: return 3; default: return 0; case 18: return 2; } return -1; }\n"+ // test 817 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 21: return 5; case 20: return 4; case 19: return 3; case 18: return 2; default: return 0; } return -1; }\n"+ // test 818 - "mixed b() { return 3; }", - - - "=mixed a() { switch(19) { case 21: return 5; case 20: return 4; case 18: return 2; case 19: return 3; } return 0; }\n"+ // test 819 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { default: return 0; case 21: return 5; case 20: return 4; case 18: return 2; case 19: return 3; } return -1; }\n"+ // test 820 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 21: return 5; default: return 0; case 20: return 4; case 18: return 2; case 19: return 3; } return -1; }\n"+ // test 821 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 21: return 5; case 20: return 4; default: return 0; case 18: return 2; case 19: return 3; } return -1; }\n"+ // test 822 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 21: return 5; case 20: return 4; case 18: return 2; default: return 0; case 19: return 3; } return -1; }\n"+ // test 823 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 21: return 5; case 20: return 4; case 18: return 2; case 19: return 3; default: return 0; } return -1; }\n"+ // test 824 - "mixed b() { return 3; }", - - - - - "=mixed a() { switch(19) { case 21: return 5; case 18: return 2; case 20: return 4; case 19: return 3; } return 0; }\n"+ // test 825 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { default: return 0; case 21: return 5; case 18: return 2; case 20: return 4; case 19: return 3; } return -1; }\n"+ // test 826 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 21: return 5; default: return 0; case 18: return 2; case 20: return 4; case 19: return 3; } return -1; }\n"+ // test 827 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 21: return 5; case 18: return 2; default: return 0; case 20: return 4; case 19: return 3; } return -1; }\n"+ // test 828 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 21: return 5; case 18: return 2; case 20: return 4; default: return 0; case 19: return 3; } return -1; }\n"+ // test 829 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 21: return 5; case 18: return 2; case 20: return 4; case 19: return 3; default: return 0; } return -1; }\n"+ // test 830 - "mixed b() { return 3; }", - - - "=mixed a() { switch(19) { case 21: return 5; case 18: return 2; case 19: return 3; case 20: return 4; } return 0; }\n"+ // test 831 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { default: return 0; case 21: return 5; case 18: return 2; case 19: return 3; case 20: return 4; } return -1; }\n"+ // test 832 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 21: return 5; default: return 0; case 18: return 2; case 19: return 3; case 20: return 4; } return -1; }\n"+ // test 833 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 21: return 5; case 18: return 2; default: return 0; case 19: return 3; case 20: return 4; } return -1; }\n"+ // test 834 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 21: return 5; case 18: return 2; case 19: return 3; default: return 0; case 20: return 4; } return -1; }\n"+ // test 835 - "mixed b() { return 3; }", - "=mixed a() { switch(19) { case 21: return 5; case 18: return 2; case 19: return 3; case 20: return 4; default: return 0; } return -1; }\n"+ // test 836 - "mixed b() { return 3; }", - - - - - - - - - "=mixed a() { switch(20) { case 18: return 2; case 19: return 3; case 20: return 4; case 21: return 5; } return 0; }\n"+ // test 837 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { default: return 0; case 18: return 2; case 19: return 3; case 20: return 4; case 21: return 5; } return -1; }\n"+ // test 838 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 18: return 2; default: return 0; case 19: return 3; case 20: return 4; case 21: return 5; } return -1; }\n"+ // test 839 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 18: return 2; case 19: return 3; default: return 0; case 20: return 4; case 21: return 5; } return -1; }\n"+ // test 840 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 18: return 2; case 19: return 3; case 20: return 4; default: return 0; case 21: return 5; } return -1; }\n"+ // test 841 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 18: return 2; case 19: return 3; case 20: return 4; case 21: return 5; default: return 0; } return -1; }\n"+ // test 842 - "mixed b() { return 4; }", - - - "=mixed a() { switch(20) { case 18: return 2; case 19: return 3; case 21: return 5; case 20: return 4; } return 0; }\n"+ // test 843 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { default: return 0; case 18: return 2; case 19: return 3; case 21: return 5; case 20: return 4; } return -1; }\n"+ // test 844 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 18: return 2; default: return 0; case 19: return 3; case 21: return 5; case 20: return 4; } return -1; }\n"+ // test 845 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 18: return 2; case 19: return 3; default: return 0; case 21: return 5; case 20: return 4; } return -1; }\n"+ // test 846 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 18: return 2; case 19: return 3; case 21: return 5; default: return 0; case 20: return 4; } return -1; }\n"+ // test 847 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 18: return 2; case 19: return 3; case 21: return 5; case 20: return 4; default: return 0; } return -1; }\n"+ // test 848 - "mixed b() { return 4; }", - - - - - "=mixed a() { switch(20) { case 18: return 2; case 20: return 4; case 19: return 3; case 21: return 5; } return 0; }\n"+ // test 849 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { default: return 0; case 18: return 2; case 20: return 4; case 19: return 3; case 21: return 5; } return -1; }\n"+ // test 850 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 18: return 2; default: return 0; case 20: return 4; case 19: return 3; case 21: return 5; } return -1; }\n"+ // test 851 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 18: return 2; case 20: return 4; default: return 0; case 19: return 3; case 21: return 5; } return -1; }\n"+ // test 852 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 18: return 2; case 20: return 4; case 19: return 3; default: return 0; case 21: return 5; } return -1; }\n"+ // test 853 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 18: return 2; case 20: return 4; case 19: return 3; case 21: return 5; default: return 0; } return -1; }\n"+ // test 854 - "mixed b() { return 4; }", - - - "=mixed a() { switch(20) { case 18: return 2; case 20: return 4; case 21: return 5; case 19: return 3; } return 0; }\n"+ // test 855 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { default: return 0; case 18: return 2; case 20: return 4; case 21: return 5; case 19: return 3; } return -1; }\n"+ // test 856 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 18: return 2; default: return 0; case 20: return 4; case 21: return 5; case 19: return 3; } return -1; }\n"+ // test 857 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 18: return 2; case 20: return 4; default: return 0; case 21: return 5; case 19: return 3; } return -1; }\n"+ // test 858 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 18: return 2; case 20: return 4; case 21: return 5; default: return 0; case 19: return 3; } return -1; }\n"+ // test 859 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 18: return 2; case 20: return 4; case 21: return 5; case 19: return 3; default: return 0; } return -1; }\n"+ // test 860 - "mixed b() { return 4; }", - - - - - "=mixed a() { switch(20) { case 18: return 2; case 21: return 5; case 20: return 4; case 19: return 3; } return 0; }\n"+ // test 861 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { default: return 0; case 18: return 2; case 21: return 5; case 20: return 4; case 19: return 3; } return -1; }\n"+ // test 862 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 18: return 2; default: return 0; case 21: return 5; case 20: return 4; case 19: return 3; } return -1; }\n"+ // test 863 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 18: return 2; case 21: return 5; default: return 0; case 20: return 4; case 19: return 3; } return -1; }\n"+ // test 864 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 18: return 2; case 21: return 5; case 20: return 4; default: return 0; case 19: return 3; } return -1; }\n"+ // test 865 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 18: return 2; case 21: return 5; case 20: return 4; case 19: return 3; default: return 0; } return -1; }\n"+ // test 866 - "mixed b() { return 4; }", - - - "=mixed a() { switch(20) { case 18: return 2; case 21: return 5; case 19: return 3; case 20: return 4; } return 0; }\n"+ // test 867 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { default: return 0; case 18: return 2; case 21: return 5; case 19: return 3; case 20: return 4; } return -1; }\n"+ // test 868 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 18: return 2; default: return 0; case 21: return 5; case 19: return 3; case 20: return 4; } return -1; }\n"+ // test 869 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 18: return 2; case 21: return 5; default: return 0; case 19: return 3; case 20: return 4; } return -1; }\n"+ // test 870 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 18: return 2; case 21: return 5; case 19: return 3; default: return 0; case 20: return 4; } return -1; }\n"+ // test 871 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 18: return 2; case 21: return 5; case 19: return 3; case 20: return 4; default: return 0; } return -1; }\n"+ // test 872 - "mixed b() { return 4; }", - - - - - - - "=mixed a() { switch(20) { case 19: return 3; case 18: return 2; case 20: return 4; case 21: return 5; } return 0; }\n"+ // test 873 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { default: return 0; case 19: return 3; case 18: return 2; case 20: return 4; case 21: return 5; } return -1; }\n"+ // test 874 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 19: return 3; default: return 0; case 18: return 2; case 20: return 4; case 21: return 5; } return -1; }\n"+ // test 875 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 19: return 3; case 18: return 2; default: return 0; case 20: return 4; case 21: return 5; } return -1; }\n"+ // test 876 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 19: return 3; case 18: return 2; case 20: return 4; default: return 0; case 21: return 5; } return -1; }\n"+ // test 877 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 19: return 3; case 18: return 2; case 20: return 4; case 21: return 5; default: return 0; } return -1; }\n"+ // test 878 - "mixed b() { return 4; }", - - - "=mixed a() { switch(20) { case 19: return 3; case 18: return 2; case 21: return 5; case 20: return 4; } return 0; }\n"+ // test 879 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { default: return 0; case 19: return 3; case 18: return 2; case 21: return 5; case 20: return 4; } return -1; }\n"+ // test 880 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 19: return 3; default: return 0; case 18: return 2; case 21: return 5; case 20: return 4; } return -1; }\n"+ // test 881 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 19: return 3; case 18: return 2; default: return 0; case 21: return 5; case 20: return 4; } return -1; }\n"+ // test 882 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 19: return 3; case 18: return 2; case 21: return 5; default: return 0; case 20: return 4; } return -1; }\n"+ // test 883 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 19: return 3; case 18: return 2; case 21: return 5; case 20: return 4; default: return 0; } return -1; }\n"+ // test 884 - "mixed b() { return 4; }", - - - - - "=mixed a() { switch(20) { case 19: return 3; case 20: return 4; case 18: return 2; case 21: return 5; } return 0; }\n"+ // test 885 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { default: return 0; case 19: return 3; case 20: return 4; case 18: return 2; case 21: return 5; } return -1; }\n"+ // test 886 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 19: return 3; default: return 0; case 20: return 4; case 18: return 2; case 21: return 5; } return -1; }\n"+ // test 887 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 19: return 3; case 20: return 4; default: return 0; case 18: return 2; case 21: return 5; } return -1; }\n"+ // test 888 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 19: return 3; case 20: return 4; case 18: return 2; default: return 0; case 21: return 5; } return -1; }\n"+ // test 889 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 19: return 3; case 20: return 4; case 18: return 2; case 21: return 5; default: return 0; } return -1; }\n"+ // test 890 - "mixed b() { return 4; }", - - - "=mixed a() { switch(20) { case 19: return 3; case 20: return 4; case 21: return 5; case 18: return 2; } return 0; }\n"+ // test 891 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { default: return 0; case 19: return 3; case 20: return 4; case 21: return 5; case 18: return 2; } return -1; }\n"+ // test 892 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 19: return 3; default: return 0; case 20: return 4; case 21: return 5; case 18: return 2; } return -1; }\n"+ // test 893 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 19: return 3; case 20: return 4; default: return 0; case 21: return 5; case 18: return 2; } return -1; }\n"+ // test 894 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 19: return 3; case 20: return 4; case 21: return 5; default: return 0; case 18: return 2; } return -1; }\n"+ // test 895 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 19: return 3; case 20: return 4; case 21: return 5; case 18: return 2; default: return 0; } return -1; }\n"+ // test 896 - "mixed b() { return 4; }", - - - - - "=mixed a() { switch(20) { case 19: return 3; case 21: return 5; case 20: return 4; case 18: return 2; } return 0; }\n"+ // test 897 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { default: return 0; case 19: return 3; case 21: return 5; case 20: return 4; case 18: return 2; } return -1; }\n"+ // test 898 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 19: return 3; default: return 0; case 21: return 5; case 20: return 4; case 18: return 2; } return -1; }\n"+ // test 899 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 19: return 3; case 21: return 5; default: return 0; case 20: return 4; case 18: return 2; } return -1; }\n"+ // test 900 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 19: return 3; case 21: return 5; case 20: return 4; default: return 0; case 18: return 2; } return -1; }\n"+ // test 901 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 19: return 3; case 21: return 5; case 20: return 4; case 18: return 2; default: return 0; } return -1; }\n"+ // test 902 - "mixed b() { return 4; }", - - - "=mixed a() { switch(20) { case 19: return 3; case 21: return 5; case 18: return 2; case 20: return 4; } return 0; }\n"+ // test 903 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { default: return 0; case 19: return 3; case 21: return 5; case 18: return 2; case 20: return 4; } return -1; }\n"+ // test 904 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 19: return 3; default: return 0; case 21: return 5; case 18: return 2; case 20: return 4; } return -1; }\n"+ // test 905 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 19: return 3; case 21: return 5; default: return 0; case 18: return 2; case 20: return 4; } return -1; }\n"+ // test 906 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 19: return 3; case 21: return 5; case 18: return 2; default: return 0; case 20: return 4; } return -1; }\n"+ // test 907 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 19: return 3; case 21: return 5; case 18: return 2; case 20: return 4; default: return 0; } return -1; }\n"+ // test 908 - "mixed b() { return 4; }", - - - - - - - "=mixed a() { switch(20) { case 20: return 4; case 19: return 3; case 18: return 2; case 21: return 5; } return 0; }\n"+ // test 909 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { default: return 0; case 20: return 4; case 19: return 3; case 18: return 2; case 21: return 5; } return -1; }\n"+ // test 910 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 20: return 4; default: return 0; case 19: return 3; case 18: return 2; case 21: return 5; } return -1; }\n"+ // test 911 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 20: return 4; case 19: return 3; default: return 0; case 18: return 2; case 21: return 5; } return -1; }\n"+ // test 912 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 20: return 4; case 19: return 3; case 18: return 2; default: return 0; case 21: return 5; } return -1; }\n"+ // test 913 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 20: return 4; case 19: return 3; case 18: return 2; case 21: return 5; default: return 0; } return -1; }\n"+ // test 914 - "mixed b() { return 4; }", - - - "=mixed a() { switch(20) { case 20: return 4; case 19: return 3; case 21: return 5; case 18: return 2; } return 0; }\n"+ // test 915 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { default: return 0; case 20: return 4; case 19: return 3; case 21: return 5; case 18: return 2; } return -1; }\n"+ // test 916 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 20: return 4; default: return 0; case 19: return 3; case 21: return 5; case 18: return 2; } return -1; }\n"+ // test 917 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 20: return 4; case 19: return 3; default: return 0; case 21: return 5; case 18: return 2; } return -1; }\n"+ // test 918 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 20: return 4; case 19: return 3; case 21: return 5; default: return 0; case 18: return 2; } return -1; }\n"+ // test 919 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 20: return 4; case 19: return 3; case 21: return 5; case 18: return 2; default: return 0; } return -1; }\n"+ // test 920 - "mixed b() { return 4; }", - - - - - "=mixed a() { switch(20) { case 20: return 4; case 18: return 2; case 19: return 3; case 21: return 5; } return 0; }\n"+ // test 921 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { default: return 0; case 20: return 4; case 18: return 2; case 19: return 3; case 21: return 5; } return -1; }\n"+ // test 922 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 20: return 4; default: return 0; case 18: return 2; case 19: return 3; case 21: return 5; } return -1; }\n"+ // test 923 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 20: return 4; case 18: return 2; default: return 0; case 19: return 3; case 21: return 5; } return -1; }\n"+ // test 924 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 20: return 4; case 18: return 2; case 19: return 3; default: return 0; case 21: return 5; } return -1; }\n"+ // test 925 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 20: return 4; case 18: return 2; case 19: return 3; case 21: return 5; default: return 0; } return -1; }\n"+ // test 926 - "mixed b() { return 4; }", - - - "=mixed a() { switch(20) { case 20: return 4; case 18: return 2; case 21: return 5; case 19: return 3; } return 0; }\n"+ // test 927 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { default: return 0; case 20: return 4; case 18: return 2; case 21: return 5; case 19: return 3; } return -1; }\n"+ // test 928 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 20: return 4; default: return 0; case 18: return 2; case 21: return 5; case 19: return 3; } return -1; }\n"+ // test 929 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 20: return 4; case 18: return 2; default: return 0; case 21: return 5; case 19: return 3; } return -1; }\n"+ // test 930 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 20: return 4; case 18: return 2; case 21: return 5; default: return 0; case 19: return 3; } return -1; }\n"+ // test 931 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 20: return 4; case 18: return 2; case 21: return 5; case 19: return 3; default: return 0; } return -1; }\n"+ // test 932 - "mixed b() { return 4; }", - - - - - "=mixed a() { switch(20) { case 20: return 4; case 21: return 5; case 18: return 2; case 19: return 3; } return 0; }\n"+ // test 933 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { default: return 0; case 20: return 4; case 21: return 5; case 18: return 2; case 19: return 3; } return -1; }\n"+ // test 934 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 20: return 4; default: return 0; case 21: return 5; case 18: return 2; case 19: return 3; } return -1; }\n"+ // test 935 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 20: return 4; case 21: return 5; default: return 0; case 18: return 2; case 19: return 3; } return -1; }\n"+ // test 936 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 20: return 4; case 21: return 5; case 18: return 2; default: return 0; case 19: return 3; } return -1; }\n"+ // test 937 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 20: return 4; case 21: return 5; case 18: return 2; case 19: return 3; default: return 0; } return -1; }\n"+ // test 938 - "mixed b() { return 4; }", - - - "=mixed a() { switch(20) { case 20: return 4; case 21: return 5; case 19: return 3; case 18: return 2; } return 0; }\n"+ // test 939 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { default: return 0; case 20: return 4; case 21: return 5; case 19: return 3; case 18: return 2; } return -1; }\n"+ // test 940 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 20: return 4; default: return 0; case 21: return 5; case 19: return 3; case 18: return 2; } return -1; }\n"+ // test 941 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 20: return 4; case 21: return 5; default: return 0; case 19: return 3; case 18: return 2; } return -1; }\n"+ // test 942 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 20: return 4; case 21: return 5; case 19: return 3; default: return 0; case 18: return 2; } return -1; }\n"+ // test 943 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 20: return 4; case 21: return 5; case 19: return 3; case 18: return 2; default: return 0; } return -1; }\n"+ // test 944 - "mixed b() { return 4; }", - - - - - - - "=mixed a() { switch(20) { case 21: return 5; case 19: return 3; case 20: return 4; case 18: return 2; } return 0; }\n"+ // test 945 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { default: return 0; case 21: return 5; case 19: return 3; case 20: return 4; case 18: return 2; } return -1; }\n"+ // test 946 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 21: return 5; default: return 0; case 19: return 3; case 20: return 4; case 18: return 2; } return -1; }\n"+ // test 947 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 21: return 5; case 19: return 3; default: return 0; case 20: return 4; case 18: return 2; } return -1; }\n"+ // test 948 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 21: return 5; case 19: return 3; case 20: return 4; default: return 0; case 18: return 2; } return -1; }\n"+ // test 949 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 21: return 5; case 19: return 3; case 20: return 4; case 18: return 2; default: return 0; } return -1; }\n"+ // test 950 - "mixed b() { return 4; }", - - - "=mixed a() { switch(20) { case 21: return 5; case 19: return 3; case 18: return 2; case 20: return 4; } return 0; }\n"+ // test 951 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { default: return 0; case 21: return 5; case 19: return 3; case 18: return 2; case 20: return 4; } return -1; }\n"+ // test 952 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 21: return 5; default: return 0; case 19: return 3; case 18: return 2; case 20: return 4; } return -1; }\n"+ // test 953 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 21: return 5; case 19: return 3; default: return 0; case 18: return 2; case 20: return 4; } return -1; }\n"+ // test 954 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 21: return 5; case 19: return 3; case 18: return 2; default: return 0; case 20: return 4; } return -1; }\n"+ // test 955 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 21: return 5; case 19: return 3; case 18: return 2; case 20: return 4; default: return 0; } return -1; }\n"+ // test 956 - "mixed b() { return 4; }", - - - - - "=mixed a() { switch(20) { case 21: return 5; case 20: return 4; case 19: return 3; case 18: return 2; } return 0; }\n"+ // test 957 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { default: return 0; case 21: return 5; case 20: return 4; case 19: return 3; case 18: return 2; } return -1; }\n"+ // test 958 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 21: return 5; default: return 0; case 20: return 4; case 19: return 3; case 18: return 2; } return -1; }\n"+ // test 959 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 21: return 5; case 20: return 4; default: return 0; case 19: return 3; case 18: return 2; } return -1; }\n"+ // test 960 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 21: return 5; case 20: return 4; case 19: return 3; default: return 0; case 18: return 2; } return -1; }\n"+ // test 961 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 21: return 5; case 20: return 4; case 19: return 3; case 18: return 2; default: return 0; } return -1; }\n"+ // test 962 - "mixed b() { return 4; }", - - - "=mixed a() { switch(20) { case 21: return 5; case 20: return 4; case 18: return 2; case 19: return 3; } return 0; }\n"+ // test 963 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { default: return 0; case 21: return 5; case 20: return 4; case 18: return 2; case 19: return 3; } return -1; }\n"+ // test 964 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 21: return 5; default: return 0; case 20: return 4; case 18: return 2; case 19: return 3; } return -1; }\n"+ // test 965 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 21: return 5; case 20: return 4; default: return 0; case 18: return 2; case 19: return 3; } return -1; }\n"+ // test 966 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 21: return 5; case 20: return 4; case 18: return 2; default: return 0; case 19: return 3; } return -1; }\n"+ // test 967 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 21: return 5; case 20: return 4; case 18: return 2; case 19: return 3; default: return 0; } return -1; }\n"+ // test 968 - "mixed b() { return 4; }", - - - - - "=mixed a() { switch(20) { case 21: return 5; case 18: return 2; case 20: return 4; case 19: return 3; } return 0; }\n"+ // test 969 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { default: return 0; case 21: return 5; case 18: return 2; case 20: return 4; case 19: return 3; } return -1; }\n"+ // test 970 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 21: return 5; default: return 0; case 18: return 2; case 20: return 4; case 19: return 3; } return -1; }\n"+ // test 971 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 21: return 5; case 18: return 2; default: return 0; case 20: return 4; case 19: return 3; } return -1; }\n"+ // test 972 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 21: return 5; case 18: return 2; case 20: return 4; default: return 0; case 19: return 3; } return -1; }\n"+ // test 973 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 21: return 5; case 18: return 2; case 20: return 4; case 19: return 3; default: return 0; } return -1; }\n"+ // test 974 - "mixed b() { return 4; }", - - - "=mixed a() { switch(20) { case 21: return 5; case 18: return 2; case 19: return 3; case 20: return 4; } return 0; }\n"+ // test 975 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { default: return 0; case 21: return 5; case 18: return 2; case 19: return 3; case 20: return 4; } return -1; }\n"+ // test 976 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 21: return 5; default: return 0; case 18: return 2; case 19: return 3; case 20: return 4; } return -1; }\n"+ // test 977 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 21: return 5; case 18: return 2; default: return 0; case 19: return 3; case 20: return 4; } return -1; }\n"+ // test 978 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 21: return 5; case 18: return 2; case 19: return 3; default: return 0; case 20: return 4; } return -1; }\n"+ // test 979 - "mixed b() { return 4; }", - "=mixed a() { switch(20) { case 21: return 5; case 18: return 2; case 19: return 3; case 20: return 4; default: return 0; } return -1; }\n"+ // test 980 - "mixed b() { return 4; }", - - - - - - - - - "=mixed a() { switch(21) { case 18: return 2; case 19: return 3; case 20: return 4; case 21: return 5; } return 0; }\n"+ // test 981 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { default: return 0; case 18: return 2; case 19: return 3; case 20: return 4; case 21: return 5; } return -1; }\n"+ // test 982 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 18: return 2; default: return 0; case 19: return 3; case 20: return 4; case 21: return 5; } return -1; }\n"+ // test 983 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 18: return 2; case 19: return 3; default: return 0; case 20: return 4; case 21: return 5; } return -1; }\n"+ // test 984 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 18: return 2; case 19: return 3; case 20: return 4; default: return 0; case 21: return 5; } return -1; }\n"+ // test 985 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 18: return 2; case 19: return 3; case 20: return 4; case 21: return 5; default: return 0; } return -1; }\n"+ // test 986 - "mixed b() { return 5; }", - - - "=mixed a() { switch(21) { case 18: return 2; case 19: return 3; case 21: return 5; case 20: return 4; } return 0; }\n"+ // test 987 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { default: return 0; case 18: return 2; case 19: return 3; case 21: return 5; case 20: return 4; } return -1; }\n"+ // test 988 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 18: return 2; default: return 0; case 19: return 3; case 21: return 5; case 20: return 4; } return -1; }\n"+ // test 989 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 18: return 2; case 19: return 3; default: return 0; case 21: return 5; case 20: return 4; } return -1; }\n"+ // test 990 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 18: return 2; case 19: return 3; case 21: return 5; default: return 0; case 20: return 4; } return -1; }\n"+ // test 991 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 18: return 2; case 19: return 3; case 21: return 5; case 20: return 4; default: return 0; } return -1; }\n"+ // test 992 - "mixed b() { return 5; }", - - - - - "=mixed a() { switch(21) { case 18: return 2; case 20: return 4; case 19: return 3; case 21: return 5; } return 0; }\n"+ // test 993 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { default: return 0; case 18: return 2; case 20: return 4; case 19: return 3; case 21: return 5; } return -1; }\n"+ // test 994 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 18: return 2; default: return 0; case 20: return 4; case 19: return 3; case 21: return 5; } return -1; }\n"+ // test 995 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 18: return 2; case 20: return 4; default: return 0; case 19: return 3; case 21: return 5; } return -1; }\n"+ // test 996 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 18: return 2; case 20: return 4; case 19: return 3; default: return 0; case 21: return 5; } return -1; }\n"+ // test 997 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 18: return 2; case 20: return 4; case 19: return 3; case 21: return 5; default: return 0; } return -1; }\n"+ // test 998 - "mixed b() { return 5; }", - - - "=mixed a() { switch(21) { case 18: return 2; case 20: return 4; case 21: return 5; case 19: return 3; } return 0; }\n"+ // test 999 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { default: return 0; case 18: return 2; case 20: return 4; case 21: return 5; case 19: return 3; } return -1; }\n"+ // test 1000 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 18: return 2; default: return 0; case 20: return 4; case 21: return 5; case 19: return 3; } return -1; }\n"+ // test 1001 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 18: return 2; case 20: return 4; default: return 0; case 21: return 5; case 19: return 3; } return -1; }\n"+ // test 1002 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 18: return 2; case 20: return 4; case 21: return 5; default: return 0; case 19: return 3; } return -1; }\n"+ // test 1003 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 18: return 2; case 20: return 4; case 21: return 5; case 19: return 3; default: return 0; } return -1; }\n"+ // test 1004 - "mixed b() { return 5; }", - - - - - "=mixed a() { switch(21) { case 18: return 2; case 21: return 5; case 20: return 4; case 19: return 3; } return 0; }\n"+ // test 1005 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { default: return 0; case 18: return 2; case 21: return 5; case 20: return 4; case 19: return 3; } return -1; }\n"+ // test 1006 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 18: return 2; default: return 0; case 21: return 5; case 20: return 4; case 19: return 3; } return -1; }\n"+ // test 1007 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 18: return 2; case 21: return 5; default: return 0; case 20: return 4; case 19: return 3; } return -1; }\n"+ // test 1008 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 18: return 2; case 21: return 5; case 20: return 4; default: return 0; case 19: return 3; } return -1; }\n"+ // test 1009 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 18: return 2; case 21: return 5; case 20: return 4; case 19: return 3; default: return 0; } return -1; }\n"+ // test 1010 - "mixed b() { return 5; }", - - - "=mixed a() { switch(21) { case 18: return 2; case 21: return 5; case 19: return 3; case 20: return 4; } return 0; }\n"+ // test 1011 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { default: return 0; case 18: return 2; case 21: return 5; case 19: return 3; case 20: return 4; } return -1; }\n"+ // test 1012 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 18: return 2; default: return 0; case 21: return 5; case 19: return 3; case 20: return 4; } return -1; }\n"+ // test 1013 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 18: return 2; case 21: return 5; default: return 0; case 19: return 3; case 20: return 4; } return -1; }\n"+ // test 1014 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 18: return 2; case 21: return 5; case 19: return 3; default: return 0; case 20: return 4; } return -1; }\n"+ // test 1015 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 18: return 2; case 21: return 5; case 19: return 3; case 20: return 4; default: return 0; } return -1; }\n"+ // test 1016 - "mixed b() { return 5; }", - - - - - - - "=mixed a() { switch(21) { case 19: return 3; case 18: return 2; case 20: return 4; case 21: return 5; } return 0; }\n"+ // test 1017 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { default: return 0; case 19: return 3; case 18: return 2; case 20: return 4; case 21: return 5; } return -1; }\n"+ // test 1018 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 19: return 3; default: return 0; case 18: return 2; case 20: return 4; case 21: return 5; } return -1; }\n"+ // test 1019 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 19: return 3; case 18: return 2; default: return 0; case 20: return 4; case 21: return 5; } return -1; }\n"+ // test 1020 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 19: return 3; case 18: return 2; case 20: return 4; default: return 0; case 21: return 5; } return -1; }\n"+ // test 1021 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 19: return 3; case 18: return 2; case 20: return 4; case 21: return 5; default: return 0; } return -1; }\n"+ // test 1022 - "mixed b() { return 5; }", - - - "=mixed a() { switch(21) { case 19: return 3; case 18: return 2; case 21: return 5; case 20: return 4; } return 0; }\n"+ // test 1023 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { default: return 0; case 19: return 3; case 18: return 2; case 21: return 5; case 20: return 4; } return -1; }\n"+ // test 1024 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 19: return 3; default: return 0; case 18: return 2; case 21: return 5; case 20: return 4; } return -1; }\n"+ // test 1025 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 19: return 3; case 18: return 2; default: return 0; case 21: return 5; case 20: return 4; } return -1; }\n"+ // test 1026 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 19: return 3; case 18: return 2; case 21: return 5; default: return 0; case 20: return 4; } return -1; }\n"+ // test 1027 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 19: return 3; case 18: return 2; case 21: return 5; case 20: return 4; default: return 0; } return -1; }\n"+ // test 1028 - "mixed b() { return 5; }", - - - - - "=mixed a() { switch(21) { case 19: return 3; case 20: return 4; case 18: return 2; case 21: return 5; } return 0; }\n"+ // test 1029 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { default: return 0; case 19: return 3; case 20: return 4; case 18: return 2; case 21: return 5; } return -1; }\n"+ // test 1030 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 19: return 3; default: return 0; case 20: return 4; case 18: return 2; case 21: return 5; } return -1; }\n"+ // test 1031 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 19: return 3; case 20: return 4; default: return 0; case 18: return 2; case 21: return 5; } return -1; }\n"+ // test 1032 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 19: return 3; case 20: return 4; case 18: return 2; default: return 0; case 21: return 5; } return -1; }\n"+ // test 1033 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 19: return 3; case 20: return 4; case 18: return 2; case 21: return 5; default: return 0; } return -1; }\n"+ // test 1034 - "mixed b() { return 5; }", - - - "=mixed a() { switch(21) { case 19: return 3; case 20: return 4; case 21: return 5; case 18: return 2; } return 0; }\n"+ // test 1035 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { default: return 0; case 19: return 3; case 20: return 4; case 21: return 5; case 18: return 2; } return -1; }\n"+ // test 1036 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 19: return 3; default: return 0; case 20: return 4; case 21: return 5; case 18: return 2; } return -1; }\n"+ // test 1037 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 19: return 3; case 20: return 4; default: return 0; case 21: return 5; case 18: return 2; } return -1; }\n"+ // test 1038 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 19: return 3; case 20: return 4; case 21: return 5; default: return 0; case 18: return 2; } return -1; }\n"+ // test 1039 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 19: return 3; case 20: return 4; case 21: return 5; case 18: return 2; default: return 0; } return -1; }\n"+ // test 1040 - "mixed b() { return 5; }", - - - - - "=mixed a() { switch(21) { case 19: return 3; case 21: return 5; case 20: return 4; case 18: return 2; } return 0; }\n"+ // test 1041 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { default: return 0; case 19: return 3; case 21: return 5; case 20: return 4; case 18: return 2; } return -1; }\n"+ // test 1042 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 19: return 3; default: return 0; case 21: return 5; case 20: return 4; case 18: return 2; } return -1; }\n"+ // test 1043 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 19: return 3; case 21: return 5; default: return 0; case 20: return 4; case 18: return 2; } return -1; }\n"+ // test 1044 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 19: return 3; case 21: return 5; case 20: return 4; default: return 0; case 18: return 2; } return -1; }\n"+ // test 1045 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 19: return 3; case 21: return 5; case 20: return 4; case 18: return 2; default: return 0; } return -1; }\n"+ // test 1046 - "mixed b() { return 5; }", - - - "=mixed a() { switch(21) { case 19: return 3; case 21: return 5; case 18: return 2; case 20: return 4; } return 0; }\n"+ // test 1047 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { default: return 0; case 19: return 3; case 21: return 5; case 18: return 2; case 20: return 4; } return -1; }\n"+ // test 1048 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 19: return 3; default: return 0; case 21: return 5; case 18: return 2; case 20: return 4; } return -1; }\n"+ // test 1049 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 19: return 3; case 21: return 5; default: return 0; case 18: return 2; case 20: return 4; } return -1; }\n"+ // test 1050 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 19: return 3; case 21: return 5; case 18: return 2; default: return 0; case 20: return 4; } return -1; }\n"+ // test 1051 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 19: return 3; case 21: return 5; case 18: return 2; case 20: return 4; default: return 0; } return -1; }\n"+ // test 1052 - "mixed b() { return 5; }", - - - - - - - "=mixed a() { switch(21) { case 20: return 4; case 19: return 3; case 18: return 2; case 21: return 5; } return 0; }\n"+ // test 1053 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { default: return 0; case 20: return 4; case 19: return 3; case 18: return 2; case 21: return 5; } return -1; }\n"+ // test 1054 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 20: return 4; default: return 0; case 19: return 3; case 18: return 2; case 21: return 5; } return -1; }\n"+ // test 1055 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 20: return 4; case 19: return 3; default: return 0; case 18: return 2; case 21: return 5; } return -1; }\n"+ // test 1056 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 20: return 4; case 19: return 3; case 18: return 2; default: return 0; case 21: return 5; } return -1; }\n"+ // test 1057 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 20: return 4; case 19: return 3; case 18: return 2; case 21: return 5; default: return 0; } return -1; }\n"+ // test 1058 - "mixed b() { return 5; }", - - - "=mixed a() { switch(21) { case 20: return 4; case 19: return 3; case 21: return 5; case 18: return 2; } return 0; }\n"+ // test 1059 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { default: return 0; case 20: return 4; case 19: return 3; case 21: return 5; case 18: return 2; } return -1; }\n"+ // test 1060 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 20: return 4; default: return 0; case 19: return 3; case 21: return 5; case 18: return 2; } return -1; }\n"+ // test 1061 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 20: return 4; case 19: return 3; default: return 0; case 21: return 5; case 18: return 2; } return -1; }\n"+ // test 1062 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 20: return 4; case 19: return 3; case 21: return 5; default: return 0; case 18: return 2; } return -1; }\n"+ // test 1063 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 20: return 4; case 19: return 3; case 21: return 5; case 18: return 2; default: return 0; } return -1; }\n"+ // test 1064 - "mixed b() { return 5; }", - - - - - "=mixed a() { switch(21) { case 20: return 4; case 18: return 2; case 19: return 3; case 21: return 5; } return 0; }\n"+ // test 1065 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { default: return 0; case 20: return 4; case 18: return 2; case 19: return 3; case 21: return 5; } return -1; }\n"+ // test 1066 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 20: return 4; default: return 0; case 18: return 2; case 19: return 3; case 21: return 5; } return -1; }\n"+ // test 1067 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 20: return 4; case 18: return 2; default: return 0; case 19: return 3; case 21: return 5; } return -1; }\n"+ // test 1068 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 20: return 4; case 18: return 2; case 19: return 3; default: return 0; case 21: return 5; } return -1; }\n"+ // test 1069 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 20: return 4; case 18: return 2; case 19: return 3; case 21: return 5; default: return 0; } return -1; }\n"+ // test 1070 - "mixed b() { return 5; }", - - - "=mixed a() { switch(21) { case 20: return 4; case 18: return 2; case 21: return 5; case 19: return 3; } return 0; }\n"+ // test 1071 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { default: return 0; case 20: return 4; case 18: return 2; case 21: return 5; case 19: return 3; } return -1; }\n"+ // test 1072 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 20: return 4; default: return 0; case 18: return 2; case 21: return 5; case 19: return 3; } return -1; }\n"+ // test 1073 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 20: return 4; case 18: return 2; default: return 0; case 21: return 5; case 19: return 3; } return -1; }\n"+ // test 1074 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 20: return 4; case 18: return 2; case 21: return 5; default: return 0; case 19: return 3; } return -1; }\n"+ // test 1075 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 20: return 4; case 18: return 2; case 21: return 5; case 19: return 3; default: return 0; } return -1; }\n"+ // test 1076 - "mixed b() { return 5; }", - - - - - "=mixed a() { switch(21) { case 20: return 4; case 21: return 5; case 18: return 2; case 19: return 3; } return 0; }\n"+ // test 1077 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { default: return 0; case 20: return 4; case 21: return 5; case 18: return 2; case 19: return 3; } return -1; }\n"+ // test 1078 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 20: return 4; default: return 0; case 21: return 5; case 18: return 2; case 19: return 3; } return -1; }\n"+ // test 1079 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 20: return 4; case 21: return 5; default: return 0; case 18: return 2; case 19: return 3; } return -1; }\n"+ // test 1080 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 20: return 4; case 21: return 5; case 18: return 2; default: return 0; case 19: return 3; } return -1; }\n"+ // test 1081 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 20: return 4; case 21: return 5; case 18: return 2; case 19: return 3; default: return 0; } return -1; }\n"+ // test 1082 - "mixed b() { return 5; }", - - - "=mixed a() { switch(21) { case 20: return 4; case 21: return 5; case 19: return 3; case 18: return 2; } return 0; }\n"+ // test 1083 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { default: return 0; case 20: return 4; case 21: return 5; case 19: return 3; case 18: return 2; } return -1; }\n"+ // test 1084 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 20: return 4; default: return 0; case 21: return 5; case 19: return 3; case 18: return 2; } return -1; }\n"+ // test 1085 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 20: return 4; case 21: return 5; default: return 0; case 19: return 3; case 18: return 2; } return -1; }\n"+ // test 1086 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 20: return 4; case 21: return 5; case 19: return 3; default: return 0; case 18: return 2; } return -1; }\n"+ // test 1087 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 20: return 4; case 21: return 5; case 19: return 3; case 18: return 2; default: return 0; } return -1; }\n"+ // test 1088 - "mixed b() { return 5; }", - - - - - - - "=mixed a() { switch(21) { case 21: return 5; case 19: return 3; case 20: return 4; case 18: return 2; } return 0; }\n"+ // test 1089 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { default: return 0; case 21: return 5; case 19: return 3; case 20: return 4; case 18: return 2; } return -1; }\n"+ // test 1090 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 21: return 5; default: return 0; case 19: return 3; case 20: return 4; case 18: return 2; } return -1; }\n"+ // test 1091 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 21: return 5; case 19: return 3; default: return 0; case 20: return 4; case 18: return 2; } return -1; }\n"+ // test 1092 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 21: return 5; case 19: return 3; case 20: return 4; default: return 0; case 18: return 2; } return -1; }\n"+ // test 1093 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 21: return 5; case 19: return 3; case 20: return 4; case 18: return 2; default: return 0; } return -1; }\n"+ // test 1094 - "mixed b() { return 5; }", - - - "=mixed a() { switch(21) { case 21: return 5; case 19: return 3; case 18: return 2; case 20: return 4; } return 0; }\n"+ // test 1095 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { default: return 0; case 21: return 5; case 19: return 3; case 18: return 2; case 20: return 4; } return -1; }\n"+ // test 1096 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 21: return 5; default: return 0; case 19: return 3; case 18: return 2; case 20: return 4; } return -1; }\n"+ // test 1097 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 21: return 5; case 19: return 3; default: return 0; case 18: return 2; case 20: return 4; } return -1; }\n"+ // test 1098 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 21: return 5; case 19: return 3; case 18: return 2; default: return 0; case 20: return 4; } return -1; }\n"+ // test 1099 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 21: return 5; case 19: return 3; case 18: return 2; case 20: return 4; default: return 0; } return -1; }\n"+ // test 1100 - "mixed b() { return 5; }", - - - - - "=mixed a() { switch(21) { case 21: return 5; case 20: return 4; case 19: return 3; case 18: return 2; } return 0; }\n"+ // test 1101 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { default: return 0; case 21: return 5; case 20: return 4; case 19: return 3; case 18: return 2; } return -1; }\n"+ // test 1102 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 21: return 5; default: return 0; case 20: return 4; case 19: return 3; case 18: return 2; } return -1; }\n"+ // test 1103 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 21: return 5; case 20: return 4; default: return 0; case 19: return 3; case 18: return 2; } return -1; }\n"+ // test 1104 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 21: return 5; case 20: return 4; case 19: return 3; default: return 0; case 18: return 2; } return -1; }\n"+ // test 1105 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 21: return 5; case 20: return 4; case 19: return 3; case 18: return 2; default: return 0; } return -1; }\n"+ // test 1106 - "mixed b() { return 5; }", - - - "=mixed a() { switch(21) { case 21: return 5; case 20: return 4; case 18: return 2; case 19: return 3; } return 0; }\n"+ // test 1107 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { default: return 0; case 21: return 5; case 20: return 4; case 18: return 2; case 19: return 3; } return -1; }\n"+ // test 1108 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 21: return 5; default: return 0; case 20: return 4; case 18: return 2; case 19: return 3; } return -1; }\n"+ // test 1109 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 21: return 5; case 20: return 4; default: return 0; case 18: return 2; case 19: return 3; } return -1; }\n"+ // test 1110 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 21: return 5; case 20: return 4; case 18: return 2; default: return 0; case 19: return 3; } return -1; }\n"+ // test 1111 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 21: return 5; case 20: return 4; case 18: return 2; case 19: return 3; default: return 0; } return -1; }\n"+ // test 1112 - "mixed b() { return 5; }", - - - - - "=mixed a() { switch(21) { case 21: return 5; case 18: return 2; case 20: return 4; case 19: return 3; } return 0; }\n"+ // test 1113 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { default: return 0; case 21: return 5; case 18: return 2; case 20: return 4; case 19: return 3; } return -1; }\n"+ // test 1114 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 21: return 5; default: return 0; case 18: return 2; case 20: return 4; case 19: return 3; } return -1; }\n"+ // test 1115 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 21: return 5; case 18: return 2; default: return 0; case 20: return 4; case 19: return 3; } return -1; }\n"+ // test 1116 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 21: return 5; case 18: return 2; case 20: return 4; default: return 0; case 19: return 3; } return -1; }\n"+ // test 1117 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 21: return 5; case 18: return 2; case 20: return 4; case 19: return 3; default: return 0; } return -1; }\n"+ // test 1118 - "mixed b() { return 5; }", - - - "=mixed a() { switch(21) { case 21: return 5; case 18: return 2; case 19: return 3; case 20: return 4; } return 0; }\n"+ // test 1119 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { default: return 0; case 21: return 5; case 18: return 2; case 19: return 3; case 20: return 4; } return -1; }\n"+ // test 1120 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 21: return 5; default: return 0; case 18: return 2; case 19: return 3; case 20: return 4; } return -1; }\n"+ // test 1121 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 21: return 5; case 18: return 2; default: return 0; case 19: return 3; case 20: return 4; } return -1; }\n"+ // test 1122 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 21: return 5; case 18: return 2; case 19: return 3; default: return 0; case 20: return 4; } return -1; }\n"+ // test 1123 - "mixed b() { return 5; }", - "=mixed a() { switch(21) { case 21: return 5; case 18: return 2; case 19: return 3; case 20: return 4; default: return 0; } return -1; }\n"+ // test 1124 - "mixed b() { return 5; }", - - - - - - - - - - - "=mixed a() { switch(\"a\") { case \"b\": return 2; case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; } return 0; }\n"+ // test 1125 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { default: return 0; case \"b\": return 2; case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; } return -1; }\n"+ // test 1126 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"b\": return 2; default: return 0; case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; } return -1; }\n"+ // test 1127 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"b\": return 2; case \"c\": return 3; default: return 0; case \"d\": return 4; case \"e\": return 5; } return -1; }\n"+ // test 1128 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"b\": return 2; case \"c\": return 3; case \"d\": return 4; default: return 0; case \"e\": return 5; } return -1; }\n"+ // test 1129 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"b\": return 2; case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; default: return 0; } return -1; }\n"+ // test 1130 - "mixed b() { return 0; }", - - - "=mixed a() { switch(\"a\") { case \"b\": return 2; case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; } return 0; }\n"+ // test 1131 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { default: return 0; case \"b\": return 2; case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; } return -1; }\n"+ // test 1132 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"b\": return 2; default: return 0; case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; } return -1; }\n"+ // test 1133 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"b\": return 2; case \"c\": return 3; default: return 0; case \"e\": return 5; case \"d\": return 4; } return -1; }\n"+ // test 1134 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"b\": return 2; case \"c\": return 3; case \"e\": return 5; default: return 0; case \"d\": return 4; } return -1; }\n"+ // test 1135 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"b\": return 2; case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; default: return 0; } return -1; }\n"+ // test 1136 - "mixed b() { return 0; }", - - - - - "=mixed a() { switch(\"a\") { case \"b\": return 2; case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; } return 0; }\n"+ // test 1137 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { default: return 0; case \"b\": return 2; case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; } return -1; }\n"+ // test 1138 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"b\": return 2; default: return 0; case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; } return -1; }\n"+ // test 1139 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"b\": return 2; case \"d\": return 4; default: return 0; case \"c\": return 3; case \"e\": return 5; } return -1; }\n"+ // test 1140 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"b\": return 2; case \"d\": return 4; case \"c\": return 3; default: return 0; case \"e\": return 5; } return -1; }\n"+ // test 1141 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"b\": return 2; case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; default: return 0; } return -1; }\n"+ // test 1142 - "mixed b() { return 0; }", - - - "=mixed a() { switch(\"a\") { case \"b\": return 2; case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; } return 0; }\n"+ // test 1143 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { default: return 0; case \"b\": return 2; case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; } return -1; }\n"+ // test 1144 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"b\": return 2; default: return 0; case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; } return -1; }\n"+ // test 1145 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"b\": return 2; case \"d\": return 4; default: return 0; case \"e\": return 5; case \"c\": return 3; } return -1; }\n"+ // test 1146 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"b\": return 2; case \"d\": return 4; case \"e\": return 5; default: return 0; case \"c\": return 3; } return -1; }\n"+ // test 1147 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"b\": return 2; case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; default: return 0; } return -1; }\n"+ // test 1148 - "mixed b() { return 0; }", - - - - - "=mixed a() { switch(\"a\") { case \"b\": return 2; case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; } return 0; }\n"+ // test 1149 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { default: return 0; case \"b\": return 2; case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; } return -1; }\n"+ // test 1150 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"b\": return 2; default: return 0; case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; } return -1; }\n"+ // test 1151 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"b\": return 2; case \"e\": return 5; default: return 0; case \"d\": return 4; case \"c\": return 3; } return -1; }\n"+ // test 1152 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"b\": return 2; case \"e\": return 5; case \"d\": return 4; default: return 0; case \"c\": return 3; } return -1; }\n"+ // test 1153 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"b\": return 2; case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; default: return 0; } return -1; }\n"+ // test 1154 - "mixed b() { return 0; }", - - - "=mixed a() { switch(\"a\") { case \"b\": return 2; case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; } return 0; }\n"+ // test 1155 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { default: return 0; case \"b\": return 2; case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; } return -1; }\n"+ // test 1156 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"b\": return 2; default: return 0; case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; } return -1; }\n"+ // test 1157 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"b\": return 2; case \"e\": return 5; default: return 0; case \"c\": return 3; case \"d\": return 4; } return -1; }\n"+ // test 1158 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"b\": return 2; case \"e\": return 5; case \"c\": return 3; default: return 0; case \"d\": return 4; } return -1; }\n"+ // test 1159 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"b\": return 2; case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; default: return 0; } return -1; }\n"+ // test 1160 - "mixed b() { return 0; }", - - - - - - - "=mixed a() { switch(\"a\") { case \"c\": return 3; case \"b\": return 2; case \"d\": return 4; case \"e\": return 5; } return 0; }\n"+ // test 1161 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { default: return 0; case \"c\": return 3; case \"b\": return 2; case \"d\": return 4; case \"e\": return 5; } return -1; }\n"+ // test 1162 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"c\": return 3; default: return 0; case \"b\": return 2; case \"d\": return 4; case \"e\": return 5; } return -1; }\n"+ // test 1163 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"c\": return 3; case \"b\": return 2; default: return 0; case \"d\": return 4; case \"e\": return 5; } return -1; }\n"+ // test 1164 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"c\": return 3; case \"b\": return 2; case \"d\": return 4; default: return 0; case \"e\": return 5; } return -1; }\n"+ // test 1165 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"c\": return 3; case \"b\": return 2; case \"d\": return 4; case \"e\": return 5; default: return 0; } return -1; }\n"+ // test 1166 - "mixed b() { return 0; }", - - - "=mixed a() { switch(\"a\") { case \"c\": return 3; case \"b\": return 2; case \"e\": return 5; case \"d\": return 4; } return 0; }\n"+ // test 1167 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { default: return 0; case \"c\": return 3; case \"b\": return 2; case \"e\": return 5; case \"d\": return 4; } return -1; }\n"+ // test 1168 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"c\": return 3; default: return 0; case \"b\": return 2; case \"e\": return 5; case \"d\": return 4; } return -1; }\n"+ // test 1169 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"c\": return 3; case \"b\": return 2; default: return 0; case \"e\": return 5; case \"d\": return 4; } return -1; }\n"+ // test 1170 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"c\": return 3; case \"b\": return 2; case \"e\": return 5; default: return 0; case \"d\": return 4; } return -1; }\n"+ // test 1171 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"c\": return 3; case \"b\": return 2; case \"e\": return 5; case \"d\": return 4; default: return 0; } return -1; }\n"+ // test 1172 - "mixed b() { return 0; }", - - - - - "=mixed a() { switch(\"a\") { case \"c\": return 3; case \"d\": return 4; case \"b\": return 2; case \"e\": return 5; } return 0; }\n"+ // test 1173 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { default: return 0; case \"c\": return 3; case \"d\": return 4; case \"b\": return 2; case \"e\": return 5; } return -1; }\n"+ // test 1174 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"c\": return 3; default: return 0; case \"d\": return 4; case \"b\": return 2; case \"e\": return 5; } return -1; }\n"+ // test 1175 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"c\": return 3; case \"d\": return 4; default: return 0; case \"b\": return 2; case \"e\": return 5; } return -1; }\n"+ // test 1176 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"c\": return 3; case \"d\": return 4; case \"b\": return 2; default: return 0; case \"e\": return 5; } return -1; }\n"+ // test 1177 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"c\": return 3; case \"d\": return 4; case \"b\": return 2; case \"e\": return 5; default: return 0; } return -1; }\n"+ // test 1178 - "mixed b() { return 0; }", - - - "=mixed a() { switch(\"a\") { case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; case \"b\": return 2; } return 0; }\n"+ // test 1179 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { default: return 0; case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; case \"b\": return 2; } return -1; }\n"+ // test 1180 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"c\": return 3; default: return 0; case \"d\": return 4; case \"e\": return 5; case \"b\": return 2; } return -1; }\n"+ // test 1181 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"c\": return 3; case \"d\": return 4; default: return 0; case \"e\": return 5; case \"b\": return 2; } return -1; }\n"+ // test 1182 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; default: return 0; case \"b\": return 2; } return -1; }\n"+ // test 1183 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; case \"b\": return 2; default: return 0; } return -1; }\n"+ // test 1184 - "mixed b() { return 0; }", - - - - - "=mixed a() { switch(\"a\") { case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; case \"b\": return 2; } return 0; }\n"+ // test 1185 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { default: return 0; case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; case \"b\": return 2; } return -1; }\n"+ // test 1186 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"c\": return 3; default: return 0; case \"e\": return 5; case \"d\": return 4; case \"b\": return 2; } return -1; }\n"+ // test 1187 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"c\": return 3; case \"e\": return 5; default: return 0; case \"d\": return 4; case \"b\": return 2; } return -1; }\n"+ // test 1188 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; default: return 0; case \"b\": return 2; } return -1; }\n"+ // test 1189 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; case \"b\": return 2; default: return 0; } return -1; }\n"+ // test 1190 - "mixed b() { return 0; }", - - - "=mixed a() { switch(\"a\") { case \"c\": return 3; case \"e\": return 5; case \"b\": return 2; case \"d\": return 4; } return 0; }\n"+ // test 1191 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { default: return 0; case \"c\": return 3; case \"e\": return 5; case \"b\": return 2; case \"d\": return 4; } return -1; }\n"+ // test 1192 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"c\": return 3; default: return 0; case \"e\": return 5; case \"b\": return 2; case \"d\": return 4; } return -1; }\n"+ // test 1193 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"c\": return 3; case \"e\": return 5; default: return 0; case \"b\": return 2; case \"d\": return 4; } return -1; }\n"+ // test 1194 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"c\": return 3; case \"e\": return 5; case \"b\": return 2; default: return 0; case \"d\": return 4; } return -1; }\n"+ // test 1195 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"c\": return 3; case \"e\": return 5; case \"b\": return 2; case \"d\": return 4; default: return 0; } return -1; }\n"+ // test 1196 - "mixed b() { return 0; }", - - - - - - - "=mixed a() { switch(\"a\") { case \"d\": return 4; case \"c\": return 3; case \"b\": return 2; case \"e\": return 5; } return 0; }\n"+ // test 1197 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { default: return 0; case \"d\": return 4; case \"c\": return 3; case \"b\": return 2; case \"e\": return 5; } return -1; }\n"+ // test 1198 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"d\": return 4; default: return 0; case \"c\": return 3; case \"b\": return 2; case \"e\": return 5; } return -1; }\n"+ // test 1199 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"d\": return 4; case \"c\": return 3; default: return 0; case \"b\": return 2; case \"e\": return 5; } return -1; }\n"+ // test 1200 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"d\": return 4; case \"c\": return 3; case \"b\": return 2; default: return 0; case \"e\": return 5; } return -1; }\n"+ // test 1201 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"d\": return 4; case \"c\": return 3; case \"b\": return 2; case \"e\": return 5; default: return 0; } return -1; }\n"+ // test 1202 - "mixed b() { return 0; }", - - - "=mixed a() { switch(\"a\") { case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; case \"b\": return 2; } return 0; }\n"+ // test 1203 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { default: return 0; case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; case \"b\": return 2; } return -1; }\n"+ // test 1204 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"d\": return 4; default: return 0; case \"c\": return 3; case \"e\": return 5; case \"b\": return 2; } return -1; }\n"+ // test 1205 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"d\": return 4; case \"c\": return 3; default: return 0; case \"e\": return 5; case \"b\": return 2; } return -1; }\n"+ // test 1206 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; default: return 0; case \"b\": return 2; } return -1; }\n"+ // test 1207 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; case \"b\": return 2; default: return 0; } return -1; }\n"+ // test 1208 - "mixed b() { return 0; }", - - - - - "=mixed a() { switch(\"a\") { case \"d\": return 4; case \"b\": return 2; case \"c\": return 3; case \"e\": return 5; } return 0; }\n"+ // test 1209 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { default: return 0; case \"d\": return 4; case \"b\": return 2; case \"c\": return 3; case \"e\": return 5; } return -1; }\n"+ // test 1210 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"d\": return 4; default: return 0; case \"b\": return 2; case \"c\": return 3; case \"e\": return 5; } return -1; }\n"+ // test 1211 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"d\": return 4; case \"b\": return 2; default: return 0; case \"c\": return 3; case \"e\": return 5; } return -1; }\n"+ // test 1212 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"d\": return 4; case \"b\": return 2; case \"c\": return 3; default: return 0; case \"e\": return 5; } return -1; }\n"+ // test 1213 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"d\": return 4; case \"b\": return 2; case \"c\": return 3; case \"e\": return 5; default: return 0; } return -1; }\n"+ // test 1214 - "mixed b() { return 0; }", - - - "=mixed a() { switch(\"a\") { case \"d\": return 4; case \"b\": return 2; case \"e\": return 5; case \"c\": return 3; } return 0; }\n"+ // test 1215 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { default: return 0; case \"d\": return 4; case \"b\": return 2; case \"e\": return 5; case \"c\": return 3; } return -1; }\n"+ // test 1216 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"d\": return 4; default: return 0; case \"b\": return 2; case \"e\": return 5; case \"c\": return 3; } return -1; }\n"+ // test 1217 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"d\": return 4; case \"b\": return 2; default: return 0; case \"e\": return 5; case \"c\": return 3; } return -1; }\n"+ // test 1218 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"d\": return 4; case \"b\": return 2; case \"e\": return 5; default: return 0; case \"c\": return 3; } return -1; }\n"+ // test 1219 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"d\": return 4; case \"b\": return 2; case \"e\": return 5; case \"c\": return 3; default: return 0; } return -1; }\n"+ // test 1220 - "mixed b() { return 0; }", - - - - - "=mixed a() { switch(\"a\") { case \"d\": return 4; case \"e\": return 5; case \"b\": return 2; case \"c\": return 3; } return 0; }\n"+ // test 1221 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { default: return 0; case \"d\": return 4; case \"e\": return 5; case \"b\": return 2; case \"c\": return 3; } return -1; }\n"+ // test 1222 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"d\": return 4; default: return 0; case \"e\": return 5; case \"b\": return 2; case \"c\": return 3; } return -1; }\n"+ // test 1223 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"d\": return 4; case \"e\": return 5; default: return 0; case \"b\": return 2; case \"c\": return 3; } return -1; }\n"+ // test 1224 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"d\": return 4; case \"e\": return 5; case \"b\": return 2; default: return 0; case \"c\": return 3; } return -1; }\n"+ // test 1225 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"d\": return 4; case \"e\": return 5; case \"b\": return 2; case \"c\": return 3; default: return 0; } return -1; }\n"+ // test 1226 - "mixed b() { return 0; }", - - - "=mixed a() { switch(\"a\") { case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; case \"b\": return 2; } return 0; }\n"+ // test 1227 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { default: return 0; case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; case \"b\": return 2; } return -1; }\n"+ // test 1228 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"d\": return 4; default: return 0; case \"e\": return 5; case \"c\": return 3; case \"b\": return 2; } return -1; }\n"+ // test 1229 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"d\": return 4; case \"e\": return 5; default: return 0; case \"c\": return 3; case \"b\": return 2; } return -1; }\n"+ // test 1230 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; default: return 0; case \"b\": return 2; } return -1; }\n"+ // test 1231 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; case \"b\": return 2; default: return 0; } return -1; }\n"+ // test 1232 - "mixed b() { return 0; }", - - - - - - - "=mixed a() { switch(\"a\") { case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; case \"b\": return 2; } return 0; }\n"+ // test 1233 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { default: return 0; case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; case \"b\": return 2; } return -1; }\n"+ // test 1234 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"e\": return 5; default: return 0; case \"c\": return 3; case \"d\": return 4; case \"b\": return 2; } return -1; }\n"+ // test 1235 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"e\": return 5; case \"c\": return 3; default: return 0; case \"d\": return 4; case \"b\": return 2; } return -1; }\n"+ // test 1236 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; default: return 0; case \"b\": return 2; } return -1; }\n"+ // test 1237 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; case \"b\": return 2; default: return 0; } return -1; }\n"+ // test 1238 - "mixed b() { return 0; }", - - - "=mixed a() { switch(\"a\") { case \"e\": return 5; case \"c\": return 3; case \"b\": return 2; case \"d\": return 4; } return 0; }\n"+ // test 1239 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { default: return 0; case \"e\": return 5; case \"c\": return 3; case \"b\": return 2; case \"d\": return 4; } return -1; }\n"+ // test 1240 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"e\": return 5; default: return 0; case \"c\": return 3; case \"b\": return 2; case \"d\": return 4; } return -1; }\n"+ // test 1241 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"e\": return 5; case \"c\": return 3; default: return 0; case \"b\": return 2; case \"d\": return 4; } return -1; }\n"+ // test 1242 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"e\": return 5; case \"c\": return 3; case \"b\": return 2; default: return 0; case \"d\": return 4; } return -1; }\n"+ // test 1243 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"e\": return 5; case \"c\": return 3; case \"b\": return 2; case \"d\": return 4; default: return 0; } return -1; }\n"+ // test 1244 - "mixed b() { return 0; }", - - - - - "=mixed a() { switch(\"a\") { case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; case \"b\": return 2; } return 0; }\n"+ // test 1245 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { default: return 0; case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; case \"b\": return 2; } return -1; }\n"+ // test 1246 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"e\": return 5; default: return 0; case \"d\": return 4; case \"c\": return 3; case \"b\": return 2; } return -1; }\n"+ // test 1247 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"e\": return 5; case \"d\": return 4; default: return 0; case \"c\": return 3; case \"b\": return 2; } return -1; }\n"+ // test 1248 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; default: return 0; case \"b\": return 2; } return -1; }\n"+ // test 1249 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; case \"b\": return 2; default: return 0; } return -1; }\n"+ // test 1250 - "mixed b() { return 0; }", - - - "=mixed a() { switch(\"a\") { case \"e\": return 5; case \"d\": return 4; case \"b\": return 2; case \"c\": return 3; } return 0; }\n"+ // test 1251 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { default: return 0; case \"e\": return 5; case \"d\": return 4; case \"b\": return 2; case \"c\": return 3; } return -1; }\n"+ // test 1252 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"e\": return 5; default: return 0; case \"d\": return 4; case \"b\": return 2; case \"c\": return 3; } return -1; }\n"+ // test 1253 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"e\": return 5; case \"d\": return 4; default: return 0; case \"b\": return 2; case \"c\": return 3; } return -1; }\n"+ // test 1254 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"e\": return 5; case \"d\": return 4; case \"b\": return 2; default: return 0; case \"c\": return 3; } return -1; }\n"+ // test 1255 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"e\": return 5; case \"d\": return 4; case \"b\": return 2; case \"c\": return 3; default: return 0; } return -1; }\n"+ // test 1256 - "mixed b() { return 0; }", - - - - - "=mixed a() { switch(\"a\") { case \"e\": return 5; case \"b\": return 2; case \"d\": return 4; case \"c\": return 3; } return 0; }\n"+ // test 1257 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { default: return 0; case \"e\": return 5; case \"b\": return 2; case \"d\": return 4; case \"c\": return 3; } return -1; }\n"+ // test 1258 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"e\": return 5; default: return 0; case \"b\": return 2; case \"d\": return 4; case \"c\": return 3; } return -1; }\n"+ // test 1259 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"e\": return 5; case \"b\": return 2; default: return 0; case \"d\": return 4; case \"c\": return 3; } return -1; }\n"+ // test 1260 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"e\": return 5; case \"b\": return 2; case \"d\": return 4; default: return 0; case \"c\": return 3; } return -1; }\n"+ // test 1261 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"e\": return 5; case \"b\": return 2; case \"d\": return 4; case \"c\": return 3; default: return 0; } return -1; }\n"+ // test 1262 - "mixed b() { return 0; }", - - - "=mixed a() { switch(\"a\") { case \"e\": return 5; case \"b\": return 2; case \"c\": return 3; case \"d\": return 4; } return 0; }\n"+ // test 1263 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { default: return 0; case \"e\": return 5; case \"b\": return 2; case \"c\": return 3; case \"d\": return 4; } return -1; }\n"+ // test 1264 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"e\": return 5; default: return 0; case \"b\": return 2; case \"c\": return 3; case \"d\": return 4; } return -1; }\n"+ // test 1265 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"e\": return 5; case \"b\": return 2; default: return 0; case \"c\": return 3; case \"d\": return 4; } return -1; }\n"+ // test 1266 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"e\": return 5; case \"b\": return 2; case \"c\": return 3; default: return 0; case \"d\": return 4; } return -1; }\n"+ // test 1267 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"e\": return 5; case \"b\": return 2; case \"c\": return 3; case \"d\": return 4; default: return 0; } return -1; }\n"+ // test 1268 - "mixed b() { return 0; }", - - - - - - - - - "=mixed a() { switch(\"b\") { case \"b\": return 2; case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; } return 0; }\n"+ // test 1269 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { default: return 0; case \"b\": return 2; case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; } return -1; }\n"+ // test 1270 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"b\": return 2; default: return 0; case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; } return -1; }\n"+ // test 1271 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"b\": return 2; case \"c\": return 3; default: return 0; case \"d\": return 4; case \"e\": return 5; } return -1; }\n"+ // test 1272 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"b\": return 2; case \"c\": return 3; case \"d\": return 4; default: return 0; case \"e\": return 5; } return -1; }\n"+ // test 1273 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"b\": return 2; case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; default: return 0; } return -1; }\n"+ // test 1274 - "mixed b() { return 2; }", - - - "=mixed a() { switch(\"b\") { case \"b\": return 2; case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; } return 0; }\n"+ // test 1275 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { default: return 0; case \"b\": return 2; case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; } return -1; }\n"+ // test 1276 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"b\": return 2; default: return 0; case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; } return -1; }\n"+ // test 1277 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"b\": return 2; case \"c\": return 3; default: return 0; case \"e\": return 5; case \"d\": return 4; } return -1; }\n"+ // test 1278 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"b\": return 2; case \"c\": return 3; case \"e\": return 5; default: return 0; case \"d\": return 4; } return -1; }\n"+ // test 1279 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"b\": return 2; case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; default: return 0; } return -1; }\n"+ // test 1280 - "mixed b() { return 2; }", - - - - - "=mixed a() { switch(\"b\") { case \"b\": return 2; case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; } return 0; }\n"+ // test 1281 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { default: return 0; case \"b\": return 2; case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; } return -1; }\n"+ // test 1282 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"b\": return 2; default: return 0; case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; } return -1; }\n"+ // test 1283 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"b\": return 2; case \"d\": return 4; default: return 0; case \"c\": return 3; case \"e\": return 5; } return -1; }\n"+ // test 1284 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"b\": return 2; case \"d\": return 4; case \"c\": return 3; default: return 0; case \"e\": return 5; } return -1; }\n"+ // test 1285 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"b\": return 2; case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; default: return 0; } return -1; }\n"+ // test 1286 - "mixed b() { return 2; }", - - - "=mixed a() { switch(\"b\") { case \"b\": return 2; case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; } return 0; }\n"+ // test 1287 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { default: return 0; case \"b\": return 2; case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; } return -1; }\n"+ // test 1288 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"b\": return 2; default: return 0; case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; } return -1; }\n"+ // test 1289 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"b\": return 2; case \"d\": return 4; default: return 0; case \"e\": return 5; case \"c\": return 3; } return -1; }\n"+ // test 1290 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"b\": return 2; case \"d\": return 4; case \"e\": return 5; default: return 0; case \"c\": return 3; } return -1; }\n"+ // test 1291 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"b\": return 2; case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; default: return 0; } return -1; }\n"+ // test 1292 - "mixed b() { return 2; }", - - - - - "=mixed a() { switch(\"b\") { case \"b\": return 2; case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; } return 0; }\n"+ // test 1293 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { default: return 0; case \"b\": return 2; case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; } return -1; }\n"+ // test 1294 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"b\": return 2; default: return 0; case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; } return -1; }\n"+ // test 1295 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"b\": return 2; case \"e\": return 5; default: return 0; case \"d\": return 4; case \"c\": return 3; } return -1; }\n"+ // test 1296 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"b\": return 2; case \"e\": return 5; case \"d\": return 4; default: return 0; case \"c\": return 3; } return -1; }\n"+ // test 1297 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"b\": return 2; case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; default: return 0; } return -1; }\n"+ // test 1298 - "mixed b() { return 2; }", - - - "=mixed a() { switch(\"b\") { case \"b\": return 2; case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; } return 0; }\n"+ // test 1299 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { default: return 0; case \"b\": return 2; case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; } return -1; }\n"+ // test 1300 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"b\": return 2; default: return 0; case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; } return -1; }\n"+ // test 1301 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"b\": return 2; case \"e\": return 5; default: return 0; case \"c\": return 3; case \"d\": return 4; } return -1; }\n"+ // test 1302 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"b\": return 2; case \"e\": return 5; case \"c\": return 3; default: return 0; case \"d\": return 4; } return -1; }\n"+ // test 1303 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"b\": return 2; case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; default: return 0; } return -1; }\n"+ // test 1304 - "mixed b() { return 2; }", - - - - - - - "=mixed a() { switch(\"b\") { case \"c\": return 3; case \"b\": return 2; case \"d\": return 4; case \"e\": return 5; } return 0; }\n"+ // test 1305 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { default: return 0; case \"c\": return 3; case \"b\": return 2; case \"d\": return 4; case \"e\": return 5; } return -1; }\n"+ // test 1306 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"c\": return 3; default: return 0; case \"b\": return 2; case \"d\": return 4; case \"e\": return 5; } return -1; }\n"+ // test 1307 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"c\": return 3; case \"b\": return 2; default: return 0; case \"d\": return 4; case \"e\": return 5; } return -1; }\n"+ // test 1308 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"c\": return 3; case \"b\": return 2; case \"d\": return 4; default: return 0; case \"e\": return 5; } return -1; }\n"+ // test 1309 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"c\": return 3; case \"b\": return 2; case \"d\": return 4; case \"e\": return 5; default: return 0; } return -1; }\n"+ // test 1310 - "mixed b() { return 2; }", - - - "=mixed a() { switch(\"b\") { case \"c\": return 3; case \"b\": return 2; case \"e\": return 5; case \"d\": return 4; } return 0; }\n"+ // test 1311 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { default: return 0; case \"c\": return 3; case \"b\": return 2; case \"e\": return 5; case \"d\": return 4; } return -1; }\n"+ // test 1312 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"c\": return 3; default: return 0; case \"b\": return 2; case \"e\": return 5; case \"d\": return 4; } return -1; }\n"+ // test 1313 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"c\": return 3; case \"b\": return 2; default: return 0; case \"e\": return 5; case \"d\": return 4; } return -1; }\n"+ // test 1314 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"c\": return 3; case \"b\": return 2; case \"e\": return 5; default: return 0; case \"d\": return 4; } return -1; }\n"+ // test 1315 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"c\": return 3; case \"b\": return 2; case \"e\": return 5; case \"d\": return 4; default: return 0; } return -1; }\n"+ // test 1316 - "mixed b() { return 2; }", - - - - - "=mixed a() { switch(\"b\") { case \"c\": return 3; case \"d\": return 4; case \"b\": return 2; case \"e\": return 5; } return 0; }\n"+ // test 1317 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { default: return 0; case \"c\": return 3; case \"d\": return 4; case \"b\": return 2; case \"e\": return 5; } return -1; }\n"+ // test 1318 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"c\": return 3; default: return 0; case \"d\": return 4; case \"b\": return 2; case \"e\": return 5; } return -1; }\n"+ // test 1319 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"c\": return 3; case \"d\": return 4; default: return 0; case \"b\": return 2; case \"e\": return 5; } return -1; }\n"+ // test 1320 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"c\": return 3; case \"d\": return 4; case \"b\": return 2; default: return 0; case \"e\": return 5; } return -1; }\n"+ // test 1321 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"c\": return 3; case \"d\": return 4; case \"b\": return 2; case \"e\": return 5; default: return 0; } return -1; }\n"+ // test 1322 - "mixed b() { return 2; }", - - - "=mixed a() { switch(\"b\") { case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; case \"b\": return 2; } return 0; }\n"+ // test 1323 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { default: return 0; case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; case \"b\": return 2; } return -1; }\n"+ // test 1324 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"c\": return 3; default: return 0; case \"d\": return 4; case \"e\": return 5; case \"b\": return 2; } return -1; }\n"+ // test 1325 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"c\": return 3; case \"d\": return 4; default: return 0; case \"e\": return 5; case \"b\": return 2; } return -1; }\n"+ // test 1326 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; default: return 0; case \"b\": return 2; } return -1; }\n"+ // test 1327 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; case \"b\": return 2; default: return 0; } return -1; }\n"+ // test 1328 - "mixed b() { return 2; }", - - - - - "=mixed a() { switch(\"b\") { case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; case \"b\": return 2; } return 0; }\n"+ // test 1329 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { default: return 0; case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; case \"b\": return 2; } return -1; }\n"+ // test 1330 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"c\": return 3; default: return 0; case \"e\": return 5; case \"d\": return 4; case \"b\": return 2; } return -1; }\n"+ // test 1331 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"c\": return 3; case \"e\": return 5; default: return 0; case \"d\": return 4; case \"b\": return 2; } return -1; }\n"+ // test 1332 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; default: return 0; case \"b\": return 2; } return -1; }\n"+ // test 1333 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; case \"b\": return 2; default: return 0; } return -1; }\n"+ // test 1334 - "mixed b() { return 2; }", - - - "=mixed a() { switch(\"b\") { case \"c\": return 3; case \"e\": return 5; case \"b\": return 2; case \"d\": return 4; } return 0; }\n"+ // test 1335 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { default: return 0; case \"c\": return 3; case \"e\": return 5; case \"b\": return 2; case \"d\": return 4; } return -1; }\n"+ // test 1336 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"c\": return 3; default: return 0; case \"e\": return 5; case \"b\": return 2; case \"d\": return 4; } return -1; }\n"+ // test 1337 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"c\": return 3; case \"e\": return 5; default: return 0; case \"b\": return 2; case \"d\": return 4; } return -1; }\n"+ // test 1338 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"c\": return 3; case \"e\": return 5; case \"b\": return 2; default: return 0; case \"d\": return 4; } return -1; }\n"+ // test 1339 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"c\": return 3; case \"e\": return 5; case \"b\": return 2; case \"d\": return 4; default: return 0; } return -1; }\n"+ // test 1340 - "mixed b() { return 2; }", - - - - - - - "=mixed a() { switch(\"b\") { case \"d\": return 4; case \"c\": return 3; case \"b\": return 2; case \"e\": return 5; } return 0; }\n"+ // test 1341 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { default: return 0; case \"d\": return 4; case \"c\": return 3; case \"b\": return 2; case \"e\": return 5; } return -1; }\n"+ // test 1342 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"d\": return 4; default: return 0; case \"c\": return 3; case \"b\": return 2; case \"e\": return 5; } return -1; }\n"+ // test 1343 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"d\": return 4; case \"c\": return 3; default: return 0; case \"b\": return 2; case \"e\": return 5; } return -1; }\n"+ // test 1344 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"d\": return 4; case \"c\": return 3; case \"b\": return 2; default: return 0; case \"e\": return 5; } return -1; }\n"+ // test 1345 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"d\": return 4; case \"c\": return 3; case \"b\": return 2; case \"e\": return 5; default: return 0; } return -1; }\n"+ // test 1346 - "mixed b() { return 2; }", - - - "=mixed a() { switch(\"b\") { case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; case \"b\": return 2; } return 0; }\n"+ // test 1347 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { default: return 0; case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; case \"b\": return 2; } return -1; }\n"+ // test 1348 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"d\": return 4; default: return 0; case \"c\": return 3; case \"e\": return 5; case \"b\": return 2; } return -1; }\n"+ // test 1349 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"d\": return 4; case \"c\": return 3; default: return 0; case \"e\": return 5; case \"b\": return 2; } return -1; }\n"+ // test 1350 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; default: return 0; case \"b\": return 2; } return -1; }\n"+ // test 1351 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; case \"b\": return 2; default: return 0; } return -1; }\n"+ // test 1352 - "mixed b() { return 2; }", - - - - - "=mixed a() { switch(\"b\") { case \"d\": return 4; case \"b\": return 2; case \"c\": return 3; case \"e\": return 5; } return 0; }\n"+ // test 1353 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { default: return 0; case \"d\": return 4; case \"b\": return 2; case \"c\": return 3; case \"e\": return 5; } return -1; }\n"+ // test 1354 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"d\": return 4; default: return 0; case \"b\": return 2; case \"c\": return 3; case \"e\": return 5; } return -1; }\n"+ // test 1355 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"d\": return 4; case \"b\": return 2; default: return 0; case \"c\": return 3; case \"e\": return 5; } return -1; }\n"+ // test 1356 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"d\": return 4; case \"b\": return 2; case \"c\": return 3; default: return 0; case \"e\": return 5; } return -1; }\n"+ // test 1357 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"d\": return 4; case \"b\": return 2; case \"c\": return 3; case \"e\": return 5; default: return 0; } return -1; }\n"+ // test 1358 - "mixed b() { return 2; }", - - - "=mixed a() { switch(\"b\") { case \"d\": return 4; case \"b\": return 2; case \"e\": return 5; case \"c\": return 3; } return 0; }\n"+ // test 1359 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { default: return 0; case \"d\": return 4; case \"b\": return 2; case \"e\": return 5; case \"c\": return 3; } return -1; }\n"+ // test 1360 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"d\": return 4; default: return 0; case \"b\": return 2; case \"e\": return 5; case \"c\": return 3; } return -1; }\n"+ // test 1361 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"d\": return 4; case \"b\": return 2; default: return 0; case \"e\": return 5; case \"c\": return 3; } return -1; }\n"+ // test 1362 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"d\": return 4; case \"b\": return 2; case \"e\": return 5; default: return 0; case \"c\": return 3; } return -1; }\n"+ // test 1363 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"d\": return 4; case \"b\": return 2; case \"e\": return 5; case \"c\": return 3; default: return 0; } return -1; }\n"+ // test 1364 - "mixed b() { return 2; }", - - - - - "=mixed a() { switch(\"b\") { case \"d\": return 4; case \"e\": return 5; case \"b\": return 2; case \"c\": return 3; } return 0; }\n"+ // test 1365 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { default: return 0; case \"d\": return 4; case \"e\": return 5; case \"b\": return 2; case \"c\": return 3; } return -1; }\n"+ // test 1366 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"d\": return 4; default: return 0; case \"e\": return 5; case \"b\": return 2; case \"c\": return 3; } return -1; }\n"+ // test 1367 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"d\": return 4; case \"e\": return 5; default: return 0; case \"b\": return 2; case \"c\": return 3; } return -1; }\n"+ // test 1368 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"d\": return 4; case \"e\": return 5; case \"b\": return 2; default: return 0; case \"c\": return 3; } return -1; }\n"+ // test 1369 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"d\": return 4; case \"e\": return 5; case \"b\": return 2; case \"c\": return 3; default: return 0; } return -1; }\n"+ // test 1370 - "mixed b() { return 2; }", - - - "=mixed a() { switch(\"b\") { case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; case \"b\": return 2; } return 0; }\n"+ // test 1371 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { default: return 0; case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; case \"b\": return 2; } return -1; }\n"+ // test 1372 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"d\": return 4; default: return 0; case \"e\": return 5; case \"c\": return 3; case \"b\": return 2; } return -1; }\n"+ // test 1373 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"d\": return 4; case \"e\": return 5; default: return 0; case \"c\": return 3; case \"b\": return 2; } return -1; }\n"+ // test 1374 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; default: return 0; case \"b\": return 2; } return -1; }\n"+ // test 1375 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; case \"b\": return 2; default: return 0; } return -1; }\n"+ // test 1376 - "mixed b() { return 2; }", - - - - - - - "=mixed a() { switch(\"b\") { case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; case \"b\": return 2; } return 0; }\n"+ // test 1377 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { default: return 0; case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; case \"b\": return 2; } return -1; }\n"+ // test 1378 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"e\": return 5; default: return 0; case \"c\": return 3; case \"d\": return 4; case \"b\": return 2; } return -1; }\n"+ // test 1379 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"e\": return 5; case \"c\": return 3; default: return 0; case \"d\": return 4; case \"b\": return 2; } return -1; }\n"+ // test 1380 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; default: return 0; case \"b\": return 2; } return -1; }\n"+ // test 1381 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; case \"b\": return 2; default: return 0; } return -1; }\n"+ // test 1382 - "mixed b() { return 2; }", - - - "=mixed a() { switch(\"b\") { case \"e\": return 5; case \"c\": return 3; case \"b\": return 2; case \"d\": return 4; } return 0; }\n"+ // test 1383 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { default: return 0; case \"e\": return 5; case \"c\": return 3; case \"b\": return 2; case \"d\": return 4; } return -1; }\n"+ // test 1384 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"e\": return 5; default: return 0; case \"c\": return 3; case \"b\": return 2; case \"d\": return 4; } return -1; }\n"+ // test 1385 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"e\": return 5; case \"c\": return 3; default: return 0; case \"b\": return 2; case \"d\": return 4; } return -1; }\n"+ // test 1386 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"e\": return 5; case \"c\": return 3; case \"b\": return 2; default: return 0; case \"d\": return 4; } return -1; }\n"+ // test 1387 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"e\": return 5; case \"c\": return 3; case \"b\": return 2; case \"d\": return 4; default: return 0; } return -1; }\n"+ // test 1388 - "mixed b() { return 2; }", - - - - - "=mixed a() { switch(\"b\") { case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; case \"b\": return 2; } return 0; }\n"+ // test 1389 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { default: return 0; case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; case \"b\": return 2; } return -1; }\n"+ // test 1390 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"e\": return 5; default: return 0; case \"d\": return 4; case \"c\": return 3; case \"b\": return 2; } return -1; }\n"+ // test 1391 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"e\": return 5; case \"d\": return 4; default: return 0; case \"c\": return 3; case \"b\": return 2; } return -1; }\n"+ // test 1392 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; default: return 0; case \"b\": return 2; } return -1; }\n"+ // test 1393 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; case \"b\": return 2; default: return 0; } return -1; }\n"+ // test 1394 - "mixed b() { return 2; }", - - - "=mixed a() { switch(\"b\") { case \"e\": return 5; case \"d\": return 4; case \"b\": return 2; case \"c\": return 3; } return 0; }\n"+ // test 1395 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { default: return 0; case \"e\": return 5; case \"d\": return 4; case \"b\": return 2; case \"c\": return 3; } return -1; }\n"+ // test 1396 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"e\": return 5; default: return 0; case \"d\": return 4; case \"b\": return 2; case \"c\": return 3; } return -1; }\n"+ // test 1397 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"e\": return 5; case \"d\": return 4; default: return 0; case \"b\": return 2; case \"c\": return 3; } return -1; }\n"+ // test 1398 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"e\": return 5; case \"d\": return 4; case \"b\": return 2; default: return 0; case \"c\": return 3; } return -1; }\n"+ // test 1399 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"e\": return 5; case \"d\": return 4; case \"b\": return 2; case \"c\": return 3; default: return 0; } return -1; }\n"+ // test 1400 - "mixed b() { return 2; }", - - - - - "=mixed a() { switch(\"b\") { case \"e\": return 5; case \"b\": return 2; case \"d\": return 4; case \"c\": return 3; } return 0; }\n"+ // test 1401 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { default: return 0; case \"e\": return 5; case \"b\": return 2; case \"d\": return 4; case \"c\": return 3; } return -1; }\n"+ // test 1402 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"e\": return 5; default: return 0; case \"b\": return 2; case \"d\": return 4; case \"c\": return 3; } return -1; }\n"+ // test 1403 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"e\": return 5; case \"b\": return 2; default: return 0; case \"d\": return 4; case \"c\": return 3; } return -1; }\n"+ // test 1404 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"e\": return 5; case \"b\": return 2; case \"d\": return 4; default: return 0; case \"c\": return 3; } return -1; }\n"+ // test 1405 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"e\": return 5; case \"b\": return 2; case \"d\": return 4; case \"c\": return 3; default: return 0; } return -1; }\n"+ // test 1406 - "mixed b() { return 2; }", - - - "=mixed a() { switch(\"b\") { case \"e\": return 5; case \"b\": return 2; case \"c\": return 3; case \"d\": return 4; } return 0; }\n"+ // test 1407 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { default: return 0; case \"e\": return 5; case \"b\": return 2; case \"c\": return 3; case \"d\": return 4; } return -1; }\n"+ // test 1408 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"e\": return 5; default: return 0; case \"b\": return 2; case \"c\": return 3; case \"d\": return 4; } return -1; }\n"+ // test 1409 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"e\": return 5; case \"b\": return 2; default: return 0; case \"c\": return 3; case \"d\": return 4; } return -1; }\n"+ // test 1410 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"e\": return 5; case \"b\": return 2; case \"c\": return 3; default: return 0; case \"d\": return 4; } return -1; }\n"+ // test 1411 - "mixed b() { return 2; }", - "=mixed a() { switch(\"b\") { case \"e\": return 5; case \"b\": return 2; case \"c\": return 3; case \"d\": return 4; default: return 0; } return -1; }\n"+ // test 1412 - "mixed b() { return 2; }", - - - - - - - - - "=mixed a() { switch(\"c\") { case \"b\": return 2; case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; } return 0; }\n"+ // test 1413 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { default: return 0; case \"b\": return 2; case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; } return -1; }\n"+ // test 1414 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"b\": return 2; default: return 0; case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; } return -1; }\n"+ // test 1415 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"b\": return 2; case \"c\": return 3; default: return 0; case \"d\": return 4; case \"e\": return 5; } return -1; }\n"+ // test 1416 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"b\": return 2; case \"c\": return 3; case \"d\": return 4; default: return 0; case \"e\": return 5; } return -1; }\n"+ // test 1417 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"b\": return 2; case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; default: return 0; } return -1; }\n"+ // test 1418 - "mixed b() { return 3; }", - - - "=mixed a() { switch(\"c\") { case \"b\": return 2; case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; } return 0; }\n"+ // test 1419 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { default: return 0; case \"b\": return 2; case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; } return -1; }\n"+ // test 1420 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"b\": return 2; default: return 0; case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; } return -1; }\n"+ // test 1421 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"b\": return 2; case \"c\": return 3; default: return 0; case \"e\": return 5; case \"d\": return 4; } return -1; }\n"+ // test 1422 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"b\": return 2; case \"c\": return 3; case \"e\": return 5; default: return 0; case \"d\": return 4; } return -1; }\n"+ // test 1423 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"b\": return 2; case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; default: return 0; } return -1; }\n"+ // test 1424 - "mixed b() { return 3; }", - - - - - "=mixed a() { switch(\"c\") { case \"b\": return 2; case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; } return 0; }\n"+ // test 1425 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { default: return 0; case \"b\": return 2; case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; } return -1; }\n"+ // test 1426 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"b\": return 2; default: return 0; case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; } return -1; }\n"+ // test 1427 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"b\": return 2; case \"d\": return 4; default: return 0; case \"c\": return 3; case \"e\": return 5; } return -1; }\n"+ // test 1428 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"b\": return 2; case \"d\": return 4; case \"c\": return 3; default: return 0; case \"e\": return 5; } return -1; }\n"+ // test 1429 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"b\": return 2; case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; default: return 0; } return -1; }\n"+ // test 1430 - "mixed b() { return 3; }", - - - "=mixed a() { switch(\"c\") { case \"b\": return 2; case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; } return 0; }\n"+ // test 1431 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { default: return 0; case \"b\": return 2; case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; } return -1; }\n"+ // test 1432 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"b\": return 2; default: return 0; case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; } return -1; }\n"+ // test 1433 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"b\": return 2; case \"d\": return 4; default: return 0; case \"e\": return 5; case \"c\": return 3; } return -1; }\n"+ // test 1434 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"b\": return 2; case \"d\": return 4; case \"e\": return 5; default: return 0; case \"c\": return 3; } return -1; }\n"+ // test 1435 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"b\": return 2; case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; default: return 0; } return -1; }\n"+ // test 1436 - "mixed b() { return 3; }", - - - - - "=mixed a() { switch(\"c\") { case \"b\": return 2; case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; } return 0; }\n"+ // test 1437 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { default: return 0; case \"b\": return 2; case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; } return -1; }\n"+ // test 1438 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"b\": return 2; default: return 0; case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; } return -1; }\n"+ // test 1439 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"b\": return 2; case \"e\": return 5; default: return 0; case \"d\": return 4; case \"c\": return 3; } return -1; }\n"+ // test 1440 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"b\": return 2; case \"e\": return 5; case \"d\": return 4; default: return 0; case \"c\": return 3; } return -1; }\n"+ // test 1441 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"b\": return 2; case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; default: return 0; } return -1; }\n"+ // test 1442 - "mixed b() { return 3; }", - - - "=mixed a() { switch(\"c\") { case \"b\": return 2; case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; } return 0; }\n"+ // test 1443 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { default: return 0; case \"b\": return 2; case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; } return -1; }\n"+ // test 1444 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"b\": return 2; default: return 0; case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; } return -1; }\n"+ // test 1445 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"b\": return 2; case \"e\": return 5; default: return 0; case \"c\": return 3; case \"d\": return 4; } return -1; }\n"+ // test 1446 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"b\": return 2; case \"e\": return 5; case \"c\": return 3; default: return 0; case \"d\": return 4; } return -1; }\n"+ // test 1447 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"b\": return 2; case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; default: return 0; } return -1; }\n"+ // test 1448 - "mixed b() { return 3; }", - - - - - - - "=mixed a() { switch(\"c\") { case \"c\": return 3; case \"b\": return 2; case \"d\": return 4; case \"e\": return 5; } return 0; }\n"+ // test 1449 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { default: return 0; case \"c\": return 3; case \"b\": return 2; case \"d\": return 4; case \"e\": return 5; } return -1; }\n"+ // test 1450 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"c\": return 3; default: return 0; case \"b\": return 2; case \"d\": return 4; case \"e\": return 5; } return -1; }\n"+ // test 1451 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"c\": return 3; case \"b\": return 2; default: return 0; case \"d\": return 4; case \"e\": return 5; } return -1; }\n"+ // test 1452 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"c\": return 3; case \"b\": return 2; case \"d\": return 4; default: return 0; case \"e\": return 5; } return -1; }\n"+ // test 1453 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"c\": return 3; case \"b\": return 2; case \"d\": return 4; case \"e\": return 5; default: return 0; } return -1; }\n"+ // test 1454 - "mixed b() { return 3; }", - - - "=mixed a() { switch(\"c\") { case \"c\": return 3; case \"b\": return 2; case \"e\": return 5; case \"d\": return 4; } return 0; }\n"+ // test 1455 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { default: return 0; case \"c\": return 3; case \"b\": return 2; case \"e\": return 5; case \"d\": return 4; } return -1; }\n"+ // test 1456 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"c\": return 3; default: return 0; case \"b\": return 2; case \"e\": return 5; case \"d\": return 4; } return -1; }\n"+ // test 1457 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"c\": return 3; case \"b\": return 2; default: return 0; case \"e\": return 5; case \"d\": return 4; } return -1; }\n"+ // test 1458 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"c\": return 3; case \"b\": return 2; case \"e\": return 5; default: return 0; case \"d\": return 4; } return -1; }\n"+ // test 1459 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"c\": return 3; case \"b\": return 2; case \"e\": return 5; case \"d\": return 4; default: return 0; } return -1; }\n"+ // test 1460 - "mixed b() { return 3; }", - - - - - "=mixed a() { switch(\"c\") { case \"c\": return 3; case \"d\": return 4; case \"b\": return 2; case \"e\": return 5; } return 0; }\n"+ // test 1461 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { default: return 0; case \"c\": return 3; case \"d\": return 4; case \"b\": return 2; case \"e\": return 5; } return -1; }\n"+ // test 1462 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"c\": return 3; default: return 0; case \"d\": return 4; case \"b\": return 2; case \"e\": return 5; } return -1; }\n"+ // test 1463 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"c\": return 3; case \"d\": return 4; default: return 0; case \"b\": return 2; case \"e\": return 5; } return -1; }\n"+ // test 1464 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"c\": return 3; case \"d\": return 4; case \"b\": return 2; default: return 0; case \"e\": return 5; } return -1; }\n"+ // test 1465 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"c\": return 3; case \"d\": return 4; case \"b\": return 2; case \"e\": return 5; default: return 0; } return -1; }\n"+ // test 1466 - "mixed b() { return 3; }", - - - "=mixed a() { switch(\"c\") { case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; case \"b\": return 2; } return 0; }\n"+ // test 1467 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { default: return 0; case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; case \"b\": return 2; } return -1; }\n"+ // test 1468 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"c\": return 3; default: return 0; case \"d\": return 4; case \"e\": return 5; case \"b\": return 2; } return -1; }\n"+ // test 1469 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"c\": return 3; case \"d\": return 4; default: return 0; case \"e\": return 5; case \"b\": return 2; } return -1; }\n"+ // test 1470 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; default: return 0; case \"b\": return 2; } return -1; }\n"+ // test 1471 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; case \"b\": return 2; default: return 0; } return -1; }\n"+ // test 1472 - "mixed b() { return 3; }", - - - - - "=mixed a() { switch(\"c\") { case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; case \"b\": return 2; } return 0; }\n"+ // test 1473 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { default: return 0; case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; case \"b\": return 2; } return -1; }\n"+ // test 1474 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"c\": return 3; default: return 0; case \"e\": return 5; case \"d\": return 4; case \"b\": return 2; } return -1; }\n"+ // test 1475 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"c\": return 3; case \"e\": return 5; default: return 0; case \"d\": return 4; case \"b\": return 2; } return -1; }\n"+ // test 1476 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; default: return 0; case \"b\": return 2; } return -1; }\n"+ // test 1477 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; case \"b\": return 2; default: return 0; } return -1; }\n"+ // test 1478 - "mixed b() { return 3; }", - - - "=mixed a() { switch(\"c\") { case \"c\": return 3; case \"e\": return 5; case \"b\": return 2; case \"d\": return 4; } return 0; }\n"+ // test 1479 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { default: return 0; case \"c\": return 3; case \"e\": return 5; case \"b\": return 2; case \"d\": return 4; } return -1; }\n"+ // test 1480 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"c\": return 3; default: return 0; case \"e\": return 5; case \"b\": return 2; case \"d\": return 4; } return -1; }\n"+ // test 1481 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"c\": return 3; case \"e\": return 5; default: return 0; case \"b\": return 2; case \"d\": return 4; } return -1; }\n"+ // test 1482 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"c\": return 3; case \"e\": return 5; case \"b\": return 2; default: return 0; case \"d\": return 4; } return -1; }\n"+ // test 1483 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"c\": return 3; case \"e\": return 5; case \"b\": return 2; case \"d\": return 4; default: return 0; } return -1; }\n"+ // test 1484 - "mixed b() { return 3; }", - - - - - - - "=mixed a() { switch(\"c\") { case \"d\": return 4; case \"c\": return 3; case \"b\": return 2; case \"e\": return 5; } return 0; }\n"+ // test 1485 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { default: return 0; case \"d\": return 4; case \"c\": return 3; case \"b\": return 2; case \"e\": return 5; } return -1; }\n"+ // test 1486 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"d\": return 4; default: return 0; case \"c\": return 3; case \"b\": return 2; case \"e\": return 5; } return -1; }\n"+ // test 1487 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"d\": return 4; case \"c\": return 3; default: return 0; case \"b\": return 2; case \"e\": return 5; } return -1; }\n"+ // test 1488 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"d\": return 4; case \"c\": return 3; case \"b\": return 2; default: return 0; case \"e\": return 5; } return -1; }\n"+ // test 1489 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"d\": return 4; case \"c\": return 3; case \"b\": return 2; case \"e\": return 5; default: return 0; } return -1; }\n"+ // test 1490 - "mixed b() { return 3; }", - - - "=mixed a() { switch(\"c\") { case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; case \"b\": return 2; } return 0; }\n"+ // test 1491 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { default: return 0; case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; case \"b\": return 2; } return -1; }\n"+ // test 1492 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"d\": return 4; default: return 0; case \"c\": return 3; case \"e\": return 5; case \"b\": return 2; } return -1; }\n"+ // test 1493 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"d\": return 4; case \"c\": return 3; default: return 0; case \"e\": return 5; case \"b\": return 2; } return -1; }\n"+ // test 1494 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; default: return 0; case \"b\": return 2; } return -1; }\n"+ // test 1495 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; case \"b\": return 2; default: return 0; } return -1; }\n"+ // test 1496 - "mixed b() { return 3; }", - - - - - "=mixed a() { switch(\"c\") { case \"d\": return 4; case \"b\": return 2; case \"c\": return 3; case \"e\": return 5; } return 0; }\n"+ // test 1497 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { default: return 0; case \"d\": return 4; case \"b\": return 2; case \"c\": return 3; case \"e\": return 5; } return -1; }\n"+ // test 1498 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"d\": return 4; default: return 0; case \"b\": return 2; case \"c\": return 3; case \"e\": return 5; } return -1; }\n"+ // test 1499 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"d\": return 4; case \"b\": return 2; default: return 0; case \"c\": return 3; case \"e\": return 5; } return -1; }\n"+ // test 1500 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"d\": return 4; case \"b\": return 2; case \"c\": return 3; default: return 0; case \"e\": return 5; } return -1; }\n"+ // test 1501 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"d\": return 4; case \"b\": return 2; case \"c\": return 3; case \"e\": return 5; default: return 0; } return -1; }\n"+ // test 1502 - "mixed b() { return 3; }", - - - "=mixed a() { switch(\"c\") { case \"d\": return 4; case \"b\": return 2; case \"e\": return 5; case \"c\": return 3; } return 0; }\n"+ // test 1503 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { default: return 0; case \"d\": return 4; case \"b\": return 2; case \"e\": return 5; case \"c\": return 3; } return -1; }\n"+ // test 1504 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"d\": return 4; default: return 0; case \"b\": return 2; case \"e\": return 5; case \"c\": return 3; } return -1; }\n"+ // test 1505 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"d\": return 4; case \"b\": return 2; default: return 0; case \"e\": return 5; case \"c\": return 3; } return -1; }\n"+ // test 1506 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"d\": return 4; case \"b\": return 2; case \"e\": return 5; default: return 0; case \"c\": return 3; } return -1; }\n"+ // test 1507 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"d\": return 4; case \"b\": return 2; case \"e\": return 5; case \"c\": return 3; default: return 0; } return -1; }\n"+ // test 1508 - "mixed b() { return 3; }", - - - - - "=mixed a() { switch(\"c\") { case \"d\": return 4; case \"e\": return 5; case \"b\": return 2; case \"c\": return 3; } return 0; }\n"+ // test 1509 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { default: return 0; case \"d\": return 4; case \"e\": return 5; case \"b\": return 2; case \"c\": return 3; } return -1; }\n"+ // test 1510 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"d\": return 4; default: return 0; case \"e\": return 5; case \"b\": return 2; case \"c\": return 3; } return -1; }\n"+ // test 1511 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"d\": return 4; case \"e\": return 5; default: return 0; case \"b\": return 2; case \"c\": return 3; } return -1; }\n"+ // test 1512 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"d\": return 4; case \"e\": return 5; case \"b\": return 2; default: return 0; case \"c\": return 3; } return -1; }\n"+ // test 1513 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"d\": return 4; case \"e\": return 5; case \"b\": return 2; case \"c\": return 3; default: return 0; } return -1; }\n"+ // test 1514 - "mixed b() { return 3; }", - - - "=mixed a() { switch(\"c\") { case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; case \"b\": return 2; } return 0; }\n"+ // test 1515 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { default: return 0; case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; case \"b\": return 2; } return -1; }\n"+ // test 1516 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"d\": return 4; default: return 0; case \"e\": return 5; case \"c\": return 3; case \"b\": return 2; } return -1; }\n"+ // test 1517 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"d\": return 4; case \"e\": return 5; default: return 0; case \"c\": return 3; case \"b\": return 2; } return -1; }\n"+ // test 1518 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; default: return 0; case \"b\": return 2; } return -1; }\n"+ // test 1519 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; case \"b\": return 2; default: return 0; } return -1; }\n"+ // test 1520 - "mixed b() { return 3; }", - - - - - - - "=mixed a() { switch(\"c\") { case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; case \"b\": return 2; } return 0; }\n"+ // test 1521 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { default: return 0; case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; case \"b\": return 2; } return -1; }\n"+ // test 1522 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"e\": return 5; default: return 0; case \"c\": return 3; case \"d\": return 4; case \"b\": return 2; } return -1; }\n"+ // test 1523 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"e\": return 5; case \"c\": return 3; default: return 0; case \"d\": return 4; case \"b\": return 2; } return -1; }\n"+ // test 1524 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; default: return 0; case \"b\": return 2; } return -1; }\n"+ // test 1525 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; case \"b\": return 2; default: return 0; } return -1; }\n"+ // test 1526 - "mixed b() { return 3; }", - - - "=mixed a() { switch(\"c\") { case \"e\": return 5; case \"c\": return 3; case \"b\": return 2; case \"d\": return 4; } return 0; }\n"+ // test 1527 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { default: return 0; case \"e\": return 5; case \"c\": return 3; case \"b\": return 2; case \"d\": return 4; } return -1; }\n"+ // test 1528 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"e\": return 5; default: return 0; case \"c\": return 3; case \"b\": return 2; case \"d\": return 4; } return -1; }\n"+ // test 1529 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"e\": return 5; case \"c\": return 3; default: return 0; case \"b\": return 2; case \"d\": return 4; } return -1; }\n"+ // test 1530 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"e\": return 5; case \"c\": return 3; case \"b\": return 2; default: return 0; case \"d\": return 4; } return -1; }\n"+ // test 1531 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"e\": return 5; case \"c\": return 3; case \"b\": return 2; case \"d\": return 4; default: return 0; } return -1; }\n"+ // test 1532 - "mixed b() { return 3; }", - - - - - "=mixed a() { switch(\"c\") { case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; case \"b\": return 2; } return 0; }\n"+ // test 1533 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { default: return 0; case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; case \"b\": return 2; } return -1; }\n"+ // test 1534 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"e\": return 5; default: return 0; case \"d\": return 4; case \"c\": return 3; case \"b\": return 2; } return -1; }\n"+ // test 1535 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"e\": return 5; case \"d\": return 4; default: return 0; case \"c\": return 3; case \"b\": return 2; } return -1; }\n"+ // test 1536 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; default: return 0; case \"b\": return 2; } return -1; }\n"+ // test 1537 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; case \"b\": return 2; default: return 0; } return -1; }\n"+ // test 1538 - "mixed b() { return 3; }", - - - "=mixed a() { switch(\"c\") { case \"e\": return 5; case \"d\": return 4; case \"b\": return 2; case \"c\": return 3; } return 0; }\n"+ // test 1539 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { default: return 0; case \"e\": return 5; case \"d\": return 4; case \"b\": return 2; case \"c\": return 3; } return -1; }\n"+ // test 1540 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"e\": return 5; default: return 0; case \"d\": return 4; case \"b\": return 2; case \"c\": return 3; } return -1; }\n"+ // test 1541 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"e\": return 5; case \"d\": return 4; default: return 0; case \"b\": return 2; case \"c\": return 3; } return -1; }\n"+ // test 1542 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"e\": return 5; case \"d\": return 4; case \"b\": return 2; default: return 0; case \"c\": return 3; } return -1; }\n"+ // test 1543 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"e\": return 5; case \"d\": return 4; case \"b\": return 2; case \"c\": return 3; default: return 0; } return -1; }\n"+ // test 1544 - "mixed b() { return 3; }", - - - - - "=mixed a() { switch(\"c\") { case \"e\": return 5; case \"b\": return 2; case \"d\": return 4; case \"c\": return 3; } return 0; }\n"+ // test 1545 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { default: return 0; case \"e\": return 5; case \"b\": return 2; case \"d\": return 4; case \"c\": return 3; } return -1; }\n"+ // test 1546 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"e\": return 5; default: return 0; case \"b\": return 2; case \"d\": return 4; case \"c\": return 3; } return -1; }\n"+ // test 1547 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"e\": return 5; case \"b\": return 2; default: return 0; case \"d\": return 4; case \"c\": return 3; } return -1; }\n"+ // test 1548 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"e\": return 5; case \"b\": return 2; case \"d\": return 4; default: return 0; case \"c\": return 3; } return -1; }\n"+ // test 1549 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"e\": return 5; case \"b\": return 2; case \"d\": return 4; case \"c\": return 3; default: return 0; } return -1; }\n"+ // test 1550 - "mixed b() { return 3; }", - - - "=mixed a() { switch(\"c\") { case \"e\": return 5; case \"b\": return 2; case \"c\": return 3; case \"d\": return 4; } return 0; }\n"+ // test 1551 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { default: return 0; case \"e\": return 5; case \"b\": return 2; case \"c\": return 3; case \"d\": return 4; } return -1; }\n"+ // test 1552 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"e\": return 5; default: return 0; case \"b\": return 2; case \"c\": return 3; case \"d\": return 4; } return -1; }\n"+ // test 1553 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"e\": return 5; case \"b\": return 2; default: return 0; case \"c\": return 3; case \"d\": return 4; } return -1; }\n"+ // test 1554 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"e\": return 5; case \"b\": return 2; case \"c\": return 3; default: return 0; case \"d\": return 4; } return -1; }\n"+ // test 1555 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"e\": return 5; case \"b\": return 2; case \"c\": return 3; case \"d\": return 4; default: return 0; } return -1; }\n"+ // test 1556 - "mixed b() { return 3; }", - - - - - - - - - "=mixed a() { switch(\"d\") { case \"b\": return 2; case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; } return 0; }\n"+ // test 1557 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { default: return 0; case \"b\": return 2; case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; } return -1; }\n"+ // test 1558 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"b\": return 2; default: return 0; case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; } return -1; }\n"+ // test 1559 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"b\": return 2; case \"c\": return 3; default: return 0; case \"d\": return 4; case \"e\": return 5; } return -1; }\n"+ // test 1560 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"b\": return 2; case \"c\": return 3; case \"d\": return 4; default: return 0; case \"e\": return 5; } return -1; }\n"+ // test 1561 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"b\": return 2; case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; default: return 0; } return -1; }\n"+ // test 1562 - "mixed b() { return 4; }", - - - "=mixed a() { switch(\"d\") { case \"b\": return 2; case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; } return 0; }\n"+ // test 1563 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { default: return 0; case \"b\": return 2; case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; } return -1; }\n"+ // test 1564 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"b\": return 2; default: return 0; case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; } return -1; }\n"+ // test 1565 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"b\": return 2; case \"c\": return 3; default: return 0; case \"e\": return 5; case \"d\": return 4; } return -1; }\n"+ // test 1566 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"b\": return 2; case \"c\": return 3; case \"e\": return 5; default: return 0; case \"d\": return 4; } return -1; }\n"+ // test 1567 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"b\": return 2; case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; default: return 0; } return -1; }\n"+ // test 1568 - "mixed b() { return 4; }", - - - - - "=mixed a() { switch(\"d\") { case \"b\": return 2; case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; } return 0; }\n"+ // test 1569 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { default: return 0; case \"b\": return 2; case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; } return -1; }\n"+ // test 1570 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"b\": return 2; default: return 0; case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; } return -1; }\n"+ // test 1571 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"b\": return 2; case \"d\": return 4; default: return 0; case \"c\": return 3; case \"e\": return 5; } return -1; }\n"+ // test 1572 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"b\": return 2; case \"d\": return 4; case \"c\": return 3; default: return 0; case \"e\": return 5; } return -1; }\n"+ // test 1573 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"b\": return 2; case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; default: return 0; } return -1; }\n"+ // test 1574 - "mixed b() { return 4; }", - - - "=mixed a() { switch(\"d\") { case \"b\": return 2; case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; } return 0; }\n"+ // test 1575 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { default: return 0; case \"b\": return 2; case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; } return -1; }\n"+ // test 1576 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"b\": return 2; default: return 0; case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; } return -1; }\n"+ // test 1577 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"b\": return 2; case \"d\": return 4; default: return 0; case \"e\": return 5; case \"c\": return 3; } return -1; }\n"+ // test 1578 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"b\": return 2; case \"d\": return 4; case \"e\": return 5; default: return 0; case \"c\": return 3; } return -1; }\n"+ // test 1579 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"b\": return 2; case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; default: return 0; } return -1; }\n"+ // test 1580 - "mixed b() { return 4; }", - - - - - "=mixed a() { switch(\"d\") { case \"b\": return 2; case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; } return 0; }\n"+ // test 1581 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { default: return 0; case \"b\": return 2; case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; } return -1; }\n"+ // test 1582 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"b\": return 2; default: return 0; case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; } return -1; }\n"+ // test 1583 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"b\": return 2; case \"e\": return 5; default: return 0; case \"d\": return 4; case \"c\": return 3; } return -1; }\n"+ // test 1584 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"b\": return 2; case \"e\": return 5; case \"d\": return 4; default: return 0; case \"c\": return 3; } return -1; }\n"+ // test 1585 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"b\": return 2; case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; default: return 0; } return -1; }\n"+ // test 1586 - "mixed b() { return 4; }", - - - "=mixed a() { switch(\"d\") { case \"b\": return 2; case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; } return 0; }\n"+ // test 1587 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { default: return 0; case \"b\": return 2; case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; } return -1; }\n"+ // test 1588 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"b\": return 2; default: return 0; case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; } return -1; }\n"+ // test 1589 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"b\": return 2; case \"e\": return 5; default: return 0; case \"c\": return 3; case \"d\": return 4; } return -1; }\n"+ // test 1590 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"b\": return 2; case \"e\": return 5; case \"c\": return 3; default: return 0; case \"d\": return 4; } return -1; }\n"+ // test 1591 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"b\": return 2; case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; default: return 0; } return -1; }\n"+ // test 1592 - "mixed b() { return 4; }", - - - - - - - "=mixed a() { switch(\"d\") { case \"c\": return 3; case \"b\": return 2; case \"d\": return 4; case \"e\": return 5; } return 0; }\n"+ // test 1593 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { default: return 0; case \"c\": return 3; case \"b\": return 2; case \"d\": return 4; case \"e\": return 5; } return -1; }\n"+ // test 1594 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"c\": return 3; default: return 0; case \"b\": return 2; case \"d\": return 4; case \"e\": return 5; } return -1; }\n"+ // test 1595 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"c\": return 3; case \"b\": return 2; default: return 0; case \"d\": return 4; case \"e\": return 5; } return -1; }\n"+ // test 1596 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"c\": return 3; case \"b\": return 2; case \"d\": return 4; default: return 0; case \"e\": return 5; } return -1; }\n"+ // test 1597 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"c\": return 3; case \"b\": return 2; case \"d\": return 4; case \"e\": return 5; default: return 0; } return -1; }\n"+ // test 1598 - "mixed b() { return 4; }", - - - "=mixed a() { switch(\"d\") { case \"c\": return 3; case \"b\": return 2; case \"e\": return 5; case \"d\": return 4; } return 0; }\n"+ // test 1599 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { default: return 0; case \"c\": return 3; case \"b\": return 2; case \"e\": return 5; case \"d\": return 4; } return -1; }\n"+ // test 1600 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"c\": return 3; default: return 0; case \"b\": return 2; case \"e\": return 5; case \"d\": return 4; } return -1; }\n"+ // test 1601 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"c\": return 3; case \"b\": return 2; default: return 0; case \"e\": return 5; case \"d\": return 4; } return -1; }\n"+ // test 1602 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"c\": return 3; case \"b\": return 2; case \"e\": return 5; default: return 0; case \"d\": return 4; } return -1; }\n"+ // test 1603 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"c\": return 3; case \"b\": return 2; case \"e\": return 5; case \"d\": return 4; default: return 0; } return -1; }\n"+ // test 1604 - "mixed b() { return 4; }", - - - - - "=mixed a() { switch(\"d\") { case \"c\": return 3; case \"d\": return 4; case \"b\": return 2; case \"e\": return 5; } return 0; }\n"+ // test 1605 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { default: return 0; case \"c\": return 3; case \"d\": return 4; case \"b\": return 2; case \"e\": return 5; } return -1; }\n"+ // test 1606 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"c\": return 3; default: return 0; case \"d\": return 4; case \"b\": return 2; case \"e\": return 5; } return -1; }\n"+ // test 1607 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"c\": return 3; case \"d\": return 4; default: return 0; case \"b\": return 2; case \"e\": return 5; } return -1; }\n"+ // test 1608 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"c\": return 3; case \"d\": return 4; case \"b\": return 2; default: return 0; case \"e\": return 5; } return -1; }\n"+ // test 1609 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"c\": return 3; case \"d\": return 4; case \"b\": return 2; case \"e\": return 5; default: return 0; } return -1; }\n"+ // test 1610 - "mixed b() { return 4; }", - - - "=mixed a() { switch(\"d\") { case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; case \"b\": return 2; } return 0; }\n"+ // test 1611 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { default: return 0; case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; case \"b\": return 2; } return -1; }\n"+ // test 1612 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"c\": return 3; default: return 0; case \"d\": return 4; case \"e\": return 5; case \"b\": return 2; } return -1; }\n"+ // test 1613 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"c\": return 3; case \"d\": return 4; default: return 0; case \"e\": return 5; case \"b\": return 2; } return -1; }\n"+ // test 1614 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; default: return 0; case \"b\": return 2; } return -1; }\n"+ // test 1615 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; case \"b\": return 2; default: return 0; } return -1; }\n"+ // test 1616 - "mixed b() { return 4; }", - - - - - "=mixed a() { switch(\"d\") { case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; case \"b\": return 2; } return 0; }\n"+ // test 1617 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { default: return 0; case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; case \"b\": return 2; } return -1; }\n"+ // test 1618 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"c\": return 3; default: return 0; case \"e\": return 5; case \"d\": return 4; case \"b\": return 2; } return -1; }\n"+ // test 1619 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"c\": return 3; case \"e\": return 5; default: return 0; case \"d\": return 4; case \"b\": return 2; } return -1; }\n"+ // test 1620 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; default: return 0; case \"b\": return 2; } return -1; }\n"+ // test 1621 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; case \"b\": return 2; default: return 0; } return -1; }\n"+ // test 1622 - "mixed b() { return 4; }", - - - "=mixed a() { switch(\"d\") { case \"c\": return 3; case \"e\": return 5; case \"b\": return 2; case \"d\": return 4; } return 0; }\n"+ // test 1623 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { default: return 0; case \"c\": return 3; case \"e\": return 5; case \"b\": return 2; case \"d\": return 4; } return -1; }\n"+ // test 1624 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"c\": return 3; default: return 0; case \"e\": return 5; case \"b\": return 2; case \"d\": return 4; } return -1; }\n"+ // test 1625 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"c\": return 3; case \"e\": return 5; default: return 0; case \"b\": return 2; case \"d\": return 4; } return -1; }\n"+ // test 1626 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"c\": return 3; case \"e\": return 5; case \"b\": return 2; default: return 0; case \"d\": return 4; } return -1; }\n"+ // test 1627 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"c\": return 3; case \"e\": return 5; case \"b\": return 2; case \"d\": return 4; default: return 0; } return -1; }\n"+ // test 1628 - "mixed b() { return 4; }", - - - - - - - "=mixed a() { switch(\"d\") { case \"d\": return 4; case \"c\": return 3; case \"b\": return 2; case \"e\": return 5; } return 0; }\n"+ // test 1629 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { default: return 0; case \"d\": return 4; case \"c\": return 3; case \"b\": return 2; case \"e\": return 5; } return -1; }\n"+ // test 1630 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"d\": return 4; default: return 0; case \"c\": return 3; case \"b\": return 2; case \"e\": return 5; } return -1; }\n"+ // test 1631 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"d\": return 4; case \"c\": return 3; default: return 0; case \"b\": return 2; case \"e\": return 5; } return -1; }\n"+ // test 1632 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"d\": return 4; case \"c\": return 3; case \"b\": return 2; default: return 0; case \"e\": return 5; } return -1; }\n"+ // test 1633 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"d\": return 4; case \"c\": return 3; case \"b\": return 2; case \"e\": return 5; default: return 0; } return -1; }\n"+ // test 1634 - "mixed b() { return 4; }", - - - "=mixed a() { switch(\"d\") { case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; case \"b\": return 2; } return 0; }\n"+ // test 1635 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { default: return 0; case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; case \"b\": return 2; } return -1; }\n"+ // test 1636 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"d\": return 4; default: return 0; case \"c\": return 3; case \"e\": return 5; case \"b\": return 2; } return -1; }\n"+ // test 1637 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"d\": return 4; case \"c\": return 3; default: return 0; case \"e\": return 5; case \"b\": return 2; } return -1; }\n"+ // test 1638 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; default: return 0; case \"b\": return 2; } return -1; }\n"+ // test 1639 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; case \"b\": return 2; default: return 0; } return -1; }\n"+ // test 1640 - "mixed b() { return 4; }", - - - - - "=mixed a() { switch(\"d\") { case \"d\": return 4; case \"b\": return 2; case \"c\": return 3; case \"e\": return 5; } return 0; }\n"+ // test 1641 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { default: return 0; case \"d\": return 4; case \"b\": return 2; case \"c\": return 3; case \"e\": return 5; } return -1; }\n"+ // test 1642 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"d\": return 4; default: return 0; case \"b\": return 2; case \"c\": return 3; case \"e\": return 5; } return -1; }\n"+ // test 1643 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"d\": return 4; case \"b\": return 2; default: return 0; case \"c\": return 3; case \"e\": return 5; } return -1; }\n"+ // test 1644 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"d\": return 4; case \"b\": return 2; case \"c\": return 3; default: return 0; case \"e\": return 5; } return -1; }\n"+ // test 1645 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"d\": return 4; case \"b\": return 2; case \"c\": return 3; case \"e\": return 5; default: return 0; } return -1; }\n"+ // test 1646 - "mixed b() { return 4; }", - - - "=mixed a() { switch(\"d\") { case \"d\": return 4; case \"b\": return 2; case \"e\": return 5; case \"c\": return 3; } return 0; }\n"+ // test 1647 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { default: return 0; case \"d\": return 4; case \"b\": return 2; case \"e\": return 5; case \"c\": return 3; } return -1; }\n"+ // test 1648 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"d\": return 4; default: return 0; case \"b\": return 2; case \"e\": return 5; case \"c\": return 3; } return -1; }\n"+ // test 1649 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"d\": return 4; case \"b\": return 2; default: return 0; case \"e\": return 5; case \"c\": return 3; } return -1; }\n"+ // test 1650 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"d\": return 4; case \"b\": return 2; case \"e\": return 5; default: return 0; case \"c\": return 3; } return -1; }\n"+ // test 1651 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"d\": return 4; case \"b\": return 2; case \"e\": return 5; case \"c\": return 3; default: return 0; } return -1; }\n"+ // test 1652 - "mixed b() { return 4; }", - - - - - "=mixed a() { switch(\"d\") { case \"d\": return 4; case \"e\": return 5; case \"b\": return 2; case \"c\": return 3; } return 0; }\n"+ // test 1653 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { default: return 0; case \"d\": return 4; case \"e\": return 5; case \"b\": return 2; case \"c\": return 3; } return -1; }\n"+ // test 1654 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"d\": return 4; default: return 0; case \"e\": return 5; case \"b\": return 2; case \"c\": return 3; } return -1; }\n"+ // test 1655 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"d\": return 4; case \"e\": return 5; default: return 0; case \"b\": return 2; case \"c\": return 3; } return -1; }\n"+ // test 1656 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"d\": return 4; case \"e\": return 5; case \"b\": return 2; default: return 0; case \"c\": return 3; } return -1; }\n"+ // test 1657 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"d\": return 4; case \"e\": return 5; case \"b\": return 2; case \"c\": return 3; default: return 0; } return -1; }\n"+ // test 1658 - "mixed b() { return 4; }", - - - "=mixed a() { switch(\"d\") { case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; case \"b\": return 2; } return 0; }\n"+ // test 1659 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { default: return 0; case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; case \"b\": return 2; } return -1; }\n"+ // test 1660 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"d\": return 4; default: return 0; case \"e\": return 5; case \"c\": return 3; case \"b\": return 2; } return -1; }\n"+ // test 1661 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"d\": return 4; case \"e\": return 5; default: return 0; case \"c\": return 3; case \"b\": return 2; } return -1; }\n"+ // test 1662 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; default: return 0; case \"b\": return 2; } return -1; }\n"+ // test 1663 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; case \"b\": return 2; default: return 0; } return -1; }\n"+ // test 1664 - "mixed b() { return 4; }", - - - - - - - "=mixed a() { switch(\"d\") { case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; case \"b\": return 2; } return 0; }\n"+ // test 1665 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { default: return 0; case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; case \"b\": return 2; } return -1; }\n"+ // test 1666 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"e\": return 5; default: return 0; case \"c\": return 3; case \"d\": return 4; case \"b\": return 2; } return -1; }\n"+ // test 1667 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"e\": return 5; case \"c\": return 3; default: return 0; case \"d\": return 4; case \"b\": return 2; } return -1; }\n"+ // test 1668 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; default: return 0; case \"b\": return 2; } return -1; }\n"+ // test 1669 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; case \"b\": return 2; default: return 0; } return -1; }\n"+ // test 1670 - "mixed b() { return 4; }", - - - "=mixed a() { switch(\"d\") { case \"e\": return 5; case \"c\": return 3; case \"b\": return 2; case \"d\": return 4; } return 0; }\n"+ // test 1671 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { default: return 0; case \"e\": return 5; case \"c\": return 3; case \"b\": return 2; case \"d\": return 4; } return -1; }\n"+ // test 1672 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"e\": return 5; default: return 0; case \"c\": return 3; case \"b\": return 2; case \"d\": return 4; } return -1; }\n"+ // test 1673 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"e\": return 5; case \"c\": return 3; default: return 0; case \"b\": return 2; case \"d\": return 4; } return -1; }\n"+ // test 1674 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"e\": return 5; case \"c\": return 3; case \"b\": return 2; default: return 0; case \"d\": return 4; } return -1; }\n"+ // test 1675 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"e\": return 5; case \"c\": return 3; case \"b\": return 2; case \"d\": return 4; default: return 0; } return -1; }\n"+ // test 1676 - "mixed b() { return 4; }", - - - - - "=mixed a() { switch(\"d\") { case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; case \"b\": return 2; } return 0; }\n"+ // test 1677 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { default: return 0; case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; case \"b\": return 2; } return -1; }\n"+ // test 1678 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"e\": return 5; default: return 0; case \"d\": return 4; case \"c\": return 3; case \"b\": return 2; } return -1; }\n"+ // test 1679 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"e\": return 5; case \"d\": return 4; default: return 0; case \"c\": return 3; case \"b\": return 2; } return -1; }\n"+ // test 1680 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; default: return 0; case \"b\": return 2; } return -1; }\n"+ // test 1681 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; case \"b\": return 2; default: return 0; } return -1; }\n"+ // test 1682 - "mixed b() { return 4; }", - - - "=mixed a() { switch(\"d\") { case \"e\": return 5; case \"d\": return 4; case \"b\": return 2; case \"c\": return 3; } return 0; }\n"+ // test 1683 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { default: return 0; case \"e\": return 5; case \"d\": return 4; case \"b\": return 2; case \"c\": return 3; } return -1; }\n"+ // test 1684 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"e\": return 5; default: return 0; case \"d\": return 4; case \"b\": return 2; case \"c\": return 3; } return -1; }\n"+ // test 1685 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"e\": return 5; case \"d\": return 4; default: return 0; case \"b\": return 2; case \"c\": return 3; } return -1; }\n"+ // test 1686 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"e\": return 5; case \"d\": return 4; case \"b\": return 2; default: return 0; case \"c\": return 3; } return -1; }\n"+ // test 1687 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"e\": return 5; case \"d\": return 4; case \"b\": return 2; case \"c\": return 3; default: return 0; } return -1; }\n"+ // test 1688 - "mixed b() { return 4; }", - - - - - "=mixed a() { switch(\"d\") { case \"e\": return 5; case \"b\": return 2; case \"d\": return 4; case \"c\": return 3; } return 0; }\n"+ // test 1689 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { default: return 0; case \"e\": return 5; case \"b\": return 2; case \"d\": return 4; case \"c\": return 3; } return -1; }\n"+ // test 1690 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"e\": return 5; default: return 0; case \"b\": return 2; case \"d\": return 4; case \"c\": return 3; } return -1; }\n"+ // test 1691 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"e\": return 5; case \"b\": return 2; default: return 0; case \"d\": return 4; case \"c\": return 3; } return -1; }\n"+ // test 1692 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"e\": return 5; case \"b\": return 2; case \"d\": return 4; default: return 0; case \"c\": return 3; } return -1; }\n"+ // test 1693 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"e\": return 5; case \"b\": return 2; case \"d\": return 4; case \"c\": return 3; default: return 0; } return -1; }\n"+ // test 1694 - "mixed b() { return 4; }", - - - "=mixed a() { switch(\"d\") { case \"e\": return 5; case \"b\": return 2; case \"c\": return 3; case \"d\": return 4; } return 0; }\n"+ // test 1695 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { default: return 0; case \"e\": return 5; case \"b\": return 2; case \"c\": return 3; case \"d\": return 4; } return -1; }\n"+ // test 1696 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"e\": return 5; default: return 0; case \"b\": return 2; case \"c\": return 3; case \"d\": return 4; } return -1; }\n"+ // test 1697 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"e\": return 5; case \"b\": return 2; default: return 0; case \"c\": return 3; case \"d\": return 4; } return -1; }\n"+ // test 1698 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"e\": return 5; case \"b\": return 2; case \"c\": return 3; default: return 0; case \"d\": return 4; } return -1; }\n"+ // test 1699 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"e\": return 5; case \"b\": return 2; case \"c\": return 3; case \"d\": return 4; default: return 0; } return -1; }\n"+ // test 1700 - "mixed b() { return 4; }", - - - - - - - - - "=mixed a() { switch(\"e\") { case \"b\": return 2; case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; } return 0; }\n"+ // test 1701 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { default: return 0; case \"b\": return 2; case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; } return -1; }\n"+ // test 1702 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"b\": return 2; default: return 0; case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; } return -1; }\n"+ // test 1703 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"b\": return 2; case \"c\": return 3; default: return 0; case \"d\": return 4; case \"e\": return 5; } return -1; }\n"+ // test 1704 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"b\": return 2; case \"c\": return 3; case \"d\": return 4; default: return 0; case \"e\": return 5; } return -1; }\n"+ // test 1705 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"b\": return 2; case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; default: return 0; } return -1; }\n"+ // test 1706 - "mixed b() { return 5; }", - - - "=mixed a() { switch(\"e\") { case \"b\": return 2; case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; } return 0; }\n"+ // test 1707 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { default: return 0; case \"b\": return 2; case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; } return -1; }\n"+ // test 1708 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"b\": return 2; default: return 0; case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; } return -1; }\n"+ // test 1709 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"b\": return 2; case \"c\": return 3; default: return 0; case \"e\": return 5; case \"d\": return 4; } return -1; }\n"+ // test 1710 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"b\": return 2; case \"c\": return 3; case \"e\": return 5; default: return 0; case \"d\": return 4; } return -1; }\n"+ // test 1711 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"b\": return 2; case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; default: return 0; } return -1; }\n"+ // test 1712 - "mixed b() { return 5; }", - - - - - "=mixed a() { switch(\"e\") { case \"b\": return 2; case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; } return 0; }\n"+ // test 1713 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { default: return 0; case \"b\": return 2; case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; } return -1; }\n"+ // test 1714 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"b\": return 2; default: return 0; case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; } return -1; }\n"+ // test 1715 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"b\": return 2; case \"d\": return 4; default: return 0; case \"c\": return 3; case \"e\": return 5; } return -1; }\n"+ // test 1716 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"b\": return 2; case \"d\": return 4; case \"c\": return 3; default: return 0; case \"e\": return 5; } return -1; }\n"+ // test 1717 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"b\": return 2; case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; default: return 0; } return -1; }\n"+ // test 1718 - "mixed b() { return 5; }", - - - "=mixed a() { switch(\"e\") { case \"b\": return 2; case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; } return 0; }\n"+ // test 1719 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { default: return 0; case \"b\": return 2; case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; } return -1; }\n"+ // test 1720 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"b\": return 2; default: return 0; case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; } return -1; }\n"+ // test 1721 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"b\": return 2; case \"d\": return 4; default: return 0; case \"e\": return 5; case \"c\": return 3; } return -1; }\n"+ // test 1722 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"b\": return 2; case \"d\": return 4; case \"e\": return 5; default: return 0; case \"c\": return 3; } return -1; }\n"+ // test 1723 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"b\": return 2; case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; default: return 0; } return -1; }\n"+ // test 1724 - "mixed b() { return 5; }", - - - - - "=mixed a() { switch(\"e\") { case \"b\": return 2; case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; } return 0; }\n"+ // test 1725 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { default: return 0; case \"b\": return 2; case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; } return -1; }\n"+ // test 1726 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"b\": return 2; default: return 0; case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; } return -1; }\n"+ // test 1727 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"b\": return 2; case \"e\": return 5; default: return 0; case \"d\": return 4; case \"c\": return 3; } return -1; }\n"+ // test 1728 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"b\": return 2; case \"e\": return 5; case \"d\": return 4; default: return 0; case \"c\": return 3; } return -1; }\n"+ // test 1729 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"b\": return 2; case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; default: return 0; } return -1; }\n"+ // test 1730 - "mixed b() { return 5; }", - - - "=mixed a() { switch(\"e\") { case \"b\": return 2; case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; } return 0; }\n"+ // test 1731 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { default: return 0; case \"b\": return 2; case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; } return -1; }\n"+ // test 1732 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"b\": return 2; default: return 0; case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; } return -1; }\n"+ // test 1733 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"b\": return 2; case \"e\": return 5; default: return 0; case \"c\": return 3; case \"d\": return 4; } return -1; }\n"+ // test 1734 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"b\": return 2; case \"e\": return 5; case \"c\": return 3; default: return 0; case \"d\": return 4; } return -1; }\n"+ // test 1735 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"b\": return 2; case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; default: return 0; } return -1; }\n"+ // test 1736 - "mixed b() { return 5; }", - - - - - - - "=mixed a() { switch(\"e\") { case \"c\": return 3; case \"b\": return 2; case \"d\": return 4; case \"e\": return 5; } return 0; }\n"+ // test 1737 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { default: return 0; case \"c\": return 3; case \"b\": return 2; case \"d\": return 4; case \"e\": return 5; } return -1; }\n"+ // test 1738 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"c\": return 3; default: return 0; case \"b\": return 2; case \"d\": return 4; case \"e\": return 5; } return -1; }\n"+ // test 1739 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"c\": return 3; case \"b\": return 2; default: return 0; case \"d\": return 4; case \"e\": return 5; } return -1; }\n"+ // test 1740 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"c\": return 3; case \"b\": return 2; case \"d\": return 4; default: return 0; case \"e\": return 5; } return -1; }\n"+ // test 1741 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"c\": return 3; case \"b\": return 2; case \"d\": return 4; case \"e\": return 5; default: return 0; } return -1; }\n"+ // test 1742 - "mixed b() { return 5; }", - - - "=mixed a() { switch(\"e\") { case \"c\": return 3; case \"b\": return 2; case \"e\": return 5; case \"d\": return 4; } return 0; }\n"+ // test 1743 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { default: return 0; case \"c\": return 3; case \"b\": return 2; case \"e\": return 5; case \"d\": return 4; } return -1; }\n"+ // test 1744 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"c\": return 3; default: return 0; case \"b\": return 2; case \"e\": return 5; case \"d\": return 4; } return -1; }\n"+ // test 1745 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"c\": return 3; case \"b\": return 2; default: return 0; case \"e\": return 5; case \"d\": return 4; } return -1; }\n"+ // test 1746 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"c\": return 3; case \"b\": return 2; case \"e\": return 5; default: return 0; case \"d\": return 4; } return -1; }\n"+ // test 1747 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"c\": return 3; case \"b\": return 2; case \"e\": return 5; case \"d\": return 4; default: return 0; } return -1; }\n"+ // test 1748 - "mixed b() { return 5; }", - - - - - "=mixed a() { switch(\"e\") { case \"c\": return 3; case \"d\": return 4; case \"b\": return 2; case \"e\": return 5; } return 0; }\n"+ // test 1749 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { default: return 0; case \"c\": return 3; case \"d\": return 4; case \"b\": return 2; case \"e\": return 5; } return -1; }\n"+ // test 1750 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"c\": return 3; default: return 0; case \"d\": return 4; case \"b\": return 2; case \"e\": return 5; } return -1; }\n"+ // test 1751 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"c\": return 3; case \"d\": return 4; default: return 0; case \"b\": return 2; case \"e\": return 5; } return -1; }\n"+ // test 1752 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"c\": return 3; case \"d\": return 4; case \"b\": return 2; default: return 0; case \"e\": return 5; } return -1; }\n"+ // test 1753 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"c\": return 3; case \"d\": return 4; case \"b\": return 2; case \"e\": return 5; default: return 0; } return -1; }\n"+ // test 1754 - "mixed b() { return 5; }", - - - "=mixed a() { switch(\"e\") { case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; case \"b\": return 2; } return 0; }\n"+ // test 1755 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { default: return 0; case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; case \"b\": return 2; } return -1; }\n"+ // test 1756 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"c\": return 3; default: return 0; case \"d\": return 4; case \"e\": return 5; case \"b\": return 2; } return -1; }\n"+ // test 1757 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"c\": return 3; case \"d\": return 4; default: return 0; case \"e\": return 5; case \"b\": return 2; } return -1; }\n"+ // test 1758 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; default: return 0; case \"b\": return 2; } return -1; }\n"+ // test 1759 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; case \"b\": return 2; default: return 0; } return -1; }\n"+ // test 1760 - "mixed b() { return 5; }", - - - - - "=mixed a() { switch(\"e\") { case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; case \"b\": return 2; } return 0; }\n"+ // test 1761 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { default: return 0; case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; case \"b\": return 2; } return -1; }\n"+ // test 1762 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"c\": return 3; default: return 0; case \"e\": return 5; case \"d\": return 4; case \"b\": return 2; } return -1; }\n"+ // test 1763 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"c\": return 3; case \"e\": return 5; default: return 0; case \"d\": return 4; case \"b\": return 2; } return -1; }\n"+ // test 1764 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; default: return 0; case \"b\": return 2; } return -1; }\n"+ // test 1765 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; case \"b\": return 2; default: return 0; } return -1; }\n"+ // test 1766 - "mixed b() { return 5; }", - - - "=mixed a() { switch(\"e\") { case \"c\": return 3; case \"e\": return 5; case \"b\": return 2; case \"d\": return 4; } return 0; }\n"+ // test 1767 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { default: return 0; case \"c\": return 3; case \"e\": return 5; case \"b\": return 2; case \"d\": return 4; } return -1; }\n"+ // test 1768 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"c\": return 3; default: return 0; case \"e\": return 5; case \"b\": return 2; case \"d\": return 4; } return -1; }\n"+ // test 1769 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"c\": return 3; case \"e\": return 5; default: return 0; case \"b\": return 2; case \"d\": return 4; } return -1; }\n"+ // test 1770 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"c\": return 3; case \"e\": return 5; case \"b\": return 2; default: return 0; case \"d\": return 4; } return -1; }\n"+ // test 1771 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"c\": return 3; case \"e\": return 5; case \"b\": return 2; case \"d\": return 4; default: return 0; } return -1; }\n"+ // test 1772 - "mixed b() { return 5; }", - - - - - - - "=mixed a() { switch(\"e\") { case \"d\": return 4; case \"c\": return 3; case \"b\": return 2; case \"e\": return 5; } return 0; }\n"+ // test 1773 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { default: return 0; case \"d\": return 4; case \"c\": return 3; case \"b\": return 2; case \"e\": return 5; } return -1; }\n"+ // test 1774 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"d\": return 4; default: return 0; case \"c\": return 3; case \"b\": return 2; case \"e\": return 5; } return -1; }\n"+ // test 1775 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"d\": return 4; case \"c\": return 3; default: return 0; case \"b\": return 2; case \"e\": return 5; } return -1; }\n"+ // test 1776 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"d\": return 4; case \"c\": return 3; case \"b\": return 2; default: return 0; case \"e\": return 5; } return -1; }\n"+ // test 1777 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"d\": return 4; case \"c\": return 3; case \"b\": return 2; case \"e\": return 5; default: return 0; } return -1; }\n"+ // test 1778 - "mixed b() { return 5; }", - - - "=mixed a() { switch(\"e\") { case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; case \"b\": return 2; } return 0; }\n"+ // test 1779 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { default: return 0; case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; case \"b\": return 2; } return -1; }\n"+ // test 1780 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"d\": return 4; default: return 0; case \"c\": return 3; case \"e\": return 5; case \"b\": return 2; } return -1; }\n"+ // test 1781 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"d\": return 4; case \"c\": return 3; default: return 0; case \"e\": return 5; case \"b\": return 2; } return -1; }\n"+ // test 1782 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; default: return 0; case \"b\": return 2; } return -1; }\n"+ // test 1783 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; case \"b\": return 2; default: return 0; } return -1; }\n"+ // test 1784 - "mixed b() { return 5; }", - - - - - "=mixed a() { switch(\"e\") { case \"d\": return 4; case \"b\": return 2; case \"c\": return 3; case \"e\": return 5; } return 0; }\n"+ // test 1785 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { default: return 0; case \"d\": return 4; case \"b\": return 2; case \"c\": return 3; case \"e\": return 5; } return -1; }\n"+ // test 1786 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"d\": return 4; default: return 0; case \"b\": return 2; case \"c\": return 3; case \"e\": return 5; } return -1; }\n"+ // test 1787 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"d\": return 4; case \"b\": return 2; default: return 0; case \"c\": return 3; case \"e\": return 5; } return -1; }\n"+ // test 1788 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"d\": return 4; case \"b\": return 2; case \"c\": return 3; default: return 0; case \"e\": return 5; } return -1; }\n"+ // test 1789 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"d\": return 4; case \"b\": return 2; case \"c\": return 3; case \"e\": return 5; default: return 0; } return -1; }\n"+ // test 1790 - "mixed b() { return 5; }", - - - "=mixed a() { switch(\"e\") { case \"d\": return 4; case \"b\": return 2; case \"e\": return 5; case \"c\": return 3; } return 0; }\n"+ // test 1791 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { default: return 0; case \"d\": return 4; case \"b\": return 2; case \"e\": return 5; case \"c\": return 3; } return -1; }\n"+ // test 1792 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"d\": return 4; default: return 0; case \"b\": return 2; case \"e\": return 5; case \"c\": return 3; } return -1; }\n"+ // test 1793 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"d\": return 4; case \"b\": return 2; default: return 0; case \"e\": return 5; case \"c\": return 3; } return -1; }\n"+ // test 1794 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"d\": return 4; case \"b\": return 2; case \"e\": return 5; default: return 0; case \"c\": return 3; } return -1; }\n"+ // test 1795 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"d\": return 4; case \"b\": return 2; case \"e\": return 5; case \"c\": return 3; default: return 0; } return -1; }\n"+ // test 1796 - "mixed b() { return 5; }", - - - - - "=mixed a() { switch(\"e\") { case \"d\": return 4; case \"e\": return 5; case \"b\": return 2; case \"c\": return 3; } return 0; }\n"+ // test 1797 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { default: return 0; case \"d\": return 4; case \"e\": return 5; case \"b\": return 2; case \"c\": return 3; } return -1; }\n"+ // test 1798 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"d\": return 4; default: return 0; case \"e\": return 5; case \"b\": return 2; case \"c\": return 3; } return -1; }\n"+ // test 1799 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"d\": return 4; case \"e\": return 5; default: return 0; case \"b\": return 2; case \"c\": return 3; } return -1; }\n"+ // test 1800 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"d\": return 4; case \"e\": return 5; case \"b\": return 2; default: return 0; case \"c\": return 3; } return -1; }\n"+ // test 1801 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"d\": return 4; case \"e\": return 5; case \"b\": return 2; case \"c\": return 3; default: return 0; } return -1; }\n"+ // test 1802 - "mixed b() { return 5; }", - - - "=mixed a() { switch(\"e\") { case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; case \"b\": return 2; } return 0; }\n"+ // test 1803 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { default: return 0; case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; case \"b\": return 2; } return -1; }\n"+ // test 1804 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"d\": return 4; default: return 0; case \"e\": return 5; case \"c\": return 3; case \"b\": return 2; } return -1; }\n"+ // test 1805 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"d\": return 4; case \"e\": return 5; default: return 0; case \"c\": return 3; case \"b\": return 2; } return -1; }\n"+ // test 1806 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; default: return 0; case \"b\": return 2; } return -1; }\n"+ // test 1807 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; case \"b\": return 2; default: return 0; } return -1; }\n"+ // test 1808 - "mixed b() { return 5; }", - - - - - - - "=mixed a() { switch(\"e\") { case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; case \"b\": return 2; } return 0; }\n"+ // test 1809 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { default: return 0; case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; case \"b\": return 2; } return -1; }\n"+ // test 1810 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"e\": return 5; default: return 0; case \"c\": return 3; case \"d\": return 4; case \"b\": return 2; } return -1; }\n"+ // test 1811 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"e\": return 5; case \"c\": return 3; default: return 0; case \"d\": return 4; case \"b\": return 2; } return -1; }\n"+ // test 1812 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; default: return 0; case \"b\": return 2; } return -1; }\n"+ // test 1813 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; case \"b\": return 2; default: return 0; } return -1; }\n"+ // test 1814 - "mixed b() { return 5; }", - - - "=mixed a() { switch(\"e\") { case \"e\": return 5; case \"c\": return 3; case \"b\": return 2; case \"d\": return 4; } return 0; }\n"+ // test 1815 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { default: return 0; case \"e\": return 5; case \"c\": return 3; case \"b\": return 2; case \"d\": return 4; } return -1; }\n"+ // test 1816 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"e\": return 5; default: return 0; case \"c\": return 3; case \"b\": return 2; case \"d\": return 4; } return -1; }\n"+ // test 1817 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"e\": return 5; case \"c\": return 3; default: return 0; case \"b\": return 2; case \"d\": return 4; } return -1; }\n"+ // test 1818 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"e\": return 5; case \"c\": return 3; case \"b\": return 2; default: return 0; case \"d\": return 4; } return -1; }\n"+ // test 1819 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"e\": return 5; case \"c\": return 3; case \"b\": return 2; case \"d\": return 4; default: return 0; } return -1; }\n"+ // test 1820 - "mixed b() { return 5; }", - - - - - "=mixed a() { switch(\"e\") { case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; case \"b\": return 2; } return 0; }\n"+ // test 1821 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { default: return 0; case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; case \"b\": return 2; } return -1; }\n"+ // test 1822 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"e\": return 5; default: return 0; case \"d\": return 4; case \"c\": return 3; case \"b\": return 2; } return -1; }\n"+ // test 1823 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"e\": return 5; case \"d\": return 4; default: return 0; case \"c\": return 3; case \"b\": return 2; } return -1; }\n"+ // test 1824 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; default: return 0; case \"b\": return 2; } return -1; }\n"+ // test 1825 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; case \"b\": return 2; default: return 0; } return -1; }\n"+ // test 1826 - "mixed b() { return 5; }", - - - "=mixed a() { switch(\"e\") { case \"e\": return 5; case \"d\": return 4; case \"b\": return 2; case \"c\": return 3; } return 0; }\n"+ // test 1827 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { default: return 0; case \"e\": return 5; case \"d\": return 4; case \"b\": return 2; case \"c\": return 3; } return -1; }\n"+ // test 1828 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"e\": return 5; default: return 0; case \"d\": return 4; case \"b\": return 2; case \"c\": return 3; } return -1; }\n"+ // test 1829 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"e\": return 5; case \"d\": return 4; default: return 0; case \"b\": return 2; case \"c\": return 3; } return -1; }\n"+ // test 1830 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"e\": return 5; case \"d\": return 4; case \"b\": return 2; default: return 0; case \"c\": return 3; } return -1; }\n"+ // test 1831 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"e\": return 5; case \"d\": return 4; case \"b\": return 2; case \"c\": return 3; default: return 0; } return -1; }\n"+ // test 1832 - "mixed b() { return 5; }", - - - - - "=mixed a() { switch(\"e\") { case \"e\": return 5; case \"b\": return 2; case \"d\": return 4; case \"c\": return 3; } return 0; }\n"+ // test 1833 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { default: return 0; case \"e\": return 5; case \"b\": return 2; case \"d\": return 4; case \"c\": return 3; } return -1; }\n"+ // test 1834 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"e\": return 5; default: return 0; case \"b\": return 2; case \"d\": return 4; case \"c\": return 3; } return -1; }\n"+ // test 1835 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"e\": return 5; case \"b\": return 2; default: return 0; case \"d\": return 4; case \"c\": return 3; } return -1; }\n"+ // test 1836 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"e\": return 5; case \"b\": return 2; case \"d\": return 4; default: return 0; case \"c\": return 3; } return -1; }\n"+ // test 1837 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"e\": return 5; case \"b\": return 2; case \"d\": return 4; case \"c\": return 3; default: return 0; } return -1; }\n"+ // test 1838 - "mixed b() { return 5; }", - - - "=mixed a() { switch(\"e\") { case \"e\": return 5; case \"b\": return 2; case \"c\": return 3; case \"d\": return 4; } return 0; }\n"+ // test 1839 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { default: return 0; case \"e\": return 5; case \"b\": return 2; case \"c\": return 3; case \"d\": return 4; } return -1; }\n"+ // test 1840 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"e\": return 5; default: return 0; case \"b\": return 2; case \"c\": return 3; case \"d\": return 4; } return -1; }\n"+ // test 1841 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"e\": return 5; case \"b\": return 2; default: return 0; case \"c\": return 3; case \"d\": return 4; } return -1; }\n"+ // test 1842 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"e\": return 5; case \"b\": return 2; case \"c\": return 3; default: return 0; case \"d\": return 4; } return -1; }\n"+ // test 1843 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"e\": return 5; case \"b\": return 2; case \"c\": return 3; case \"d\": return 4; default: return 0; } return -1; }\n"+ // test 1844 - "mixed b() { return 5; }", - - - - - - - - - - - "=mixed a() { switch(\"a\") { case 0: return 2; case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; } return 0; }\n"+ // test 1845 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { default: return 0; case 0: return 2; case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; } return -1; }\n"+ // test 1846 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case 0: return 2; default: return 0; case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; } return -1; }\n"+ // test 1847 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case 0: return 2; case \"c\": return 3; default: return 0; case \"d\": return 4; case \"e\": return 5; } return -1; }\n"+ // test 1848 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case 0: return 2; case \"c\": return 3; case \"d\": return 4; default: return 0; case \"e\": return 5; } return -1; }\n"+ // test 1849 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case 0: return 2; case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; default: return 0; } return -1; }\n"+ // test 1850 - "mixed b() { return 0; }", - - - "=mixed a() { switch(\"a\") { case 0: return 2; case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; } return 0; }\n"+ // test 1851 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { default: return 0; case 0: return 2; case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; } return -1; }\n"+ // test 1852 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case 0: return 2; default: return 0; case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; } return -1; }\n"+ // test 1853 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case 0: return 2; case \"c\": return 3; default: return 0; case \"e\": return 5; case \"d\": return 4; } return -1; }\n"+ // test 1854 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case 0: return 2; case \"c\": return 3; case \"e\": return 5; default: return 0; case \"d\": return 4; } return -1; }\n"+ // test 1855 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case 0: return 2; case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; default: return 0; } return -1; }\n"+ // test 1856 - "mixed b() { return 0; }", - - - - - "=mixed a() { switch(\"a\") { case 0: return 2; case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; } return 0; }\n"+ // test 1857 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { default: return 0; case 0: return 2; case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; } return -1; }\n"+ // test 1858 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case 0: return 2; default: return 0; case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; } return -1; }\n"+ // test 1859 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case 0: return 2; case \"d\": return 4; default: return 0; case \"c\": return 3; case \"e\": return 5; } return -1; }\n"+ // test 1860 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case 0: return 2; case \"d\": return 4; case \"c\": return 3; default: return 0; case \"e\": return 5; } return -1; }\n"+ // test 1861 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case 0: return 2; case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; default: return 0; } return -1; }\n"+ // test 1862 - "mixed b() { return 0; }", - - - "=mixed a() { switch(\"a\") { case 0: return 2; case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; } return 0; }\n"+ // test 1863 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { default: return 0; case 0: return 2; case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; } return -1; }\n"+ // test 1864 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case 0: return 2; default: return 0; case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; } return -1; }\n"+ // test 1865 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case 0: return 2; case \"d\": return 4; default: return 0; case \"e\": return 5; case \"c\": return 3; } return -1; }\n"+ // test 1866 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case 0: return 2; case \"d\": return 4; case \"e\": return 5; default: return 0; case \"c\": return 3; } return -1; }\n"+ // test 1867 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case 0: return 2; case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; default: return 0; } return -1; }\n"+ // test 1868 - "mixed b() { return 0; }", - - - - - "=mixed a() { switch(\"a\") { case 0: return 2; case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; } return 0; }\n"+ // test 1869 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { default: return 0; case 0: return 2; case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; } return -1; }\n"+ // test 1870 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case 0: return 2; default: return 0; case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; } return -1; }\n"+ // test 1871 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case 0: return 2; case \"e\": return 5; default: return 0; case \"d\": return 4; case \"c\": return 3; } return -1; }\n"+ // test 1872 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case 0: return 2; case \"e\": return 5; case \"d\": return 4; default: return 0; case \"c\": return 3; } return -1; }\n"+ // test 1873 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case 0: return 2; case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; default: return 0; } return -1; }\n"+ // test 1874 - "mixed b() { return 0; }", - - - "=mixed a() { switch(\"a\") { case 0: return 2; case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; } return 0; }\n"+ // test 1875 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { default: return 0; case 0: return 2; case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; } return -1; }\n"+ // test 1876 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case 0: return 2; default: return 0; case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; } return -1; }\n"+ // test 1877 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case 0: return 2; case \"e\": return 5; default: return 0; case \"c\": return 3; case \"d\": return 4; } return -1; }\n"+ // test 1878 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case 0: return 2; case \"e\": return 5; case \"c\": return 3; default: return 0; case \"d\": return 4; } return -1; }\n"+ // test 1879 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case 0: return 2; case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; default: return 0; } return -1; }\n"+ // test 1880 - "mixed b() { return 0; }", - - - - - - - "=mixed a() { switch(\"a\") { case \"c\": return 3; case 0: return 2; case \"d\": return 4; case \"e\": return 5; } return 0; }\n"+ // test 1881 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { default: return 0; case \"c\": return 3; case 0: return 2; case \"d\": return 4; case \"e\": return 5; } return -1; }\n"+ // test 1882 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"c\": return 3; default: return 0; case 0: return 2; case \"d\": return 4; case \"e\": return 5; } return -1; }\n"+ // test 1883 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"c\": return 3; case 0: return 2; default: return 0; case \"d\": return 4; case \"e\": return 5; } return -1; }\n"+ // test 1884 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"c\": return 3; case 0: return 2; case \"d\": return 4; default: return 0; case \"e\": return 5; } return -1; }\n"+ // test 1885 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"c\": return 3; case 0: return 2; case \"d\": return 4; case \"e\": return 5; default: return 0; } return -1; }\n"+ // test 1886 - "mixed b() { return 0; }", - - - "=mixed a() { switch(\"a\") { case \"c\": return 3; case 0: return 2; case \"e\": return 5; case \"d\": return 4; } return 0; }\n"+ // test 1887 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { default: return 0; case \"c\": return 3; case 0: return 2; case \"e\": return 5; case \"d\": return 4; } return -1; }\n"+ // test 1888 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"c\": return 3; default: return 0; case 0: return 2; case \"e\": return 5; case \"d\": return 4; } return -1; }\n"+ // test 1889 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"c\": return 3; case 0: return 2; default: return 0; case \"e\": return 5; case \"d\": return 4; } return -1; }\n"+ // test 1890 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"c\": return 3; case 0: return 2; case \"e\": return 5; default: return 0; case \"d\": return 4; } return -1; }\n"+ // test 1891 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"c\": return 3; case 0: return 2; case \"e\": return 5; case \"d\": return 4; default: return 0; } return -1; }\n"+ // test 1892 - "mixed b() { return 0; }", - - - - - "=mixed a() { switch(\"a\") { case \"c\": return 3; case \"d\": return 4; case 0: return 2; case \"e\": return 5; } return 0; }\n"+ // test 1893 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { default: return 0; case \"c\": return 3; case \"d\": return 4; case 0: return 2; case \"e\": return 5; } return -1; }\n"+ // test 1894 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"c\": return 3; default: return 0; case \"d\": return 4; case 0: return 2; case \"e\": return 5; } return -1; }\n"+ // test 1895 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"c\": return 3; case \"d\": return 4; default: return 0; case 0: return 2; case \"e\": return 5; } return -1; }\n"+ // test 1896 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"c\": return 3; case \"d\": return 4; case 0: return 2; default: return 0; case \"e\": return 5; } return -1; }\n"+ // test 1897 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"c\": return 3; case \"d\": return 4; case 0: return 2; case \"e\": return 5; default: return 0; } return -1; }\n"+ // test 1898 - "mixed b() { return 0; }", - - - "=mixed a() { switch(\"a\") { case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; case 0: return 2; } return 0; }\n"+ // test 1899 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { default: return 0; case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; case 0: return 2; } return -1; }\n"+ // test 1900 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"c\": return 3; default: return 0; case \"d\": return 4; case \"e\": return 5; case 0: return 2; } return -1; }\n"+ // test 1901 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"c\": return 3; case \"d\": return 4; default: return 0; case \"e\": return 5; case 0: return 2; } return -1; }\n"+ // test 1902 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; default: return 0; case 0: return 2; } return -1; }\n"+ // test 1903 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; case 0: return 2; default: return 0; } return -1; }\n"+ // test 1904 - "mixed b() { return 0; }", - - - - - "=mixed a() { switch(\"a\") { case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; case 0: return 2; } return 0; }\n"+ // test 1905 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { default: return 0; case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; case 0: return 2; } return -1; }\n"+ // test 1906 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"c\": return 3; default: return 0; case \"e\": return 5; case \"d\": return 4; case 0: return 2; } return -1; }\n"+ // test 1907 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"c\": return 3; case \"e\": return 5; default: return 0; case \"d\": return 4; case 0: return 2; } return -1; }\n"+ // test 1908 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; default: return 0; case 0: return 2; } return -1; }\n"+ // test 1909 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; case 0: return 2; default: return 0; } return -1; }\n"+ // test 1910 - "mixed b() { return 0; }", - - - "=mixed a() { switch(\"a\") { case \"c\": return 3; case \"e\": return 5; case 0: return 2; case \"d\": return 4; } return 0; }\n"+ // test 1911 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { default: return 0; case \"c\": return 3; case \"e\": return 5; case 0: return 2; case \"d\": return 4; } return -1; }\n"+ // test 1912 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"c\": return 3; default: return 0; case \"e\": return 5; case 0: return 2; case \"d\": return 4; } return -1; }\n"+ // test 1913 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"c\": return 3; case \"e\": return 5; default: return 0; case 0: return 2; case \"d\": return 4; } return -1; }\n"+ // test 1914 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"c\": return 3; case \"e\": return 5; case 0: return 2; default: return 0; case \"d\": return 4; } return -1; }\n"+ // test 1915 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"c\": return 3; case \"e\": return 5; case 0: return 2; case \"d\": return 4; default: return 0; } return -1; }\n"+ // test 1916 - "mixed b() { return 0; }", - - - - - - - "=mixed a() { switch(\"a\") { case \"d\": return 4; case \"c\": return 3; case 0: return 2; case \"e\": return 5; } return 0; }\n"+ // test 1917 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { default: return 0; case \"d\": return 4; case \"c\": return 3; case 0: return 2; case \"e\": return 5; } return -1; }\n"+ // test 1918 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"d\": return 4; default: return 0; case \"c\": return 3; case 0: return 2; case \"e\": return 5; } return -1; }\n"+ // test 1919 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"d\": return 4; case \"c\": return 3; default: return 0; case 0: return 2; case \"e\": return 5; } return -1; }\n"+ // test 1920 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"d\": return 4; case \"c\": return 3; case 0: return 2; default: return 0; case \"e\": return 5; } return -1; }\n"+ // test 1921 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"d\": return 4; case \"c\": return 3; case 0: return 2; case \"e\": return 5; default: return 0; } return -1; }\n"+ // test 1922 - "mixed b() { return 0; }", - - - "=mixed a() { switch(\"a\") { case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; case 0: return 2; } return 0; }\n"+ // test 1923 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { default: return 0; case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; case 0: return 2; } return -1; }\n"+ // test 1924 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"d\": return 4; default: return 0; case \"c\": return 3; case \"e\": return 5; case 0: return 2; } return -1; }\n"+ // test 1925 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"d\": return 4; case \"c\": return 3; default: return 0; case \"e\": return 5; case 0: return 2; } return -1; }\n"+ // test 1926 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; default: return 0; case 0: return 2; } return -1; }\n"+ // test 1927 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; case 0: return 2; default: return 0; } return -1; }\n"+ // test 1928 - "mixed b() { return 0; }", - - - - - "=mixed a() { switch(\"a\") { case \"d\": return 4; case 0: return 2; case \"c\": return 3; case \"e\": return 5; } return 0; }\n"+ // test 1929 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { default: return 0; case \"d\": return 4; case 0: return 2; case \"c\": return 3; case \"e\": return 5; } return -1; }\n"+ // test 1930 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"d\": return 4; default: return 0; case 0: return 2; case \"c\": return 3; case \"e\": return 5; } return -1; }\n"+ // test 1931 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"d\": return 4; case 0: return 2; default: return 0; case \"c\": return 3; case \"e\": return 5; } return -1; }\n"+ // test 1932 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"d\": return 4; case 0: return 2; case \"c\": return 3; default: return 0; case \"e\": return 5; } return -1; }\n"+ // test 1933 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"d\": return 4; case 0: return 2; case \"c\": return 3; case \"e\": return 5; default: return 0; } return -1; }\n"+ // test 1934 - "mixed b() { return 0; }", - - - "=mixed a() { switch(\"a\") { case \"d\": return 4; case 0: return 2; case \"e\": return 5; case \"c\": return 3; } return 0; }\n"+ // test 1935 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { default: return 0; case \"d\": return 4; case 0: return 2; case \"e\": return 5; case \"c\": return 3; } return -1; }\n"+ // test 1936 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"d\": return 4; default: return 0; case 0: return 2; case \"e\": return 5; case \"c\": return 3; } return -1; }\n"+ // test 1937 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"d\": return 4; case 0: return 2; default: return 0; case \"e\": return 5; case \"c\": return 3; } return -1; }\n"+ // test 1938 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"d\": return 4; case 0: return 2; case \"e\": return 5; default: return 0; case \"c\": return 3; } return -1; }\n"+ // test 1939 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"d\": return 4; case 0: return 2; case \"e\": return 5; case \"c\": return 3; default: return 0; } return -1; }\n"+ // test 1940 - "mixed b() { return 0; }", - - - - - "=mixed a() { switch(\"a\") { case \"d\": return 4; case \"e\": return 5; case 0: return 2; case \"c\": return 3; } return 0; }\n"+ // test 1941 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { default: return 0; case \"d\": return 4; case \"e\": return 5; case 0: return 2; case \"c\": return 3; } return -1; }\n"+ // test 1942 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"d\": return 4; default: return 0; case \"e\": return 5; case 0: return 2; case \"c\": return 3; } return -1; }\n"+ // test 1943 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"d\": return 4; case \"e\": return 5; default: return 0; case 0: return 2; case \"c\": return 3; } return -1; }\n"+ // test 1944 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"d\": return 4; case \"e\": return 5; case 0: return 2; default: return 0; case \"c\": return 3; } return -1; }\n"+ // test 1945 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"d\": return 4; case \"e\": return 5; case 0: return 2; case \"c\": return 3; default: return 0; } return -1; }\n"+ // test 1946 - "mixed b() { return 0; }", - - - "=mixed a() { switch(\"a\") { case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; case 0: return 2; } return 0; }\n"+ // test 1947 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { default: return 0; case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; case 0: return 2; } return -1; }\n"+ // test 1948 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"d\": return 4; default: return 0; case \"e\": return 5; case \"c\": return 3; case 0: return 2; } return -1; }\n"+ // test 1949 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"d\": return 4; case \"e\": return 5; default: return 0; case \"c\": return 3; case 0: return 2; } return -1; }\n"+ // test 1950 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; default: return 0; case 0: return 2; } return -1; }\n"+ // test 1951 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; case 0: return 2; default: return 0; } return -1; }\n"+ // test 1952 - "mixed b() { return 0; }", - - - - - - - "=mixed a() { switch(\"a\") { case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; case 0: return 2; } return 0; }\n"+ // test 1953 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { default: return 0; case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; case 0: return 2; } return -1; }\n"+ // test 1954 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"e\": return 5; default: return 0; case \"c\": return 3; case \"d\": return 4; case 0: return 2; } return -1; }\n"+ // test 1955 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"e\": return 5; case \"c\": return 3; default: return 0; case \"d\": return 4; case 0: return 2; } return -1; }\n"+ // test 1956 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; default: return 0; case 0: return 2; } return -1; }\n"+ // test 1957 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; case 0: return 2; default: return 0; } return -1; }\n"+ // test 1958 - "mixed b() { return 0; }", - - - "=mixed a() { switch(\"a\") { case \"e\": return 5; case \"c\": return 3; case 0: return 2; case \"d\": return 4; } return 0; }\n"+ // test 1959 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { default: return 0; case \"e\": return 5; case \"c\": return 3; case 0: return 2; case \"d\": return 4; } return -1; }\n"+ // test 1960 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"e\": return 5; default: return 0; case \"c\": return 3; case 0: return 2; case \"d\": return 4; } return -1; }\n"+ // test 1961 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"e\": return 5; case \"c\": return 3; default: return 0; case 0: return 2; case \"d\": return 4; } return -1; }\n"+ // test 1962 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"e\": return 5; case \"c\": return 3; case 0: return 2; default: return 0; case \"d\": return 4; } return -1; }\n"+ // test 1963 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"e\": return 5; case \"c\": return 3; case 0: return 2; case \"d\": return 4; default: return 0; } return -1; }\n"+ // test 1964 - "mixed b() { return 0; }", - - - - - "=mixed a() { switch(\"a\") { case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; case 0: return 2; } return 0; }\n"+ // test 1965 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { default: return 0; case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; case 0: return 2; } return -1; }\n"+ // test 1966 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"e\": return 5; default: return 0; case \"d\": return 4; case \"c\": return 3; case 0: return 2; } return -1; }\n"+ // test 1967 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"e\": return 5; case \"d\": return 4; default: return 0; case \"c\": return 3; case 0: return 2; } return -1; }\n"+ // test 1968 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; default: return 0; case 0: return 2; } return -1; }\n"+ // test 1969 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; case 0: return 2; default: return 0; } return -1; }\n"+ // test 1970 - "mixed b() { return 0; }", - - - "=mixed a() { switch(\"a\") { case \"e\": return 5; case \"d\": return 4; case 0: return 2; case \"c\": return 3; } return 0; }\n"+ // test 1971 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { default: return 0; case \"e\": return 5; case \"d\": return 4; case 0: return 2; case \"c\": return 3; } return -1; }\n"+ // test 1972 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"e\": return 5; default: return 0; case \"d\": return 4; case 0: return 2; case \"c\": return 3; } return -1; }\n"+ // test 1973 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"e\": return 5; case \"d\": return 4; default: return 0; case 0: return 2; case \"c\": return 3; } return -1; }\n"+ // test 1974 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"e\": return 5; case \"d\": return 4; case 0: return 2; default: return 0; case \"c\": return 3; } return -1; }\n"+ // test 1975 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"e\": return 5; case \"d\": return 4; case 0: return 2; case \"c\": return 3; default: return 0; } return -1; }\n"+ // test 1976 - "mixed b() { return 0; }", - - - - - "=mixed a() { switch(\"a\") { case \"e\": return 5; case 0: return 2; case \"d\": return 4; case \"c\": return 3; } return 0; }\n"+ // test 1977 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { default: return 0; case \"e\": return 5; case 0: return 2; case \"d\": return 4; case \"c\": return 3; } return -1; }\n"+ // test 1978 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"e\": return 5; default: return 0; case 0: return 2; case \"d\": return 4; case \"c\": return 3; } return -1; }\n"+ // test 1979 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"e\": return 5; case 0: return 2; default: return 0; case \"d\": return 4; case \"c\": return 3; } return -1; }\n"+ // test 1980 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"e\": return 5; case 0: return 2; case \"d\": return 4; default: return 0; case \"c\": return 3; } return -1; }\n"+ // test 1981 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"e\": return 5; case 0: return 2; case \"d\": return 4; case \"c\": return 3; default: return 0; } return -1; }\n"+ // test 1982 - "mixed b() { return 0; }", - - - "=mixed a() { switch(\"a\") { case \"e\": return 5; case 0: return 2; case \"c\": return 3; case \"d\": return 4; } return 0; }\n"+ // test 1983 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { default: return 0; case \"e\": return 5; case 0: return 2; case \"c\": return 3; case \"d\": return 4; } return -1; }\n"+ // test 1984 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"e\": return 5; default: return 0; case 0: return 2; case \"c\": return 3; case \"d\": return 4; } return -1; }\n"+ // test 1985 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"e\": return 5; case 0: return 2; default: return 0; case \"c\": return 3; case \"d\": return 4; } return -1; }\n"+ // test 1986 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"e\": return 5; case 0: return 2; case \"c\": return 3; default: return 0; case \"d\": return 4; } return -1; }\n"+ // test 1987 - "mixed b() { return 0; }", - "=mixed a() { switch(\"a\") { case \"e\": return 5; case 0: return 2; case \"c\": return 3; case \"d\": return 4; default: return 0; } return -1; }\n"+ // test 1988 - "mixed b() { return 0; }", - - - - - - - - - "=mixed a() { switch(0) { case 0: return 2; case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; } return 0; }\n"+ // test 1989 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { default: return 0; case 0: return 2; case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; } return -1; }\n"+ // test 1990 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case 0: return 2; default: return 0; case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; } return -1; }\n"+ // test 1991 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case 0: return 2; case \"c\": return 3; default: return 0; case \"d\": return 4; case \"e\": return 5; } return -1; }\n"+ // test 1992 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case 0: return 2; case \"c\": return 3; case \"d\": return 4; default: return 0; case \"e\": return 5; } return -1; }\n"+ // test 1993 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case 0: return 2; case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; default: return 0; } return -1; }\n"+ // test 1994 - "mixed b() { return 2; }", - - - "=mixed a() { switch(0) { case 0: return 2; case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; } return 0; }\n"+ // test 1995 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { default: return 0; case 0: return 2; case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; } return -1; }\n"+ // test 1996 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case 0: return 2; default: return 0; case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; } return -1; }\n"+ // test 1997 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case 0: return 2; case \"c\": return 3; default: return 0; case \"e\": return 5; case \"d\": return 4; } return -1; }\n"+ // test 1998 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case 0: return 2; case \"c\": return 3; case \"e\": return 5; default: return 0; case \"d\": return 4; } return -1; }\n"+ // test 1999 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case 0: return 2; case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; default: return 0; } return -1; }\n"+ // test 2000 - "mixed b() { return 2; }", - - - - - "=mixed a() { switch(0) { case 0: return 2; case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; } return 0; }\n"+ // test 2001 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { default: return 0; case 0: return 2; case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; } return -1; }\n"+ // test 2002 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case 0: return 2; default: return 0; case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; } return -1; }\n"+ // test 2003 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case 0: return 2; case \"d\": return 4; default: return 0; case \"c\": return 3; case \"e\": return 5; } return -1; }\n"+ // test 2004 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case 0: return 2; case \"d\": return 4; case \"c\": return 3; default: return 0; case \"e\": return 5; } return -1; }\n"+ // test 2005 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case 0: return 2; case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; default: return 0; } return -1; }\n"+ // test 2006 - "mixed b() { return 2; }", - - - "=mixed a() { switch(0) { case 0: return 2; case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; } return 0; }\n"+ // test 2007 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { default: return 0; case 0: return 2; case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; } return -1; }\n"+ // test 2008 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case 0: return 2; default: return 0; case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; } return -1; }\n"+ // test 2009 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case 0: return 2; case \"d\": return 4; default: return 0; case \"e\": return 5; case \"c\": return 3; } return -1; }\n"+ // test 2010 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case 0: return 2; case \"d\": return 4; case \"e\": return 5; default: return 0; case \"c\": return 3; } return -1; }\n"+ // test 2011 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case 0: return 2; case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; default: return 0; } return -1; }\n"+ // test 2012 - "mixed b() { return 2; }", - - - - - "=mixed a() { switch(0) { case 0: return 2; case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; } return 0; }\n"+ // test 2013 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { default: return 0; case 0: return 2; case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; } return -1; }\n"+ // test 2014 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case 0: return 2; default: return 0; case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; } return -1; }\n"+ // test 2015 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case 0: return 2; case \"e\": return 5; default: return 0; case \"d\": return 4; case \"c\": return 3; } return -1; }\n"+ // test 2016 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case 0: return 2; case \"e\": return 5; case \"d\": return 4; default: return 0; case \"c\": return 3; } return -1; }\n"+ // test 2017 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case 0: return 2; case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; default: return 0; } return -1; }\n"+ // test 2018 - "mixed b() { return 2; }", - - - "=mixed a() { switch(0) { case 0: return 2; case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; } return 0; }\n"+ // test 2019 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { default: return 0; case 0: return 2; case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; } return -1; }\n"+ // test 2020 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case 0: return 2; default: return 0; case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; } return -1; }\n"+ // test 2021 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case 0: return 2; case \"e\": return 5; default: return 0; case \"c\": return 3; case \"d\": return 4; } return -1; }\n"+ // test 2022 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case 0: return 2; case \"e\": return 5; case \"c\": return 3; default: return 0; case \"d\": return 4; } return -1; }\n"+ // test 2023 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case 0: return 2; case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; default: return 0; } return -1; }\n"+ // test 2024 - "mixed b() { return 2; }", - - - - - - - "=mixed a() { switch(0) { case \"c\": return 3; case 0: return 2; case \"d\": return 4; case \"e\": return 5; } return 0; }\n"+ // test 2025 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { default: return 0; case \"c\": return 3; case 0: return 2; case \"d\": return 4; case \"e\": return 5; } return -1; }\n"+ // test 2026 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case \"c\": return 3; default: return 0; case 0: return 2; case \"d\": return 4; case \"e\": return 5; } return -1; }\n"+ // test 2027 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case \"c\": return 3; case 0: return 2; default: return 0; case \"d\": return 4; case \"e\": return 5; } return -1; }\n"+ // test 2028 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case \"c\": return 3; case 0: return 2; case \"d\": return 4; default: return 0; case \"e\": return 5; } return -1; }\n"+ // test 2029 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case \"c\": return 3; case 0: return 2; case \"d\": return 4; case \"e\": return 5; default: return 0; } return -1; }\n"+ // test 2030 - "mixed b() { return 2; }", - - - "=mixed a() { switch(0) { case \"c\": return 3; case 0: return 2; case \"e\": return 5; case \"d\": return 4; } return 0; }\n"+ // test 2031 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { default: return 0; case \"c\": return 3; case 0: return 2; case \"e\": return 5; case \"d\": return 4; } return -1; }\n"+ // test 2032 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case \"c\": return 3; default: return 0; case 0: return 2; case \"e\": return 5; case \"d\": return 4; } return -1; }\n"+ // test 2033 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case \"c\": return 3; case 0: return 2; default: return 0; case \"e\": return 5; case \"d\": return 4; } return -1; }\n"+ // test 2034 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case \"c\": return 3; case 0: return 2; case \"e\": return 5; default: return 0; case \"d\": return 4; } return -1; }\n"+ // test 2035 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case \"c\": return 3; case 0: return 2; case \"e\": return 5; case \"d\": return 4; default: return 0; } return -1; }\n"+ // test 2036 - "mixed b() { return 2; }", - - - - - "=mixed a() { switch(0) { case \"c\": return 3; case \"d\": return 4; case 0: return 2; case \"e\": return 5; } return 0; }\n"+ // test 2037 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { default: return 0; case \"c\": return 3; case \"d\": return 4; case 0: return 2; case \"e\": return 5; } return -1; }\n"+ // test 2038 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case \"c\": return 3; default: return 0; case \"d\": return 4; case 0: return 2; case \"e\": return 5; } return -1; }\n"+ // test 2039 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case \"c\": return 3; case \"d\": return 4; default: return 0; case 0: return 2; case \"e\": return 5; } return -1; }\n"+ // test 2040 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case \"c\": return 3; case \"d\": return 4; case 0: return 2; default: return 0; case \"e\": return 5; } return -1; }\n"+ // test 2041 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case \"c\": return 3; case \"d\": return 4; case 0: return 2; case \"e\": return 5; default: return 0; } return -1; }\n"+ // test 2042 - "mixed b() { return 2; }", - - - "=mixed a() { switch(0) { case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; case 0: return 2; } return 0; }\n"+ // test 2043 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { default: return 0; case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; case 0: return 2; } return -1; }\n"+ // test 2044 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case \"c\": return 3; default: return 0; case \"d\": return 4; case \"e\": return 5; case 0: return 2; } return -1; }\n"+ // test 2045 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case \"c\": return 3; case \"d\": return 4; default: return 0; case \"e\": return 5; case 0: return 2; } return -1; }\n"+ // test 2046 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; default: return 0; case 0: return 2; } return -1; }\n"+ // test 2047 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; case 0: return 2; default: return 0; } return -1; }\n"+ // test 2048 - "mixed b() { return 2; }", - - - - - "=mixed a() { switch(0) { case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; case 0: return 2; } return 0; }\n"+ // test 2049 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { default: return 0; case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; case 0: return 2; } return -1; }\n"+ // test 2050 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case \"c\": return 3; default: return 0; case \"e\": return 5; case \"d\": return 4; case 0: return 2; } return -1; }\n"+ // test 2051 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case \"c\": return 3; case \"e\": return 5; default: return 0; case \"d\": return 4; case 0: return 2; } return -1; }\n"+ // test 2052 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; default: return 0; case 0: return 2; } return -1; }\n"+ // test 2053 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; case 0: return 2; default: return 0; } return -1; }\n"+ // test 2054 - "mixed b() { return 2; }", - - - "=mixed a() { switch(0) { case \"c\": return 3; case \"e\": return 5; case 0: return 2; case \"d\": return 4; } return 0; }\n"+ // test 2055 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { default: return 0; case \"c\": return 3; case \"e\": return 5; case 0: return 2; case \"d\": return 4; } return -1; }\n"+ // test 2056 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case \"c\": return 3; default: return 0; case \"e\": return 5; case 0: return 2; case \"d\": return 4; } return -1; }\n"+ // test 2057 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case \"c\": return 3; case \"e\": return 5; default: return 0; case 0: return 2; case \"d\": return 4; } return -1; }\n"+ // test 2058 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case \"c\": return 3; case \"e\": return 5; case 0: return 2; default: return 0; case \"d\": return 4; } return -1; }\n"+ // test 2059 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case \"c\": return 3; case \"e\": return 5; case 0: return 2; case \"d\": return 4; default: return 0; } return -1; }\n"+ // test 2060 - "mixed b() { return 2; }", - - - - - - - "=mixed a() { switch(0) { case \"d\": return 4; case \"c\": return 3; case 0: return 2; case \"e\": return 5; } return 0; }\n"+ // test 2061 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { default: return 0; case \"d\": return 4; case \"c\": return 3; case 0: return 2; case \"e\": return 5; } return -1; }\n"+ // test 2062 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case \"d\": return 4; default: return 0; case \"c\": return 3; case 0: return 2; case \"e\": return 5; } return -1; }\n"+ // test 2063 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case \"d\": return 4; case \"c\": return 3; default: return 0; case 0: return 2; case \"e\": return 5; } return -1; }\n"+ // test 2064 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case \"d\": return 4; case \"c\": return 3; case 0: return 2; default: return 0; case \"e\": return 5; } return -1; }\n"+ // test 2065 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case \"d\": return 4; case \"c\": return 3; case 0: return 2; case \"e\": return 5; default: return 0; } return -1; }\n"+ // test 2066 - "mixed b() { return 2; }", - - - "=mixed a() { switch(0) { case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; case 0: return 2; } return 0; }\n"+ // test 2067 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { default: return 0; case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; case 0: return 2; } return -1; }\n"+ // test 2068 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case \"d\": return 4; default: return 0; case \"c\": return 3; case \"e\": return 5; case 0: return 2; } return -1; }\n"+ // test 2069 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case \"d\": return 4; case \"c\": return 3; default: return 0; case \"e\": return 5; case 0: return 2; } return -1; }\n"+ // test 2070 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; default: return 0; case 0: return 2; } return -1; }\n"+ // test 2071 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; case 0: return 2; default: return 0; } return -1; }\n"+ // test 2072 - "mixed b() { return 2; }", - - - - - "=mixed a() { switch(0) { case \"d\": return 4; case 0: return 2; case \"c\": return 3; case \"e\": return 5; } return 0; }\n"+ // test 2073 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { default: return 0; case \"d\": return 4; case 0: return 2; case \"c\": return 3; case \"e\": return 5; } return -1; }\n"+ // test 2074 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case \"d\": return 4; default: return 0; case 0: return 2; case \"c\": return 3; case \"e\": return 5; } return -1; }\n"+ // test 2075 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case \"d\": return 4; case 0: return 2; default: return 0; case \"c\": return 3; case \"e\": return 5; } return -1; }\n"+ // test 2076 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case \"d\": return 4; case 0: return 2; case \"c\": return 3; default: return 0; case \"e\": return 5; } return -1; }\n"+ // test 2077 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case \"d\": return 4; case 0: return 2; case \"c\": return 3; case \"e\": return 5; default: return 0; } return -1; }\n"+ // test 2078 - "mixed b() { return 2; }", - - - "=mixed a() { switch(0) { case \"d\": return 4; case 0: return 2; case \"e\": return 5; case \"c\": return 3; } return 0; }\n"+ // test 2079 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { default: return 0; case \"d\": return 4; case 0: return 2; case \"e\": return 5; case \"c\": return 3; } return -1; }\n"+ // test 2080 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case \"d\": return 4; default: return 0; case 0: return 2; case \"e\": return 5; case \"c\": return 3; } return -1; }\n"+ // test 2081 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case \"d\": return 4; case 0: return 2; default: return 0; case \"e\": return 5; case \"c\": return 3; } return -1; }\n"+ // test 2082 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case \"d\": return 4; case 0: return 2; case \"e\": return 5; default: return 0; case \"c\": return 3; } return -1; }\n"+ // test 2083 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case \"d\": return 4; case 0: return 2; case \"e\": return 5; case \"c\": return 3; default: return 0; } return -1; }\n"+ // test 2084 - "mixed b() { return 2; }", - - - - - "=mixed a() { switch(0) { case \"d\": return 4; case \"e\": return 5; case 0: return 2; case \"c\": return 3; } return 0; }\n"+ // test 2085 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { default: return 0; case \"d\": return 4; case \"e\": return 5; case 0: return 2; case \"c\": return 3; } return -1; }\n"+ // test 2086 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case \"d\": return 4; default: return 0; case \"e\": return 5; case 0: return 2; case \"c\": return 3; } return -1; }\n"+ // test 2087 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case \"d\": return 4; case \"e\": return 5; default: return 0; case 0: return 2; case \"c\": return 3; } return -1; }\n"+ // test 2088 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case \"d\": return 4; case \"e\": return 5; case 0: return 2; default: return 0; case \"c\": return 3; } return -1; }\n"+ // test 2089 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case \"d\": return 4; case \"e\": return 5; case 0: return 2; case \"c\": return 3; default: return 0; } return -1; }\n"+ // test 2090 - "mixed b() { return 2; }", - - - "=mixed a() { switch(0) { case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; case 0: return 2; } return 0; }\n"+ // test 2091 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { default: return 0; case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; case 0: return 2; } return -1; }\n"+ // test 2092 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case \"d\": return 4; default: return 0; case \"e\": return 5; case \"c\": return 3; case 0: return 2; } return -1; }\n"+ // test 2093 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case \"d\": return 4; case \"e\": return 5; default: return 0; case \"c\": return 3; case 0: return 2; } return -1; }\n"+ // test 2094 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; default: return 0; case 0: return 2; } return -1; }\n"+ // test 2095 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; case 0: return 2; default: return 0; } return -1; }\n"+ // test 2096 - "mixed b() { return 2; }", - - - - - - - "=mixed a() { switch(0) { case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; case 0: return 2; } return 0; }\n"+ // test 2097 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { default: return 0; case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; case 0: return 2; } return -1; }\n"+ // test 2098 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case \"e\": return 5; default: return 0; case \"c\": return 3; case \"d\": return 4; case 0: return 2; } return -1; }\n"+ // test 2099 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case \"e\": return 5; case \"c\": return 3; default: return 0; case \"d\": return 4; case 0: return 2; } return -1; }\n"+ // test 2100 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; default: return 0; case 0: return 2; } return -1; }\n"+ // test 2101 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; case 0: return 2; default: return 0; } return -1; }\n"+ // test 2102 - "mixed b() { return 2; }", - - - "=mixed a() { switch(0) { case \"e\": return 5; case \"c\": return 3; case 0: return 2; case \"d\": return 4; } return 0; }\n"+ // test 2103 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { default: return 0; case \"e\": return 5; case \"c\": return 3; case 0: return 2; case \"d\": return 4; } return -1; }\n"+ // test 2104 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case \"e\": return 5; default: return 0; case \"c\": return 3; case 0: return 2; case \"d\": return 4; } return -1; }\n"+ // test 2105 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case \"e\": return 5; case \"c\": return 3; default: return 0; case 0: return 2; case \"d\": return 4; } return -1; }\n"+ // test 2106 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case \"e\": return 5; case \"c\": return 3; case 0: return 2; default: return 0; case \"d\": return 4; } return -1; }\n"+ // test 2107 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case \"e\": return 5; case \"c\": return 3; case 0: return 2; case \"d\": return 4; default: return 0; } return -1; }\n"+ // test 2108 - "mixed b() { return 2; }", - - - - - "=mixed a() { switch(0) { case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; case 0: return 2; } return 0; }\n"+ // test 2109 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { default: return 0; case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; case 0: return 2; } return -1; }\n"+ // test 2110 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case \"e\": return 5; default: return 0; case \"d\": return 4; case \"c\": return 3; case 0: return 2; } return -1; }\n"+ // test 2111 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case \"e\": return 5; case \"d\": return 4; default: return 0; case \"c\": return 3; case 0: return 2; } return -1; }\n"+ // test 2112 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; default: return 0; case 0: return 2; } return -1; }\n"+ // test 2113 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; case 0: return 2; default: return 0; } return -1; }\n"+ // test 2114 - "mixed b() { return 2; }", - - - "=mixed a() { switch(0) { case \"e\": return 5; case \"d\": return 4; case 0: return 2; case \"c\": return 3; } return 0; }\n"+ // test 2115 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { default: return 0; case \"e\": return 5; case \"d\": return 4; case 0: return 2; case \"c\": return 3; } return -1; }\n"+ // test 2116 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case \"e\": return 5; default: return 0; case \"d\": return 4; case 0: return 2; case \"c\": return 3; } return -1; }\n"+ // test 2117 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case \"e\": return 5; case \"d\": return 4; default: return 0; case 0: return 2; case \"c\": return 3; } return -1; }\n"+ // test 2118 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case \"e\": return 5; case \"d\": return 4; case 0: return 2; default: return 0; case \"c\": return 3; } return -1; }\n"+ // test 2119 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case \"e\": return 5; case \"d\": return 4; case 0: return 2; case \"c\": return 3; default: return 0; } return -1; }\n"+ // test 2120 - "mixed b() { return 2; }", - - - - - "=mixed a() { switch(0) { case \"e\": return 5; case 0: return 2; case \"d\": return 4; case \"c\": return 3; } return 0; }\n"+ // test 2121 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { default: return 0; case \"e\": return 5; case 0: return 2; case \"d\": return 4; case \"c\": return 3; } return -1; }\n"+ // test 2122 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case \"e\": return 5; default: return 0; case 0: return 2; case \"d\": return 4; case \"c\": return 3; } return -1; }\n"+ // test 2123 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case \"e\": return 5; case 0: return 2; default: return 0; case \"d\": return 4; case \"c\": return 3; } return -1; }\n"+ // test 2124 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case \"e\": return 5; case 0: return 2; case \"d\": return 4; default: return 0; case \"c\": return 3; } return -1; }\n"+ // test 2125 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case \"e\": return 5; case 0: return 2; case \"d\": return 4; case \"c\": return 3; default: return 0; } return -1; }\n"+ // test 2126 - "mixed b() { return 2; }", - - - "=mixed a() { switch(0) { case \"e\": return 5; case 0: return 2; case \"c\": return 3; case \"d\": return 4; } return 0; }\n"+ // test 2127 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { default: return 0; case \"e\": return 5; case 0: return 2; case \"c\": return 3; case \"d\": return 4; } return -1; }\n"+ // test 2128 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case \"e\": return 5; default: return 0; case 0: return 2; case \"c\": return 3; case \"d\": return 4; } return -1; }\n"+ // test 2129 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case \"e\": return 5; case 0: return 2; default: return 0; case \"c\": return 3; case \"d\": return 4; } return -1; }\n"+ // test 2130 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case \"e\": return 5; case 0: return 2; case \"c\": return 3; default: return 0; case \"d\": return 4; } return -1; }\n"+ // test 2131 - "mixed b() { return 2; }", - "=mixed a() { switch(0) { case \"e\": return 5; case 0: return 2; case \"c\": return 3; case \"d\": return 4; default: return 0; } return -1; }\n"+ // test 2132 - "mixed b() { return 2; }", - - - - - - - - - "=mixed a() { switch(\"c\") { case 0: return 2; case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; } return 0; }\n"+ // test 2133 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { default: return 0; case 0: return 2; case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; } return -1; }\n"+ // test 2134 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case 0: return 2; default: return 0; case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; } return -1; }\n"+ // test 2135 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case 0: return 2; case \"c\": return 3; default: return 0; case \"d\": return 4; case \"e\": return 5; } return -1; }\n"+ // test 2136 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case 0: return 2; case \"c\": return 3; case \"d\": return 4; default: return 0; case \"e\": return 5; } return -1; }\n"+ // test 2137 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case 0: return 2; case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; default: return 0; } return -1; }\n"+ // test 2138 - "mixed b() { return 3; }", - - - "=mixed a() { switch(\"c\") { case 0: return 2; case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; } return 0; }\n"+ // test 2139 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { default: return 0; case 0: return 2; case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; } return -1; }\n"+ // test 2140 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case 0: return 2; default: return 0; case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; } return -1; }\n"+ // test 2141 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case 0: return 2; case \"c\": return 3; default: return 0; case \"e\": return 5; case \"d\": return 4; } return -1; }\n"+ // test 2142 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case 0: return 2; case \"c\": return 3; case \"e\": return 5; default: return 0; case \"d\": return 4; } return -1; }\n"+ // test 2143 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case 0: return 2; case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; default: return 0; } return -1; }\n"+ // test 2144 - "mixed b() { return 3; }", - - - - - "=mixed a() { switch(\"c\") { case 0: return 2; case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; } return 0; }\n"+ // test 2145 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { default: return 0; case 0: return 2; case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; } return -1; }\n"+ // test 2146 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case 0: return 2; default: return 0; case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; } return -1; }\n"+ // test 2147 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case 0: return 2; case \"d\": return 4; default: return 0; case \"c\": return 3; case \"e\": return 5; } return -1; }\n"+ // test 2148 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case 0: return 2; case \"d\": return 4; case \"c\": return 3; default: return 0; case \"e\": return 5; } return -1; }\n"+ // test 2149 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case 0: return 2; case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; default: return 0; } return -1; }\n"+ // test 2150 - "mixed b() { return 3; }", - - - "=mixed a() { switch(\"c\") { case 0: return 2; case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; } return 0; }\n"+ // test 2151 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { default: return 0; case 0: return 2; case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; } return -1; }\n"+ // test 2152 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case 0: return 2; default: return 0; case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; } return -1; }\n"+ // test 2153 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case 0: return 2; case \"d\": return 4; default: return 0; case \"e\": return 5; case \"c\": return 3; } return -1; }\n"+ // test 2154 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case 0: return 2; case \"d\": return 4; case \"e\": return 5; default: return 0; case \"c\": return 3; } return -1; }\n"+ // test 2155 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case 0: return 2; case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; default: return 0; } return -1; }\n"+ // test 2156 - "mixed b() { return 3; }", - - - - - "=mixed a() { switch(\"c\") { case 0: return 2; case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; } return 0; }\n"+ // test 2157 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { default: return 0; case 0: return 2; case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; } return -1; }\n"+ // test 2158 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case 0: return 2; default: return 0; case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; } return -1; }\n"+ // test 2159 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case 0: return 2; case \"e\": return 5; default: return 0; case \"d\": return 4; case \"c\": return 3; } return -1; }\n"+ // test 2160 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case 0: return 2; case \"e\": return 5; case \"d\": return 4; default: return 0; case \"c\": return 3; } return -1; }\n"+ // test 2161 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case 0: return 2; case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; default: return 0; } return -1; }\n"+ // test 2162 - "mixed b() { return 3; }", - - - "=mixed a() { switch(\"c\") { case 0: return 2; case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; } return 0; }\n"+ // test 2163 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { default: return 0; case 0: return 2; case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; } return -1; }\n"+ // test 2164 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case 0: return 2; default: return 0; case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; } return -1; }\n"+ // test 2165 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case 0: return 2; case \"e\": return 5; default: return 0; case \"c\": return 3; case \"d\": return 4; } return -1; }\n"+ // test 2166 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case 0: return 2; case \"e\": return 5; case \"c\": return 3; default: return 0; case \"d\": return 4; } return -1; }\n"+ // test 2167 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case 0: return 2; case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; default: return 0; } return -1; }\n"+ // test 2168 - "mixed b() { return 3; }", - - - - - - - "=mixed a() { switch(\"c\") { case \"c\": return 3; case 0: return 2; case \"d\": return 4; case \"e\": return 5; } return 0; }\n"+ // test 2169 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { default: return 0; case \"c\": return 3; case 0: return 2; case \"d\": return 4; case \"e\": return 5; } return -1; }\n"+ // test 2170 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"c\": return 3; default: return 0; case 0: return 2; case \"d\": return 4; case \"e\": return 5; } return -1; }\n"+ // test 2171 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"c\": return 3; case 0: return 2; default: return 0; case \"d\": return 4; case \"e\": return 5; } return -1; }\n"+ // test 2172 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"c\": return 3; case 0: return 2; case \"d\": return 4; default: return 0; case \"e\": return 5; } return -1; }\n"+ // test 2173 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"c\": return 3; case 0: return 2; case \"d\": return 4; case \"e\": return 5; default: return 0; } return -1; }\n"+ // test 2174 - "mixed b() { return 3; }", - - - "=mixed a() { switch(\"c\") { case \"c\": return 3; case 0: return 2; case \"e\": return 5; case \"d\": return 4; } return 0; }\n"+ // test 2175 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { default: return 0; case \"c\": return 3; case 0: return 2; case \"e\": return 5; case \"d\": return 4; } return -1; }\n"+ // test 2176 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"c\": return 3; default: return 0; case 0: return 2; case \"e\": return 5; case \"d\": return 4; } return -1; }\n"+ // test 2177 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"c\": return 3; case 0: return 2; default: return 0; case \"e\": return 5; case \"d\": return 4; } return -1; }\n"+ // test 2178 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"c\": return 3; case 0: return 2; case \"e\": return 5; default: return 0; case \"d\": return 4; } return -1; }\n"+ // test 2179 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"c\": return 3; case 0: return 2; case \"e\": return 5; case \"d\": return 4; default: return 0; } return -1; }\n"+ // test 2180 - "mixed b() { return 3; }", - - - - - "=mixed a() { switch(\"c\") { case \"c\": return 3; case \"d\": return 4; case 0: return 2; case \"e\": return 5; } return 0; }\n"+ // test 2181 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { default: return 0; case \"c\": return 3; case \"d\": return 4; case 0: return 2; case \"e\": return 5; } return -1; }\n"+ // test 2182 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"c\": return 3; default: return 0; case \"d\": return 4; case 0: return 2; case \"e\": return 5; } return -1; }\n"+ // test 2183 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"c\": return 3; case \"d\": return 4; default: return 0; case 0: return 2; case \"e\": return 5; } return -1; }\n"+ // test 2184 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"c\": return 3; case \"d\": return 4; case 0: return 2; default: return 0; case \"e\": return 5; } return -1; }\n"+ // test 2185 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"c\": return 3; case \"d\": return 4; case 0: return 2; case \"e\": return 5; default: return 0; } return -1; }\n"+ // test 2186 - "mixed b() { return 3; }", - - - "=mixed a() { switch(\"c\") { case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; case 0: return 2; } return 0; }\n"+ // test 2187 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { default: return 0; case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; case 0: return 2; } return -1; }\n"+ // test 2188 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"c\": return 3; default: return 0; case \"d\": return 4; case \"e\": return 5; case 0: return 2; } return -1; }\n"+ // test 2189 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"c\": return 3; case \"d\": return 4; default: return 0; case \"e\": return 5; case 0: return 2; } return -1; }\n"+ // test 2190 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; default: return 0; case 0: return 2; } return -1; }\n"+ // test 2191 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; case 0: return 2; default: return 0; } return -1; }\n"+ // test 2192 - "mixed b() { return 3; }", - - - - - "=mixed a() { switch(\"c\") { case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; case 0: return 2; } return 0; }\n"+ // test 2193 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { default: return 0; case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; case 0: return 2; } return -1; }\n"+ // test 2194 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"c\": return 3; default: return 0; case \"e\": return 5; case \"d\": return 4; case 0: return 2; } return -1; }\n"+ // test 2195 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"c\": return 3; case \"e\": return 5; default: return 0; case \"d\": return 4; case 0: return 2; } return -1; }\n"+ // test 2196 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; default: return 0; case 0: return 2; } return -1; }\n"+ // test 2197 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; case 0: return 2; default: return 0; } return -1; }\n"+ // test 2198 - "mixed b() { return 3; }", - - - "=mixed a() { switch(\"c\") { case \"c\": return 3; case \"e\": return 5; case 0: return 2; case \"d\": return 4; } return 0; }\n"+ // test 2199 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { default: return 0; case \"c\": return 3; case \"e\": return 5; case 0: return 2; case \"d\": return 4; } return -1; }\n"+ // test 2200 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"c\": return 3; default: return 0; case \"e\": return 5; case 0: return 2; case \"d\": return 4; } return -1; }\n"+ // test 2201 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"c\": return 3; case \"e\": return 5; default: return 0; case 0: return 2; case \"d\": return 4; } return -1; }\n"+ // test 2202 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"c\": return 3; case \"e\": return 5; case 0: return 2; default: return 0; case \"d\": return 4; } return -1; }\n"+ // test 2203 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"c\": return 3; case \"e\": return 5; case 0: return 2; case \"d\": return 4; default: return 0; } return -1; }\n"+ // test 2204 - "mixed b() { return 3; }", - - - - - - - "=mixed a() { switch(\"c\") { case \"d\": return 4; case \"c\": return 3; case 0: return 2; case \"e\": return 5; } return 0; }\n"+ // test 2205 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { default: return 0; case \"d\": return 4; case \"c\": return 3; case 0: return 2; case \"e\": return 5; } return -1; }\n"+ // test 2206 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"d\": return 4; default: return 0; case \"c\": return 3; case 0: return 2; case \"e\": return 5; } return -1; }\n"+ // test 2207 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"d\": return 4; case \"c\": return 3; default: return 0; case 0: return 2; case \"e\": return 5; } return -1; }\n"+ // test 2208 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"d\": return 4; case \"c\": return 3; case 0: return 2; default: return 0; case \"e\": return 5; } return -1; }\n"+ // test 2209 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"d\": return 4; case \"c\": return 3; case 0: return 2; case \"e\": return 5; default: return 0; } return -1; }\n"+ // test 2210 - "mixed b() { return 3; }", - - - "=mixed a() { switch(\"c\") { case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; case 0: return 2; } return 0; }\n"+ // test 2211 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { default: return 0; case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; case 0: return 2; } return -1; }\n"+ // test 2212 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"d\": return 4; default: return 0; case \"c\": return 3; case \"e\": return 5; case 0: return 2; } return -1; }\n"+ // test 2213 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"d\": return 4; case \"c\": return 3; default: return 0; case \"e\": return 5; case 0: return 2; } return -1; }\n"+ // test 2214 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; default: return 0; case 0: return 2; } return -1; }\n"+ // test 2215 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; case 0: return 2; default: return 0; } return -1; }\n"+ // test 2216 - "mixed b() { return 3; }", - - - - - "=mixed a() { switch(\"c\") { case \"d\": return 4; case 0: return 2; case \"c\": return 3; case \"e\": return 5; } return 0; }\n"+ // test 2217 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { default: return 0; case \"d\": return 4; case 0: return 2; case \"c\": return 3; case \"e\": return 5; } return -1; }\n"+ // test 2218 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"d\": return 4; default: return 0; case 0: return 2; case \"c\": return 3; case \"e\": return 5; } return -1; }\n"+ // test 2219 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"d\": return 4; case 0: return 2; default: return 0; case \"c\": return 3; case \"e\": return 5; } return -1; }\n"+ // test 2220 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"d\": return 4; case 0: return 2; case \"c\": return 3; default: return 0; case \"e\": return 5; } return -1; }\n"+ // test 2221 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"d\": return 4; case 0: return 2; case \"c\": return 3; case \"e\": return 5; default: return 0; } return -1; }\n"+ // test 2222 - "mixed b() { return 3; }", - - - "=mixed a() { switch(\"c\") { case \"d\": return 4; case 0: return 2; case \"e\": return 5; case \"c\": return 3; } return 0; }\n"+ // test 2223 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { default: return 0; case \"d\": return 4; case 0: return 2; case \"e\": return 5; case \"c\": return 3; } return -1; }\n"+ // test 2224 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"d\": return 4; default: return 0; case 0: return 2; case \"e\": return 5; case \"c\": return 3; } return -1; }\n"+ // test 2225 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"d\": return 4; case 0: return 2; default: return 0; case \"e\": return 5; case \"c\": return 3; } return -1; }\n"+ // test 2226 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"d\": return 4; case 0: return 2; case \"e\": return 5; default: return 0; case \"c\": return 3; } return -1; }\n"+ // test 2227 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"d\": return 4; case 0: return 2; case \"e\": return 5; case \"c\": return 3; default: return 0; } return -1; }\n"+ // test 2228 - "mixed b() { return 3; }", - - - - - "=mixed a() { switch(\"c\") { case \"d\": return 4; case \"e\": return 5; case 0: return 2; case \"c\": return 3; } return 0; }\n"+ // test 2229 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { default: return 0; case \"d\": return 4; case \"e\": return 5; case 0: return 2; case \"c\": return 3; } return -1; }\n"+ // test 2230 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"d\": return 4; default: return 0; case \"e\": return 5; case 0: return 2; case \"c\": return 3; } return -1; }\n"+ // test 2231 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"d\": return 4; case \"e\": return 5; default: return 0; case 0: return 2; case \"c\": return 3; } return -1; }\n"+ // test 2232 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"d\": return 4; case \"e\": return 5; case 0: return 2; default: return 0; case \"c\": return 3; } return -1; }\n"+ // test 2233 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"d\": return 4; case \"e\": return 5; case 0: return 2; case \"c\": return 3; default: return 0; } return -1; }\n"+ // test 2234 - "mixed b() { return 3; }", - - - "=mixed a() { switch(\"c\") { case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; case 0: return 2; } return 0; }\n"+ // test 2235 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { default: return 0; case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; case 0: return 2; } return -1; }\n"+ // test 2236 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"d\": return 4; default: return 0; case \"e\": return 5; case \"c\": return 3; case 0: return 2; } return -1; }\n"+ // test 2237 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"d\": return 4; case \"e\": return 5; default: return 0; case \"c\": return 3; case 0: return 2; } return -1; }\n"+ // test 2238 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; default: return 0; case 0: return 2; } return -1; }\n"+ // test 2239 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; case 0: return 2; default: return 0; } return -1; }\n"+ // test 2240 - "mixed b() { return 3; }", - - - - - - - "=mixed a() { switch(\"c\") { case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; case 0: return 2; } return 0; }\n"+ // test 2241 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { default: return 0; case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; case 0: return 2; } return -1; }\n"+ // test 2242 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"e\": return 5; default: return 0; case \"c\": return 3; case \"d\": return 4; case 0: return 2; } return -1; }\n"+ // test 2243 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"e\": return 5; case \"c\": return 3; default: return 0; case \"d\": return 4; case 0: return 2; } return -1; }\n"+ // test 2244 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; default: return 0; case 0: return 2; } return -1; }\n"+ // test 2245 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; case 0: return 2; default: return 0; } return -1; }\n"+ // test 2246 - "mixed b() { return 3; }", - - - "=mixed a() { switch(\"c\") { case \"e\": return 5; case \"c\": return 3; case 0: return 2; case \"d\": return 4; } return 0; }\n"+ // test 2247 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { default: return 0; case \"e\": return 5; case \"c\": return 3; case 0: return 2; case \"d\": return 4; } return -1; }\n"+ // test 2248 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"e\": return 5; default: return 0; case \"c\": return 3; case 0: return 2; case \"d\": return 4; } return -1; }\n"+ // test 2249 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"e\": return 5; case \"c\": return 3; default: return 0; case 0: return 2; case \"d\": return 4; } return -1; }\n"+ // test 2250 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"e\": return 5; case \"c\": return 3; case 0: return 2; default: return 0; case \"d\": return 4; } return -1; }\n"+ // test 2251 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"e\": return 5; case \"c\": return 3; case 0: return 2; case \"d\": return 4; default: return 0; } return -1; }\n"+ // test 2252 - "mixed b() { return 3; }", - - - - - "=mixed a() { switch(\"c\") { case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; case 0: return 2; } return 0; }\n"+ // test 2253 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { default: return 0; case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; case 0: return 2; } return -1; }\n"+ // test 2254 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"e\": return 5; default: return 0; case \"d\": return 4; case \"c\": return 3; case 0: return 2; } return -1; }\n"+ // test 2255 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"e\": return 5; case \"d\": return 4; default: return 0; case \"c\": return 3; case 0: return 2; } return -1; }\n"+ // test 2256 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; default: return 0; case 0: return 2; } return -1; }\n"+ // test 2257 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; case 0: return 2; default: return 0; } return -1; }\n"+ // test 2258 - "mixed b() { return 3; }", - - - "=mixed a() { switch(\"c\") { case \"e\": return 5; case \"d\": return 4; case 0: return 2; case \"c\": return 3; } return 0; }\n"+ // test 2259 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { default: return 0; case \"e\": return 5; case \"d\": return 4; case 0: return 2; case \"c\": return 3; } return -1; }\n"+ // test 2260 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"e\": return 5; default: return 0; case \"d\": return 4; case 0: return 2; case \"c\": return 3; } return -1; }\n"+ // test 2261 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"e\": return 5; case \"d\": return 4; default: return 0; case 0: return 2; case \"c\": return 3; } return -1; }\n"+ // test 2262 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"e\": return 5; case \"d\": return 4; case 0: return 2; default: return 0; case \"c\": return 3; } return -1; }\n"+ // test 2263 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"e\": return 5; case \"d\": return 4; case 0: return 2; case \"c\": return 3; default: return 0; } return -1; }\n"+ // test 2264 - "mixed b() { return 3; }", - - - - - "=mixed a() { switch(\"c\") { case \"e\": return 5; case 0: return 2; case \"d\": return 4; case \"c\": return 3; } return 0; }\n"+ // test 2265 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { default: return 0; case \"e\": return 5; case 0: return 2; case \"d\": return 4; case \"c\": return 3; } return -1; }\n"+ // test 2266 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"e\": return 5; default: return 0; case 0: return 2; case \"d\": return 4; case \"c\": return 3; } return -1; }\n"+ // test 2267 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"e\": return 5; case 0: return 2; default: return 0; case \"d\": return 4; case \"c\": return 3; } return -1; }\n"+ // test 2268 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"e\": return 5; case 0: return 2; case \"d\": return 4; default: return 0; case \"c\": return 3; } return -1; }\n"+ // test 2269 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"e\": return 5; case 0: return 2; case \"d\": return 4; case \"c\": return 3; default: return 0; } return -1; }\n"+ // test 2270 - "mixed b() { return 3; }", - - - "=mixed a() { switch(\"c\") { case \"e\": return 5; case 0: return 2; case \"c\": return 3; case \"d\": return 4; } return 0; }\n"+ // test 2271 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { default: return 0; case \"e\": return 5; case 0: return 2; case \"c\": return 3; case \"d\": return 4; } return -1; }\n"+ // test 2272 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"e\": return 5; default: return 0; case 0: return 2; case \"c\": return 3; case \"d\": return 4; } return -1; }\n"+ // test 2273 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"e\": return 5; case 0: return 2; default: return 0; case \"c\": return 3; case \"d\": return 4; } return -1; }\n"+ // test 2274 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"e\": return 5; case 0: return 2; case \"c\": return 3; default: return 0; case \"d\": return 4; } return -1; }\n"+ // test 2275 - "mixed b() { return 3; }", - "=mixed a() { switch(\"c\") { case \"e\": return 5; case 0: return 2; case \"c\": return 3; case \"d\": return 4; default: return 0; } return -1; }\n"+ // test 2276 - "mixed b() { return 3; }", - - - - - - - - - "=mixed a() { switch(\"d\") { case 0: return 2; case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; } return 0; }\n"+ // test 2277 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { default: return 0; case 0: return 2; case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; } return -1; }\n"+ // test 2278 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case 0: return 2; default: return 0; case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; } return -1; }\n"+ // test 2279 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case 0: return 2; case \"c\": return 3; default: return 0; case \"d\": return 4; case \"e\": return 5; } return -1; }\n"+ // test 2280 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case 0: return 2; case \"c\": return 3; case \"d\": return 4; default: return 0; case \"e\": return 5; } return -1; }\n"+ // test 2281 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case 0: return 2; case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; default: return 0; } return -1; }\n"+ // test 2282 - "mixed b() { return 4; }", - - - "=mixed a() { switch(\"d\") { case 0: return 2; case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; } return 0; }\n"+ // test 2283 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { default: return 0; case 0: return 2; case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; } return -1; }\n"+ // test 2284 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case 0: return 2; default: return 0; case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; } return -1; }\n"+ // test 2285 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case 0: return 2; case \"c\": return 3; default: return 0; case \"e\": return 5; case \"d\": return 4; } return -1; }\n"+ // test 2286 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case 0: return 2; case \"c\": return 3; case \"e\": return 5; default: return 0; case \"d\": return 4; } return -1; }\n"+ // test 2287 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case 0: return 2; case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; default: return 0; } return -1; }\n"+ // test 2288 - "mixed b() { return 4; }", - - - - - "=mixed a() { switch(\"d\") { case 0: return 2; case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; } return 0; }\n"+ // test 2289 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { default: return 0; case 0: return 2; case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; } return -1; }\n"+ // test 2290 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case 0: return 2; default: return 0; case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; } return -1; }\n"+ // test 2291 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case 0: return 2; case \"d\": return 4; default: return 0; case \"c\": return 3; case \"e\": return 5; } return -1; }\n"+ // test 2292 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case 0: return 2; case \"d\": return 4; case \"c\": return 3; default: return 0; case \"e\": return 5; } return -1; }\n"+ // test 2293 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case 0: return 2; case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; default: return 0; } return -1; }\n"+ // test 2294 - "mixed b() { return 4; }", - - - "=mixed a() { switch(\"d\") { case 0: return 2; case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; } return 0; }\n"+ // test 2295 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { default: return 0; case 0: return 2; case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; } return -1; }\n"+ // test 2296 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case 0: return 2; default: return 0; case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; } return -1; }\n"+ // test 2297 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case 0: return 2; case \"d\": return 4; default: return 0; case \"e\": return 5; case \"c\": return 3; } return -1; }\n"+ // test 2298 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case 0: return 2; case \"d\": return 4; case \"e\": return 5; default: return 0; case \"c\": return 3; } return -1; }\n"+ // test 2299 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case 0: return 2; case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; default: return 0; } return -1; }\n"+ // test 2300 - "mixed b() { return 4; }", - - - - - "=mixed a() { switch(\"d\") { case 0: return 2; case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; } return 0; }\n"+ // test 2301 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { default: return 0; case 0: return 2; case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; } return -1; }\n"+ // test 2302 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case 0: return 2; default: return 0; case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; } return -1; }\n"+ // test 2303 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case 0: return 2; case \"e\": return 5; default: return 0; case \"d\": return 4; case \"c\": return 3; } return -1; }\n"+ // test 2304 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case 0: return 2; case \"e\": return 5; case \"d\": return 4; default: return 0; case \"c\": return 3; } return -1; }\n"+ // test 2305 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case 0: return 2; case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; default: return 0; } return -1; }\n"+ // test 2306 - "mixed b() { return 4; }", - - - "=mixed a() { switch(\"d\") { case 0: return 2; case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; } return 0; }\n"+ // test 2307 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { default: return 0; case 0: return 2; case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; } return -1; }\n"+ // test 2308 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case 0: return 2; default: return 0; case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; } return -1; }\n"+ // test 2309 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case 0: return 2; case \"e\": return 5; default: return 0; case \"c\": return 3; case \"d\": return 4; } return -1; }\n"+ // test 2310 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case 0: return 2; case \"e\": return 5; case \"c\": return 3; default: return 0; case \"d\": return 4; } return -1; }\n"+ // test 2311 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case 0: return 2; case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; default: return 0; } return -1; }\n"+ // test 2312 - "mixed b() { return 4; }", - - - - - - - "=mixed a() { switch(\"d\") { case \"c\": return 3; case 0: return 2; case \"d\": return 4; case \"e\": return 5; } return 0; }\n"+ // test 2313 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { default: return 0; case \"c\": return 3; case 0: return 2; case \"d\": return 4; case \"e\": return 5; } return -1; }\n"+ // test 2314 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"c\": return 3; default: return 0; case 0: return 2; case \"d\": return 4; case \"e\": return 5; } return -1; }\n"+ // test 2315 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"c\": return 3; case 0: return 2; default: return 0; case \"d\": return 4; case \"e\": return 5; } return -1; }\n"+ // test 2316 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"c\": return 3; case 0: return 2; case \"d\": return 4; default: return 0; case \"e\": return 5; } return -1; }\n"+ // test 2317 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"c\": return 3; case 0: return 2; case \"d\": return 4; case \"e\": return 5; default: return 0; } return -1; }\n"+ // test 2318 - "mixed b() { return 4; }", - - - "=mixed a() { switch(\"d\") { case \"c\": return 3; case 0: return 2; case \"e\": return 5; case \"d\": return 4; } return 0; }\n"+ // test 2319 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { default: return 0; case \"c\": return 3; case 0: return 2; case \"e\": return 5; case \"d\": return 4; } return -1; }\n"+ // test 2320 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"c\": return 3; default: return 0; case 0: return 2; case \"e\": return 5; case \"d\": return 4; } return -1; }\n"+ // test 2321 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"c\": return 3; case 0: return 2; default: return 0; case \"e\": return 5; case \"d\": return 4; } return -1; }\n"+ // test 2322 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"c\": return 3; case 0: return 2; case \"e\": return 5; default: return 0; case \"d\": return 4; } return -1; }\n"+ // test 2323 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"c\": return 3; case 0: return 2; case \"e\": return 5; case \"d\": return 4; default: return 0; } return -1; }\n"+ // test 2324 - "mixed b() { return 4; }", - - - - - "=mixed a() { switch(\"d\") { case \"c\": return 3; case \"d\": return 4; case 0: return 2; case \"e\": return 5; } return 0; }\n"+ // test 2325 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { default: return 0; case \"c\": return 3; case \"d\": return 4; case 0: return 2; case \"e\": return 5; } return -1; }\n"+ // test 2326 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"c\": return 3; default: return 0; case \"d\": return 4; case 0: return 2; case \"e\": return 5; } return -1; }\n"+ // test 2327 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"c\": return 3; case \"d\": return 4; default: return 0; case 0: return 2; case \"e\": return 5; } return -1; }\n"+ // test 2328 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"c\": return 3; case \"d\": return 4; case 0: return 2; default: return 0; case \"e\": return 5; } return -1; }\n"+ // test 2329 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"c\": return 3; case \"d\": return 4; case 0: return 2; case \"e\": return 5; default: return 0; } return -1; }\n"+ // test 2330 - "mixed b() { return 4; }", - - - "=mixed a() { switch(\"d\") { case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; case 0: return 2; } return 0; }\n"+ // test 2331 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { default: return 0; case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; case 0: return 2; } return -1; }\n"+ // test 2332 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"c\": return 3; default: return 0; case \"d\": return 4; case \"e\": return 5; case 0: return 2; } return -1; }\n"+ // test 2333 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"c\": return 3; case \"d\": return 4; default: return 0; case \"e\": return 5; case 0: return 2; } return -1; }\n"+ // test 2334 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; default: return 0; case 0: return 2; } return -1; }\n"+ // test 2335 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; case 0: return 2; default: return 0; } return -1; }\n"+ // test 2336 - "mixed b() { return 4; }", - - - - - "=mixed a() { switch(\"d\") { case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; case 0: return 2; } return 0; }\n"+ // test 2337 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { default: return 0; case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; case 0: return 2; } return -1; }\n"+ // test 2338 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"c\": return 3; default: return 0; case \"e\": return 5; case \"d\": return 4; case 0: return 2; } return -1; }\n"+ // test 2339 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"c\": return 3; case \"e\": return 5; default: return 0; case \"d\": return 4; case 0: return 2; } return -1; }\n"+ // test 2340 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; default: return 0; case 0: return 2; } return -1; }\n"+ // test 2341 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; case 0: return 2; default: return 0; } return -1; }\n"+ // test 2342 - "mixed b() { return 4; }", - - - "=mixed a() { switch(\"d\") { case \"c\": return 3; case \"e\": return 5; case 0: return 2; case \"d\": return 4; } return 0; }\n"+ // test 2343 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { default: return 0; case \"c\": return 3; case \"e\": return 5; case 0: return 2; case \"d\": return 4; } return -1; }\n"+ // test 2344 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"c\": return 3; default: return 0; case \"e\": return 5; case 0: return 2; case \"d\": return 4; } return -1; }\n"+ // test 2345 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"c\": return 3; case \"e\": return 5; default: return 0; case 0: return 2; case \"d\": return 4; } return -1; }\n"+ // test 2346 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"c\": return 3; case \"e\": return 5; case 0: return 2; default: return 0; case \"d\": return 4; } return -1; }\n"+ // test 2347 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"c\": return 3; case \"e\": return 5; case 0: return 2; case \"d\": return 4; default: return 0; } return -1; }\n"+ // test 2348 - "mixed b() { return 4; }", - - - - - - - "=mixed a() { switch(\"d\") { case \"d\": return 4; case \"c\": return 3; case 0: return 2; case \"e\": return 5; } return 0; }\n"+ // test 2349 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { default: return 0; case \"d\": return 4; case \"c\": return 3; case 0: return 2; case \"e\": return 5; } return -1; }\n"+ // test 2350 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"d\": return 4; default: return 0; case \"c\": return 3; case 0: return 2; case \"e\": return 5; } return -1; }\n"+ // test 2351 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"d\": return 4; case \"c\": return 3; default: return 0; case 0: return 2; case \"e\": return 5; } return -1; }\n"+ // test 2352 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"d\": return 4; case \"c\": return 3; case 0: return 2; default: return 0; case \"e\": return 5; } return -1; }\n"+ // test 2353 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"d\": return 4; case \"c\": return 3; case 0: return 2; case \"e\": return 5; default: return 0; } return -1; }\n"+ // test 2354 - "mixed b() { return 4; }", - - - "=mixed a() { switch(\"d\") { case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; case 0: return 2; } return 0; }\n"+ // test 2355 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { default: return 0; case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; case 0: return 2; } return -1; }\n"+ // test 2356 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"d\": return 4; default: return 0; case \"c\": return 3; case \"e\": return 5; case 0: return 2; } return -1; }\n"+ // test 2357 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"d\": return 4; case \"c\": return 3; default: return 0; case \"e\": return 5; case 0: return 2; } return -1; }\n"+ // test 2358 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; default: return 0; case 0: return 2; } return -1; }\n"+ // test 2359 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; case 0: return 2; default: return 0; } return -1; }\n"+ // test 2360 - "mixed b() { return 4; }", - - - - - "=mixed a() { switch(\"d\") { case \"d\": return 4; case 0: return 2; case \"c\": return 3; case \"e\": return 5; } return 0; }\n"+ // test 2361 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { default: return 0; case \"d\": return 4; case 0: return 2; case \"c\": return 3; case \"e\": return 5; } return -1; }\n"+ // test 2362 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"d\": return 4; default: return 0; case 0: return 2; case \"c\": return 3; case \"e\": return 5; } return -1; }\n"+ // test 2363 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"d\": return 4; case 0: return 2; default: return 0; case \"c\": return 3; case \"e\": return 5; } return -1; }\n"+ // test 2364 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"d\": return 4; case 0: return 2; case \"c\": return 3; default: return 0; case \"e\": return 5; } return -1; }\n"+ // test 2365 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"d\": return 4; case 0: return 2; case \"c\": return 3; case \"e\": return 5; default: return 0; } return -1; }\n"+ // test 2366 - "mixed b() { return 4; }", - - - "=mixed a() { switch(\"d\") { case \"d\": return 4; case 0: return 2; case \"e\": return 5; case \"c\": return 3; } return 0; }\n"+ // test 2367 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { default: return 0; case \"d\": return 4; case 0: return 2; case \"e\": return 5; case \"c\": return 3; } return -1; }\n"+ // test 2368 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"d\": return 4; default: return 0; case 0: return 2; case \"e\": return 5; case \"c\": return 3; } return -1; }\n"+ // test 2369 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"d\": return 4; case 0: return 2; default: return 0; case \"e\": return 5; case \"c\": return 3; } return -1; }\n"+ // test 2370 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"d\": return 4; case 0: return 2; case \"e\": return 5; default: return 0; case \"c\": return 3; } return -1; }\n"+ // test 2371 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"d\": return 4; case 0: return 2; case \"e\": return 5; case \"c\": return 3; default: return 0; } return -1; }\n"+ // test 2372 - "mixed b() { return 4; }", - - - - - "=mixed a() { switch(\"d\") { case \"d\": return 4; case \"e\": return 5; case 0: return 2; case \"c\": return 3; } return 0; }\n"+ // test 2373 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { default: return 0; case \"d\": return 4; case \"e\": return 5; case 0: return 2; case \"c\": return 3; } return -1; }\n"+ // test 2374 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"d\": return 4; default: return 0; case \"e\": return 5; case 0: return 2; case \"c\": return 3; } return -1; }\n"+ // test 2375 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"d\": return 4; case \"e\": return 5; default: return 0; case 0: return 2; case \"c\": return 3; } return -1; }\n"+ // test 2376 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"d\": return 4; case \"e\": return 5; case 0: return 2; default: return 0; case \"c\": return 3; } return -1; }\n"+ // test 2377 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"d\": return 4; case \"e\": return 5; case 0: return 2; case \"c\": return 3; default: return 0; } return -1; }\n"+ // test 2378 - "mixed b() { return 4; }", - - - "=mixed a() { switch(\"d\") { case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; case 0: return 2; } return 0; }\n"+ // test 2379 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { default: return 0; case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; case 0: return 2; } return -1; }\n"+ // test 2380 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"d\": return 4; default: return 0; case \"e\": return 5; case \"c\": return 3; case 0: return 2; } return -1; }\n"+ // test 2381 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"d\": return 4; case \"e\": return 5; default: return 0; case \"c\": return 3; case 0: return 2; } return -1; }\n"+ // test 2382 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; default: return 0; case 0: return 2; } return -1; }\n"+ // test 2383 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; case 0: return 2; default: return 0; } return -1; }\n"+ // test 2384 - "mixed b() { return 4; }", - - - - - - - "=mixed a() { switch(\"d\") { case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; case 0: return 2; } return 0; }\n"+ // test 2385 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { default: return 0; case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; case 0: return 2; } return -1; }\n"+ // test 2386 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"e\": return 5; default: return 0; case \"c\": return 3; case \"d\": return 4; case 0: return 2; } return -1; }\n"+ // test 2387 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"e\": return 5; case \"c\": return 3; default: return 0; case \"d\": return 4; case 0: return 2; } return -1; }\n"+ // test 2388 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; default: return 0; case 0: return 2; } return -1; }\n"+ // test 2389 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; case 0: return 2; default: return 0; } return -1; }\n"+ // test 2390 - "mixed b() { return 4; }", - - - "=mixed a() { switch(\"d\") { case \"e\": return 5; case \"c\": return 3; case 0: return 2; case \"d\": return 4; } return 0; }\n"+ // test 2391 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { default: return 0; case \"e\": return 5; case \"c\": return 3; case 0: return 2; case \"d\": return 4; } return -1; }\n"+ // test 2392 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"e\": return 5; default: return 0; case \"c\": return 3; case 0: return 2; case \"d\": return 4; } return -1; }\n"+ // test 2393 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"e\": return 5; case \"c\": return 3; default: return 0; case 0: return 2; case \"d\": return 4; } return -1; }\n"+ // test 2394 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"e\": return 5; case \"c\": return 3; case 0: return 2; default: return 0; case \"d\": return 4; } return -1; }\n"+ // test 2395 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"e\": return 5; case \"c\": return 3; case 0: return 2; case \"d\": return 4; default: return 0; } return -1; }\n"+ // test 2396 - "mixed b() { return 4; }", - - - - - "=mixed a() { switch(\"d\") { case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; case 0: return 2; } return 0; }\n"+ // test 2397 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { default: return 0; case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; case 0: return 2; } return -1; }\n"+ // test 2398 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"e\": return 5; default: return 0; case \"d\": return 4; case \"c\": return 3; case 0: return 2; } return -1; }\n"+ // test 2399 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"e\": return 5; case \"d\": return 4; default: return 0; case \"c\": return 3; case 0: return 2; } return -1; }\n"+ // test 2400 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; default: return 0; case 0: return 2; } return -1; }\n"+ // test 2401 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; case 0: return 2; default: return 0; } return -1; }\n"+ // test 2402 - "mixed b() { return 4; }", - - - "=mixed a() { switch(\"d\") { case \"e\": return 5; case \"d\": return 4; case 0: return 2; case \"c\": return 3; } return 0; }\n"+ // test 2403 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { default: return 0; case \"e\": return 5; case \"d\": return 4; case 0: return 2; case \"c\": return 3; } return -1; }\n"+ // test 2404 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"e\": return 5; default: return 0; case \"d\": return 4; case 0: return 2; case \"c\": return 3; } return -1; }\n"+ // test 2405 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"e\": return 5; case \"d\": return 4; default: return 0; case 0: return 2; case \"c\": return 3; } return -1; }\n"+ // test 2406 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"e\": return 5; case \"d\": return 4; case 0: return 2; default: return 0; case \"c\": return 3; } return -1; }\n"+ // test 2407 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"e\": return 5; case \"d\": return 4; case 0: return 2; case \"c\": return 3; default: return 0; } return -1; }\n"+ // test 2408 - "mixed b() { return 4; }", - - - - - "=mixed a() { switch(\"d\") { case \"e\": return 5; case 0: return 2; case \"d\": return 4; case \"c\": return 3; } return 0; }\n"+ // test 2409 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { default: return 0; case \"e\": return 5; case 0: return 2; case \"d\": return 4; case \"c\": return 3; } return -1; }\n"+ // test 2410 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"e\": return 5; default: return 0; case 0: return 2; case \"d\": return 4; case \"c\": return 3; } return -1; }\n"+ // test 2411 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"e\": return 5; case 0: return 2; default: return 0; case \"d\": return 4; case \"c\": return 3; } return -1; }\n"+ // test 2412 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"e\": return 5; case 0: return 2; case \"d\": return 4; default: return 0; case \"c\": return 3; } return -1; }\n"+ // test 2413 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"e\": return 5; case 0: return 2; case \"d\": return 4; case \"c\": return 3; default: return 0; } return -1; }\n"+ // test 2414 - "mixed b() { return 4; }", - - - "=mixed a() { switch(\"d\") { case \"e\": return 5; case 0: return 2; case \"c\": return 3; case \"d\": return 4; } return 0; }\n"+ // test 2415 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { default: return 0; case \"e\": return 5; case 0: return 2; case \"c\": return 3; case \"d\": return 4; } return -1; }\n"+ // test 2416 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"e\": return 5; default: return 0; case 0: return 2; case \"c\": return 3; case \"d\": return 4; } return -1; }\n"+ // test 2417 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"e\": return 5; case 0: return 2; default: return 0; case \"c\": return 3; case \"d\": return 4; } return -1; }\n"+ // test 2418 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"e\": return 5; case 0: return 2; case \"c\": return 3; default: return 0; case \"d\": return 4; } return -1; }\n"+ // test 2419 - "mixed b() { return 4; }", - "=mixed a() { switch(\"d\") { case \"e\": return 5; case 0: return 2; case \"c\": return 3; case \"d\": return 4; default: return 0; } return -1; }\n"+ // test 2420 - "mixed b() { return 4; }", - - - - - - - - - "=mixed a() { switch(\"e\") { case 0: return 2; case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; } return 0; }\n"+ // test 2421 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { default: return 0; case 0: return 2; case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; } return -1; }\n"+ // test 2422 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case 0: return 2; default: return 0; case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; } return -1; }\n"+ // test 2423 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case 0: return 2; case \"c\": return 3; default: return 0; case \"d\": return 4; case \"e\": return 5; } return -1; }\n"+ // test 2424 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case 0: return 2; case \"c\": return 3; case \"d\": return 4; default: return 0; case \"e\": return 5; } return -1; }\n"+ // test 2425 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case 0: return 2; case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; default: return 0; } return -1; }\n"+ // test 2426 - "mixed b() { return 5; }", - - - "=mixed a() { switch(\"e\") { case 0: return 2; case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; } return 0; }\n"+ // test 2427 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { default: return 0; case 0: return 2; case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; } return -1; }\n"+ // test 2428 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case 0: return 2; default: return 0; case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; } return -1; }\n"+ // test 2429 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case 0: return 2; case \"c\": return 3; default: return 0; case \"e\": return 5; case \"d\": return 4; } return -1; }\n"+ // test 2430 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case 0: return 2; case \"c\": return 3; case \"e\": return 5; default: return 0; case \"d\": return 4; } return -1; }\n"+ // test 2431 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case 0: return 2; case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; default: return 0; } return -1; }\n"+ // test 2432 - "mixed b() { return 5; }", - - - - - "=mixed a() { switch(\"e\") { case 0: return 2; case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; } return 0; }\n"+ // test 2433 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { default: return 0; case 0: return 2; case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; } return -1; }\n"+ // test 2434 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case 0: return 2; default: return 0; case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; } return -1; }\n"+ // test 2435 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case 0: return 2; case \"d\": return 4; default: return 0; case \"c\": return 3; case \"e\": return 5; } return -1; }\n"+ // test 2436 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case 0: return 2; case \"d\": return 4; case \"c\": return 3; default: return 0; case \"e\": return 5; } return -1; }\n"+ // test 2437 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case 0: return 2; case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; default: return 0; } return -1; }\n"+ // test 2438 - "mixed b() { return 5; }", - - - "=mixed a() { switch(\"e\") { case 0: return 2; case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; } return 0; }\n"+ // test 2439 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { default: return 0; case 0: return 2; case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; } return -1; }\n"+ // test 2440 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case 0: return 2; default: return 0; case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; } return -1; }\n"+ // test 2441 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case 0: return 2; case \"d\": return 4; default: return 0; case \"e\": return 5; case \"c\": return 3; } return -1; }\n"+ // test 2442 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case 0: return 2; case \"d\": return 4; case \"e\": return 5; default: return 0; case \"c\": return 3; } return -1; }\n"+ // test 2443 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case 0: return 2; case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; default: return 0; } return -1; }\n"+ // test 2444 - "mixed b() { return 5; }", - - - - - "=mixed a() { switch(\"e\") { case 0: return 2; case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; } return 0; }\n"+ // test 2445 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { default: return 0; case 0: return 2; case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; } return -1; }\n"+ // test 2446 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case 0: return 2; default: return 0; case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; } return -1; }\n"+ // test 2447 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case 0: return 2; case \"e\": return 5; default: return 0; case \"d\": return 4; case \"c\": return 3; } return -1; }\n"+ // test 2448 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case 0: return 2; case \"e\": return 5; case \"d\": return 4; default: return 0; case \"c\": return 3; } return -1; }\n"+ // test 2449 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case 0: return 2; case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; default: return 0; } return -1; }\n"+ // test 2450 - "mixed b() { return 5; }", - - - "=mixed a() { switch(\"e\") { case 0: return 2; case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; } return 0; }\n"+ // test 2451 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { default: return 0; case 0: return 2; case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; } return -1; }\n"+ // test 2452 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case 0: return 2; default: return 0; case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; } return -1; }\n"+ // test 2453 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case 0: return 2; case \"e\": return 5; default: return 0; case \"c\": return 3; case \"d\": return 4; } return -1; }\n"+ // test 2454 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case 0: return 2; case \"e\": return 5; case \"c\": return 3; default: return 0; case \"d\": return 4; } return -1; }\n"+ // test 2455 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case 0: return 2; case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; default: return 0; } return -1; }\n"+ // test 2456 - "mixed b() { return 5; }", - - - - - - - "=mixed a() { switch(\"e\") { case \"c\": return 3; case 0: return 2; case \"d\": return 4; case \"e\": return 5; } return 0; }\n"+ // test 2457 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { default: return 0; case \"c\": return 3; case 0: return 2; case \"d\": return 4; case \"e\": return 5; } return -1; }\n"+ // test 2458 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"c\": return 3; default: return 0; case 0: return 2; case \"d\": return 4; case \"e\": return 5; } return -1; }\n"+ // test 2459 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"c\": return 3; case 0: return 2; default: return 0; case \"d\": return 4; case \"e\": return 5; } return -1; }\n"+ // test 2460 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"c\": return 3; case 0: return 2; case \"d\": return 4; default: return 0; case \"e\": return 5; } return -1; }\n"+ // test 2461 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"c\": return 3; case 0: return 2; case \"d\": return 4; case \"e\": return 5; default: return 0; } return -1; }\n"+ // test 2462 - "mixed b() { return 5; }", - - - "=mixed a() { switch(\"e\") { case \"c\": return 3; case 0: return 2; case \"e\": return 5; case \"d\": return 4; } return 0; }\n"+ // test 2463 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { default: return 0; case \"c\": return 3; case 0: return 2; case \"e\": return 5; case \"d\": return 4; } return -1; }\n"+ // test 2464 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"c\": return 3; default: return 0; case 0: return 2; case \"e\": return 5; case \"d\": return 4; } return -1; }\n"+ // test 2465 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"c\": return 3; case 0: return 2; default: return 0; case \"e\": return 5; case \"d\": return 4; } return -1; }\n"+ // test 2466 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"c\": return 3; case 0: return 2; case \"e\": return 5; default: return 0; case \"d\": return 4; } return -1; }\n"+ // test 2467 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"c\": return 3; case 0: return 2; case \"e\": return 5; case \"d\": return 4; default: return 0; } return -1; }\n"+ // test 2468 - "mixed b() { return 5; }", - - - - - "=mixed a() { switch(\"e\") { case \"c\": return 3; case \"d\": return 4; case 0: return 2; case \"e\": return 5; } return 0; }\n"+ // test 2469 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { default: return 0; case \"c\": return 3; case \"d\": return 4; case 0: return 2; case \"e\": return 5; } return -1; }\n"+ // test 2470 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"c\": return 3; default: return 0; case \"d\": return 4; case 0: return 2; case \"e\": return 5; } return -1; }\n"+ // test 2471 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"c\": return 3; case \"d\": return 4; default: return 0; case 0: return 2; case \"e\": return 5; } return -1; }\n"+ // test 2472 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"c\": return 3; case \"d\": return 4; case 0: return 2; default: return 0; case \"e\": return 5; } return -1; }\n"+ // test 2473 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"c\": return 3; case \"d\": return 4; case 0: return 2; case \"e\": return 5; default: return 0; } return -1; }\n"+ // test 2474 - "mixed b() { return 5; }", - - - "=mixed a() { switch(\"e\") { case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; case 0: return 2; } return 0; }\n"+ // test 2475 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { default: return 0; case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; case 0: return 2; } return -1; }\n"+ // test 2476 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"c\": return 3; default: return 0; case \"d\": return 4; case \"e\": return 5; case 0: return 2; } return -1; }\n"+ // test 2477 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"c\": return 3; case \"d\": return 4; default: return 0; case \"e\": return 5; case 0: return 2; } return -1; }\n"+ // test 2478 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; default: return 0; case 0: return 2; } return -1; }\n"+ // test 2479 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"c\": return 3; case \"d\": return 4; case \"e\": return 5; case 0: return 2; default: return 0; } return -1; }\n"+ // test 2480 - "mixed b() { return 5; }", - - - - - "=mixed a() { switch(\"e\") { case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; case 0: return 2; } return 0; }\n"+ // test 2481 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { default: return 0; case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; case 0: return 2; } return -1; }\n"+ // test 2482 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"c\": return 3; default: return 0; case \"e\": return 5; case \"d\": return 4; case 0: return 2; } return -1; }\n"+ // test 2483 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"c\": return 3; case \"e\": return 5; default: return 0; case \"d\": return 4; case 0: return 2; } return -1; }\n"+ // test 2484 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; default: return 0; case 0: return 2; } return -1; }\n"+ // test 2485 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"c\": return 3; case \"e\": return 5; case \"d\": return 4; case 0: return 2; default: return 0; } return -1; }\n"+ // test 2486 - "mixed b() { return 5; }", - - - "=mixed a() { switch(\"e\") { case \"c\": return 3; case \"e\": return 5; case 0: return 2; case \"d\": return 4; } return 0; }\n"+ // test 2487 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { default: return 0; case \"c\": return 3; case \"e\": return 5; case 0: return 2; case \"d\": return 4; } return -1; }\n"+ // test 2488 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"c\": return 3; default: return 0; case \"e\": return 5; case 0: return 2; case \"d\": return 4; } return -1; }\n"+ // test 2489 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"c\": return 3; case \"e\": return 5; default: return 0; case 0: return 2; case \"d\": return 4; } return -1; }\n"+ // test 2490 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"c\": return 3; case \"e\": return 5; case 0: return 2; default: return 0; case \"d\": return 4; } return -1; }\n"+ // test 2491 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"c\": return 3; case \"e\": return 5; case 0: return 2; case \"d\": return 4; default: return 0; } return -1; }\n"+ // test 2492 - "mixed b() { return 5; }", - - - - - - - "=mixed a() { switch(\"e\") { case \"d\": return 4; case \"c\": return 3; case 0: return 2; case \"e\": return 5; } return 0; }\n"+ // test 2493 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { default: return 0; case \"d\": return 4; case \"c\": return 3; case 0: return 2; case \"e\": return 5; } return -1; }\n"+ // test 2494 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"d\": return 4; default: return 0; case \"c\": return 3; case 0: return 2; case \"e\": return 5; } return -1; }\n"+ // test 2495 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"d\": return 4; case \"c\": return 3; default: return 0; case 0: return 2; case \"e\": return 5; } return -1; }\n"+ // test 2496 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"d\": return 4; case \"c\": return 3; case 0: return 2; default: return 0; case \"e\": return 5; } return -1; }\n"+ // test 2497 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"d\": return 4; case \"c\": return 3; case 0: return 2; case \"e\": return 5; default: return 0; } return -1; }\n"+ // test 2498 - "mixed b() { return 5; }", - - - "=mixed a() { switch(\"e\") { case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; case 0: return 2; } return 0; }\n"+ // test 2499 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { default: return 0; case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; case 0: return 2; } return -1; }\n"+ // test 2500 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"d\": return 4; default: return 0; case \"c\": return 3; case \"e\": return 5; case 0: return 2; } return -1; }\n"+ // test 2501 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"d\": return 4; case \"c\": return 3; default: return 0; case \"e\": return 5; case 0: return 2; } return -1; }\n"+ // test 2502 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; default: return 0; case 0: return 2; } return -1; }\n"+ // test 2503 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"d\": return 4; case \"c\": return 3; case \"e\": return 5; case 0: return 2; default: return 0; } return -1; }\n"+ // test 2504 - "mixed b() { return 5; }", - - - - - "=mixed a() { switch(\"e\") { case \"d\": return 4; case 0: return 2; case \"c\": return 3; case \"e\": return 5; } return 0; }\n"+ // test 2505 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { default: return 0; case \"d\": return 4; case 0: return 2; case \"c\": return 3; case \"e\": return 5; } return -1; }\n"+ // test 2506 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"d\": return 4; default: return 0; case 0: return 2; case \"c\": return 3; case \"e\": return 5; } return -1; }\n"+ // test 2507 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"d\": return 4; case 0: return 2; default: return 0; case \"c\": return 3; case \"e\": return 5; } return -1; }\n"+ // test 2508 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"d\": return 4; case 0: return 2; case \"c\": return 3; default: return 0; case \"e\": return 5; } return -1; }\n"+ // test 2509 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"d\": return 4; case 0: return 2; case \"c\": return 3; case \"e\": return 5; default: return 0; } return -1; }\n"+ // test 2510 - "mixed b() { return 5; }", - - - "=mixed a() { switch(\"e\") { case \"d\": return 4; case 0: return 2; case \"e\": return 5; case \"c\": return 3; } return 0; }\n"+ // test 2511 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { default: return 0; case \"d\": return 4; case 0: return 2; case \"e\": return 5; case \"c\": return 3; } return -1; }\n"+ // test 2512 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"d\": return 4; default: return 0; case 0: return 2; case \"e\": return 5; case \"c\": return 3; } return -1; }\n"+ // test 2513 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"d\": return 4; case 0: return 2; default: return 0; case \"e\": return 5; case \"c\": return 3; } return -1; }\n"+ // test 2514 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"d\": return 4; case 0: return 2; case \"e\": return 5; default: return 0; case \"c\": return 3; } return -1; }\n"+ // test 2515 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"d\": return 4; case 0: return 2; case \"e\": return 5; case \"c\": return 3; default: return 0; } return -1; }\n"+ // test 2516 - "mixed b() { return 5; }", - - - - - "=mixed a() { switch(\"e\") { case \"d\": return 4; case \"e\": return 5; case 0: return 2; case \"c\": return 3; } return 0; }\n"+ // test 2517 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { default: return 0; case \"d\": return 4; case \"e\": return 5; case 0: return 2; case \"c\": return 3; } return -1; }\n"+ // test 2518 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"d\": return 4; default: return 0; case \"e\": return 5; case 0: return 2; case \"c\": return 3; } return -1; }\n"+ // test 2519 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"d\": return 4; case \"e\": return 5; default: return 0; case 0: return 2; case \"c\": return 3; } return -1; }\n"+ // test 2520 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"d\": return 4; case \"e\": return 5; case 0: return 2; default: return 0; case \"c\": return 3; } return -1; }\n"+ // test 2521 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"d\": return 4; case \"e\": return 5; case 0: return 2; case \"c\": return 3; default: return 0; } return -1; }\n"+ // test 2522 - "mixed b() { return 5; }", - - - "=mixed a() { switch(\"e\") { case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; case 0: return 2; } return 0; }\n"+ // test 2523 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { default: return 0; case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; case 0: return 2; } return -1; }\n"+ // test 2524 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"d\": return 4; default: return 0; case \"e\": return 5; case \"c\": return 3; case 0: return 2; } return -1; }\n"+ // test 2525 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"d\": return 4; case \"e\": return 5; default: return 0; case \"c\": return 3; case 0: return 2; } return -1; }\n"+ // test 2526 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; default: return 0; case 0: return 2; } return -1; }\n"+ // test 2527 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"d\": return 4; case \"e\": return 5; case \"c\": return 3; case 0: return 2; default: return 0; } return -1; }\n"+ // test 2528 - "mixed b() { return 5; }", - - - - - - - "=mixed a() { switch(\"e\") { case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; case 0: return 2; } return 0; }\n"+ // test 2529 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { default: return 0; case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; case 0: return 2; } return -1; }\n"+ // test 2530 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"e\": return 5; default: return 0; case \"c\": return 3; case \"d\": return 4; case 0: return 2; } return -1; }\n"+ // test 2531 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"e\": return 5; case \"c\": return 3; default: return 0; case \"d\": return 4; case 0: return 2; } return -1; }\n"+ // test 2532 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; default: return 0; case 0: return 2; } return -1; }\n"+ // test 2533 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"e\": return 5; case \"c\": return 3; case \"d\": return 4; case 0: return 2; default: return 0; } return -1; }\n"+ // test 2534 - "mixed b() { return 5; }", - - - "=mixed a() { switch(\"e\") { case \"e\": return 5; case \"c\": return 3; case 0: return 2; case \"d\": return 4; } return 0; }\n"+ // test 2535 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { default: return 0; case \"e\": return 5; case \"c\": return 3; case 0: return 2; case \"d\": return 4; } return -1; }\n"+ // test 2536 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"e\": return 5; default: return 0; case \"c\": return 3; case 0: return 2; case \"d\": return 4; } return -1; }\n"+ // test 2537 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"e\": return 5; case \"c\": return 3; default: return 0; case 0: return 2; case \"d\": return 4; } return -1; }\n"+ // test 2538 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"e\": return 5; case \"c\": return 3; case 0: return 2; default: return 0; case \"d\": return 4; } return -1; }\n"+ // test 2539 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"e\": return 5; case \"c\": return 3; case 0: return 2; case \"d\": return 4; default: return 0; } return -1; }\n"+ // test 2540 - "mixed b() { return 5; }", - - - - - "=mixed a() { switch(\"e\") { case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; case 0: return 2; } return 0; }\n"+ // test 2541 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { default: return 0; case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; case 0: return 2; } return -1; }\n"+ // test 2542 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"e\": return 5; default: return 0; case \"d\": return 4; case \"c\": return 3; case 0: return 2; } return -1; }\n"+ // test 2543 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"e\": return 5; case \"d\": return 4; default: return 0; case \"c\": return 3; case 0: return 2; } return -1; }\n"+ // test 2544 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; default: return 0; case 0: return 2; } return -1; }\n"+ // test 2545 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"e\": return 5; case \"d\": return 4; case \"c\": return 3; case 0: return 2; default: return 0; } return -1; }\n"+ // test 2546 - "mixed b() { return 5; }", - - - "=mixed a() { switch(\"e\") { case \"e\": return 5; case \"d\": return 4; case 0: return 2; case \"c\": return 3; } return 0; }\n"+ // test 2547 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { default: return 0; case \"e\": return 5; case \"d\": return 4; case 0: return 2; case \"c\": return 3; } return -1; }\n"+ // test 2548 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"e\": return 5; default: return 0; case \"d\": return 4; case 0: return 2; case \"c\": return 3; } return -1; }\n"+ // test 2549 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"e\": return 5; case \"d\": return 4; default: return 0; case 0: return 2; case \"c\": return 3; } return -1; }\n"+ // test 2550 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"e\": return 5; case \"d\": return 4; case 0: return 2; default: return 0; case \"c\": return 3; } return -1; }\n"+ // test 2551 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"e\": return 5; case \"d\": return 4; case 0: return 2; case \"c\": return 3; default: return 0; } return -1; }\n"+ // test 2552 - "mixed b() { return 5; }", - - - - - "=mixed a() { switch(\"e\") { case \"e\": return 5; case 0: return 2; case \"d\": return 4; case \"c\": return 3; } return 0; }\n"+ // test 2553 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { default: return 0; case \"e\": return 5; case 0: return 2; case \"d\": return 4; case \"c\": return 3; } return -1; }\n"+ // test 2554 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"e\": return 5; default: return 0; case 0: return 2; case \"d\": return 4; case \"c\": return 3; } return -1; }\n"+ // test 2555 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"e\": return 5; case 0: return 2; default: return 0; case \"d\": return 4; case \"c\": return 3; } return -1; }\n"+ // test 2556 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"e\": return 5; case 0: return 2; case \"d\": return 4; default: return 0; case \"c\": return 3; } return -1; }\n"+ // test 2557 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"e\": return 5; case 0: return 2; case \"d\": return 4; case \"c\": return 3; default: return 0; } return -1; }\n"+ // test 2558 - "mixed b() { return 5; }", - - - "=mixed a() { switch(\"e\") { case \"e\": return 5; case 0: return 2; case \"c\": return 3; case \"d\": return 4; } return 0; }\n"+ // test 2559 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { default: return 0; case \"e\": return 5; case 0: return 2; case \"c\": return 3; case \"d\": return 4; } return -1; }\n"+ // test 2560 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"e\": return 5; default: return 0; case 0: return 2; case \"c\": return 3; case \"d\": return 4; } return -1; }\n"+ // test 2561 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"e\": return 5; case 0: return 2; default: return 0; case \"c\": return 3; case \"d\": return 4; } return -1; }\n"+ // test 2562 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"e\": return 5; case 0: return 2; case \"c\": return 3; default: return 0; case \"d\": return 4; } return -1; }\n"+ // test 2563 - "mixed b() { return 5; }", - "=mixed a() { switch(\"e\") { case \"e\": return 5; case 0: return 2; case \"c\": return 3; case \"d\": return 4; default: return 0; } return -1; }\n"+ // test 2564 - "mixed b() { return 5; }", - - - - - - - - - - - "=mixed a() { switch(1.0) { case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; } return 0; }\n"+ // test 2565 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { default: return 0; case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; } return -1; }\n"+ // test 2566 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 2.0: return 2; default: return 0; case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; } return -1; }\n"+ // test 2567 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 2.0: return 2; case 3.0: return 3; default: return 0; case 4.0: return 4; case 5.0: return 5; } return -1; }\n"+ // test 2568 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; default: return 0; case 5.0: return 5; } return -1; }\n"+ // test 2569 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; default: return 0; } return -1; }\n"+ // test 2570 - "mixed b() { return 0; }", - - - "=mixed a() { switch(1.0) { case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; } return 0; }\n"+ // test 2571 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { default: return 0; case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; } return -1; }\n"+ // test 2572 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 2.0: return 2; default: return 0; case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; } return -1; }\n"+ // test 2573 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 2.0: return 2; case 3.0: return 3; default: return 0; case 5.0: return 5; case 4.0: return 4; } return -1; }\n"+ // test 2574 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; default: return 0; case 4.0: return 4; } return -1; }\n"+ // test 2575 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; default: return 0; } return -1; }\n"+ // test 2576 - "mixed b() { return 0; }", - - - - - "=mixed a() { switch(1.0) { case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; } return 0; }\n"+ // test 2577 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { default: return 0; case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; } return -1; }\n"+ // test 2578 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 2.0: return 2; default: return 0; case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; } return -1; }\n"+ // test 2579 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 2.0: return 2; case 4.0: return 4; default: return 0; case 3.0: return 3; case 5.0: return 5; } return -1; }\n"+ // test 2580 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; default: return 0; case 5.0: return 5; } return -1; }\n"+ // test 2581 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; default: return 0; } return -1; }\n"+ // test 2582 - "mixed b() { return 0; }", - - - "=mixed a() { switch(1.0) { case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; } return 0; }\n"+ // test 2583 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { default: return 0; case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; } return -1; }\n"+ // test 2584 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 2.0: return 2; default: return 0; case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; } return -1; }\n"+ // test 2585 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 2.0: return 2; case 4.0: return 4; default: return 0; case 5.0: return 5; case 3.0: return 3; } return -1; }\n"+ // test 2586 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; default: return 0; case 3.0: return 3; } return -1; }\n"+ // test 2587 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; default: return 0; } return -1; }\n"+ // test 2588 - "mixed b() { return 0; }", - - - - - "=mixed a() { switch(1.0) { case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; } return 0; }\n"+ // test 2589 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { default: return 0; case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; } return -1; }\n"+ // test 2590 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 2.0: return 2; default: return 0; case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; } return -1; }\n"+ // test 2591 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 2.0: return 2; case 5.0: return 5; default: return 0; case 4.0: return 4; case 3.0: return 3; } return -1; }\n"+ // test 2592 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; default: return 0; case 3.0: return 3; } return -1; }\n"+ // test 2593 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; default: return 0; } return -1; }\n"+ // test 2594 - "mixed b() { return 0; }", - - - "=mixed a() { switch(1.0) { case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; } return 0; }\n"+ // test 2595 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { default: return 0; case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; } return -1; }\n"+ // test 2596 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 2.0: return 2; default: return 0; case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; } return -1; }\n"+ // test 2597 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 2.0: return 2; case 5.0: return 5; default: return 0; case 3.0: return 3; case 4.0: return 4; } return -1; }\n"+ // test 2598 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; default: return 0; case 4.0: return 4; } return -1; }\n"+ // test 2599 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; default: return 0; } return -1; }\n"+ // test 2600 - "mixed b() { return 0; }", - - - - - - - "=mixed a() { switch(1.0) { case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; } return 0; }\n"+ // test 2601 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { default: return 0; case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; } return -1; }\n"+ // test 2602 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 3.0: return 3; default: return 0; case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; } return -1; }\n"+ // test 2603 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 3.0: return 3; case 2.0: return 2; default: return 0; case 4.0: return 4; case 5.0: return 5; } return -1; }\n"+ // test 2604 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; default: return 0; case 5.0: return 5; } return -1; }\n"+ // test 2605 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; default: return 0; } return -1; }\n"+ // test 2606 - "mixed b() { return 0; }", - - - "=mixed a() { switch(1.0) { case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; } return 0; }\n"+ // test 2607 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { default: return 0; case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; } return -1; }\n"+ // test 2608 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 3.0: return 3; default: return 0; case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; } return -1; }\n"+ // test 2609 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 3.0: return 3; case 2.0: return 2; default: return 0; case 5.0: return 5; case 4.0: return 4; } return -1; }\n"+ // test 2610 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; default: return 0; case 4.0: return 4; } return -1; }\n"+ // test 2611 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; default: return 0; } return -1; }\n"+ // test 2612 - "mixed b() { return 0; }", - - - - - "=mixed a() { switch(1.0) { case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; } return 0; }\n"+ // test 2613 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { default: return 0; case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; } return -1; }\n"+ // test 2614 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 3.0: return 3; default: return 0; case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; } return -1; }\n"+ // test 2615 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 3.0: return 3; case 4.0: return 4; default: return 0; case 2.0: return 2; case 5.0: return 5; } return -1; }\n"+ // test 2616 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; default: return 0; case 5.0: return 5; } return -1; }\n"+ // test 2617 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; default: return 0; } return -1; }\n"+ // test 2618 - "mixed b() { return 0; }", - - - "=mixed a() { switch(1.0) { case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; } return 0; }\n"+ // test 2619 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { default: return 0; case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; } return -1; }\n"+ // test 2620 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 3.0: return 3; default: return 0; case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; } return -1; }\n"+ // test 2621 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 3.0: return 3; case 4.0: return 4; default: return 0; case 5.0: return 5; case 2.0: return 2; } return -1; }\n"+ // test 2622 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; default: return 0; case 2.0: return 2; } return -1; }\n"+ // test 2623 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; default: return 0; } return -1; }\n"+ // test 2624 - "mixed b() { return 0; }", - - - - - "=mixed a() { switch(1.0) { case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; } return 0; }\n"+ // test 2625 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { default: return 0; case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; } return -1; }\n"+ // test 2626 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 3.0: return 3; default: return 0; case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; } return -1; }\n"+ // test 2627 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 3.0: return 3; case 5.0: return 5; default: return 0; case 4.0: return 4; case 2.0: return 2; } return -1; }\n"+ // test 2628 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; default: return 0; case 2.0: return 2; } return -1; }\n"+ // test 2629 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; default: return 0; } return -1; }\n"+ // test 2630 - "mixed b() { return 0; }", - - - "=mixed a() { switch(1.0) { case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; } return 0; }\n"+ // test 2631 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { default: return 0; case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; } return -1; }\n"+ // test 2632 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 3.0: return 3; default: return 0; case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; } return -1; }\n"+ // test 2633 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 3.0: return 3; case 5.0: return 5; default: return 0; case 2.0: return 2; case 4.0: return 4; } return -1; }\n"+ // test 2634 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; default: return 0; case 4.0: return 4; } return -1; }\n"+ // test 2635 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; default: return 0; } return -1; }\n"+ // test 2636 - "mixed b() { return 0; }", - - - - - - - "=mixed a() { switch(1.0) { case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; } return 0; }\n"+ // test 2637 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { default: return 0; case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; } return -1; }\n"+ // test 2638 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 4.0: return 4; default: return 0; case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; } return -1; }\n"+ // test 2639 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 4.0: return 4; case 3.0: return 3; default: return 0; case 2.0: return 2; case 5.0: return 5; } return -1; }\n"+ // test 2640 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; default: return 0; case 5.0: return 5; } return -1; }\n"+ // test 2641 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; default: return 0; } return -1; }\n"+ // test 2642 - "mixed b() { return 0; }", - - - "=mixed a() { switch(1.0) { case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; } return 0; }\n"+ // test 2643 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { default: return 0; case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; } return -1; }\n"+ // test 2644 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 4.0: return 4; default: return 0; case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; } return -1; }\n"+ // test 2645 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 4.0: return 4; case 3.0: return 3; default: return 0; case 5.0: return 5; case 2.0: return 2; } return -1; }\n"+ // test 2646 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; default: return 0; case 2.0: return 2; } return -1; }\n"+ // test 2647 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; default: return 0; } return -1; }\n"+ // test 2648 - "mixed b() { return 0; }", - - - - - "=mixed a() { switch(1.0) { case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; } return 0; }\n"+ // test 2649 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { default: return 0; case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; } return -1; }\n"+ // test 2650 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 4.0: return 4; default: return 0; case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; } return -1; }\n"+ // test 2651 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 4.0: return 4; case 2.0: return 2; default: return 0; case 3.0: return 3; case 5.0: return 5; } return -1; }\n"+ // test 2652 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; default: return 0; case 5.0: return 5; } return -1; }\n"+ // test 2653 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; default: return 0; } return -1; }\n"+ // test 2654 - "mixed b() { return 0; }", - - - "=mixed a() { switch(1.0) { case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; } return 0; }\n"+ // test 2655 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { default: return 0; case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; } return -1; }\n"+ // test 2656 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 4.0: return 4; default: return 0; case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; } return -1; }\n"+ // test 2657 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 4.0: return 4; case 2.0: return 2; default: return 0; case 5.0: return 5; case 3.0: return 3; } return -1; }\n"+ // test 2658 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; default: return 0; case 3.0: return 3; } return -1; }\n"+ // test 2659 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; default: return 0; } return -1; }\n"+ // test 2660 - "mixed b() { return 0; }", - - - - - "=mixed a() { switch(1.0) { case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; } return 0; }\n"+ // test 2661 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { default: return 0; case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; } return -1; }\n"+ // test 2662 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 4.0: return 4; default: return 0; case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; } return -1; }\n"+ // test 2663 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 4.0: return 4; case 5.0: return 5; default: return 0; case 2.0: return 2; case 3.0: return 3; } return -1; }\n"+ // test 2664 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; default: return 0; case 3.0: return 3; } return -1; }\n"+ // test 2665 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; default: return 0; } return -1; }\n"+ // test 2666 - "mixed b() { return 0; }", - - - "=mixed a() { switch(1.0) { case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; } return 0; }\n"+ // test 2667 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { default: return 0; case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; } return -1; }\n"+ // test 2668 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 4.0: return 4; default: return 0; case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; } return -1; }\n"+ // test 2669 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 4.0: return 4; case 5.0: return 5; default: return 0; case 3.0: return 3; case 2.0: return 2; } return -1; }\n"+ // test 2670 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; default: return 0; case 2.0: return 2; } return -1; }\n"+ // test 2671 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; default: return 0; } return -1; }\n"+ // test 2672 - "mixed b() { return 0; }", - - - - - - - "=mixed a() { switch(1.0) { case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; } return 0; }\n"+ // test 2673 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { default: return 0; case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; } return -1; }\n"+ // test 2674 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 5.0: return 5; default: return 0; case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; } return -1; }\n"+ // test 2675 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 5.0: return 5; case 3.0: return 3; default: return 0; case 4.0: return 4; case 2.0: return 2; } return -1; }\n"+ // test 2676 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; default: return 0; case 2.0: return 2; } return -1; }\n"+ // test 2677 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; default: return 0; } return -1; }\n"+ // test 2678 - "mixed b() { return 0; }", - - - "=mixed a() { switch(1.0) { case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; } return 0; }\n"+ // test 2679 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { default: return 0; case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; } return -1; }\n"+ // test 2680 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 5.0: return 5; default: return 0; case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; } return -1; }\n"+ // test 2681 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 5.0: return 5; case 3.0: return 3; default: return 0; case 2.0: return 2; case 4.0: return 4; } return -1; }\n"+ // test 2682 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; default: return 0; case 4.0: return 4; } return -1; }\n"+ // test 2683 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; default: return 0; } return -1; }\n"+ // test 2684 - "mixed b() { return 0; }", - - - - - "=mixed a() { switch(1.0) { case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; } return 0; }\n"+ // test 2685 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { default: return 0; case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; } return -1; }\n"+ // test 2686 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 5.0: return 5; default: return 0; case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; } return -1; }\n"+ // test 2687 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 5.0: return 5; case 4.0: return 4; default: return 0; case 3.0: return 3; case 2.0: return 2; } return -1; }\n"+ // test 2688 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; default: return 0; case 2.0: return 2; } return -1; }\n"+ // test 2689 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; default: return 0; } return -1; }\n"+ // test 2690 - "mixed b() { return 0; }", - - - "=mixed a() { switch(1.0) { case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; } return 0; }\n"+ // test 2691 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { default: return 0; case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; } return -1; }\n"+ // test 2692 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 5.0: return 5; default: return 0; case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; } return -1; }\n"+ // test 2693 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 5.0: return 5; case 4.0: return 4; default: return 0; case 2.0: return 2; case 3.0: return 3; } return -1; }\n"+ // test 2694 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; default: return 0; case 3.0: return 3; } return -1; }\n"+ // test 2695 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; default: return 0; } return -1; }\n"+ // test 2696 - "mixed b() { return 0; }", - - - - - "=mixed a() { switch(1.0) { case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; } return 0; }\n"+ // test 2697 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { default: return 0; case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; } return -1; }\n"+ // test 2698 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 5.0: return 5; default: return 0; case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; } return -1; }\n"+ // test 2699 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 5.0: return 5; case 2.0: return 2; default: return 0; case 4.0: return 4; case 3.0: return 3; } return -1; }\n"+ // test 2700 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; default: return 0; case 3.0: return 3; } return -1; }\n"+ // test 2701 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; default: return 0; } return -1; }\n"+ // test 2702 - "mixed b() { return 0; }", - - - "=mixed a() { switch(1.0) { case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; } return 0; }\n"+ // test 2703 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { default: return 0; case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; } return -1; }\n"+ // test 2704 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 5.0: return 5; default: return 0; case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; } return -1; }\n"+ // test 2705 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 5.0: return 5; case 2.0: return 2; default: return 0; case 3.0: return 3; case 4.0: return 4; } return -1; }\n"+ // test 2706 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; default: return 0; case 4.0: return 4; } return -1; }\n"+ // test 2707 - "mixed b() { return 0; }", - "=mixed a() { switch(1.0) { case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; default: return 0; } return -1; }\n"+ // test 2708 - "mixed b() { return 0; }", - - - - - - - - - "=mixed a() { switch(2.0) { case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; } return 0; }\n"+ // test 2709 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { default: return 0; case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; } return -1; }\n"+ // test 2710 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 2.0: return 2; default: return 0; case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; } return -1; }\n"+ // test 2711 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 2.0: return 2; case 3.0: return 3; default: return 0; case 4.0: return 4; case 5.0: return 5; } return -1; }\n"+ // test 2712 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; default: return 0; case 5.0: return 5; } return -1; }\n"+ // test 2713 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; default: return 0; } return -1; }\n"+ // test 2714 - "mixed b() { return 2; }", - - - "=mixed a() { switch(2.0) { case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; } return 0; }\n"+ // test 2715 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { default: return 0; case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; } return -1; }\n"+ // test 2716 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 2.0: return 2; default: return 0; case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; } return -1; }\n"+ // test 2717 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 2.0: return 2; case 3.0: return 3; default: return 0; case 5.0: return 5; case 4.0: return 4; } return -1; }\n"+ // test 2718 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; default: return 0; case 4.0: return 4; } return -1; }\n"+ // test 2719 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; default: return 0; } return -1; }\n"+ // test 2720 - "mixed b() { return 2; }", - - - - - "=mixed a() { switch(2.0) { case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; } return 0; }\n"+ // test 2721 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { default: return 0; case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; } return -1; }\n"+ // test 2722 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 2.0: return 2; default: return 0; case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; } return -1; }\n"+ // test 2723 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 2.0: return 2; case 4.0: return 4; default: return 0; case 3.0: return 3; case 5.0: return 5; } return -1; }\n"+ // test 2724 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; default: return 0; case 5.0: return 5; } return -1; }\n"+ // test 2725 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; default: return 0; } return -1; }\n"+ // test 2726 - "mixed b() { return 2; }", - - - "=mixed a() { switch(2.0) { case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; } return 0; }\n"+ // test 2727 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { default: return 0; case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; } return -1; }\n"+ // test 2728 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 2.0: return 2; default: return 0; case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; } return -1; }\n"+ // test 2729 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 2.0: return 2; case 4.0: return 4; default: return 0; case 5.0: return 5; case 3.0: return 3; } return -1; }\n"+ // test 2730 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; default: return 0; case 3.0: return 3; } return -1; }\n"+ // test 2731 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; default: return 0; } return -1; }\n"+ // test 2732 - "mixed b() { return 2; }", - - - - - "=mixed a() { switch(2.0) { case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; } return 0; }\n"+ // test 2733 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { default: return 0; case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; } return -1; }\n"+ // test 2734 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 2.0: return 2; default: return 0; case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; } return -1; }\n"+ // test 2735 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 2.0: return 2; case 5.0: return 5; default: return 0; case 4.0: return 4; case 3.0: return 3; } return -1; }\n"+ // test 2736 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; default: return 0; case 3.0: return 3; } return -1; }\n"+ // test 2737 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; default: return 0; } return -1; }\n"+ // test 2738 - "mixed b() { return 2; }", - - - "=mixed a() { switch(2.0) { case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; } return 0; }\n"+ // test 2739 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { default: return 0; case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; } return -1; }\n"+ // test 2740 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 2.0: return 2; default: return 0; case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; } return -1; }\n"+ // test 2741 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 2.0: return 2; case 5.0: return 5; default: return 0; case 3.0: return 3; case 4.0: return 4; } return -1; }\n"+ // test 2742 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; default: return 0; case 4.0: return 4; } return -1; }\n"+ // test 2743 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; default: return 0; } return -1; }\n"+ // test 2744 - "mixed b() { return 2; }", - - - - - - - "=mixed a() { switch(2.0) { case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; } return 0; }\n"+ // test 2745 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { default: return 0; case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; } return -1; }\n"+ // test 2746 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 3.0: return 3; default: return 0; case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; } return -1; }\n"+ // test 2747 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 3.0: return 3; case 2.0: return 2; default: return 0; case 4.0: return 4; case 5.0: return 5; } return -1; }\n"+ // test 2748 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; default: return 0; case 5.0: return 5; } return -1; }\n"+ // test 2749 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; default: return 0; } return -1; }\n"+ // test 2750 - "mixed b() { return 2; }", - - - "=mixed a() { switch(2.0) { case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; } return 0; }\n"+ // test 2751 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { default: return 0; case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; } return -1; }\n"+ // test 2752 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 3.0: return 3; default: return 0; case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; } return -1; }\n"+ // test 2753 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 3.0: return 3; case 2.0: return 2; default: return 0; case 5.0: return 5; case 4.0: return 4; } return -1; }\n"+ // test 2754 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; default: return 0; case 4.0: return 4; } return -1; }\n"+ // test 2755 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; default: return 0; } return -1; }\n"+ // test 2756 - "mixed b() { return 2; }", - - - - - "=mixed a() { switch(2.0) { case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; } return 0; }\n"+ // test 2757 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { default: return 0; case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; } return -1; }\n"+ // test 2758 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 3.0: return 3; default: return 0; case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; } return -1; }\n"+ // test 2759 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 3.0: return 3; case 4.0: return 4; default: return 0; case 2.0: return 2; case 5.0: return 5; } return -1; }\n"+ // test 2760 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; default: return 0; case 5.0: return 5; } return -1; }\n"+ // test 2761 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; default: return 0; } return -1; }\n"+ // test 2762 - "mixed b() { return 2; }", - - - "=mixed a() { switch(2.0) { case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; } return 0; }\n"+ // test 2763 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { default: return 0; case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; } return -1; }\n"+ // test 2764 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 3.0: return 3; default: return 0; case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; } return -1; }\n"+ // test 2765 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 3.0: return 3; case 4.0: return 4; default: return 0; case 5.0: return 5; case 2.0: return 2; } return -1; }\n"+ // test 2766 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; default: return 0; case 2.0: return 2; } return -1; }\n"+ // test 2767 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; default: return 0; } return -1; }\n"+ // test 2768 - "mixed b() { return 2; }", - - - - - "=mixed a() { switch(2.0) { case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; } return 0; }\n"+ // test 2769 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { default: return 0; case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; } return -1; }\n"+ // test 2770 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 3.0: return 3; default: return 0; case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; } return -1; }\n"+ // test 2771 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 3.0: return 3; case 5.0: return 5; default: return 0; case 4.0: return 4; case 2.0: return 2; } return -1; }\n"+ // test 2772 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; default: return 0; case 2.0: return 2; } return -1; }\n"+ // test 2773 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; default: return 0; } return -1; }\n"+ // test 2774 - "mixed b() { return 2; }", - - - "=mixed a() { switch(2.0) { case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; } return 0; }\n"+ // test 2775 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { default: return 0; case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; } return -1; }\n"+ // test 2776 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 3.0: return 3; default: return 0; case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; } return -1; }\n"+ // test 2777 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 3.0: return 3; case 5.0: return 5; default: return 0; case 2.0: return 2; case 4.0: return 4; } return -1; }\n"+ // test 2778 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; default: return 0; case 4.0: return 4; } return -1; }\n"+ // test 2779 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; default: return 0; } return -1; }\n"+ // test 2780 - "mixed b() { return 2; }", - - - - - - - "=mixed a() { switch(2.0) { case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; } return 0; }\n"+ // test 2781 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { default: return 0; case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; } return -1; }\n"+ // test 2782 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 4.0: return 4; default: return 0; case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; } return -1; }\n"+ // test 2783 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 4.0: return 4; case 3.0: return 3; default: return 0; case 2.0: return 2; case 5.0: return 5; } return -1; }\n"+ // test 2784 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; default: return 0; case 5.0: return 5; } return -1; }\n"+ // test 2785 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; default: return 0; } return -1; }\n"+ // test 2786 - "mixed b() { return 2; }", - - - "=mixed a() { switch(2.0) { case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; } return 0; }\n"+ // test 2787 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { default: return 0; case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; } return -1; }\n"+ // test 2788 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 4.0: return 4; default: return 0; case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; } return -1; }\n"+ // test 2789 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 4.0: return 4; case 3.0: return 3; default: return 0; case 5.0: return 5; case 2.0: return 2; } return -1; }\n"+ // test 2790 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; default: return 0; case 2.0: return 2; } return -1; }\n"+ // test 2791 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; default: return 0; } return -1; }\n"+ // test 2792 - "mixed b() { return 2; }", - - - - - "=mixed a() { switch(2.0) { case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; } return 0; }\n"+ // test 2793 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { default: return 0; case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; } return -1; }\n"+ // test 2794 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 4.0: return 4; default: return 0; case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; } return -1; }\n"+ // test 2795 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 4.0: return 4; case 2.0: return 2; default: return 0; case 3.0: return 3; case 5.0: return 5; } return -1; }\n"+ // test 2796 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; default: return 0; case 5.0: return 5; } return -1; }\n"+ // test 2797 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; default: return 0; } return -1; }\n"+ // test 2798 - "mixed b() { return 2; }", - - - "=mixed a() { switch(2.0) { case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; } return 0; }\n"+ // test 2799 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { default: return 0; case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; } return -1; }\n"+ // test 2800 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 4.0: return 4; default: return 0; case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; } return -1; }\n"+ // test 2801 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 4.0: return 4; case 2.0: return 2; default: return 0; case 5.0: return 5; case 3.0: return 3; } return -1; }\n"+ // test 2802 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; default: return 0; case 3.0: return 3; } return -1; }\n"+ // test 2803 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; default: return 0; } return -1; }\n"+ // test 2804 - "mixed b() { return 2; }", - - - - - "=mixed a() { switch(2.0) { case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; } return 0; }\n"+ // test 2805 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { default: return 0; case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; } return -1; }\n"+ // test 2806 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 4.0: return 4; default: return 0; case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; } return -1; }\n"+ // test 2807 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 4.0: return 4; case 5.0: return 5; default: return 0; case 2.0: return 2; case 3.0: return 3; } return -1; }\n"+ // test 2808 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; default: return 0; case 3.0: return 3; } return -1; }\n"+ // test 2809 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; default: return 0; } return -1; }\n"+ // test 2810 - "mixed b() { return 2; }", - - - "=mixed a() { switch(2.0) { case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; } return 0; }\n"+ // test 2811 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { default: return 0; case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; } return -1; }\n"+ // test 2812 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 4.0: return 4; default: return 0; case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; } return -1; }\n"+ // test 2813 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 4.0: return 4; case 5.0: return 5; default: return 0; case 3.0: return 3; case 2.0: return 2; } return -1; }\n"+ // test 2814 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; default: return 0; case 2.0: return 2; } return -1; }\n"+ // test 2815 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; default: return 0; } return -1; }\n"+ // test 2816 - "mixed b() { return 2; }", - - - - - - - "=mixed a() { switch(2.0) { case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; } return 0; }\n"+ // test 2817 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { default: return 0; case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; } return -1; }\n"+ // test 2818 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 5.0: return 5; default: return 0; case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; } return -1; }\n"+ // test 2819 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 5.0: return 5; case 3.0: return 3; default: return 0; case 4.0: return 4; case 2.0: return 2; } return -1; }\n"+ // test 2820 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; default: return 0; case 2.0: return 2; } return -1; }\n"+ // test 2821 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; default: return 0; } return -1; }\n"+ // test 2822 - "mixed b() { return 2; }", - - - "=mixed a() { switch(2.0) { case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; } return 0; }\n"+ // test 2823 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { default: return 0; case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; } return -1; }\n"+ // test 2824 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 5.0: return 5; default: return 0; case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; } return -1; }\n"+ // test 2825 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 5.0: return 5; case 3.0: return 3; default: return 0; case 2.0: return 2; case 4.0: return 4; } return -1; }\n"+ // test 2826 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; default: return 0; case 4.0: return 4; } return -1; }\n"+ // test 2827 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; default: return 0; } return -1; }\n"+ // test 2828 - "mixed b() { return 2; }", - - - - - "=mixed a() { switch(2.0) { case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; } return 0; }\n"+ // test 2829 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { default: return 0; case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; } return -1; }\n"+ // test 2830 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 5.0: return 5; default: return 0; case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; } return -1; }\n"+ // test 2831 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 5.0: return 5; case 4.0: return 4; default: return 0; case 3.0: return 3; case 2.0: return 2; } return -1; }\n"+ // test 2832 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; default: return 0; case 2.0: return 2; } return -1; }\n"+ // test 2833 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; default: return 0; } return -1; }\n"+ // test 2834 - "mixed b() { return 2; }", - - - "=mixed a() { switch(2.0) { case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; } return 0; }\n"+ // test 2835 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { default: return 0; case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; } return -1; }\n"+ // test 2836 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 5.0: return 5; default: return 0; case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; } return -1; }\n"+ // test 2837 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 5.0: return 5; case 4.0: return 4; default: return 0; case 2.0: return 2; case 3.0: return 3; } return -1; }\n"+ // test 2838 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; default: return 0; case 3.0: return 3; } return -1; }\n"+ // test 2839 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; default: return 0; } return -1; }\n"+ // test 2840 - "mixed b() { return 2; }", - - - - - "=mixed a() { switch(2.0) { case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; } return 0; }\n"+ // test 2841 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { default: return 0; case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; } return -1; }\n"+ // test 2842 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 5.0: return 5; default: return 0; case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; } return -1; }\n"+ // test 2843 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 5.0: return 5; case 2.0: return 2; default: return 0; case 4.0: return 4; case 3.0: return 3; } return -1; }\n"+ // test 2844 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; default: return 0; case 3.0: return 3; } return -1; }\n"+ // test 2845 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; default: return 0; } return -1; }\n"+ // test 2846 - "mixed b() { return 2; }", - - - "=mixed a() { switch(2.0) { case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; } return 0; }\n"+ // test 2847 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { default: return 0; case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; } return -1; }\n"+ // test 2848 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 5.0: return 5; default: return 0; case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; } return -1; }\n"+ // test 2849 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 5.0: return 5; case 2.0: return 2; default: return 0; case 3.0: return 3; case 4.0: return 4; } return -1; }\n"+ // test 2850 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; default: return 0; case 4.0: return 4; } return -1; }\n"+ // test 2851 - "mixed b() { return 2; }", - "=mixed a() { switch(2.0) { case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; default: return 0; } return -1; }\n"+ // test 2852 - "mixed b() { return 2; }", - - - - - - - - - "=mixed a() { switch(3.0) { case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; } return 0; }\n"+ // test 2853 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { default: return 0; case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; } return -1; }\n"+ // test 2854 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 2.0: return 2; default: return 0; case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; } return -1; }\n"+ // test 2855 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 2.0: return 2; case 3.0: return 3; default: return 0; case 4.0: return 4; case 5.0: return 5; } return -1; }\n"+ // test 2856 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; default: return 0; case 5.0: return 5; } return -1; }\n"+ // test 2857 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; default: return 0; } return -1; }\n"+ // test 2858 - "mixed b() { return 3; }", - - - "=mixed a() { switch(3.0) { case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; } return 0; }\n"+ // test 2859 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { default: return 0; case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; } return -1; }\n"+ // test 2860 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 2.0: return 2; default: return 0; case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; } return -1; }\n"+ // test 2861 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 2.0: return 2; case 3.0: return 3; default: return 0; case 5.0: return 5; case 4.0: return 4; } return -1; }\n"+ // test 2862 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; default: return 0; case 4.0: return 4; } return -1; }\n"+ // test 2863 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; default: return 0; } return -1; }\n"+ // test 2864 - "mixed b() { return 3; }", - - - - - "=mixed a() { switch(3.0) { case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; } return 0; }\n"+ // test 2865 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { default: return 0; case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; } return -1; }\n"+ // test 2866 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 2.0: return 2; default: return 0; case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; } return -1; }\n"+ // test 2867 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 2.0: return 2; case 4.0: return 4; default: return 0; case 3.0: return 3; case 5.0: return 5; } return -1; }\n"+ // test 2868 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; default: return 0; case 5.0: return 5; } return -1; }\n"+ // test 2869 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; default: return 0; } return -1; }\n"+ // test 2870 - "mixed b() { return 3; }", - - - "=mixed a() { switch(3.0) { case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; } return 0; }\n"+ // test 2871 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { default: return 0; case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; } return -1; }\n"+ // test 2872 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 2.0: return 2; default: return 0; case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; } return -1; }\n"+ // test 2873 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 2.0: return 2; case 4.0: return 4; default: return 0; case 5.0: return 5; case 3.0: return 3; } return -1; }\n"+ // test 2874 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; default: return 0; case 3.0: return 3; } return -1; }\n"+ // test 2875 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; default: return 0; } return -1; }\n"+ // test 2876 - "mixed b() { return 3; }", - - - - - "=mixed a() { switch(3.0) { case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; } return 0; }\n"+ // test 2877 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { default: return 0; case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; } return -1; }\n"+ // test 2878 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 2.0: return 2; default: return 0; case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; } return -1; }\n"+ // test 2879 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 2.0: return 2; case 5.0: return 5; default: return 0; case 4.0: return 4; case 3.0: return 3; } return -1; }\n"+ // test 2880 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; default: return 0; case 3.0: return 3; } return -1; }\n"+ // test 2881 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; default: return 0; } return -1; }\n"+ // test 2882 - "mixed b() { return 3; }", - - - "=mixed a() { switch(3.0) { case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; } return 0; }\n"+ // test 2883 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { default: return 0; case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; } return -1; }\n"+ // test 2884 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 2.0: return 2; default: return 0; case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; } return -1; }\n"+ // test 2885 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 2.0: return 2; case 5.0: return 5; default: return 0; case 3.0: return 3; case 4.0: return 4; } return -1; }\n"+ // test 2886 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; default: return 0; case 4.0: return 4; } return -1; }\n"+ // test 2887 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; default: return 0; } return -1; }\n"+ // test 2888 - "mixed b() { return 3; }", - - - - - - - "=mixed a() { switch(3.0) { case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; } return 0; }\n"+ // test 2889 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { default: return 0; case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; } return -1; }\n"+ // test 2890 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 3.0: return 3; default: return 0; case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; } return -1; }\n"+ // test 2891 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 3.0: return 3; case 2.0: return 2; default: return 0; case 4.0: return 4; case 5.0: return 5; } return -1; }\n"+ // test 2892 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; default: return 0; case 5.0: return 5; } return -1; }\n"+ // test 2893 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; default: return 0; } return -1; }\n"+ // test 2894 - "mixed b() { return 3; }", - - - "=mixed a() { switch(3.0) { case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; } return 0; }\n"+ // test 2895 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { default: return 0; case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; } return -1; }\n"+ // test 2896 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 3.0: return 3; default: return 0; case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; } return -1; }\n"+ // test 2897 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 3.0: return 3; case 2.0: return 2; default: return 0; case 5.0: return 5; case 4.0: return 4; } return -1; }\n"+ // test 2898 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; default: return 0; case 4.0: return 4; } return -1; }\n"+ // test 2899 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; default: return 0; } return -1; }\n"+ // test 2900 - "mixed b() { return 3; }", - - - - - "=mixed a() { switch(3.0) { case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; } return 0; }\n"+ // test 2901 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { default: return 0; case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; } return -1; }\n"+ // test 2902 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 3.0: return 3; default: return 0; case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; } return -1; }\n"+ // test 2903 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 3.0: return 3; case 4.0: return 4; default: return 0; case 2.0: return 2; case 5.0: return 5; } return -1; }\n"+ // test 2904 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; default: return 0; case 5.0: return 5; } return -1; }\n"+ // test 2905 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; default: return 0; } return -1; }\n"+ // test 2906 - "mixed b() { return 3; }", - - - "=mixed a() { switch(3.0) { case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; } return 0; }\n"+ // test 2907 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { default: return 0; case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; } return -1; }\n"+ // test 2908 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 3.0: return 3; default: return 0; case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; } return -1; }\n"+ // test 2909 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 3.0: return 3; case 4.0: return 4; default: return 0; case 5.0: return 5; case 2.0: return 2; } return -1; }\n"+ // test 2910 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; default: return 0; case 2.0: return 2; } return -1; }\n"+ // test 2911 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; default: return 0; } return -1; }\n"+ // test 2912 - "mixed b() { return 3; }", - - - - - "=mixed a() { switch(3.0) { case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; } return 0; }\n"+ // test 2913 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { default: return 0; case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; } return -1; }\n"+ // test 2914 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 3.0: return 3; default: return 0; case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; } return -1; }\n"+ // test 2915 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 3.0: return 3; case 5.0: return 5; default: return 0; case 4.0: return 4; case 2.0: return 2; } return -1; }\n"+ // test 2916 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; default: return 0; case 2.0: return 2; } return -1; }\n"+ // test 2917 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; default: return 0; } return -1; }\n"+ // test 2918 - "mixed b() { return 3; }", - - - "=mixed a() { switch(3.0) { case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; } return 0; }\n"+ // test 2919 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { default: return 0; case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; } return -1; }\n"+ // test 2920 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 3.0: return 3; default: return 0; case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; } return -1; }\n"+ // test 2921 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 3.0: return 3; case 5.0: return 5; default: return 0; case 2.0: return 2; case 4.0: return 4; } return -1; }\n"+ // test 2922 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; default: return 0; case 4.0: return 4; } return -1; }\n"+ // test 2923 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; default: return 0; } return -1; }\n"+ // test 2924 - "mixed b() { return 3; }", - - - - - - - "=mixed a() { switch(3.0) { case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; } return 0; }\n"+ // test 2925 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { default: return 0; case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; } return -1; }\n"+ // test 2926 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 4.0: return 4; default: return 0; case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; } return -1; }\n"+ // test 2927 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 4.0: return 4; case 3.0: return 3; default: return 0; case 2.0: return 2; case 5.0: return 5; } return -1; }\n"+ // test 2928 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; default: return 0; case 5.0: return 5; } return -1; }\n"+ // test 2929 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; default: return 0; } return -1; }\n"+ // test 2930 - "mixed b() { return 3; }", - - - "=mixed a() { switch(3.0) { case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; } return 0; }\n"+ // test 2931 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { default: return 0; case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; } return -1; }\n"+ // test 2932 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 4.0: return 4; default: return 0; case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; } return -1; }\n"+ // test 2933 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 4.0: return 4; case 3.0: return 3; default: return 0; case 5.0: return 5; case 2.0: return 2; } return -1; }\n"+ // test 2934 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; default: return 0; case 2.0: return 2; } return -1; }\n"+ // test 2935 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; default: return 0; } return -1; }\n"+ // test 2936 - "mixed b() { return 3; }", - - - - - "=mixed a() { switch(3.0) { case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; } return 0; }\n"+ // test 2937 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { default: return 0; case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; } return -1; }\n"+ // test 2938 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 4.0: return 4; default: return 0; case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; } return -1; }\n"+ // test 2939 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 4.0: return 4; case 2.0: return 2; default: return 0; case 3.0: return 3; case 5.0: return 5; } return -1; }\n"+ // test 2940 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; default: return 0; case 5.0: return 5; } return -1; }\n"+ // test 2941 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; default: return 0; } return -1; }\n"+ // test 2942 - "mixed b() { return 3; }", - - - "=mixed a() { switch(3.0) { case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; } return 0; }\n"+ // test 2943 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { default: return 0; case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; } return -1; }\n"+ // test 2944 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 4.0: return 4; default: return 0; case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; } return -1; }\n"+ // test 2945 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 4.0: return 4; case 2.0: return 2; default: return 0; case 5.0: return 5; case 3.0: return 3; } return -1; }\n"+ // test 2946 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; default: return 0; case 3.0: return 3; } return -1; }\n"+ // test 2947 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; default: return 0; } return -1; }\n"+ // test 2948 - "mixed b() { return 3; }", - - - - - "=mixed a() { switch(3.0) { case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; } return 0; }\n"+ // test 2949 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { default: return 0; case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; } return -1; }\n"+ // test 2950 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 4.0: return 4; default: return 0; case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; } return -1; }\n"+ // test 2951 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 4.0: return 4; case 5.0: return 5; default: return 0; case 2.0: return 2; case 3.0: return 3; } return -1; }\n"+ // test 2952 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; default: return 0; case 3.0: return 3; } return -1; }\n"+ // test 2953 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; default: return 0; } return -1; }\n"+ // test 2954 - "mixed b() { return 3; }", - - - "=mixed a() { switch(3.0) { case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; } return 0; }\n"+ // test 2955 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { default: return 0; case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; } return -1; }\n"+ // test 2956 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 4.0: return 4; default: return 0; case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; } return -1; }\n"+ // test 2957 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 4.0: return 4; case 5.0: return 5; default: return 0; case 3.0: return 3; case 2.0: return 2; } return -1; }\n"+ // test 2958 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; default: return 0; case 2.0: return 2; } return -1; }\n"+ // test 2959 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; default: return 0; } return -1; }\n"+ // test 2960 - "mixed b() { return 3; }", - - - - - - - "=mixed a() { switch(3.0) { case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; } return 0; }\n"+ // test 2961 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { default: return 0; case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; } return -1; }\n"+ // test 2962 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 5.0: return 5; default: return 0; case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; } return -1; }\n"+ // test 2963 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 5.0: return 5; case 3.0: return 3; default: return 0; case 4.0: return 4; case 2.0: return 2; } return -1; }\n"+ // test 2964 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; default: return 0; case 2.0: return 2; } return -1; }\n"+ // test 2965 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; default: return 0; } return -1; }\n"+ // test 2966 - "mixed b() { return 3; }", - - - "=mixed a() { switch(3.0) { case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; } return 0; }\n"+ // test 2967 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { default: return 0; case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; } return -1; }\n"+ // test 2968 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 5.0: return 5; default: return 0; case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; } return -1; }\n"+ // test 2969 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 5.0: return 5; case 3.0: return 3; default: return 0; case 2.0: return 2; case 4.0: return 4; } return -1; }\n"+ // test 2970 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; default: return 0; case 4.0: return 4; } return -1; }\n"+ // test 2971 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; default: return 0; } return -1; }\n"+ // test 2972 - "mixed b() { return 3; }", - - - - - "=mixed a() { switch(3.0) { case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; } return 0; }\n"+ // test 2973 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { default: return 0; case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; } return -1; }\n"+ // test 2974 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 5.0: return 5; default: return 0; case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; } return -1; }\n"+ // test 2975 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 5.0: return 5; case 4.0: return 4; default: return 0; case 3.0: return 3; case 2.0: return 2; } return -1; }\n"+ // test 2976 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; default: return 0; case 2.0: return 2; } return -1; }\n"+ // test 2977 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; default: return 0; } return -1; }\n"+ // test 2978 - "mixed b() { return 3; }", - - - "=mixed a() { switch(3.0) { case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; } return 0; }\n"+ // test 2979 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { default: return 0; case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; } return -1; }\n"+ // test 2980 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 5.0: return 5; default: return 0; case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; } return -1; }\n"+ // test 2981 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 5.0: return 5; case 4.0: return 4; default: return 0; case 2.0: return 2; case 3.0: return 3; } return -1; }\n"+ // test 2982 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; default: return 0; case 3.0: return 3; } return -1; }\n"+ // test 2983 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; default: return 0; } return -1; }\n"+ // test 2984 - "mixed b() { return 3; }", - - - - - "=mixed a() { switch(3.0) { case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; } return 0; }\n"+ // test 2985 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { default: return 0; case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; } return -1; }\n"+ // test 2986 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 5.0: return 5; default: return 0; case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; } return -1; }\n"+ // test 2987 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 5.0: return 5; case 2.0: return 2; default: return 0; case 4.0: return 4; case 3.0: return 3; } return -1; }\n"+ // test 2988 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; default: return 0; case 3.0: return 3; } return -1; }\n"+ // test 2989 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; default: return 0; } return -1; }\n"+ // test 2990 - "mixed b() { return 3; }", - - - "=mixed a() { switch(3.0) { case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; } return 0; }\n"+ // test 2991 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { default: return 0; case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; } return -1; }\n"+ // test 2992 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 5.0: return 5; default: return 0; case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; } return -1; }\n"+ // test 2993 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 5.0: return 5; case 2.0: return 2; default: return 0; case 3.0: return 3; case 4.0: return 4; } return -1; }\n"+ // test 2994 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; default: return 0; case 4.0: return 4; } return -1; }\n"+ // test 2995 - "mixed b() { return 3; }", - "=mixed a() { switch(3.0) { case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; default: return 0; } return -1; }\n"+ // test 2996 - "mixed b() { return 3; }", - - - - - - - - - "=mixed a() { switch(4.0) { case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; } return 0; }\n"+ // test 2997 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { default: return 0; case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; } return -1; }\n"+ // test 2998 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 2.0: return 2; default: return 0; case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; } return -1; }\n"+ // test 2999 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 2.0: return 2; case 3.0: return 3; default: return 0; case 4.0: return 4; case 5.0: return 5; } return -1; }\n"+ // test 3000 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; default: return 0; case 5.0: return 5; } return -1; }\n"+ // test 3001 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; default: return 0; } return -1; }\n"+ // test 3002 - "mixed b() { return 4; }", - - - "=mixed a() { switch(4.0) { case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; } return 0; }\n"+ // test 3003 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { default: return 0; case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; } return -1; }\n"+ // test 3004 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 2.0: return 2; default: return 0; case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; } return -1; }\n"+ // test 3005 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 2.0: return 2; case 3.0: return 3; default: return 0; case 5.0: return 5; case 4.0: return 4; } return -1; }\n"+ // test 3006 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; default: return 0; case 4.0: return 4; } return -1; }\n"+ // test 3007 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; default: return 0; } return -1; }\n"+ // test 3008 - "mixed b() { return 4; }", - - - - - "=mixed a() { switch(4.0) { case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; } return 0; }\n"+ // test 3009 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { default: return 0; case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; } return -1; }\n"+ // test 3010 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 2.0: return 2; default: return 0; case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; } return -1; }\n"+ // test 3011 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 2.0: return 2; case 4.0: return 4; default: return 0; case 3.0: return 3; case 5.0: return 5; } return -1; }\n"+ // test 3012 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; default: return 0; case 5.0: return 5; } return -1; }\n"+ // test 3013 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; default: return 0; } return -1; }\n"+ // test 3014 - "mixed b() { return 4; }", - - - "=mixed a() { switch(4.0) { case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; } return 0; }\n"+ // test 3015 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { default: return 0; case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; } return -1; }\n"+ // test 3016 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 2.0: return 2; default: return 0; case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; } return -1; }\n"+ // test 3017 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 2.0: return 2; case 4.0: return 4; default: return 0; case 5.0: return 5; case 3.0: return 3; } return -1; }\n"+ // test 3018 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; default: return 0; case 3.0: return 3; } return -1; }\n"+ // test 3019 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; default: return 0; } return -1; }\n"+ // test 3020 - "mixed b() { return 4; }", - - - - - "=mixed a() { switch(4.0) { case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; } return 0; }\n"+ // test 3021 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { default: return 0; case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; } return -1; }\n"+ // test 3022 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 2.0: return 2; default: return 0; case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; } return -1; }\n"+ // test 3023 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 2.0: return 2; case 5.0: return 5; default: return 0; case 4.0: return 4; case 3.0: return 3; } return -1; }\n"+ // test 3024 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; default: return 0; case 3.0: return 3; } return -1; }\n"+ // test 3025 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; default: return 0; } return -1; }\n"+ // test 3026 - "mixed b() { return 4; }", - - - "=mixed a() { switch(4.0) { case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; } return 0; }\n"+ // test 3027 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { default: return 0; case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; } return -1; }\n"+ // test 3028 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 2.0: return 2; default: return 0; case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; } return -1; }\n"+ // test 3029 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 2.0: return 2; case 5.0: return 5; default: return 0; case 3.0: return 3; case 4.0: return 4; } return -1; }\n"+ // test 3030 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; default: return 0; case 4.0: return 4; } return -1; }\n"+ // test 3031 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; default: return 0; } return -1; }\n"+ // test 3032 - "mixed b() { return 4; }", - - - - - - - "=mixed a() { switch(4.0) { case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; } return 0; }\n"+ // test 3033 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { default: return 0; case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; } return -1; }\n"+ // test 3034 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 3.0: return 3; default: return 0; case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; } return -1; }\n"+ // test 3035 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 3.0: return 3; case 2.0: return 2; default: return 0; case 4.0: return 4; case 5.0: return 5; } return -1; }\n"+ // test 3036 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; default: return 0; case 5.0: return 5; } return -1; }\n"+ // test 3037 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; default: return 0; } return -1; }\n"+ // test 3038 - "mixed b() { return 4; }", - - - "=mixed a() { switch(4.0) { case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; } return 0; }\n"+ // test 3039 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { default: return 0; case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; } return -1; }\n"+ // test 3040 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 3.0: return 3; default: return 0; case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; } return -1; }\n"+ // test 3041 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 3.0: return 3; case 2.0: return 2; default: return 0; case 5.0: return 5; case 4.0: return 4; } return -1; }\n"+ // test 3042 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; default: return 0; case 4.0: return 4; } return -1; }\n"+ // test 3043 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; default: return 0; } return -1; }\n"+ // test 3044 - "mixed b() { return 4; }", - - - - - "=mixed a() { switch(4.0) { case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; } return 0; }\n"+ // test 3045 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { default: return 0; case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; } return -1; }\n"+ // test 3046 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 3.0: return 3; default: return 0; case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; } return -1; }\n"+ // test 3047 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 3.0: return 3; case 4.0: return 4; default: return 0; case 2.0: return 2; case 5.0: return 5; } return -1; }\n"+ // test 3048 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; default: return 0; case 5.0: return 5; } return -1; }\n"+ // test 3049 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; default: return 0; } return -1; }\n"+ // test 3050 - "mixed b() { return 4; }", - - - "=mixed a() { switch(4.0) { case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; } return 0; }\n"+ // test 3051 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { default: return 0; case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; } return -1; }\n"+ // test 3052 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 3.0: return 3; default: return 0; case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; } return -1; }\n"+ // test 3053 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 3.0: return 3; case 4.0: return 4; default: return 0; case 5.0: return 5; case 2.0: return 2; } return -1; }\n"+ // test 3054 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; default: return 0; case 2.0: return 2; } return -1; }\n"+ // test 3055 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; default: return 0; } return -1; }\n"+ // test 3056 - "mixed b() { return 4; }", - - - - - "=mixed a() { switch(4.0) { case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; } return 0; }\n"+ // test 3057 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { default: return 0; case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; } return -1; }\n"+ // test 3058 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 3.0: return 3; default: return 0; case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; } return -1; }\n"+ // test 3059 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 3.0: return 3; case 5.0: return 5; default: return 0; case 4.0: return 4; case 2.0: return 2; } return -1; }\n"+ // test 3060 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; default: return 0; case 2.0: return 2; } return -1; }\n"+ // test 3061 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; default: return 0; } return -1; }\n"+ // test 3062 - "mixed b() { return 4; }", - - - "=mixed a() { switch(4.0) { case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; } return 0; }\n"+ // test 3063 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { default: return 0; case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; } return -1; }\n"+ // test 3064 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 3.0: return 3; default: return 0; case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; } return -1; }\n"+ // test 3065 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 3.0: return 3; case 5.0: return 5; default: return 0; case 2.0: return 2; case 4.0: return 4; } return -1; }\n"+ // test 3066 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; default: return 0; case 4.0: return 4; } return -1; }\n"+ // test 3067 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; default: return 0; } return -1; }\n"+ // test 3068 - "mixed b() { return 4; }", - - - - - - - "=mixed a() { switch(4.0) { case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; } return 0; }\n"+ // test 3069 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { default: return 0; case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; } return -1; }\n"+ // test 3070 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 4.0: return 4; default: return 0; case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; } return -1; }\n"+ // test 3071 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 4.0: return 4; case 3.0: return 3; default: return 0; case 2.0: return 2; case 5.0: return 5; } return -1; }\n"+ // test 3072 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; default: return 0; case 5.0: return 5; } return -1; }\n"+ // test 3073 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; default: return 0; } return -1; }\n"+ // test 3074 - "mixed b() { return 4; }", - - - "=mixed a() { switch(4.0) { case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; } return 0; }\n"+ // test 3075 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { default: return 0; case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; } return -1; }\n"+ // test 3076 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 4.0: return 4; default: return 0; case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; } return -1; }\n"+ // test 3077 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 4.0: return 4; case 3.0: return 3; default: return 0; case 5.0: return 5; case 2.0: return 2; } return -1; }\n"+ // test 3078 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; default: return 0; case 2.0: return 2; } return -1; }\n"+ // test 3079 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; default: return 0; } return -1; }\n"+ // test 3080 - "mixed b() { return 4; }", - - - - - "=mixed a() { switch(4.0) { case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; } return 0; }\n"+ // test 3081 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { default: return 0; case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; } return -1; }\n"+ // test 3082 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 4.0: return 4; default: return 0; case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; } return -1; }\n"+ // test 3083 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 4.0: return 4; case 2.0: return 2; default: return 0; case 3.0: return 3; case 5.0: return 5; } return -1; }\n"+ // test 3084 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; default: return 0; case 5.0: return 5; } return -1; }\n"+ // test 3085 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; default: return 0; } return -1; }\n"+ // test 3086 - "mixed b() { return 4; }", - - - "=mixed a() { switch(4.0) { case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; } return 0; }\n"+ // test 3087 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { default: return 0; case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; } return -1; }\n"+ // test 3088 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 4.0: return 4; default: return 0; case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; } return -1; }\n"+ // test 3089 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 4.0: return 4; case 2.0: return 2; default: return 0; case 5.0: return 5; case 3.0: return 3; } return -1; }\n"+ // test 3090 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; default: return 0; case 3.0: return 3; } return -1; }\n"+ // test 3091 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; default: return 0; } return -1; }\n"+ // test 3092 - "mixed b() { return 4; }", - - - - - "=mixed a() { switch(4.0) { case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; } return 0; }\n"+ // test 3093 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { default: return 0; case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; } return -1; }\n"+ // test 3094 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 4.0: return 4; default: return 0; case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; } return -1; }\n"+ // test 3095 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 4.0: return 4; case 5.0: return 5; default: return 0; case 2.0: return 2; case 3.0: return 3; } return -1; }\n"+ // test 3096 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; default: return 0; case 3.0: return 3; } return -1; }\n"+ // test 3097 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; default: return 0; } return -1; }\n"+ // test 3098 - "mixed b() { return 4; }", - - - "=mixed a() { switch(4.0) { case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; } return 0; }\n"+ // test 3099 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { default: return 0; case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; } return -1; }\n"+ // test 3100 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 4.0: return 4; default: return 0; case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; } return -1; }\n"+ // test 3101 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 4.0: return 4; case 5.0: return 5; default: return 0; case 3.0: return 3; case 2.0: return 2; } return -1; }\n"+ // test 3102 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; default: return 0; case 2.0: return 2; } return -1; }\n"+ // test 3103 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; default: return 0; } return -1; }\n"+ // test 3104 - "mixed b() { return 4; }", - - - - - - - "=mixed a() { switch(4.0) { case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; } return 0; }\n"+ // test 3105 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { default: return 0; case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; } return -1; }\n"+ // test 3106 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 5.0: return 5; default: return 0; case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; } return -1; }\n"+ // test 3107 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 5.0: return 5; case 3.0: return 3; default: return 0; case 4.0: return 4; case 2.0: return 2; } return -1; }\n"+ // test 3108 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; default: return 0; case 2.0: return 2; } return -1; }\n"+ // test 3109 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; default: return 0; } return -1; }\n"+ // test 3110 - "mixed b() { return 4; }", - - - "=mixed a() { switch(4.0) { case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; } return 0; }\n"+ // test 3111 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { default: return 0; case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; } return -1; }\n"+ // test 3112 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 5.0: return 5; default: return 0; case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; } return -1; }\n"+ // test 3113 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 5.0: return 5; case 3.0: return 3; default: return 0; case 2.0: return 2; case 4.0: return 4; } return -1; }\n"+ // test 3114 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; default: return 0; case 4.0: return 4; } return -1; }\n"+ // test 3115 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; default: return 0; } return -1; }\n"+ // test 3116 - "mixed b() { return 4; }", - - - - - "=mixed a() { switch(4.0) { case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; } return 0; }\n"+ // test 3117 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { default: return 0; case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; } return -1; }\n"+ // test 3118 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 5.0: return 5; default: return 0; case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; } return -1; }\n"+ // test 3119 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 5.0: return 5; case 4.0: return 4; default: return 0; case 3.0: return 3; case 2.0: return 2; } return -1; }\n"+ // test 3120 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; default: return 0; case 2.0: return 2; } return -1; }\n"+ // test 3121 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; default: return 0; } return -1; }\n"+ // test 3122 - "mixed b() { return 4; }", - - - "=mixed a() { switch(4.0) { case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; } return 0; }\n"+ // test 3123 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { default: return 0; case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; } return -1; }\n"+ // test 3124 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 5.0: return 5; default: return 0; case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; } return -1; }\n"+ // test 3125 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 5.0: return 5; case 4.0: return 4; default: return 0; case 2.0: return 2; case 3.0: return 3; } return -1; }\n"+ // test 3126 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; default: return 0; case 3.0: return 3; } return -1; }\n"+ // test 3127 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; default: return 0; } return -1; }\n"+ // test 3128 - "mixed b() { return 4; }", - - - - - "=mixed a() { switch(4.0) { case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; } return 0; }\n"+ // test 3129 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { default: return 0; case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; } return -1; }\n"+ // test 3130 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 5.0: return 5; default: return 0; case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; } return -1; }\n"+ // test 3131 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 5.0: return 5; case 2.0: return 2; default: return 0; case 4.0: return 4; case 3.0: return 3; } return -1; }\n"+ // test 3132 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; default: return 0; case 3.0: return 3; } return -1; }\n"+ // test 3133 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; default: return 0; } return -1; }\n"+ // test 3134 - "mixed b() { return 4; }", - - - "=mixed a() { switch(4.0) { case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; } return 0; }\n"+ // test 3135 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { default: return 0; case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; } return -1; }\n"+ // test 3136 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 5.0: return 5; default: return 0; case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; } return -1; }\n"+ // test 3137 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 5.0: return 5; case 2.0: return 2; default: return 0; case 3.0: return 3; case 4.0: return 4; } return -1; }\n"+ // test 3138 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; default: return 0; case 4.0: return 4; } return -1; }\n"+ // test 3139 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; default: return 0; } return -1; }\n"+ // test 3140 - "mixed b() { return 4; }", - - - - - - - - - "=mixed a() { switch(5.0) { case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; } return 0; }\n"+ // test 3141 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { default: return 0; case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; } return -1; }\n"+ // test 3142 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 2.0: return 2; default: return 0; case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; } return -1; }\n"+ // test 3143 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 2.0: return 2; case 3.0: return 3; default: return 0; case 4.0: return 4; case 5.0: return 5; } return -1; }\n"+ // test 3144 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; default: return 0; case 5.0: return 5; } return -1; }\n"+ // test 3145 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; default: return 0; } return -1; }\n"+ // test 3146 - "mixed b() { return 5; }", - - - "=mixed a() { switch(5.0) { case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; } return 0; }\n"+ // test 3147 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { default: return 0; case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; } return -1; }\n"+ // test 3148 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 2.0: return 2; default: return 0; case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; } return -1; }\n"+ // test 3149 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 2.0: return 2; case 3.0: return 3; default: return 0; case 5.0: return 5; case 4.0: return 4; } return -1; }\n"+ // test 3150 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; default: return 0; case 4.0: return 4; } return -1; }\n"+ // test 3151 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; default: return 0; } return -1; }\n"+ // test 3152 - "mixed b() { return 5; }", - - - - - "=mixed a() { switch(5.0) { case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; } return 0; }\n"+ // test 3153 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { default: return 0; case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; } return -1; }\n"+ // test 3154 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 2.0: return 2; default: return 0; case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; } return -1; }\n"+ // test 3155 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 2.0: return 2; case 4.0: return 4; default: return 0; case 3.0: return 3; case 5.0: return 5; } return -1; }\n"+ // test 3156 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; default: return 0; case 5.0: return 5; } return -1; }\n"+ // test 3157 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; default: return 0; } return -1; }\n"+ // test 3158 - "mixed b() { return 5; }", - - - "=mixed a() { switch(5.0) { case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; } return 0; }\n"+ // test 3159 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { default: return 0; case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; } return -1; }\n"+ // test 3160 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 2.0: return 2; default: return 0; case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; } return -1; }\n"+ // test 3161 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 2.0: return 2; case 4.0: return 4; default: return 0; case 5.0: return 5; case 3.0: return 3; } return -1; }\n"+ // test 3162 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; default: return 0; case 3.0: return 3; } return -1; }\n"+ // test 3163 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; default: return 0; } return -1; }\n"+ // test 3164 - "mixed b() { return 5; }", - - - - - "=mixed a() { switch(5.0) { case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; } return 0; }\n"+ // test 3165 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { default: return 0; case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; } return -1; }\n"+ // test 3166 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 2.0: return 2; default: return 0; case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; } return -1; }\n"+ // test 3167 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 2.0: return 2; case 5.0: return 5; default: return 0; case 4.0: return 4; case 3.0: return 3; } return -1; }\n"+ // test 3168 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; default: return 0; case 3.0: return 3; } return -1; }\n"+ // test 3169 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; default: return 0; } return -1; }\n"+ // test 3170 - "mixed b() { return 5; }", - - - "=mixed a() { switch(5.0) { case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; } return 0; }\n"+ // test 3171 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { default: return 0; case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; } return -1; }\n"+ // test 3172 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 2.0: return 2; default: return 0; case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; } return -1; }\n"+ // test 3173 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 2.0: return 2; case 5.0: return 5; default: return 0; case 3.0: return 3; case 4.0: return 4; } return -1; }\n"+ // test 3174 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; default: return 0; case 4.0: return 4; } return -1; }\n"+ // test 3175 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; default: return 0; } return -1; }\n"+ // test 3176 - "mixed b() { return 5; }", - - - - - - - "=mixed a() { switch(5.0) { case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; } return 0; }\n"+ // test 3177 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { default: return 0; case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; } return -1; }\n"+ // test 3178 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 3.0: return 3; default: return 0; case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; } return -1; }\n"+ // test 3179 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 3.0: return 3; case 2.0: return 2; default: return 0; case 4.0: return 4; case 5.0: return 5; } return -1; }\n"+ // test 3180 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; default: return 0; case 5.0: return 5; } return -1; }\n"+ // test 3181 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; default: return 0; } return -1; }\n"+ // test 3182 - "mixed b() { return 5; }", - - - "=mixed a() { switch(5.0) { case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; } return 0; }\n"+ // test 3183 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { default: return 0; case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; } return -1; }\n"+ // test 3184 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 3.0: return 3; default: return 0; case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; } return -1; }\n"+ // test 3185 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 3.0: return 3; case 2.0: return 2; default: return 0; case 5.0: return 5; case 4.0: return 4; } return -1; }\n"+ // test 3186 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; default: return 0; case 4.0: return 4; } return -1; }\n"+ // test 3187 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; default: return 0; } return -1; }\n"+ // test 3188 - "mixed b() { return 5; }", - - - - - "=mixed a() { switch(5.0) { case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; } return 0; }\n"+ // test 3189 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { default: return 0; case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; } return -1; }\n"+ // test 3190 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 3.0: return 3; default: return 0; case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; } return -1; }\n"+ // test 3191 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 3.0: return 3; case 4.0: return 4; default: return 0; case 2.0: return 2; case 5.0: return 5; } return -1; }\n"+ // test 3192 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; default: return 0; case 5.0: return 5; } return -1; }\n"+ // test 3193 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; default: return 0; } return -1; }\n"+ // test 3194 - "mixed b() { return 5; }", - - - "=mixed a() { switch(5.0) { case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; } return 0; }\n"+ // test 3195 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { default: return 0; case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; } return -1; }\n"+ // test 3196 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 3.0: return 3; default: return 0; case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; } return -1; }\n"+ // test 3197 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 3.0: return 3; case 4.0: return 4; default: return 0; case 5.0: return 5; case 2.0: return 2; } return -1; }\n"+ // test 3198 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; default: return 0; case 2.0: return 2; } return -1; }\n"+ // test 3199 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; default: return 0; } return -1; }\n"+ // test 3200 - "mixed b() { return 5; }", - - - - - "=mixed a() { switch(5.0) { case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; } return 0; }\n"+ // test 3201 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { default: return 0; case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; } return -1; }\n"+ // test 3202 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 3.0: return 3; default: return 0; case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; } return -1; }\n"+ // test 3203 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 3.0: return 3; case 5.0: return 5; default: return 0; case 4.0: return 4; case 2.0: return 2; } return -1; }\n"+ // test 3204 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; default: return 0; case 2.0: return 2; } return -1; }\n"+ // test 3205 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; default: return 0; } return -1; }\n"+ // test 3206 - "mixed b() { return 5; }", - - - "=mixed a() { switch(5.0) { case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; } return 0; }\n"+ // test 3207 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { default: return 0; case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; } return -1; }\n"+ // test 3208 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 3.0: return 3; default: return 0; case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; } return -1; }\n"+ // test 3209 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 3.0: return 3; case 5.0: return 5; default: return 0; case 2.0: return 2; case 4.0: return 4; } return -1; }\n"+ // test 3210 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; default: return 0; case 4.0: return 4; } return -1; }\n"+ // test 3211 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; default: return 0; } return -1; }\n"+ // test 3212 - "mixed b() { return 5; }", - - - - - - - "=mixed a() { switch(5.0) { case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; } return 0; }\n"+ // test 3213 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { default: return 0; case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; } return -1; }\n"+ // test 3214 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 4.0: return 4; default: return 0; case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; } return -1; }\n"+ // test 3215 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 4.0: return 4; case 3.0: return 3; default: return 0; case 2.0: return 2; case 5.0: return 5; } return -1; }\n"+ // test 3216 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; default: return 0; case 5.0: return 5; } return -1; }\n"+ // test 3217 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; default: return 0; } return -1; }\n"+ // test 3218 - "mixed b() { return 5; }", - - - "=mixed a() { switch(5.0) { case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; } return 0; }\n"+ // test 3219 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { default: return 0; case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; } return -1; }\n"+ // test 3220 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 4.0: return 4; default: return 0; case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; } return -1; }\n"+ // test 3221 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 4.0: return 4; case 3.0: return 3; default: return 0; case 5.0: return 5; case 2.0: return 2; } return -1; }\n"+ // test 3222 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; default: return 0; case 2.0: return 2; } return -1; }\n"+ // test 3223 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; default: return 0; } return -1; }\n"+ // test 3224 - "mixed b() { return 5; }", - - - - - "=mixed a() { switch(5.0) { case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; } return 0; }\n"+ // test 3225 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { default: return 0; case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; } return -1; }\n"+ // test 3226 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 4.0: return 4; default: return 0; case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; } return -1; }\n"+ // test 3227 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 4.0: return 4; case 2.0: return 2; default: return 0; case 3.0: return 3; case 5.0: return 5; } return -1; }\n"+ // test 3228 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; default: return 0; case 5.0: return 5; } return -1; }\n"+ // test 3229 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; default: return 0; } return -1; }\n"+ // test 3230 - "mixed b() { return 5; }", - - - "=mixed a() { switch(5.0) { case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; } return 0; }\n"+ // test 3231 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { default: return 0; case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; } return -1; }\n"+ // test 3232 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 4.0: return 4; default: return 0; case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; } return -1; }\n"+ // test 3233 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 4.0: return 4; case 2.0: return 2; default: return 0; case 5.0: return 5; case 3.0: return 3; } return -1; }\n"+ // test 3234 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; default: return 0; case 3.0: return 3; } return -1; }\n"+ // test 3235 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; default: return 0; } return -1; }\n"+ // test 3236 - "mixed b() { return 5; }", - - - - - "=mixed a() { switch(5.0) { case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; } return 0; }\n"+ // test 3237 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { default: return 0; case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; } return -1; }\n"+ // test 3238 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 4.0: return 4; default: return 0; case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; } return -1; }\n"+ // test 3239 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 4.0: return 4; case 5.0: return 5; default: return 0; case 2.0: return 2; case 3.0: return 3; } return -1; }\n"+ // test 3240 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; default: return 0; case 3.0: return 3; } return -1; }\n"+ // test 3241 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; default: return 0; } return -1; }\n"+ // test 3242 - "mixed b() { return 5; }", - - - "=mixed a() { switch(5.0) { case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; } return 0; }\n"+ // test 3243 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { default: return 0; case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; } return -1; }\n"+ // test 3244 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 4.0: return 4; default: return 0; case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; } return -1; }\n"+ // test 3245 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 4.0: return 4; case 5.0: return 5; default: return 0; case 3.0: return 3; case 2.0: return 2; } return -1; }\n"+ // test 3246 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; default: return 0; case 2.0: return 2; } return -1; }\n"+ // test 3247 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; default: return 0; } return -1; }\n"+ // test 3248 - "mixed b() { return 5; }", - - - - - - - "=mixed a() { switch(5.0) { case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; } return 0; }\n"+ // test 3249 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { default: return 0; case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; } return -1; }\n"+ // test 3250 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 5.0: return 5; default: return 0; case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; } return -1; }\n"+ // test 3251 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 5.0: return 5; case 3.0: return 3; default: return 0; case 4.0: return 4; case 2.0: return 2; } return -1; }\n"+ // test 3252 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; default: return 0; case 2.0: return 2; } return -1; }\n"+ // test 3253 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; default: return 0; } return -1; }\n"+ // test 3254 - "mixed b() { return 5; }", - - - "=mixed a() { switch(5.0) { case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; } return 0; }\n"+ // test 3255 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { default: return 0; case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; } return -1; }\n"+ // test 3256 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 5.0: return 5; default: return 0; case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; } return -1; }\n"+ // test 3257 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 5.0: return 5; case 3.0: return 3; default: return 0; case 2.0: return 2; case 4.0: return 4; } return -1; }\n"+ // test 3258 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; default: return 0; case 4.0: return 4; } return -1; }\n"+ // test 3259 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; default: return 0; } return -1; }\n"+ // test 3260 - "mixed b() { return 5; }", - - - - - "=mixed a() { switch(5.0) { case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; } return 0; }\n"+ // test 3261 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { default: return 0; case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; } return -1; }\n"+ // test 3262 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 5.0: return 5; default: return 0; case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; } return -1; }\n"+ // test 3263 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 5.0: return 5; case 4.0: return 4; default: return 0; case 3.0: return 3; case 2.0: return 2; } return -1; }\n"+ // test 3264 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; default: return 0; case 2.0: return 2; } return -1; }\n"+ // test 3265 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; default: return 0; } return -1; }\n"+ // test 3266 - "mixed b() { return 5; }", - - - "=mixed a() { switch(5.0) { case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; } return 0; }\n"+ // test 3267 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { default: return 0; case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; } return -1; }\n"+ // test 3268 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 5.0: return 5; default: return 0; case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; } return -1; }\n"+ // test 3269 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 5.0: return 5; case 4.0: return 4; default: return 0; case 2.0: return 2; case 3.0: return 3; } return -1; }\n"+ // test 3270 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; default: return 0; case 3.0: return 3; } return -1; }\n"+ // test 3271 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; default: return 0; } return -1; }\n"+ // test 3272 - "mixed b() { return 5; }", - - - - - "=mixed a() { switch(5.0) { case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; } return 0; }\n"+ // test 3273 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { default: return 0; case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; } return -1; }\n"+ // test 3274 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 5.0: return 5; default: return 0; case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; } return -1; }\n"+ // test 3275 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 5.0: return 5; case 2.0: return 2; default: return 0; case 4.0: return 4; case 3.0: return 3; } return -1; }\n"+ // test 3276 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; default: return 0; case 3.0: return 3; } return -1; }\n"+ // test 3277 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; default: return 0; } return -1; }\n"+ // test 3278 - "mixed b() { return 5; }", - - - "=mixed a() { switch(5.0) { case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; } return 0; }\n"+ // test 3279 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { default: return 0; case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; } return -1; }\n"+ // test 3280 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 5.0: return 5; default: return 0; case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; } return -1; }\n"+ // test 3281 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 5.0: return 5; case 2.0: return 2; default: return 0; case 3.0: return 3; case 4.0: return 4; } return -1; }\n"+ // test 3282 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; default: return 0; case 4.0: return 4; } return -1; }\n"+ // test 3283 - "mixed b() { return 5; }", - "=mixed a() { switch(5.0) { case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; default: return 0; } return -1; }\n"+ // test 3284 - "mixed b() { return 5; }", - - - - - - - - - - - "=mixed a() { switch(this_object()) { case \"\": return 2; case 0: return 3; case 4.0: return 4; case 1: return 5; } return 0; }\n"+ // test 3285 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { default: return 0; case \"\": return 2; case 0: return 3; case 4.0: return 4; case 1: return 5; } return -1; }\n"+ // test 3286 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case \"\": return 2; default: return 0; case 0: return 3; case 4.0: return 4; case 1: return 5; } return -1; }\n"+ // test 3287 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case \"\": return 2; case 0: return 3; default: return 0; case 4.0: return 4; case 1: return 5; } return -1; }\n"+ // test 3288 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case \"\": return 2; case 0: return 3; case 4.0: return 4; default: return 0; case 1: return 5; } return -1; }\n"+ // test 3289 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case \"\": return 2; case 0: return 3; case 4.0: return 4; case 1: return 5; default: return 0; } return -1; }\n"+ // test 3290 - "mixed b() { return 0; }", - - - "=mixed a() { switch(this_object()) { case \"\": return 2; case 0: return 3; case 1: return 5; case 4.0: return 4; } return 0; }\n"+ // test 3291 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { default: return 0; case \"\": return 2; case 0: return 3; case 1: return 5; case 4.0: return 4; } return -1; }\n"+ // test 3292 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case \"\": return 2; default: return 0; case 0: return 3; case 1: return 5; case 4.0: return 4; } return -1; }\n"+ // test 3293 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case \"\": return 2; case 0: return 3; default: return 0; case 1: return 5; case 4.0: return 4; } return -1; }\n"+ // test 3294 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case \"\": return 2; case 0: return 3; case 1: return 5; default: return 0; case 4.0: return 4; } return -1; }\n"+ // test 3295 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case \"\": return 2; case 0: return 3; case 1: return 5; case 4.0: return 4; default: return 0; } return -1; }\n"+ // test 3296 - "mixed b() { return 0; }", - - - - - "=mixed a() { switch(this_object()) { case \"\": return 2; case 4.0: return 4; case 0: return 3; case 1: return 5; } return 0; }\n"+ // test 3297 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { default: return 0; case \"\": return 2; case 4.0: return 4; case 0: return 3; case 1: return 5; } return -1; }\n"+ // test 3298 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case \"\": return 2; default: return 0; case 4.0: return 4; case 0: return 3; case 1: return 5; } return -1; }\n"+ // test 3299 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case \"\": return 2; case 4.0: return 4; default: return 0; case 0: return 3; case 1: return 5; } return -1; }\n"+ // test 3300 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case \"\": return 2; case 4.0: return 4; case 0: return 3; default: return 0; case 1: return 5; } return -1; }\n"+ // test 3301 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case \"\": return 2; case 4.0: return 4; case 0: return 3; case 1: return 5; default: return 0; } return -1; }\n"+ // test 3302 - "mixed b() { return 0; }", - - - "=mixed a() { switch(this_object()) { case \"\": return 2; case 4.0: return 4; case 1: return 5; case 0: return 3; } return 0; }\n"+ // test 3303 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { default: return 0; case \"\": return 2; case 4.0: return 4; case 1: return 5; case 0: return 3; } return -1; }\n"+ // test 3304 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case \"\": return 2; default: return 0; case 4.0: return 4; case 1: return 5; case 0: return 3; } return -1; }\n"+ // test 3305 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case \"\": return 2; case 4.0: return 4; default: return 0; case 1: return 5; case 0: return 3; } return -1; }\n"+ // test 3306 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case \"\": return 2; case 4.0: return 4; case 1: return 5; default: return 0; case 0: return 3; } return -1; }\n"+ // test 3307 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case \"\": return 2; case 4.0: return 4; case 1: return 5; case 0: return 3; default: return 0; } return -1; }\n"+ // test 3308 - "mixed b() { return 0; }", - - - - - "=mixed a() { switch(this_object()) { case \"\": return 2; case 1: return 5; case 4.0: return 4; case 0: return 3; } return 0; }\n"+ // test 3309 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { default: return 0; case \"\": return 2; case 1: return 5; case 4.0: return 4; case 0: return 3; } return -1; }\n"+ // test 3310 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case \"\": return 2; default: return 0; case 1: return 5; case 4.0: return 4; case 0: return 3; } return -1; }\n"+ // test 3311 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case \"\": return 2; case 1: return 5; default: return 0; case 4.0: return 4; case 0: return 3; } return -1; }\n"+ // test 3312 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case \"\": return 2; case 1: return 5; case 4.0: return 4; default: return 0; case 0: return 3; } return -1; }\n"+ // test 3313 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case \"\": return 2; case 1: return 5; case 4.0: return 4; case 0: return 3; default: return 0; } return -1; }\n"+ // test 3314 - "mixed b() { return 0; }", - - - "=mixed a() { switch(this_object()) { case \"\": return 2; case 1: return 5; case 0: return 3; case 4.0: return 4; } return 0; }\n"+ // test 3315 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { default: return 0; case \"\": return 2; case 1: return 5; case 0: return 3; case 4.0: return 4; } return -1; }\n"+ // test 3316 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case \"\": return 2; default: return 0; case 1: return 5; case 0: return 3; case 4.0: return 4; } return -1; }\n"+ // test 3317 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case \"\": return 2; case 1: return 5; default: return 0; case 0: return 3; case 4.0: return 4; } return -1; }\n"+ // test 3318 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case \"\": return 2; case 1: return 5; case 0: return 3; default: return 0; case 4.0: return 4; } return -1; }\n"+ // test 3319 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case \"\": return 2; case 1: return 5; case 0: return 3; case 4.0: return 4; default: return 0; } return -1; }\n"+ // test 3320 - "mixed b() { return 0; }", - - - - - - - "=mixed a() { switch(this_object()) { case 0: return 3; case \"\": return 2; case 4.0: return 4; case 1: return 5; } return 0; }\n"+ // test 3321 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { default: return 0; case 0: return 3; case \"\": return 2; case 4.0: return 4; case 1: return 5; } return -1; }\n"+ // test 3322 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case 0: return 3; default: return 0; case \"\": return 2; case 4.0: return 4; case 1: return 5; } return -1; }\n"+ // test 3323 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case 0: return 3; case \"\": return 2; default: return 0; case 4.0: return 4; case 1: return 5; } return -1; }\n"+ // test 3324 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case 0: return 3; case \"\": return 2; case 4.0: return 4; default: return 0; case 1: return 5; } return -1; }\n"+ // test 3325 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case 0: return 3; case \"\": return 2; case 4.0: return 4; case 1: return 5; default: return 0; } return -1; }\n"+ // test 3326 - "mixed b() { return 0; }", - - - "=mixed a() { switch(this_object()) { case 0: return 3; case \"\": return 2; case 1: return 5; case 4.0: return 4; } return 0; }\n"+ // test 3327 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { default: return 0; case 0: return 3; case \"\": return 2; case 1: return 5; case 4.0: return 4; } return -1; }\n"+ // test 3328 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case 0: return 3; default: return 0; case \"\": return 2; case 1: return 5; case 4.0: return 4; } return -1; }\n"+ // test 3329 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case 0: return 3; case \"\": return 2; default: return 0; case 1: return 5; case 4.0: return 4; } return -1; }\n"+ // test 3330 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case 0: return 3; case \"\": return 2; case 1: return 5; default: return 0; case 4.0: return 4; } return -1; }\n"+ // test 3331 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case 0: return 3; case \"\": return 2; case 1: return 5; case 4.0: return 4; default: return 0; } return -1; }\n"+ // test 3332 - "mixed b() { return 0; }", - - - - - "=mixed a() { switch(this_object()) { case 0: return 3; case 4.0: return 4; case \"\": return 2; case 1: return 5; } return 0; }\n"+ // test 3333 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { default: return 0; case 0: return 3; case 4.0: return 4; case \"\": return 2; case 1: return 5; } return -1; }\n"+ // test 3334 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case 0: return 3; default: return 0; case 4.0: return 4; case \"\": return 2; case 1: return 5; } return -1; }\n"+ // test 3335 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case 0: return 3; case 4.0: return 4; default: return 0; case \"\": return 2; case 1: return 5; } return -1; }\n"+ // test 3336 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case 0: return 3; case 4.0: return 4; case \"\": return 2; default: return 0; case 1: return 5; } return -1; }\n"+ // test 3337 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case 0: return 3; case 4.0: return 4; case \"\": return 2; case 1: return 5; default: return 0; } return -1; }\n"+ // test 3338 - "mixed b() { return 0; }", - - - "=mixed a() { switch(this_object()) { case 0: return 3; case 4.0: return 4; case 1: return 5; case \"\": return 2; } return 0; }\n"+ // test 3339 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { default: return 0; case 0: return 3; case 4.0: return 4; case 1: return 5; case \"\": return 2; } return -1; }\n"+ // test 3340 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case 0: return 3; default: return 0; case 4.0: return 4; case 1: return 5; case \"\": return 2; } return -1; }\n"+ // test 3341 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case 0: return 3; case 4.0: return 4; default: return 0; case 1: return 5; case \"\": return 2; } return -1; }\n"+ // test 3342 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case 0: return 3; case 4.0: return 4; case 1: return 5; default: return 0; case \"\": return 2; } return -1; }\n"+ // test 3343 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case 0: return 3; case 4.0: return 4; case 1: return 5; case \"\": return 2; default: return 0; } return -1; }\n"+ // test 3344 - "mixed b() { return 0; }", - - - - - "=mixed a() { switch(this_object()) { case 0: return 3; case 1: return 5; case 4.0: return 4; case \"\": return 2; } return 0; }\n"+ // test 3345 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { default: return 0; case 0: return 3; case 1: return 5; case 4.0: return 4; case \"\": return 2; } return -1; }\n"+ // test 3346 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case 0: return 3; default: return 0; case 1: return 5; case 4.0: return 4; case \"\": return 2; } return -1; }\n"+ // test 3347 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case 0: return 3; case 1: return 5; default: return 0; case 4.0: return 4; case \"\": return 2; } return -1; }\n"+ // test 3348 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case 0: return 3; case 1: return 5; case 4.0: return 4; default: return 0; case \"\": return 2; } return -1; }\n"+ // test 3349 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case 0: return 3; case 1: return 5; case 4.0: return 4; case \"\": return 2; default: return 0; } return -1; }\n"+ // test 3350 - "mixed b() { return 0; }", - - - "=mixed a() { switch(this_object()) { case 0: return 3; case 1: return 5; case \"\": return 2; case 4.0: return 4; } return 0; }\n"+ // test 3351 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { default: return 0; case 0: return 3; case 1: return 5; case \"\": return 2; case 4.0: return 4; } return -1; }\n"+ // test 3352 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case 0: return 3; default: return 0; case 1: return 5; case \"\": return 2; case 4.0: return 4; } return -1; }\n"+ // test 3353 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case 0: return 3; case 1: return 5; default: return 0; case \"\": return 2; case 4.0: return 4; } return -1; }\n"+ // test 3354 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case 0: return 3; case 1: return 5; case \"\": return 2; default: return 0; case 4.0: return 4; } return -1; }\n"+ // test 3355 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case 0: return 3; case 1: return 5; case \"\": return 2; case 4.0: return 4; default: return 0; } return -1; }\n"+ // test 3356 - "mixed b() { return 0; }", - - - - - - - "=mixed a() { switch(this_object()) { case 4.0: return 4; case 0: return 3; case \"\": return 2; case 1: return 5; } return 0; }\n"+ // test 3357 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { default: return 0; case 4.0: return 4; case 0: return 3; case \"\": return 2; case 1: return 5; } return -1; }\n"+ // test 3358 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case 4.0: return 4; default: return 0; case 0: return 3; case \"\": return 2; case 1: return 5; } return -1; }\n"+ // test 3359 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case 4.0: return 4; case 0: return 3; default: return 0; case \"\": return 2; case 1: return 5; } return -1; }\n"+ // test 3360 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case 4.0: return 4; case 0: return 3; case \"\": return 2; default: return 0; case 1: return 5; } return -1; }\n"+ // test 3361 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case 4.0: return 4; case 0: return 3; case \"\": return 2; case 1: return 5; default: return 0; } return -1; }\n"+ // test 3362 - "mixed b() { return 0; }", - - - "=mixed a() { switch(this_object()) { case 4.0: return 4; case 0: return 3; case 1: return 5; case \"\": return 2; } return 0; }\n"+ // test 3363 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { default: return 0; case 4.0: return 4; case 0: return 3; case 1: return 5; case \"\": return 2; } return -1; }\n"+ // test 3364 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case 4.0: return 4; default: return 0; case 0: return 3; case 1: return 5; case \"\": return 2; } return -1; }\n"+ // test 3365 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case 4.0: return 4; case 0: return 3; default: return 0; case 1: return 5; case \"\": return 2; } return -1; }\n"+ // test 3366 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case 4.0: return 4; case 0: return 3; case 1: return 5; default: return 0; case \"\": return 2; } return -1; }\n"+ // test 3367 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case 4.0: return 4; case 0: return 3; case 1: return 5; case \"\": return 2; default: return 0; } return -1; }\n"+ // test 3368 - "mixed b() { return 0; }", - - - - - "=mixed a() { switch(this_object()) { case 4.0: return 4; case \"\": return 2; case 0: return 3; case 1: return 5; } return 0; }\n"+ // test 3369 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { default: return 0; case 4.0: return 4; case \"\": return 2; case 0: return 3; case 1: return 5; } return -1; }\n"+ // test 3370 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case 4.0: return 4; default: return 0; case \"\": return 2; case 0: return 3; case 1: return 5; } return -1; }\n"+ // test 3371 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case 4.0: return 4; case \"\": return 2; default: return 0; case 0: return 3; case 1: return 5; } return -1; }\n"+ // test 3372 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case 4.0: return 4; case \"\": return 2; case 0: return 3; default: return 0; case 1: return 5; } return -1; }\n"+ // test 3373 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case 4.0: return 4; case \"\": return 2; case 0: return 3; case 1: return 5; default: return 0; } return -1; }\n"+ // test 3374 - "mixed b() { return 0; }", - - - "=mixed a() { switch(this_object()) { case 4.0: return 4; case \"\": return 2; case 1: return 5; case 0: return 3; } return 0; }\n"+ // test 3375 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { default: return 0; case 4.0: return 4; case \"\": return 2; case 1: return 5; case 0: return 3; } return -1; }\n"+ // test 3376 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case 4.0: return 4; default: return 0; case \"\": return 2; case 1: return 5; case 0: return 3; } return -1; }\n"+ // test 3377 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case 4.0: return 4; case \"\": return 2; default: return 0; case 1: return 5; case 0: return 3; } return -1; }\n"+ // test 3378 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case 4.0: return 4; case \"\": return 2; case 1: return 5; default: return 0; case 0: return 3; } return -1; }\n"+ // test 3379 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case 4.0: return 4; case \"\": return 2; case 1: return 5; case 0: return 3; default: return 0; } return -1; }\n"+ // test 3380 - "mixed b() { return 0; }", - - - - - "=mixed a() { switch(this_object()) { case 4.0: return 4; case 1: return 5; case \"\": return 2; case 0: return 3; } return 0; }\n"+ // test 3381 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { default: return 0; case 4.0: return 4; case 1: return 5; case \"\": return 2; case 0: return 3; } return -1; }\n"+ // test 3382 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case 4.0: return 4; default: return 0; case 1: return 5; case \"\": return 2; case 0: return 3; } return -1; }\n"+ // test 3383 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case 4.0: return 4; case 1: return 5; default: return 0; case \"\": return 2; case 0: return 3; } return -1; }\n"+ // test 3384 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case 4.0: return 4; case 1: return 5; case \"\": return 2; default: return 0; case 0: return 3; } return -1; }\n"+ // test 3385 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case 4.0: return 4; case 1: return 5; case \"\": return 2; case 0: return 3; default: return 0; } return -1; }\n"+ // test 3386 - "mixed b() { return 0; }", - - - "=mixed a() { switch(this_object()) { case 4.0: return 4; case 1: return 5; case 0: return 3; case \"\": return 2; } return 0; }\n"+ // test 3387 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { default: return 0; case 4.0: return 4; case 1: return 5; case 0: return 3; case \"\": return 2; } return -1; }\n"+ // test 3388 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case 4.0: return 4; default: return 0; case 1: return 5; case 0: return 3; case \"\": return 2; } return -1; }\n"+ // test 3389 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case 4.0: return 4; case 1: return 5; default: return 0; case 0: return 3; case \"\": return 2; } return -1; }\n"+ // test 3390 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case 4.0: return 4; case 1: return 5; case 0: return 3; default: return 0; case \"\": return 2; } return -1; }\n"+ // test 3391 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case 4.0: return 4; case 1: return 5; case 0: return 3; case \"\": return 2; default: return 0; } return -1; }\n"+ // test 3392 - "mixed b() { return 0; }", - - - - - - - "=mixed a() { switch(this_object()) { case 1: return 5; case 0: return 3; case 4.0: return 4; case \"\": return 2; } return 0; }\n"+ // test 3393 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { default: return 0; case 1: return 5; case 0: return 3; case 4.0: return 4; case \"\": return 2; } return -1; }\n"+ // test 3394 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case 1: return 5; default: return 0; case 0: return 3; case 4.0: return 4; case \"\": return 2; } return -1; }\n"+ // test 3395 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case 1: return 5; case 0: return 3; default: return 0; case 4.0: return 4; case \"\": return 2; } return -1; }\n"+ // test 3396 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case 1: return 5; case 0: return 3; case 4.0: return 4; default: return 0; case \"\": return 2; } return -1; }\n"+ // test 3397 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case 1: return 5; case 0: return 3; case 4.0: return 4; case \"\": return 2; default: return 0; } return -1; }\n"+ // test 3398 - "mixed b() { return 0; }", - - - "=mixed a() { switch(this_object()) { case 1: return 5; case 0: return 3; case \"\": return 2; case 4.0: return 4; } return 0; }\n"+ // test 3399 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { default: return 0; case 1: return 5; case 0: return 3; case \"\": return 2; case 4.0: return 4; } return -1; }\n"+ // test 3400 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case 1: return 5; default: return 0; case 0: return 3; case \"\": return 2; case 4.0: return 4; } return -1; }\n"+ // test 3401 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case 1: return 5; case 0: return 3; default: return 0; case \"\": return 2; case 4.0: return 4; } return -1; }\n"+ // test 3402 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case 1: return 5; case 0: return 3; case \"\": return 2; default: return 0; case 4.0: return 4; } return -1; }\n"+ // test 3403 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case 1: return 5; case 0: return 3; case \"\": return 2; case 4.0: return 4; default: return 0; } return -1; }\n"+ // test 3404 - "mixed b() { return 0; }", - - - - - "=mixed a() { switch(this_object()) { case 1: return 5; case 4.0: return 4; case 0: return 3; case \"\": return 2; } return 0; }\n"+ // test 3405 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { default: return 0; case 1: return 5; case 4.0: return 4; case 0: return 3; case \"\": return 2; } return -1; }\n"+ // test 3406 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case 1: return 5; default: return 0; case 4.0: return 4; case 0: return 3; case \"\": return 2; } return -1; }\n"+ // test 3407 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case 1: return 5; case 4.0: return 4; default: return 0; case 0: return 3; case \"\": return 2; } return -1; }\n"+ // test 3408 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case 1: return 5; case 4.0: return 4; case 0: return 3; default: return 0; case \"\": return 2; } return -1; }\n"+ // test 3409 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case 1: return 5; case 4.0: return 4; case 0: return 3; case \"\": return 2; default: return 0; } return -1; }\n"+ // test 3410 - "mixed b() { return 0; }", - - - "=mixed a() { switch(this_object()) { case 1: return 5; case 4.0: return 4; case \"\": return 2; case 0: return 3; } return 0; }\n"+ // test 3411 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { default: return 0; case 1: return 5; case 4.0: return 4; case \"\": return 2; case 0: return 3; } return -1; }\n"+ // test 3412 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case 1: return 5; default: return 0; case 4.0: return 4; case \"\": return 2; case 0: return 3; } return -1; }\n"+ // test 3413 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case 1: return 5; case 4.0: return 4; default: return 0; case \"\": return 2; case 0: return 3; } return -1; }\n"+ // test 3414 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case 1: return 5; case 4.0: return 4; case \"\": return 2; default: return 0; case 0: return 3; } return -1; }\n"+ // test 3415 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case 1: return 5; case 4.0: return 4; case \"\": return 2; case 0: return 3; default: return 0; } return -1; }\n"+ // test 3416 - "mixed b() { return 0; }", - - - - - "=mixed a() { switch(this_object()) { case 1: return 5; case \"\": return 2; case 4.0: return 4; case 0: return 3; } return 0; }\n"+ // test 3417 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { default: return 0; case 1: return 5; case \"\": return 2; case 4.0: return 4; case 0: return 3; } return -1; }\n"+ // test 3418 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case 1: return 5; default: return 0; case \"\": return 2; case 4.0: return 4; case 0: return 3; } return -1; }\n"+ // test 3419 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case 1: return 5; case \"\": return 2; default: return 0; case 4.0: return 4; case 0: return 3; } return -1; }\n"+ // test 3420 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case 1: return 5; case \"\": return 2; case 4.0: return 4; default: return 0; case 0: return 3; } return -1; }\n"+ // test 3421 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case 1: return 5; case \"\": return 2; case 4.0: return 4; case 0: return 3; default: return 0; } return -1; }\n"+ // test 3422 - "mixed b() { return 0; }", - - - "=mixed a() { switch(this_object()) { case 1: return 5; case \"\": return 2; case 0: return 3; case 4.0: return 4; } return 0; }\n"+ // test 3423 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { default: return 0; case 1: return 5; case \"\": return 2; case 0: return 3; case 4.0: return 4; } return -1; }\n"+ // test 3424 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case 1: return 5; default: return 0; case \"\": return 2; case 0: return 3; case 4.0: return 4; } return -1; }\n"+ // test 3425 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case 1: return 5; case \"\": return 2; default: return 0; case 0: return 3; case 4.0: return 4; } return -1; }\n"+ // test 3426 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case 1: return 5; case \"\": return 2; case 0: return 3; default: return 0; case 4.0: return 4; } return -1; }\n"+ // test 3427 - "mixed b() { return 0; }", - "=mixed a() { switch(this_object()) { case 1: return 5; case \"\": return 2; case 0: return 3; case 4.0: return 4; default: return 0; } return -1; }\n"+ // test 3428 - "mixed b() { return 0; }", - - - - - - - - - "=mixed a() { switch(\"\") { case \"\": return 2; case 0: return 3; case 4.0: return 4; case 1: return 5; } return 0; }\n"+ // test 3429 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { default: return 0; case \"\": return 2; case 0: return 3; case 4.0: return 4; case 1: return 5; } return -1; }\n"+ // test 3430 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case \"\": return 2; default: return 0; case 0: return 3; case 4.0: return 4; case 1: return 5; } return -1; }\n"+ // test 3431 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case \"\": return 2; case 0: return 3; default: return 0; case 4.0: return 4; case 1: return 5; } return -1; }\n"+ // test 3432 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case \"\": return 2; case 0: return 3; case 4.0: return 4; default: return 0; case 1: return 5; } return -1; }\n"+ // test 3433 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case \"\": return 2; case 0: return 3; case 4.0: return 4; case 1: return 5; default: return 0; } return -1; }\n"+ // test 3434 - "mixed b() { return 2; }", - - - "=mixed a() { switch(\"\") { case \"\": return 2; case 0: return 3; case 1: return 5; case 4.0: return 4; } return 0; }\n"+ // test 3435 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { default: return 0; case \"\": return 2; case 0: return 3; case 1: return 5; case 4.0: return 4; } return -1; }\n"+ // test 3436 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case \"\": return 2; default: return 0; case 0: return 3; case 1: return 5; case 4.0: return 4; } return -1; }\n"+ // test 3437 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case \"\": return 2; case 0: return 3; default: return 0; case 1: return 5; case 4.0: return 4; } return -1; }\n"+ // test 3438 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case \"\": return 2; case 0: return 3; case 1: return 5; default: return 0; case 4.0: return 4; } return -1; }\n"+ // test 3439 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case \"\": return 2; case 0: return 3; case 1: return 5; case 4.0: return 4; default: return 0; } return -1; }\n"+ // test 3440 - "mixed b() { return 2; }", - - - - - "=mixed a() { switch(\"\") { case \"\": return 2; case 4.0: return 4; case 0: return 3; case 1: return 5; } return 0; }\n"+ // test 3441 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { default: return 0; case \"\": return 2; case 4.0: return 4; case 0: return 3; case 1: return 5; } return -1; }\n"+ // test 3442 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case \"\": return 2; default: return 0; case 4.0: return 4; case 0: return 3; case 1: return 5; } return -1; }\n"+ // test 3443 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case \"\": return 2; case 4.0: return 4; default: return 0; case 0: return 3; case 1: return 5; } return -1; }\n"+ // test 3444 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case \"\": return 2; case 4.0: return 4; case 0: return 3; default: return 0; case 1: return 5; } return -1; }\n"+ // test 3445 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case \"\": return 2; case 4.0: return 4; case 0: return 3; case 1: return 5; default: return 0; } return -1; }\n"+ // test 3446 - "mixed b() { return 2; }", - - - "=mixed a() { switch(\"\") { case \"\": return 2; case 4.0: return 4; case 1: return 5; case 0: return 3; } return 0; }\n"+ // test 3447 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { default: return 0; case \"\": return 2; case 4.0: return 4; case 1: return 5; case 0: return 3; } return -1; }\n"+ // test 3448 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case \"\": return 2; default: return 0; case 4.0: return 4; case 1: return 5; case 0: return 3; } return -1; }\n"+ // test 3449 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case \"\": return 2; case 4.0: return 4; default: return 0; case 1: return 5; case 0: return 3; } return -1; }\n"+ // test 3450 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case \"\": return 2; case 4.0: return 4; case 1: return 5; default: return 0; case 0: return 3; } return -1; }\n"+ // test 3451 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case \"\": return 2; case 4.0: return 4; case 1: return 5; case 0: return 3; default: return 0; } return -1; }\n"+ // test 3452 - "mixed b() { return 2; }", - - - - - "=mixed a() { switch(\"\") { case \"\": return 2; case 1: return 5; case 4.0: return 4; case 0: return 3; } return 0; }\n"+ // test 3453 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { default: return 0; case \"\": return 2; case 1: return 5; case 4.0: return 4; case 0: return 3; } return -1; }\n"+ // test 3454 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case \"\": return 2; default: return 0; case 1: return 5; case 4.0: return 4; case 0: return 3; } return -1; }\n"+ // test 3455 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case \"\": return 2; case 1: return 5; default: return 0; case 4.0: return 4; case 0: return 3; } return -1; }\n"+ // test 3456 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case \"\": return 2; case 1: return 5; case 4.0: return 4; default: return 0; case 0: return 3; } return -1; }\n"+ // test 3457 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case \"\": return 2; case 1: return 5; case 4.0: return 4; case 0: return 3; default: return 0; } return -1; }\n"+ // test 3458 - "mixed b() { return 2; }", - - - "=mixed a() { switch(\"\") { case \"\": return 2; case 1: return 5; case 0: return 3; case 4.0: return 4; } return 0; }\n"+ // test 3459 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { default: return 0; case \"\": return 2; case 1: return 5; case 0: return 3; case 4.0: return 4; } return -1; }\n"+ // test 3460 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case \"\": return 2; default: return 0; case 1: return 5; case 0: return 3; case 4.0: return 4; } return -1; }\n"+ // test 3461 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case \"\": return 2; case 1: return 5; default: return 0; case 0: return 3; case 4.0: return 4; } return -1; }\n"+ // test 3462 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case \"\": return 2; case 1: return 5; case 0: return 3; default: return 0; case 4.0: return 4; } return -1; }\n"+ // test 3463 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case \"\": return 2; case 1: return 5; case 0: return 3; case 4.0: return 4; default: return 0; } return -1; }\n"+ // test 3464 - "mixed b() { return 2; }", - - - - - - - "=mixed a() { switch(\"\") { case 0: return 3; case \"\": return 2; case 4.0: return 4; case 1: return 5; } return 0; }\n"+ // test 3465 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { default: return 0; case 0: return 3; case \"\": return 2; case 4.0: return 4; case 1: return 5; } return -1; }\n"+ // test 3466 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case 0: return 3; default: return 0; case \"\": return 2; case 4.0: return 4; case 1: return 5; } return -1; }\n"+ // test 3467 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case 0: return 3; case \"\": return 2; default: return 0; case 4.0: return 4; case 1: return 5; } return -1; }\n"+ // test 3468 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case 0: return 3; case \"\": return 2; case 4.0: return 4; default: return 0; case 1: return 5; } return -1; }\n"+ // test 3469 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case 0: return 3; case \"\": return 2; case 4.0: return 4; case 1: return 5; default: return 0; } return -1; }\n"+ // test 3470 - "mixed b() { return 2; }", - - - "=mixed a() { switch(\"\") { case 0: return 3; case \"\": return 2; case 1: return 5; case 4.0: return 4; } return 0; }\n"+ // test 3471 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { default: return 0; case 0: return 3; case \"\": return 2; case 1: return 5; case 4.0: return 4; } return -1; }\n"+ // test 3472 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case 0: return 3; default: return 0; case \"\": return 2; case 1: return 5; case 4.0: return 4; } return -1; }\n"+ // test 3473 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case 0: return 3; case \"\": return 2; default: return 0; case 1: return 5; case 4.0: return 4; } return -1; }\n"+ // test 3474 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case 0: return 3; case \"\": return 2; case 1: return 5; default: return 0; case 4.0: return 4; } return -1; }\n"+ // test 3475 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case 0: return 3; case \"\": return 2; case 1: return 5; case 4.0: return 4; default: return 0; } return -1; }\n"+ // test 3476 - "mixed b() { return 2; }", - - - - - "=mixed a() { switch(\"\") { case 0: return 3; case 4.0: return 4; case \"\": return 2; case 1: return 5; } return 0; }\n"+ // test 3477 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { default: return 0; case 0: return 3; case 4.0: return 4; case \"\": return 2; case 1: return 5; } return -1; }\n"+ // test 3478 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case 0: return 3; default: return 0; case 4.0: return 4; case \"\": return 2; case 1: return 5; } return -1; }\n"+ // test 3479 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case 0: return 3; case 4.0: return 4; default: return 0; case \"\": return 2; case 1: return 5; } return -1; }\n"+ // test 3480 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case 0: return 3; case 4.0: return 4; case \"\": return 2; default: return 0; case 1: return 5; } return -1; }\n"+ // test 3481 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case 0: return 3; case 4.0: return 4; case \"\": return 2; case 1: return 5; default: return 0; } return -1; }\n"+ // test 3482 - "mixed b() { return 2; }", - - - "=mixed a() { switch(\"\") { case 0: return 3; case 4.0: return 4; case 1: return 5; case \"\": return 2; } return 0; }\n"+ // test 3483 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { default: return 0; case 0: return 3; case 4.0: return 4; case 1: return 5; case \"\": return 2; } return -1; }\n"+ // test 3484 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case 0: return 3; default: return 0; case 4.0: return 4; case 1: return 5; case \"\": return 2; } return -1; }\n"+ // test 3485 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case 0: return 3; case 4.0: return 4; default: return 0; case 1: return 5; case \"\": return 2; } return -1; }\n"+ // test 3486 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case 0: return 3; case 4.0: return 4; case 1: return 5; default: return 0; case \"\": return 2; } return -1; }\n"+ // test 3487 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case 0: return 3; case 4.0: return 4; case 1: return 5; case \"\": return 2; default: return 0; } return -1; }\n"+ // test 3488 - "mixed b() { return 2; }", - - - - - "=mixed a() { switch(\"\") { case 0: return 3; case 1: return 5; case 4.0: return 4; case \"\": return 2; } return 0; }\n"+ // test 3489 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { default: return 0; case 0: return 3; case 1: return 5; case 4.0: return 4; case \"\": return 2; } return -1; }\n"+ // test 3490 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case 0: return 3; default: return 0; case 1: return 5; case 4.0: return 4; case \"\": return 2; } return -1; }\n"+ // test 3491 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case 0: return 3; case 1: return 5; default: return 0; case 4.0: return 4; case \"\": return 2; } return -1; }\n"+ // test 3492 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case 0: return 3; case 1: return 5; case 4.0: return 4; default: return 0; case \"\": return 2; } return -1; }\n"+ // test 3493 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case 0: return 3; case 1: return 5; case 4.0: return 4; case \"\": return 2; default: return 0; } return -1; }\n"+ // test 3494 - "mixed b() { return 2; }", - - - "=mixed a() { switch(\"\") { case 0: return 3; case 1: return 5; case \"\": return 2; case 4.0: return 4; } return 0; }\n"+ // test 3495 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { default: return 0; case 0: return 3; case 1: return 5; case \"\": return 2; case 4.0: return 4; } return -1; }\n"+ // test 3496 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case 0: return 3; default: return 0; case 1: return 5; case \"\": return 2; case 4.0: return 4; } return -1; }\n"+ // test 3497 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case 0: return 3; case 1: return 5; default: return 0; case \"\": return 2; case 4.0: return 4; } return -1; }\n"+ // test 3498 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case 0: return 3; case 1: return 5; case \"\": return 2; default: return 0; case 4.0: return 4; } return -1; }\n"+ // test 3499 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case 0: return 3; case 1: return 5; case \"\": return 2; case 4.0: return 4; default: return 0; } return -1; }\n"+ // test 3500 - "mixed b() { return 2; }", - - - - - - - "=mixed a() { switch(\"\") { case 4.0: return 4; case 0: return 3; case \"\": return 2; case 1: return 5; } return 0; }\n"+ // test 3501 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { default: return 0; case 4.0: return 4; case 0: return 3; case \"\": return 2; case 1: return 5; } return -1; }\n"+ // test 3502 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case 4.0: return 4; default: return 0; case 0: return 3; case \"\": return 2; case 1: return 5; } return -1; }\n"+ // test 3503 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case 4.0: return 4; case 0: return 3; default: return 0; case \"\": return 2; case 1: return 5; } return -1; }\n"+ // test 3504 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case 4.0: return 4; case 0: return 3; case \"\": return 2; default: return 0; case 1: return 5; } return -1; }\n"+ // test 3505 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case 4.0: return 4; case 0: return 3; case \"\": return 2; case 1: return 5; default: return 0; } return -1; }\n"+ // test 3506 - "mixed b() { return 2; }", - - - "=mixed a() { switch(\"\") { case 4.0: return 4; case 0: return 3; case 1: return 5; case \"\": return 2; } return 0; }\n"+ // test 3507 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { default: return 0; case 4.0: return 4; case 0: return 3; case 1: return 5; case \"\": return 2; } return -1; }\n"+ // test 3508 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case 4.0: return 4; default: return 0; case 0: return 3; case 1: return 5; case \"\": return 2; } return -1; }\n"+ // test 3509 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case 4.0: return 4; case 0: return 3; default: return 0; case 1: return 5; case \"\": return 2; } return -1; }\n"+ // test 3510 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case 4.0: return 4; case 0: return 3; case 1: return 5; default: return 0; case \"\": return 2; } return -1; }\n"+ // test 3511 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case 4.0: return 4; case 0: return 3; case 1: return 5; case \"\": return 2; default: return 0; } return -1; }\n"+ // test 3512 - "mixed b() { return 2; }", - - - - - "=mixed a() { switch(\"\") { case 4.0: return 4; case \"\": return 2; case 0: return 3; case 1: return 5; } return 0; }\n"+ // test 3513 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { default: return 0; case 4.0: return 4; case \"\": return 2; case 0: return 3; case 1: return 5; } return -1; }\n"+ // test 3514 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case 4.0: return 4; default: return 0; case \"\": return 2; case 0: return 3; case 1: return 5; } return -1; }\n"+ // test 3515 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case 4.0: return 4; case \"\": return 2; default: return 0; case 0: return 3; case 1: return 5; } return -1; }\n"+ // test 3516 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case 4.0: return 4; case \"\": return 2; case 0: return 3; default: return 0; case 1: return 5; } return -1; }\n"+ // test 3517 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case 4.0: return 4; case \"\": return 2; case 0: return 3; case 1: return 5; default: return 0; } return -1; }\n"+ // test 3518 - "mixed b() { return 2; }", - - - "=mixed a() { switch(\"\") { case 4.0: return 4; case \"\": return 2; case 1: return 5; case 0: return 3; } return 0; }\n"+ // test 3519 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { default: return 0; case 4.0: return 4; case \"\": return 2; case 1: return 5; case 0: return 3; } return -1; }\n"+ // test 3520 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case 4.0: return 4; default: return 0; case \"\": return 2; case 1: return 5; case 0: return 3; } return -1; }\n"+ // test 3521 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case 4.0: return 4; case \"\": return 2; default: return 0; case 1: return 5; case 0: return 3; } return -1; }\n"+ // test 3522 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case 4.0: return 4; case \"\": return 2; case 1: return 5; default: return 0; case 0: return 3; } return -1; }\n"+ // test 3523 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case 4.0: return 4; case \"\": return 2; case 1: return 5; case 0: return 3; default: return 0; } return -1; }\n"+ // test 3524 - "mixed b() { return 2; }", - - - - - "=mixed a() { switch(\"\") { case 4.0: return 4; case 1: return 5; case \"\": return 2; case 0: return 3; } return 0; }\n"+ // test 3525 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { default: return 0; case 4.0: return 4; case 1: return 5; case \"\": return 2; case 0: return 3; } return -1; }\n"+ // test 3526 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case 4.0: return 4; default: return 0; case 1: return 5; case \"\": return 2; case 0: return 3; } return -1; }\n"+ // test 3527 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case 4.0: return 4; case 1: return 5; default: return 0; case \"\": return 2; case 0: return 3; } return -1; }\n"+ // test 3528 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case 4.0: return 4; case 1: return 5; case \"\": return 2; default: return 0; case 0: return 3; } return -1; }\n"+ // test 3529 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case 4.0: return 4; case 1: return 5; case \"\": return 2; case 0: return 3; default: return 0; } return -1; }\n"+ // test 3530 - "mixed b() { return 2; }", - - - "=mixed a() { switch(\"\") { case 4.0: return 4; case 1: return 5; case 0: return 3; case \"\": return 2; } return 0; }\n"+ // test 3531 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { default: return 0; case 4.0: return 4; case 1: return 5; case 0: return 3; case \"\": return 2; } return -1; }\n"+ // test 3532 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case 4.0: return 4; default: return 0; case 1: return 5; case 0: return 3; case \"\": return 2; } return -1; }\n"+ // test 3533 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case 4.0: return 4; case 1: return 5; default: return 0; case 0: return 3; case \"\": return 2; } return -1; }\n"+ // test 3534 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case 4.0: return 4; case 1: return 5; case 0: return 3; default: return 0; case \"\": return 2; } return -1; }\n"+ // test 3535 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case 4.0: return 4; case 1: return 5; case 0: return 3; case \"\": return 2; default: return 0; } return -1; }\n"+ // test 3536 - "mixed b() { return 2; }", - - - - - - - "=mixed a() { switch(\"\") { case 1: return 5; case 0: return 3; case 4.0: return 4; case \"\": return 2; } return 0; }\n"+ // test 3537 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { default: return 0; case 1: return 5; case 0: return 3; case 4.0: return 4; case \"\": return 2; } return -1; }\n"+ // test 3538 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case 1: return 5; default: return 0; case 0: return 3; case 4.0: return 4; case \"\": return 2; } return -1; }\n"+ // test 3539 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case 1: return 5; case 0: return 3; default: return 0; case 4.0: return 4; case \"\": return 2; } return -1; }\n"+ // test 3540 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case 1: return 5; case 0: return 3; case 4.0: return 4; default: return 0; case \"\": return 2; } return -1; }\n"+ // test 3541 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case 1: return 5; case 0: return 3; case 4.0: return 4; case \"\": return 2; default: return 0; } return -1; }\n"+ // test 3542 - "mixed b() { return 2; }", - - - "=mixed a() { switch(\"\") { case 1: return 5; case 0: return 3; case \"\": return 2; case 4.0: return 4; } return 0; }\n"+ // test 3543 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { default: return 0; case 1: return 5; case 0: return 3; case \"\": return 2; case 4.0: return 4; } return -1; }\n"+ // test 3544 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case 1: return 5; default: return 0; case 0: return 3; case \"\": return 2; case 4.0: return 4; } return -1; }\n"+ // test 3545 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case 1: return 5; case 0: return 3; default: return 0; case \"\": return 2; case 4.0: return 4; } return -1; }\n"+ // test 3546 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case 1: return 5; case 0: return 3; case \"\": return 2; default: return 0; case 4.0: return 4; } return -1; }\n"+ // test 3547 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case 1: return 5; case 0: return 3; case \"\": return 2; case 4.0: return 4; default: return 0; } return -1; }\n"+ // test 3548 - "mixed b() { return 2; }", - - - - - "=mixed a() { switch(\"\") { case 1: return 5; case 4.0: return 4; case 0: return 3; case \"\": return 2; } return 0; }\n"+ // test 3549 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { default: return 0; case 1: return 5; case 4.0: return 4; case 0: return 3; case \"\": return 2; } return -1; }\n"+ // test 3550 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case 1: return 5; default: return 0; case 4.0: return 4; case 0: return 3; case \"\": return 2; } return -1; }\n"+ // test 3551 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case 1: return 5; case 4.0: return 4; default: return 0; case 0: return 3; case \"\": return 2; } return -1; }\n"+ // test 3552 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case 1: return 5; case 4.0: return 4; case 0: return 3; default: return 0; case \"\": return 2; } return -1; }\n"+ // test 3553 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case 1: return 5; case 4.0: return 4; case 0: return 3; case \"\": return 2; default: return 0; } return -1; }\n"+ // test 3554 - "mixed b() { return 2; }", - - - "=mixed a() { switch(\"\") { case 1: return 5; case 4.0: return 4; case \"\": return 2; case 0: return 3; } return 0; }\n"+ // test 3555 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { default: return 0; case 1: return 5; case 4.0: return 4; case \"\": return 2; case 0: return 3; } return -1; }\n"+ // test 3556 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case 1: return 5; default: return 0; case 4.0: return 4; case \"\": return 2; case 0: return 3; } return -1; }\n"+ // test 3557 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case 1: return 5; case 4.0: return 4; default: return 0; case \"\": return 2; case 0: return 3; } return -1; }\n"+ // test 3558 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case 1: return 5; case 4.0: return 4; case \"\": return 2; default: return 0; case 0: return 3; } return -1; }\n"+ // test 3559 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case 1: return 5; case 4.0: return 4; case \"\": return 2; case 0: return 3; default: return 0; } return -1; }\n"+ // test 3560 - "mixed b() { return 2; }", - - - - - "=mixed a() { switch(\"\") { case 1: return 5; case \"\": return 2; case 4.0: return 4; case 0: return 3; } return 0; }\n"+ // test 3561 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { default: return 0; case 1: return 5; case \"\": return 2; case 4.0: return 4; case 0: return 3; } return -1; }\n"+ // test 3562 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case 1: return 5; default: return 0; case \"\": return 2; case 4.0: return 4; case 0: return 3; } return -1; }\n"+ // test 3563 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case 1: return 5; case \"\": return 2; default: return 0; case 4.0: return 4; case 0: return 3; } return -1; }\n"+ // test 3564 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case 1: return 5; case \"\": return 2; case 4.0: return 4; default: return 0; case 0: return 3; } return -1; }\n"+ // test 3565 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case 1: return 5; case \"\": return 2; case 4.0: return 4; case 0: return 3; default: return 0; } return -1; }\n"+ // test 3566 - "mixed b() { return 2; }", - - - "=mixed a() { switch(\"\") { case 1: return 5; case \"\": return 2; case 0: return 3; case 4.0: return 4; } return 0; }\n"+ // test 3567 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { default: return 0; case 1: return 5; case \"\": return 2; case 0: return 3; case 4.0: return 4; } return -1; }\n"+ // test 3568 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case 1: return 5; default: return 0; case \"\": return 2; case 0: return 3; case 4.0: return 4; } return -1; }\n"+ // test 3569 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case 1: return 5; case \"\": return 2; default: return 0; case 0: return 3; case 4.0: return 4; } return -1; }\n"+ // test 3570 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case 1: return 5; case \"\": return 2; case 0: return 3; default: return 0; case 4.0: return 4; } return -1; }\n"+ // test 3571 - "mixed b() { return 2; }", - "=mixed a() { switch(\"\") { case 1: return 5; case \"\": return 2; case 0: return 3; case 4.0: return 4; default: return 0; } return -1; }\n"+ // test 3572 - "mixed b() { return 2; }", - - - - - - - - - "=mixed a() { switch(0) { case \"\": return 2; case 0: return 3; case 4.0: return 4; case 1: return 5; } return 0; }\n"+ // test 3573 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { default: return 0; case \"\": return 2; case 0: return 3; case 4.0: return 4; case 1: return 5; } return -1; }\n"+ // test 3574 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case \"\": return 2; default: return 0; case 0: return 3; case 4.0: return 4; case 1: return 5; } return -1; }\n"+ // test 3575 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case \"\": return 2; case 0: return 3; default: return 0; case 4.0: return 4; case 1: return 5; } return -1; }\n"+ // test 3576 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case \"\": return 2; case 0: return 3; case 4.0: return 4; default: return 0; case 1: return 5; } return -1; }\n"+ // test 3577 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case \"\": return 2; case 0: return 3; case 4.0: return 4; case 1: return 5; default: return 0; } return -1; }\n"+ // test 3578 - "mixed b() { return 3; }", - - - "=mixed a() { switch(0) { case \"\": return 2; case 0: return 3; case 1: return 5; case 4.0: return 4; } return 0; }\n"+ // test 3579 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { default: return 0; case \"\": return 2; case 0: return 3; case 1: return 5; case 4.0: return 4; } return -1; }\n"+ // test 3580 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case \"\": return 2; default: return 0; case 0: return 3; case 1: return 5; case 4.0: return 4; } return -1; }\n"+ // test 3581 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case \"\": return 2; case 0: return 3; default: return 0; case 1: return 5; case 4.0: return 4; } return -1; }\n"+ // test 3582 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case \"\": return 2; case 0: return 3; case 1: return 5; default: return 0; case 4.0: return 4; } return -1; }\n"+ // test 3583 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case \"\": return 2; case 0: return 3; case 1: return 5; case 4.0: return 4; default: return 0; } return -1; }\n"+ // test 3584 - "mixed b() { return 3; }", - - - - - "=mixed a() { switch(0) { case \"\": return 2; case 4.0: return 4; case 0: return 3; case 1: return 5; } return 0; }\n"+ // test 3585 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { default: return 0; case \"\": return 2; case 4.0: return 4; case 0: return 3; case 1: return 5; } return -1; }\n"+ // test 3586 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case \"\": return 2; default: return 0; case 4.0: return 4; case 0: return 3; case 1: return 5; } return -1; }\n"+ // test 3587 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case \"\": return 2; case 4.0: return 4; default: return 0; case 0: return 3; case 1: return 5; } return -1; }\n"+ // test 3588 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case \"\": return 2; case 4.0: return 4; case 0: return 3; default: return 0; case 1: return 5; } return -1; }\n"+ // test 3589 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case \"\": return 2; case 4.0: return 4; case 0: return 3; case 1: return 5; default: return 0; } return -1; }\n"+ // test 3590 - "mixed b() { return 3; }", - - - "=mixed a() { switch(0) { case \"\": return 2; case 4.0: return 4; case 1: return 5; case 0: return 3; } return 0; }\n"+ // test 3591 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { default: return 0; case \"\": return 2; case 4.0: return 4; case 1: return 5; case 0: return 3; } return -1; }\n"+ // test 3592 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case \"\": return 2; default: return 0; case 4.0: return 4; case 1: return 5; case 0: return 3; } return -1; }\n"+ // test 3593 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case \"\": return 2; case 4.0: return 4; default: return 0; case 1: return 5; case 0: return 3; } return -1; }\n"+ // test 3594 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case \"\": return 2; case 4.0: return 4; case 1: return 5; default: return 0; case 0: return 3; } return -1; }\n"+ // test 3595 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case \"\": return 2; case 4.0: return 4; case 1: return 5; case 0: return 3; default: return 0; } return -1; }\n"+ // test 3596 - "mixed b() { return 3; }", - - - - - "=mixed a() { switch(0) { case \"\": return 2; case 1: return 5; case 4.0: return 4; case 0: return 3; } return 0; }\n"+ // test 3597 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { default: return 0; case \"\": return 2; case 1: return 5; case 4.0: return 4; case 0: return 3; } return -1; }\n"+ // test 3598 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case \"\": return 2; default: return 0; case 1: return 5; case 4.0: return 4; case 0: return 3; } return -1; }\n"+ // test 3599 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case \"\": return 2; case 1: return 5; default: return 0; case 4.0: return 4; case 0: return 3; } return -1; }\n"+ // test 3600 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case \"\": return 2; case 1: return 5; case 4.0: return 4; default: return 0; case 0: return 3; } return -1; }\n"+ // test 3601 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case \"\": return 2; case 1: return 5; case 4.0: return 4; case 0: return 3; default: return 0; } return -1; }\n"+ // test 3602 - "mixed b() { return 3; }", - - - "=mixed a() { switch(0) { case \"\": return 2; case 1: return 5; case 0: return 3; case 4.0: return 4; } return 0; }\n"+ // test 3603 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { default: return 0; case \"\": return 2; case 1: return 5; case 0: return 3; case 4.0: return 4; } return -1; }\n"+ // test 3604 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case \"\": return 2; default: return 0; case 1: return 5; case 0: return 3; case 4.0: return 4; } return -1; }\n"+ // test 3605 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case \"\": return 2; case 1: return 5; default: return 0; case 0: return 3; case 4.0: return 4; } return -1; }\n"+ // test 3606 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case \"\": return 2; case 1: return 5; case 0: return 3; default: return 0; case 4.0: return 4; } return -1; }\n"+ // test 3607 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case \"\": return 2; case 1: return 5; case 0: return 3; case 4.0: return 4; default: return 0; } return -1; }\n"+ // test 3608 - "mixed b() { return 3; }", - - - - - - - "=mixed a() { switch(0) { case 0: return 3; case \"\": return 2; case 4.0: return 4; case 1: return 5; } return 0; }\n"+ // test 3609 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { default: return 0; case 0: return 3; case \"\": return 2; case 4.0: return 4; case 1: return 5; } return -1; }\n"+ // test 3610 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case 0: return 3; default: return 0; case \"\": return 2; case 4.0: return 4; case 1: return 5; } return -1; }\n"+ // test 3611 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case 0: return 3; case \"\": return 2; default: return 0; case 4.0: return 4; case 1: return 5; } return -1; }\n"+ // test 3612 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case 0: return 3; case \"\": return 2; case 4.0: return 4; default: return 0; case 1: return 5; } return -1; }\n"+ // test 3613 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case 0: return 3; case \"\": return 2; case 4.0: return 4; case 1: return 5; default: return 0; } return -1; }\n"+ // test 3614 - "mixed b() { return 3; }", - - - "=mixed a() { switch(0) { case 0: return 3; case \"\": return 2; case 1: return 5; case 4.0: return 4; } return 0; }\n"+ // test 3615 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { default: return 0; case 0: return 3; case \"\": return 2; case 1: return 5; case 4.0: return 4; } return -1; }\n"+ // test 3616 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case 0: return 3; default: return 0; case \"\": return 2; case 1: return 5; case 4.0: return 4; } return -1; }\n"+ // test 3617 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case 0: return 3; case \"\": return 2; default: return 0; case 1: return 5; case 4.0: return 4; } return -1; }\n"+ // test 3618 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case 0: return 3; case \"\": return 2; case 1: return 5; default: return 0; case 4.0: return 4; } return -1; }\n"+ // test 3619 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case 0: return 3; case \"\": return 2; case 1: return 5; case 4.0: return 4; default: return 0; } return -1; }\n"+ // test 3620 - "mixed b() { return 3; }", - - - - - "=mixed a() { switch(0) { case 0: return 3; case 4.0: return 4; case \"\": return 2; case 1: return 5; } return 0; }\n"+ // test 3621 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { default: return 0; case 0: return 3; case 4.0: return 4; case \"\": return 2; case 1: return 5; } return -1; }\n"+ // test 3622 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case 0: return 3; default: return 0; case 4.0: return 4; case \"\": return 2; case 1: return 5; } return -1; }\n"+ // test 3623 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case 0: return 3; case 4.0: return 4; default: return 0; case \"\": return 2; case 1: return 5; } return -1; }\n"+ // test 3624 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case 0: return 3; case 4.0: return 4; case \"\": return 2; default: return 0; case 1: return 5; } return -1; }\n"+ // test 3625 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case 0: return 3; case 4.0: return 4; case \"\": return 2; case 1: return 5; default: return 0; } return -1; }\n"+ // test 3626 - "mixed b() { return 3; }", - - - "=mixed a() { switch(0) { case 0: return 3; case 4.0: return 4; case 1: return 5; case \"\": return 2; } return 0; }\n"+ // test 3627 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { default: return 0; case 0: return 3; case 4.0: return 4; case 1: return 5; case \"\": return 2; } return -1; }\n"+ // test 3628 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case 0: return 3; default: return 0; case 4.0: return 4; case 1: return 5; case \"\": return 2; } return -1; }\n"+ // test 3629 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case 0: return 3; case 4.0: return 4; default: return 0; case 1: return 5; case \"\": return 2; } return -1; }\n"+ // test 3630 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case 0: return 3; case 4.0: return 4; case 1: return 5; default: return 0; case \"\": return 2; } return -1; }\n"+ // test 3631 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case 0: return 3; case 4.0: return 4; case 1: return 5; case \"\": return 2; default: return 0; } return -1; }\n"+ // test 3632 - "mixed b() { return 3; }", - - - - - "=mixed a() { switch(0) { case 0: return 3; case 1: return 5; case 4.0: return 4; case \"\": return 2; } return 0; }\n"+ // test 3633 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { default: return 0; case 0: return 3; case 1: return 5; case 4.0: return 4; case \"\": return 2; } return -1; }\n"+ // test 3634 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case 0: return 3; default: return 0; case 1: return 5; case 4.0: return 4; case \"\": return 2; } return -1; }\n"+ // test 3635 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case 0: return 3; case 1: return 5; default: return 0; case 4.0: return 4; case \"\": return 2; } return -1; }\n"+ // test 3636 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case 0: return 3; case 1: return 5; case 4.0: return 4; default: return 0; case \"\": return 2; } return -1; }\n"+ // test 3637 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case 0: return 3; case 1: return 5; case 4.0: return 4; case \"\": return 2; default: return 0; } return -1; }\n"+ // test 3638 - "mixed b() { return 3; }", - - - "=mixed a() { switch(0) { case 0: return 3; case 1: return 5; case \"\": return 2; case 4.0: return 4; } return 0; }\n"+ // test 3639 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { default: return 0; case 0: return 3; case 1: return 5; case \"\": return 2; case 4.0: return 4; } return -1; }\n"+ // test 3640 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case 0: return 3; default: return 0; case 1: return 5; case \"\": return 2; case 4.0: return 4; } return -1; }\n"+ // test 3641 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case 0: return 3; case 1: return 5; default: return 0; case \"\": return 2; case 4.0: return 4; } return -1; }\n"+ // test 3642 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case 0: return 3; case 1: return 5; case \"\": return 2; default: return 0; case 4.0: return 4; } return -1; }\n"+ // test 3643 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case 0: return 3; case 1: return 5; case \"\": return 2; case 4.0: return 4; default: return 0; } return -1; }\n"+ // test 3644 - "mixed b() { return 3; }", - - - - - - - "=mixed a() { switch(0) { case 4.0: return 4; case 0: return 3; case \"\": return 2; case 1: return 5; } return 0; }\n"+ // test 3645 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { default: return 0; case 4.0: return 4; case 0: return 3; case \"\": return 2; case 1: return 5; } return -1; }\n"+ // test 3646 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case 4.0: return 4; default: return 0; case 0: return 3; case \"\": return 2; case 1: return 5; } return -1; }\n"+ // test 3647 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case 4.0: return 4; case 0: return 3; default: return 0; case \"\": return 2; case 1: return 5; } return -1; }\n"+ // test 3648 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case 4.0: return 4; case 0: return 3; case \"\": return 2; default: return 0; case 1: return 5; } return -1; }\n"+ // test 3649 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case 4.0: return 4; case 0: return 3; case \"\": return 2; case 1: return 5; default: return 0; } return -1; }\n"+ // test 3650 - "mixed b() { return 3; }", - - - "=mixed a() { switch(0) { case 4.0: return 4; case 0: return 3; case 1: return 5; case \"\": return 2; } return 0; }\n"+ // test 3651 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { default: return 0; case 4.0: return 4; case 0: return 3; case 1: return 5; case \"\": return 2; } return -1; }\n"+ // test 3652 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case 4.0: return 4; default: return 0; case 0: return 3; case 1: return 5; case \"\": return 2; } return -1; }\n"+ // test 3653 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case 4.0: return 4; case 0: return 3; default: return 0; case 1: return 5; case \"\": return 2; } return -1; }\n"+ // test 3654 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case 4.0: return 4; case 0: return 3; case 1: return 5; default: return 0; case \"\": return 2; } return -1; }\n"+ // test 3655 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case 4.0: return 4; case 0: return 3; case 1: return 5; case \"\": return 2; default: return 0; } return -1; }\n"+ // test 3656 - "mixed b() { return 3; }", - - - - - "=mixed a() { switch(0) { case 4.0: return 4; case \"\": return 2; case 0: return 3; case 1: return 5; } return 0; }\n"+ // test 3657 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { default: return 0; case 4.0: return 4; case \"\": return 2; case 0: return 3; case 1: return 5; } return -1; }\n"+ // test 3658 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case 4.0: return 4; default: return 0; case \"\": return 2; case 0: return 3; case 1: return 5; } return -1; }\n"+ // test 3659 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case 4.0: return 4; case \"\": return 2; default: return 0; case 0: return 3; case 1: return 5; } return -1; }\n"+ // test 3660 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case 4.0: return 4; case \"\": return 2; case 0: return 3; default: return 0; case 1: return 5; } return -1; }\n"+ // test 3661 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case 4.0: return 4; case \"\": return 2; case 0: return 3; case 1: return 5; default: return 0; } return -1; }\n"+ // test 3662 - "mixed b() { return 3; }", - - - "=mixed a() { switch(0) { case 4.0: return 4; case \"\": return 2; case 1: return 5; case 0: return 3; } return 0; }\n"+ // test 3663 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { default: return 0; case 4.0: return 4; case \"\": return 2; case 1: return 5; case 0: return 3; } return -1; }\n"+ // test 3664 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case 4.0: return 4; default: return 0; case \"\": return 2; case 1: return 5; case 0: return 3; } return -1; }\n"+ // test 3665 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case 4.0: return 4; case \"\": return 2; default: return 0; case 1: return 5; case 0: return 3; } return -1; }\n"+ // test 3666 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case 4.0: return 4; case \"\": return 2; case 1: return 5; default: return 0; case 0: return 3; } return -1; }\n"+ // test 3667 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case 4.0: return 4; case \"\": return 2; case 1: return 5; case 0: return 3; default: return 0; } return -1; }\n"+ // test 3668 - "mixed b() { return 3; }", - - - - - "=mixed a() { switch(0) { case 4.0: return 4; case 1: return 5; case \"\": return 2; case 0: return 3; } return 0; }\n"+ // test 3669 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { default: return 0; case 4.0: return 4; case 1: return 5; case \"\": return 2; case 0: return 3; } return -1; }\n"+ // test 3670 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case 4.0: return 4; default: return 0; case 1: return 5; case \"\": return 2; case 0: return 3; } return -1; }\n"+ // test 3671 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case 4.0: return 4; case 1: return 5; default: return 0; case \"\": return 2; case 0: return 3; } return -1; }\n"+ // test 3672 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case 4.0: return 4; case 1: return 5; case \"\": return 2; default: return 0; case 0: return 3; } return -1; }\n"+ // test 3673 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case 4.0: return 4; case 1: return 5; case \"\": return 2; case 0: return 3; default: return 0; } return -1; }\n"+ // test 3674 - "mixed b() { return 3; }", - - - "=mixed a() { switch(0) { case 4.0: return 4; case 1: return 5; case 0: return 3; case \"\": return 2; } return 0; }\n"+ // test 3675 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { default: return 0; case 4.0: return 4; case 1: return 5; case 0: return 3; case \"\": return 2; } return -1; }\n"+ // test 3676 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case 4.0: return 4; default: return 0; case 1: return 5; case 0: return 3; case \"\": return 2; } return -1; }\n"+ // test 3677 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case 4.0: return 4; case 1: return 5; default: return 0; case 0: return 3; case \"\": return 2; } return -1; }\n"+ // test 3678 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case 4.0: return 4; case 1: return 5; case 0: return 3; default: return 0; case \"\": return 2; } return -1; }\n"+ // test 3679 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case 4.0: return 4; case 1: return 5; case 0: return 3; case \"\": return 2; default: return 0; } return -1; }\n"+ // test 3680 - "mixed b() { return 3; }", - - - - - - - "=mixed a() { switch(0) { case 1: return 5; case 0: return 3; case 4.0: return 4; case \"\": return 2; } return 0; }\n"+ // test 3681 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { default: return 0; case 1: return 5; case 0: return 3; case 4.0: return 4; case \"\": return 2; } return -1; }\n"+ // test 3682 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case 1: return 5; default: return 0; case 0: return 3; case 4.0: return 4; case \"\": return 2; } return -1; }\n"+ // test 3683 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case 1: return 5; case 0: return 3; default: return 0; case 4.0: return 4; case \"\": return 2; } return -1; }\n"+ // test 3684 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case 1: return 5; case 0: return 3; case 4.0: return 4; default: return 0; case \"\": return 2; } return -1; }\n"+ // test 3685 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case 1: return 5; case 0: return 3; case 4.0: return 4; case \"\": return 2; default: return 0; } return -1; }\n"+ // test 3686 - "mixed b() { return 3; }", - - - "=mixed a() { switch(0) { case 1: return 5; case 0: return 3; case \"\": return 2; case 4.0: return 4; } return 0; }\n"+ // test 3687 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { default: return 0; case 1: return 5; case 0: return 3; case \"\": return 2; case 4.0: return 4; } return -1; }\n"+ // test 3688 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case 1: return 5; default: return 0; case 0: return 3; case \"\": return 2; case 4.0: return 4; } return -1; }\n"+ // test 3689 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case 1: return 5; case 0: return 3; default: return 0; case \"\": return 2; case 4.0: return 4; } return -1; }\n"+ // test 3690 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case 1: return 5; case 0: return 3; case \"\": return 2; default: return 0; case 4.0: return 4; } return -1; }\n"+ // test 3691 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case 1: return 5; case 0: return 3; case \"\": return 2; case 4.0: return 4; default: return 0; } return -1; }\n"+ // test 3692 - "mixed b() { return 3; }", - - - - - "=mixed a() { switch(0) { case 1: return 5; case 4.0: return 4; case 0: return 3; case \"\": return 2; } return 0; }\n"+ // test 3693 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { default: return 0; case 1: return 5; case 4.0: return 4; case 0: return 3; case \"\": return 2; } return -1; }\n"+ // test 3694 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case 1: return 5; default: return 0; case 4.0: return 4; case 0: return 3; case \"\": return 2; } return -1; }\n"+ // test 3695 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case 1: return 5; case 4.0: return 4; default: return 0; case 0: return 3; case \"\": return 2; } return -1; }\n"+ // test 3696 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case 1: return 5; case 4.0: return 4; case 0: return 3; default: return 0; case \"\": return 2; } return -1; }\n"+ // test 3697 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case 1: return 5; case 4.0: return 4; case 0: return 3; case \"\": return 2; default: return 0; } return -1; }\n"+ // test 3698 - "mixed b() { return 3; }", - - - "=mixed a() { switch(0) { case 1: return 5; case 4.0: return 4; case \"\": return 2; case 0: return 3; } return 0; }\n"+ // test 3699 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { default: return 0; case 1: return 5; case 4.0: return 4; case \"\": return 2; case 0: return 3; } return -1; }\n"+ // test 3700 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case 1: return 5; default: return 0; case 4.0: return 4; case \"\": return 2; case 0: return 3; } return -1; }\n"+ // test 3701 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case 1: return 5; case 4.0: return 4; default: return 0; case \"\": return 2; case 0: return 3; } return -1; }\n"+ // test 3702 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case 1: return 5; case 4.0: return 4; case \"\": return 2; default: return 0; case 0: return 3; } return -1; }\n"+ // test 3703 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case 1: return 5; case 4.0: return 4; case \"\": return 2; case 0: return 3; default: return 0; } return -1; }\n"+ // test 3704 - "mixed b() { return 3; }", - - - - - "=mixed a() { switch(0) { case 1: return 5; case \"\": return 2; case 4.0: return 4; case 0: return 3; } return 0; }\n"+ // test 3705 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { default: return 0; case 1: return 5; case \"\": return 2; case 4.0: return 4; case 0: return 3; } return -1; }\n"+ // test 3706 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case 1: return 5; default: return 0; case \"\": return 2; case 4.0: return 4; case 0: return 3; } return -1; }\n"+ // test 3707 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case 1: return 5; case \"\": return 2; default: return 0; case 4.0: return 4; case 0: return 3; } return -1; }\n"+ // test 3708 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case 1: return 5; case \"\": return 2; case 4.0: return 4; default: return 0; case 0: return 3; } return -1; }\n"+ // test 3709 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case 1: return 5; case \"\": return 2; case 4.0: return 4; case 0: return 3; default: return 0; } return -1; }\n"+ // test 3710 - "mixed b() { return 3; }", - - - "=mixed a() { switch(0) { case 1: return 5; case \"\": return 2; case 0: return 3; case 4.0: return 4; } return 0; }\n"+ // test 3711 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { default: return 0; case 1: return 5; case \"\": return 2; case 0: return 3; case 4.0: return 4; } return -1; }\n"+ // test 3712 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case 1: return 5; default: return 0; case \"\": return 2; case 0: return 3; case 4.0: return 4; } return -1; }\n"+ // test 3713 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case 1: return 5; case \"\": return 2; default: return 0; case 0: return 3; case 4.0: return 4; } return -1; }\n"+ // test 3714 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case 1: return 5; case \"\": return 2; case 0: return 3; default: return 0; case 4.0: return 4; } return -1; }\n"+ // test 3715 - "mixed b() { return 3; }", - "=mixed a() { switch(0) { case 1: return 5; case \"\": return 2; case 0: return 3; case 4.0: return 4; default: return 0; } return -1; }\n"+ // test 3716 - "mixed b() { return 3; }", - - - - - - - - - "=mixed a() { switch(4.0) { case \"\": return 2; case 0: return 3; case 4.0: return 4; case 1: return 5; } return 0; }\n"+ // test 3717 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { default: return 0; case \"\": return 2; case 0: return 3; case 4.0: return 4; case 1: return 5; } return -1; }\n"+ // test 3718 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case \"\": return 2; default: return 0; case 0: return 3; case 4.0: return 4; case 1: return 5; } return -1; }\n"+ // test 3719 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case \"\": return 2; case 0: return 3; default: return 0; case 4.0: return 4; case 1: return 5; } return -1; }\n"+ // test 3720 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case \"\": return 2; case 0: return 3; case 4.0: return 4; default: return 0; case 1: return 5; } return -1; }\n"+ // test 3721 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case \"\": return 2; case 0: return 3; case 4.0: return 4; case 1: return 5; default: return 0; } return -1; }\n"+ // test 3722 - "mixed b() { return 4; }", - - - "=mixed a() { switch(4.0) { case \"\": return 2; case 0: return 3; case 1: return 5; case 4.0: return 4; } return 0; }\n"+ // test 3723 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { default: return 0; case \"\": return 2; case 0: return 3; case 1: return 5; case 4.0: return 4; } return -1; }\n"+ // test 3724 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case \"\": return 2; default: return 0; case 0: return 3; case 1: return 5; case 4.0: return 4; } return -1; }\n"+ // test 3725 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case \"\": return 2; case 0: return 3; default: return 0; case 1: return 5; case 4.0: return 4; } return -1; }\n"+ // test 3726 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case \"\": return 2; case 0: return 3; case 1: return 5; default: return 0; case 4.0: return 4; } return -1; }\n"+ // test 3727 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case \"\": return 2; case 0: return 3; case 1: return 5; case 4.0: return 4; default: return 0; } return -1; }\n"+ // test 3728 - "mixed b() { return 4; }", - - - - - "=mixed a() { switch(4.0) { case \"\": return 2; case 4.0: return 4; case 0: return 3; case 1: return 5; } return 0; }\n"+ // test 3729 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { default: return 0; case \"\": return 2; case 4.0: return 4; case 0: return 3; case 1: return 5; } return -1; }\n"+ // test 3730 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case \"\": return 2; default: return 0; case 4.0: return 4; case 0: return 3; case 1: return 5; } return -1; }\n"+ // test 3731 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case \"\": return 2; case 4.0: return 4; default: return 0; case 0: return 3; case 1: return 5; } return -1; }\n"+ // test 3732 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case \"\": return 2; case 4.0: return 4; case 0: return 3; default: return 0; case 1: return 5; } return -1; }\n"+ // test 3733 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case \"\": return 2; case 4.0: return 4; case 0: return 3; case 1: return 5; default: return 0; } return -1; }\n"+ // test 3734 - "mixed b() { return 4; }", - - - "=mixed a() { switch(4.0) { case \"\": return 2; case 4.0: return 4; case 1: return 5; case 0: return 3; } return 0; }\n"+ // test 3735 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { default: return 0; case \"\": return 2; case 4.0: return 4; case 1: return 5; case 0: return 3; } return -1; }\n"+ // test 3736 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case \"\": return 2; default: return 0; case 4.0: return 4; case 1: return 5; case 0: return 3; } return -1; }\n"+ // test 3737 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case \"\": return 2; case 4.0: return 4; default: return 0; case 1: return 5; case 0: return 3; } return -1; }\n"+ // test 3738 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case \"\": return 2; case 4.0: return 4; case 1: return 5; default: return 0; case 0: return 3; } return -1; }\n"+ // test 3739 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case \"\": return 2; case 4.0: return 4; case 1: return 5; case 0: return 3; default: return 0; } return -1; }\n"+ // test 3740 - "mixed b() { return 4; }", - - - - - "=mixed a() { switch(4.0) { case \"\": return 2; case 1: return 5; case 4.0: return 4; case 0: return 3; } return 0; }\n"+ // test 3741 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { default: return 0; case \"\": return 2; case 1: return 5; case 4.0: return 4; case 0: return 3; } return -1; }\n"+ // test 3742 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case \"\": return 2; default: return 0; case 1: return 5; case 4.0: return 4; case 0: return 3; } return -1; }\n"+ // test 3743 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case \"\": return 2; case 1: return 5; default: return 0; case 4.0: return 4; case 0: return 3; } return -1; }\n"+ // test 3744 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case \"\": return 2; case 1: return 5; case 4.0: return 4; default: return 0; case 0: return 3; } return -1; }\n"+ // test 3745 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case \"\": return 2; case 1: return 5; case 4.0: return 4; case 0: return 3; default: return 0; } return -1; }\n"+ // test 3746 - "mixed b() { return 4; }", - - - "=mixed a() { switch(4.0) { case \"\": return 2; case 1: return 5; case 0: return 3; case 4.0: return 4; } return 0; }\n"+ // test 3747 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { default: return 0; case \"\": return 2; case 1: return 5; case 0: return 3; case 4.0: return 4; } return -1; }\n"+ // test 3748 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case \"\": return 2; default: return 0; case 1: return 5; case 0: return 3; case 4.0: return 4; } return -1; }\n"+ // test 3749 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case \"\": return 2; case 1: return 5; default: return 0; case 0: return 3; case 4.0: return 4; } return -1; }\n"+ // test 3750 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case \"\": return 2; case 1: return 5; case 0: return 3; default: return 0; case 4.0: return 4; } return -1; }\n"+ // test 3751 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case \"\": return 2; case 1: return 5; case 0: return 3; case 4.0: return 4; default: return 0; } return -1; }\n"+ // test 3752 - "mixed b() { return 4; }", - - - - - - - "=mixed a() { switch(4.0) { case 0: return 3; case \"\": return 2; case 4.0: return 4; case 1: return 5; } return 0; }\n"+ // test 3753 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { default: return 0; case 0: return 3; case \"\": return 2; case 4.0: return 4; case 1: return 5; } return -1; }\n"+ // test 3754 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 0: return 3; default: return 0; case \"\": return 2; case 4.0: return 4; case 1: return 5; } return -1; }\n"+ // test 3755 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 0: return 3; case \"\": return 2; default: return 0; case 4.0: return 4; case 1: return 5; } return -1; }\n"+ // test 3756 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 0: return 3; case \"\": return 2; case 4.0: return 4; default: return 0; case 1: return 5; } return -1; }\n"+ // test 3757 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 0: return 3; case \"\": return 2; case 4.0: return 4; case 1: return 5; default: return 0; } return -1; }\n"+ // test 3758 - "mixed b() { return 4; }", - - - "=mixed a() { switch(4.0) { case 0: return 3; case \"\": return 2; case 1: return 5; case 4.0: return 4; } return 0; }\n"+ // test 3759 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { default: return 0; case 0: return 3; case \"\": return 2; case 1: return 5; case 4.0: return 4; } return -1; }\n"+ // test 3760 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 0: return 3; default: return 0; case \"\": return 2; case 1: return 5; case 4.0: return 4; } return -1; }\n"+ // test 3761 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 0: return 3; case \"\": return 2; default: return 0; case 1: return 5; case 4.0: return 4; } return -1; }\n"+ // test 3762 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 0: return 3; case \"\": return 2; case 1: return 5; default: return 0; case 4.0: return 4; } return -1; }\n"+ // test 3763 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 0: return 3; case \"\": return 2; case 1: return 5; case 4.0: return 4; default: return 0; } return -1; }\n"+ // test 3764 - "mixed b() { return 4; }", - - - - - "=mixed a() { switch(4.0) { case 0: return 3; case 4.0: return 4; case \"\": return 2; case 1: return 5; } return 0; }\n"+ // test 3765 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { default: return 0; case 0: return 3; case 4.0: return 4; case \"\": return 2; case 1: return 5; } return -1; }\n"+ // test 3766 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 0: return 3; default: return 0; case 4.0: return 4; case \"\": return 2; case 1: return 5; } return -1; }\n"+ // test 3767 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 0: return 3; case 4.0: return 4; default: return 0; case \"\": return 2; case 1: return 5; } return -1; }\n"+ // test 3768 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 0: return 3; case 4.0: return 4; case \"\": return 2; default: return 0; case 1: return 5; } return -1; }\n"+ // test 3769 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 0: return 3; case 4.0: return 4; case \"\": return 2; case 1: return 5; default: return 0; } return -1; }\n"+ // test 3770 - "mixed b() { return 4; }", - - - "=mixed a() { switch(4.0) { case 0: return 3; case 4.0: return 4; case 1: return 5; case \"\": return 2; } return 0; }\n"+ // test 3771 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { default: return 0; case 0: return 3; case 4.0: return 4; case 1: return 5; case \"\": return 2; } return -1; }\n"+ // test 3772 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 0: return 3; default: return 0; case 4.0: return 4; case 1: return 5; case \"\": return 2; } return -1; }\n"+ // test 3773 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 0: return 3; case 4.0: return 4; default: return 0; case 1: return 5; case \"\": return 2; } return -1; }\n"+ // test 3774 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 0: return 3; case 4.0: return 4; case 1: return 5; default: return 0; case \"\": return 2; } return -1; }\n"+ // test 3775 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 0: return 3; case 4.0: return 4; case 1: return 5; case \"\": return 2; default: return 0; } return -1; }\n"+ // test 3776 - "mixed b() { return 4; }", - - - - - "=mixed a() { switch(4.0) { case 0: return 3; case 1: return 5; case 4.0: return 4; case \"\": return 2; } return 0; }\n"+ // test 3777 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { default: return 0; case 0: return 3; case 1: return 5; case 4.0: return 4; case \"\": return 2; } return -1; }\n"+ // test 3778 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 0: return 3; default: return 0; case 1: return 5; case 4.0: return 4; case \"\": return 2; } return -1; }\n"+ // test 3779 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 0: return 3; case 1: return 5; default: return 0; case 4.0: return 4; case \"\": return 2; } return -1; }\n"+ // test 3780 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 0: return 3; case 1: return 5; case 4.0: return 4; default: return 0; case \"\": return 2; } return -1; }\n"+ // test 3781 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 0: return 3; case 1: return 5; case 4.0: return 4; case \"\": return 2; default: return 0; } return -1; }\n"+ // test 3782 - "mixed b() { return 4; }", - - - "=mixed a() { switch(4.0) { case 0: return 3; case 1: return 5; case \"\": return 2; case 4.0: return 4; } return 0; }\n"+ // test 3783 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { default: return 0; case 0: return 3; case 1: return 5; case \"\": return 2; case 4.0: return 4; } return -1; }\n"+ // test 3784 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 0: return 3; default: return 0; case 1: return 5; case \"\": return 2; case 4.0: return 4; } return -1; }\n"+ // test 3785 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 0: return 3; case 1: return 5; default: return 0; case \"\": return 2; case 4.0: return 4; } return -1; }\n"+ // test 3786 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 0: return 3; case 1: return 5; case \"\": return 2; default: return 0; case 4.0: return 4; } return -1; }\n"+ // test 3787 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 0: return 3; case 1: return 5; case \"\": return 2; case 4.0: return 4; default: return 0; } return -1; }\n"+ // test 3788 - "mixed b() { return 4; }", - - - - - - - "=mixed a() { switch(4.0) { case 4.0: return 4; case 0: return 3; case \"\": return 2; case 1: return 5; } return 0; }\n"+ // test 3789 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { default: return 0; case 4.0: return 4; case 0: return 3; case \"\": return 2; case 1: return 5; } return -1; }\n"+ // test 3790 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 4.0: return 4; default: return 0; case 0: return 3; case \"\": return 2; case 1: return 5; } return -1; }\n"+ // test 3791 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 4.0: return 4; case 0: return 3; default: return 0; case \"\": return 2; case 1: return 5; } return -1; }\n"+ // test 3792 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 4.0: return 4; case 0: return 3; case \"\": return 2; default: return 0; case 1: return 5; } return -1; }\n"+ // test 3793 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 4.0: return 4; case 0: return 3; case \"\": return 2; case 1: return 5; default: return 0; } return -1; }\n"+ // test 3794 - "mixed b() { return 4; }", - - - "=mixed a() { switch(4.0) { case 4.0: return 4; case 0: return 3; case 1: return 5; case \"\": return 2; } return 0; }\n"+ // test 3795 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { default: return 0; case 4.0: return 4; case 0: return 3; case 1: return 5; case \"\": return 2; } return -1; }\n"+ // test 3796 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 4.0: return 4; default: return 0; case 0: return 3; case 1: return 5; case \"\": return 2; } return -1; }\n"+ // test 3797 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 4.0: return 4; case 0: return 3; default: return 0; case 1: return 5; case \"\": return 2; } return -1; }\n"+ // test 3798 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 4.0: return 4; case 0: return 3; case 1: return 5; default: return 0; case \"\": return 2; } return -1; }\n"+ // test 3799 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 4.0: return 4; case 0: return 3; case 1: return 5; case \"\": return 2; default: return 0; } return -1; }\n"+ // test 3800 - "mixed b() { return 4; }", - - - - - "=mixed a() { switch(4.0) { case 4.0: return 4; case \"\": return 2; case 0: return 3; case 1: return 5; } return 0; }\n"+ // test 3801 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { default: return 0; case 4.0: return 4; case \"\": return 2; case 0: return 3; case 1: return 5; } return -1; }\n"+ // test 3802 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 4.0: return 4; default: return 0; case \"\": return 2; case 0: return 3; case 1: return 5; } return -1; }\n"+ // test 3803 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 4.0: return 4; case \"\": return 2; default: return 0; case 0: return 3; case 1: return 5; } return -1; }\n"+ // test 3804 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 4.0: return 4; case \"\": return 2; case 0: return 3; default: return 0; case 1: return 5; } return -1; }\n"+ // test 3805 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 4.0: return 4; case \"\": return 2; case 0: return 3; case 1: return 5; default: return 0; } return -1; }\n"+ // test 3806 - "mixed b() { return 4; }", - - - "=mixed a() { switch(4.0) { case 4.0: return 4; case \"\": return 2; case 1: return 5; case 0: return 3; } return 0; }\n"+ // test 3807 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { default: return 0; case 4.0: return 4; case \"\": return 2; case 1: return 5; case 0: return 3; } return -1; }\n"+ // test 3808 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 4.0: return 4; default: return 0; case \"\": return 2; case 1: return 5; case 0: return 3; } return -1; }\n"+ // test 3809 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 4.0: return 4; case \"\": return 2; default: return 0; case 1: return 5; case 0: return 3; } return -1; }\n"+ // test 3810 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 4.0: return 4; case \"\": return 2; case 1: return 5; default: return 0; case 0: return 3; } return -1; }\n"+ // test 3811 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 4.0: return 4; case \"\": return 2; case 1: return 5; case 0: return 3; default: return 0; } return -1; }\n"+ // test 3812 - "mixed b() { return 4; }", - - - - - "=mixed a() { switch(4.0) { case 4.0: return 4; case 1: return 5; case \"\": return 2; case 0: return 3; } return 0; }\n"+ // test 3813 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { default: return 0; case 4.0: return 4; case 1: return 5; case \"\": return 2; case 0: return 3; } return -1; }\n"+ // test 3814 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 4.0: return 4; default: return 0; case 1: return 5; case \"\": return 2; case 0: return 3; } return -1; }\n"+ // test 3815 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 4.0: return 4; case 1: return 5; default: return 0; case \"\": return 2; case 0: return 3; } return -1; }\n"+ // test 3816 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 4.0: return 4; case 1: return 5; case \"\": return 2; default: return 0; case 0: return 3; } return -1; }\n"+ // test 3817 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 4.0: return 4; case 1: return 5; case \"\": return 2; case 0: return 3; default: return 0; } return -1; }\n"+ // test 3818 - "mixed b() { return 4; }", - - - "=mixed a() { switch(4.0) { case 4.0: return 4; case 1: return 5; case 0: return 3; case \"\": return 2; } return 0; }\n"+ // test 3819 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { default: return 0; case 4.0: return 4; case 1: return 5; case 0: return 3; case \"\": return 2; } return -1; }\n"+ // test 3820 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 4.0: return 4; default: return 0; case 1: return 5; case 0: return 3; case \"\": return 2; } return -1; }\n"+ // test 3821 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 4.0: return 4; case 1: return 5; default: return 0; case 0: return 3; case \"\": return 2; } return -1; }\n"+ // test 3822 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 4.0: return 4; case 1: return 5; case 0: return 3; default: return 0; case \"\": return 2; } return -1; }\n"+ // test 3823 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 4.0: return 4; case 1: return 5; case 0: return 3; case \"\": return 2; default: return 0; } return -1; }\n"+ // test 3824 - "mixed b() { return 4; }", - - - - - - - "=mixed a() { switch(4.0) { case 1: return 5; case 0: return 3; case 4.0: return 4; case \"\": return 2; } return 0; }\n"+ // test 3825 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { default: return 0; case 1: return 5; case 0: return 3; case 4.0: return 4; case \"\": return 2; } return -1; }\n"+ // test 3826 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 1: return 5; default: return 0; case 0: return 3; case 4.0: return 4; case \"\": return 2; } return -1; }\n"+ // test 3827 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 1: return 5; case 0: return 3; default: return 0; case 4.0: return 4; case \"\": return 2; } return -1; }\n"+ // test 3828 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 1: return 5; case 0: return 3; case 4.0: return 4; default: return 0; case \"\": return 2; } return -1; }\n"+ // test 3829 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 1: return 5; case 0: return 3; case 4.0: return 4; case \"\": return 2; default: return 0; } return -1; }\n"+ // test 3830 - "mixed b() { return 4; }", - - - "=mixed a() { switch(4.0) { case 1: return 5; case 0: return 3; case \"\": return 2; case 4.0: return 4; } return 0; }\n"+ // test 3831 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { default: return 0; case 1: return 5; case 0: return 3; case \"\": return 2; case 4.0: return 4; } return -1; }\n"+ // test 3832 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 1: return 5; default: return 0; case 0: return 3; case \"\": return 2; case 4.0: return 4; } return -1; }\n"+ // test 3833 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 1: return 5; case 0: return 3; default: return 0; case \"\": return 2; case 4.0: return 4; } return -1; }\n"+ // test 3834 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 1: return 5; case 0: return 3; case \"\": return 2; default: return 0; case 4.0: return 4; } return -1; }\n"+ // test 3835 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 1: return 5; case 0: return 3; case \"\": return 2; case 4.0: return 4; default: return 0; } return -1; }\n"+ // test 3836 - "mixed b() { return 4; }", - - - - - "=mixed a() { switch(4.0) { case 1: return 5; case 4.0: return 4; case 0: return 3; case \"\": return 2; } return 0; }\n"+ // test 3837 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { default: return 0; case 1: return 5; case 4.0: return 4; case 0: return 3; case \"\": return 2; } return -1; }\n"+ // test 3838 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 1: return 5; default: return 0; case 4.0: return 4; case 0: return 3; case \"\": return 2; } return -1; }\n"+ // test 3839 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 1: return 5; case 4.0: return 4; default: return 0; case 0: return 3; case \"\": return 2; } return -1; }\n"+ // test 3840 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 1: return 5; case 4.0: return 4; case 0: return 3; default: return 0; case \"\": return 2; } return -1; }\n"+ // test 3841 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 1: return 5; case 4.0: return 4; case 0: return 3; case \"\": return 2; default: return 0; } return -1; }\n"+ // test 3842 - "mixed b() { return 4; }", - - - "=mixed a() { switch(4.0) { case 1: return 5; case 4.0: return 4; case \"\": return 2; case 0: return 3; } return 0; }\n"+ // test 3843 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { default: return 0; case 1: return 5; case 4.0: return 4; case \"\": return 2; case 0: return 3; } return -1; }\n"+ // test 3844 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 1: return 5; default: return 0; case 4.0: return 4; case \"\": return 2; case 0: return 3; } return -1; }\n"+ // test 3845 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 1: return 5; case 4.0: return 4; default: return 0; case \"\": return 2; case 0: return 3; } return -1; }\n"+ // test 3846 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 1: return 5; case 4.0: return 4; case \"\": return 2; default: return 0; case 0: return 3; } return -1; }\n"+ // test 3847 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 1: return 5; case 4.0: return 4; case \"\": return 2; case 0: return 3; default: return 0; } return -1; }\n"+ // test 3848 - "mixed b() { return 4; }", - - - - - "=mixed a() { switch(4.0) { case 1: return 5; case \"\": return 2; case 4.0: return 4; case 0: return 3; } return 0; }\n"+ // test 3849 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { default: return 0; case 1: return 5; case \"\": return 2; case 4.0: return 4; case 0: return 3; } return -1; }\n"+ // test 3850 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 1: return 5; default: return 0; case \"\": return 2; case 4.0: return 4; case 0: return 3; } return -1; }\n"+ // test 3851 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 1: return 5; case \"\": return 2; default: return 0; case 4.0: return 4; case 0: return 3; } return -1; }\n"+ // test 3852 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 1: return 5; case \"\": return 2; case 4.0: return 4; default: return 0; case 0: return 3; } return -1; }\n"+ // test 3853 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 1: return 5; case \"\": return 2; case 4.0: return 4; case 0: return 3; default: return 0; } return -1; }\n"+ // test 3854 - "mixed b() { return 4; }", - - - "=mixed a() { switch(4.0) { case 1: return 5; case \"\": return 2; case 0: return 3; case 4.0: return 4; } return 0; }\n"+ // test 3855 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { default: return 0; case 1: return 5; case \"\": return 2; case 0: return 3; case 4.0: return 4; } return -1; }\n"+ // test 3856 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 1: return 5; default: return 0; case \"\": return 2; case 0: return 3; case 4.0: return 4; } return -1; }\n"+ // test 3857 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 1: return 5; case \"\": return 2; default: return 0; case 0: return 3; case 4.0: return 4; } return -1; }\n"+ // test 3858 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 1: return 5; case \"\": return 2; case 0: return 3; default: return 0; case 4.0: return 4; } return -1; }\n"+ // test 3859 - "mixed b() { return 4; }", - "=mixed a() { switch(4.0) { case 1: return 5; case \"\": return 2; case 0: return 3; case 4.0: return 4; default: return 0; } return -1; }\n"+ // test 3860 - "mixed b() { return 4; }", - - - - - - - - - "=mixed a() { switch(1) { case \"\": return 2; case 0: return 3; case 4.0: return 4; case 1: return 5; } return 0; }\n"+ // test 3861 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { default: return 0; case \"\": return 2; case 0: return 3; case 4.0: return 4; case 1: return 5; } return -1; }\n"+ // test 3862 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case \"\": return 2; default: return 0; case 0: return 3; case 4.0: return 4; case 1: return 5; } return -1; }\n"+ // test 3863 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case \"\": return 2; case 0: return 3; default: return 0; case 4.0: return 4; case 1: return 5; } return -1; }\n"+ // test 3864 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case \"\": return 2; case 0: return 3; case 4.0: return 4; default: return 0; case 1: return 5; } return -1; }\n"+ // test 3865 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case \"\": return 2; case 0: return 3; case 4.0: return 4; case 1: return 5; default: return 0; } return -1; }\n"+ // test 3866 - "mixed b() { return 5; }", - - - "=mixed a() { switch(1) { case \"\": return 2; case 0: return 3; case 1: return 5; case 4.0: return 4; } return 0; }\n"+ // test 3867 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { default: return 0; case \"\": return 2; case 0: return 3; case 1: return 5; case 4.0: return 4; } return -1; }\n"+ // test 3868 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case \"\": return 2; default: return 0; case 0: return 3; case 1: return 5; case 4.0: return 4; } return -1; }\n"+ // test 3869 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case \"\": return 2; case 0: return 3; default: return 0; case 1: return 5; case 4.0: return 4; } return -1; }\n"+ // test 3870 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case \"\": return 2; case 0: return 3; case 1: return 5; default: return 0; case 4.0: return 4; } return -1; }\n"+ // test 3871 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case \"\": return 2; case 0: return 3; case 1: return 5; case 4.0: return 4; default: return 0; } return -1; }\n"+ // test 3872 - "mixed b() { return 5; }", - - - - - "=mixed a() { switch(1) { case \"\": return 2; case 4.0: return 4; case 0: return 3; case 1: return 5; } return 0; }\n"+ // test 3873 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { default: return 0; case \"\": return 2; case 4.0: return 4; case 0: return 3; case 1: return 5; } return -1; }\n"+ // test 3874 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case \"\": return 2; default: return 0; case 4.0: return 4; case 0: return 3; case 1: return 5; } return -1; }\n"+ // test 3875 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case \"\": return 2; case 4.0: return 4; default: return 0; case 0: return 3; case 1: return 5; } return -1; }\n"+ // test 3876 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case \"\": return 2; case 4.0: return 4; case 0: return 3; default: return 0; case 1: return 5; } return -1; }\n"+ // test 3877 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case \"\": return 2; case 4.0: return 4; case 0: return 3; case 1: return 5; default: return 0; } return -1; }\n"+ // test 3878 - "mixed b() { return 5; }", - - - "=mixed a() { switch(1) { case \"\": return 2; case 4.0: return 4; case 1: return 5; case 0: return 3; } return 0; }\n"+ // test 3879 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { default: return 0; case \"\": return 2; case 4.0: return 4; case 1: return 5; case 0: return 3; } return -1; }\n"+ // test 3880 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case \"\": return 2; default: return 0; case 4.0: return 4; case 1: return 5; case 0: return 3; } return -1; }\n"+ // test 3881 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case \"\": return 2; case 4.0: return 4; default: return 0; case 1: return 5; case 0: return 3; } return -1; }\n"+ // test 3882 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case \"\": return 2; case 4.0: return 4; case 1: return 5; default: return 0; case 0: return 3; } return -1; }\n"+ // test 3883 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case \"\": return 2; case 4.0: return 4; case 1: return 5; case 0: return 3; default: return 0; } return -1; }\n"+ // test 3884 - "mixed b() { return 5; }", - - - - - "=mixed a() { switch(1) { case \"\": return 2; case 1: return 5; case 4.0: return 4; case 0: return 3; } return 0; }\n"+ // test 3885 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { default: return 0; case \"\": return 2; case 1: return 5; case 4.0: return 4; case 0: return 3; } return -1; }\n"+ // test 3886 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case \"\": return 2; default: return 0; case 1: return 5; case 4.0: return 4; case 0: return 3; } return -1; }\n"+ // test 3887 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case \"\": return 2; case 1: return 5; default: return 0; case 4.0: return 4; case 0: return 3; } return -1; }\n"+ // test 3888 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case \"\": return 2; case 1: return 5; case 4.0: return 4; default: return 0; case 0: return 3; } return -1; }\n"+ // test 3889 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case \"\": return 2; case 1: return 5; case 4.0: return 4; case 0: return 3; default: return 0; } return -1; }\n"+ // test 3890 - "mixed b() { return 5; }", - - - "=mixed a() { switch(1) { case \"\": return 2; case 1: return 5; case 0: return 3; case 4.0: return 4; } return 0; }\n"+ // test 3891 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { default: return 0; case \"\": return 2; case 1: return 5; case 0: return 3; case 4.0: return 4; } return -1; }\n"+ // test 3892 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case \"\": return 2; default: return 0; case 1: return 5; case 0: return 3; case 4.0: return 4; } return -1; }\n"+ // test 3893 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case \"\": return 2; case 1: return 5; default: return 0; case 0: return 3; case 4.0: return 4; } return -1; }\n"+ // test 3894 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case \"\": return 2; case 1: return 5; case 0: return 3; default: return 0; case 4.0: return 4; } return -1; }\n"+ // test 3895 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case \"\": return 2; case 1: return 5; case 0: return 3; case 4.0: return 4; default: return 0; } return -1; }\n"+ // test 3896 - "mixed b() { return 5; }", - - - - - - - "=mixed a() { switch(1) { case 0: return 3; case \"\": return 2; case 4.0: return 4; case 1: return 5; } return 0; }\n"+ // test 3897 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { default: return 0; case 0: return 3; case \"\": return 2; case 4.0: return 4; case 1: return 5; } return -1; }\n"+ // test 3898 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case 0: return 3; default: return 0; case \"\": return 2; case 4.0: return 4; case 1: return 5; } return -1; }\n"+ // test 3899 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case 0: return 3; case \"\": return 2; default: return 0; case 4.0: return 4; case 1: return 5; } return -1; }\n"+ // test 3900 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case 0: return 3; case \"\": return 2; case 4.0: return 4; default: return 0; case 1: return 5; } return -1; }\n"+ // test 3901 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case 0: return 3; case \"\": return 2; case 4.0: return 4; case 1: return 5; default: return 0; } return -1; }\n"+ // test 3902 - "mixed b() { return 5; }", - - - "=mixed a() { switch(1) { case 0: return 3; case \"\": return 2; case 1: return 5; case 4.0: return 4; } return 0; }\n"+ // test 3903 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { default: return 0; case 0: return 3; case \"\": return 2; case 1: return 5; case 4.0: return 4; } return -1; }\n"+ // test 3904 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case 0: return 3; default: return 0; case \"\": return 2; case 1: return 5; case 4.0: return 4; } return -1; }\n"+ // test 3905 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case 0: return 3; case \"\": return 2; default: return 0; case 1: return 5; case 4.0: return 4; } return -1; }\n"+ // test 3906 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case 0: return 3; case \"\": return 2; case 1: return 5; default: return 0; case 4.0: return 4; } return -1; }\n"+ // test 3907 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case 0: return 3; case \"\": return 2; case 1: return 5; case 4.0: return 4; default: return 0; } return -1; }\n"+ // test 3908 - "mixed b() { return 5; }", - - - - - "=mixed a() { switch(1) { case 0: return 3; case 4.0: return 4; case \"\": return 2; case 1: return 5; } return 0; }\n"+ // test 3909 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { default: return 0; case 0: return 3; case 4.0: return 4; case \"\": return 2; case 1: return 5; } return -1; }\n"+ // test 3910 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case 0: return 3; default: return 0; case 4.0: return 4; case \"\": return 2; case 1: return 5; } return -1; }\n"+ // test 3911 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case 0: return 3; case 4.0: return 4; default: return 0; case \"\": return 2; case 1: return 5; } return -1; }\n"+ // test 3912 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case 0: return 3; case 4.0: return 4; case \"\": return 2; default: return 0; case 1: return 5; } return -1; }\n"+ // test 3913 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case 0: return 3; case 4.0: return 4; case \"\": return 2; case 1: return 5; default: return 0; } return -1; }\n"+ // test 3914 - "mixed b() { return 5; }", - - - "=mixed a() { switch(1) { case 0: return 3; case 4.0: return 4; case 1: return 5; case \"\": return 2; } return 0; }\n"+ // test 3915 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { default: return 0; case 0: return 3; case 4.0: return 4; case 1: return 5; case \"\": return 2; } return -1; }\n"+ // test 3916 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case 0: return 3; default: return 0; case 4.0: return 4; case 1: return 5; case \"\": return 2; } return -1; }\n"+ // test 3917 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case 0: return 3; case 4.0: return 4; default: return 0; case 1: return 5; case \"\": return 2; } return -1; }\n"+ // test 3918 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case 0: return 3; case 4.0: return 4; case 1: return 5; default: return 0; case \"\": return 2; } return -1; }\n"+ // test 3919 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case 0: return 3; case 4.0: return 4; case 1: return 5; case \"\": return 2; default: return 0; } return -1; }\n"+ // test 3920 - "mixed b() { return 5; }", - - - - - "=mixed a() { switch(1) { case 0: return 3; case 1: return 5; case 4.0: return 4; case \"\": return 2; } return 0; }\n"+ // test 3921 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { default: return 0; case 0: return 3; case 1: return 5; case 4.0: return 4; case \"\": return 2; } return -1; }\n"+ // test 3922 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case 0: return 3; default: return 0; case 1: return 5; case 4.0: return 4; case \"\": return 2; } return -1; }\n"+ // test 3923 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case 0: return 3; case 1: return 5; default: return 0; case 4.0: return 4; case \"\": return 2; } return -1; }\n"+ // test 3924 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case 0: return 3; case 1: return 5; case 4.0: return 4; default: return 0; case \"\": return 2; } return -1; }\n"+ // test 3925 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case 0: return 3; case 1: return 5; case 4.0: return 4; case \"\": return 2; default: return 0; } return -1; }\n"+ // test 3926 - "mixed b() { return 5; }", - - - "=mixed a() { switch(1) { case 0: return 3; case 1: return 5; case \"\": return 2; case 4.0: return 4; } return 0; }\n"+ // test 3927 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { default: return 0; case 0: return 3; case 1: return 5; case \"\": return 2; case 4.0: return 4; } return -1; }\n"+ // test 3928 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case 0: return 3; default: return 0; case 1: return 5; case \"\": return 2; case 4.0: return 4; } return -1; }\n"+ // test 3929 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case 0: return 3; case 1: return 5; default: return 0; case \"\": return 2; case 4.0: return 4; } return -1; }\n"+ // test 3930 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case 0: return 3; case 1: return 5; case \"\": return 2; default: return 0; case 4.0: return 4; } return -1; }\n"+ // test 3931 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case 0: return 3; case 1: return 5; case \"\": return 2; case 4.0: return 4; default: return 0; } return -1; }\n"+ // test 3932 - "mixed b() { return 5; }", - - - - - - - "=mixed a() { switch(1) { case 4.0: return 4; case 0: return 3; case \"\": return 2; case 1: return 5; } return 0; }\n"+ // test 3933 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { default: return 0; case 4.0: return 4; case 0: return 3; case \"\": return 2; case 1: return 5; } return -1; }\n"+ // test 3934 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case 4.0: return 4; default: return 0; case 0: return 3; case \"\": return 2; case 1: return 5; } return -1; }\n"+ // test 3935 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case 4.0: return 4; case 0: return 3; default: return 0; case \"\": return 2; case 1: return 5; } return -1; }\n"+ // test 3936 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case 4.0: return 4; case 0: return 3; case \"\": return 2; default: return 0; case 1: return 5; } return -1; }\n"+ // test 3937 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case 4.0: return 4; case 0: return 3; case \"\": return 2; case 1: return 5; default: return 0; } return -1; }\n"+ // test 3938 - "mixed b() { return 5; }", - - - "=mixed a() { switch(1) { case 4.0: return 4; case 0: return 3; case 1: return 5; case \"\": return 2; } return 0; }\n"+ // test 3939 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { default: return 0; case 4.0: return 4; case 0: return 3; case 1: return 5; case \"\": return 2; } return -1; }\n"+ // test 3940 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case 4.0: return 4; default: return 0; case 0: return 3; case 1: return 5; case \"\": return 2; } return -1; }\n"+ // test 3941 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case 4.0: return 4; case 0: return 3; default: return 0; case 1: return 5; case \"\": return 2; } return -1; }\n"+ // test 3942 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case 4.0: return 4; case 0: return 3; case 1: return 5; default: return 0; case \"\": return 2; } return -1; }\n"+ // test 3943 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case 4.0: return 4; case 0: return 3; case 1: return 5; case \"\": return 2; default: return 0; } return -1; }\n"+ // test 3944 - "mixed b() { return 5; }", - - - - - "=mixed a() { switch(1) { case 4.0: return 4; case \"\": return 2; case 0: return 3; case 1: return 5; } return 0; }\n"+ // test 3945 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { default: return 0; case 4.0: return 4; case \"\": return 2; case 0: return 3; case 1: return 5; } return -1; }\n"+ // test 3946 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case 4.0: return 4; default: return 0; case \"\": return 2; case 0: return 3; case 1: return 5; } return -1; }\n"+ // test 3947 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case 4.0: return 4; case \"\": return 2; default: return 0; case 0: return 3; case 1: return 5; } return -1; }\n"+ // test 3948 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case 4.0: return 4; case \"\": return 2; case 0: return 3; default: return 0; case 1: return 5; } return -1; }\n"+ // test 3949 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case 4.0: return 4; case \"\": return 2; case 0: return 3; case 1: return 5; default: return 0; } return -1; }\n"+ // test 3950 - "mixed b() { return 5; }", - - - "=mixed a() { switch(1) { case 4.0: return 4; case \"\": return 2; case 1: return 5; case 0: return 3; } return 0; }\n"+ // test 3951 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { default: return 0; case 4.0: return 4; case \"\": return 2; case 1: return 5; case 0: return 3; } return -1; }\n"+ // test 3952 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case 4.0: return 4; default: return 0; case \"\": return 2; case 1: return 5; case 0: return 3; } return -1; }\n"+ // test 3953 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case 4.0: return 4; case \"\": return 2; default: return 0; case 1: return 5; case 0: return 3; } return -1; }\n"+ // test 3954 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case 4.0: return 4; case \"\": return 2; case 1: return 5; default: return 0; case 0: return 3; } return -1; }\n"+ // test 3955 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case 4.0: return 4; case \"\": return 2; case 1: return 5; case 0: return 3; default: return 0; } return -1; }\n"+ // test 3956 - "mixed b() { return 5; }", - - - - - "=mixed a() { switch(1) { case 4.0: return 4; case 1: return 5; case \"\": return 2; case 0: return 3; } return 0; }\n"+ // test 3957 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { default: return 0; case 4.0: return 4; case 1: return 5; case \"\": return 2; case 0: return 3; } return -1; }\n"+ // test 3958 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case 4.0: return 4; default: return 0; case 1: return 5; case \"\": return 2; case 0: return 3; } return -1; }\n"+ // test 3959 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case 4.0: return 4; case 1: return 5; default: return 0; case \"\": return 2; case 0: return 3; } return -1; }\n"+ // test 3960 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case 4.0: return 4; case 1: return 5; case \"\": return 2; default: return 0; case 0: return 3; } return -1; }\n"+ // test 3961 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case 4.0: return 4; case 1: return 5; case \"\": return 2; case 0: return 3; default: return 0; } return -1; }\n"+ // test 3962 - "mixed b() { return 5; }", - - - "=mixed a() { switch(1) { case 4.0: return 4; case 1: return 5; case 0: return 3; case \"\": return 2; } return 0; }\n"+ // test 3963 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { default: return 0; case 4.0: return 4; case 1: return 5; case 0: return 3; case \"\": return 2; } return -1; }\n"+ // test 3964 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case 4.0: return 4; default: return 0; case 1: return 5; case 0: return 3; case \"\": return 2; } return -1; }\n"+ // test 3965 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case 4.0: return 4; case 1: return 5; default: return 0; case 0: return 3; case \"\": return 2; } return -1; }\n"+ // test 3966 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case 4.0: return 4; case 1: return 5; case 0: return 3; default: return 0; case \"\": return 2; } return -1; }\n"+ // test 3967 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case 4.0: return 4; case 1: return 5; case 0: return 3; case \"\": return 2; default: return 0; } return -1; }\n"+ // test 3968 - "mixed b() { return 5; }", - - - - - - - "=mixed a() { switch(1) { case 1: return 5; case 0: return 3; case 4.0: return 4; case \"\": return 2; } return 0; }\n"+ // test 3969 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { default: return 0; case 1: return 5; case 0: return 3; case 4.0: return 4; case \"\": return 2; } return -1; }\n"+ // test 3970 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case 1: return 5; default: return 0; case 0: return 3; case 4.0: return 4; case \"\": return 2; } return -1; }\n"+ // test 3971 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case 1: return 5; case 0: return 3; default: return 0; case 4.0: return 4; case \"\": return 2; } return -1; }\n"+ // test 3972 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case 1: return 5; case 0: return 3; case 4.0: return 4; default: return 0; case \"\": return 2; } return -1; }\n"+ // test 3973 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case 1: return 5; case 0: return 3; case 4.0: return 4; case \"\": return 2; default: return 0; } return -1; }\n"+ // test 3974 - "mixed b() { return 5; }", - - - "=mixed a() { switch(1) { case 1: return 5; case 0: return 3; case \"\": return 2; case 4.0: return 4; } return 0; }\n"+ // test 3975 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { default: return 0; case 1: return 5; case 0: return 3; case \"\": return 2; case 4.0: return 4; } return -1; }\n"+ // test 3976 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case 1: return 5; default: return 0; case 0: return 3; case \"\": return 2; case 4.0: return 4; } return -1; }\n"+ // test 3977 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case 1: return 5; case 0: return 3; default: return 0; case \"\": return 2; case 4.0: return 4; } return -1; }\n"+ // test 3978 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case 1: return 5; case 0: return 3; case \"\": return 2; default: return 0; case 4.0: return 4; } return -1; }\n"+ // test 3979 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case 1: return 5; case 0: return 3; case \"\": return 2; case 4.0: return 4; default: return 0; } return -1; }\n"+ // test 3980 - "mixed b() { return 5; }", - - - - - "=mixed a() { switch(1) { case 1: return 5; case 4.0: return 4; case 0: return 3; case \"\": return 2; } return 0; }\n"+ // test 3981 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { default: return 0; case 1: return 5; case 4.0: return 4; case 0: return 3; case \"\": return 2; } return -1; }\n"+ // test 3982 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case 1: return 5; default: return 0; case 4.0: return 4; case 0: return 3; case \"\": return 2; } return -1; }\n"+ // test 3983 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case 1: return 5; case 4.0: return 4; default: return 0; case 0: return 3; case \"\": return 2; } return -1; }\n"+ // test 3984 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case 1: return 5; case 4.0: return 4; case 0: return 3; default: return 0; case \"\": return 2; } return -1; }\n"+ // test 3985 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case 1: return 5; case 4.0: return 4; case 0: return 3; case \"\": return 2; default: return 0; } return -1; }\n"+ // test 3986 - "mixed b() { return 5; }", - - - "=mixed a() { switch(1) { case 1: return 5; case 4.0: return 4; case \"\": return 2; case 0: return 3; } return 0; }\n"+ // test 3987 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { default: return 0; case 1: return 5; case 4.0: return 4; case \"\": return 2; case 0: return 3; } return -1; }\n"+ // test 3988 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case 1: return 5; default: return 0; case 4.0: return 4; case \"\": return 2; case 0: return 3; } return -1; }\n"+ // test 3989 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case 1: return 5; case 4.0: return 4; default: return 0; case \"\": return 2; case 0: return 3; } return -1; }\n"+ // test 3990 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case 1: return 5; case 4.0: return 4; case \"\": return 2; default: return 0; case 0: return 3; } return -1; }\n"+ // test 3991 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case 1: return 5; case 4.0: return 4; case \"\": return 2; case 0: return 3; default: return 0; } return -1; }\n"+ // test 3992 - "mixed b() { return 5; }", - - - - - "=mixed a() { switch(1) { case 1: return 5; case \"\": return 2; case 4.0: return 4; case 0: return 3; } return 0; }\n"+ // test 3993 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { default: return 0; case 1: return 5; case \"\": return 2; case 4.0: return 4; case 0: return 3; } return -1; }\n"+ // test 3994 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case 1: return 5; default: return 0; case \"\": return 2; case 4.0: return 4; case 0: return 3; } return -1; }\n"+ // test 3995 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case 1: return 5; case \"\": return 2; default: return 0; case 4.0: return 4; case 0: return 3; } return -1; }\n"+ // test 3996 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case 1: return 5; case \"\": return 2; case 4.0: return 4; default: return 0; case 0: return 3; } return -1; }\n"+ // test 3997 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case 1: return 5; case \"\": return 2; case 4.0: return 4; case 0: return 3; default: return 0; } return -1; }\n"+ // test 3998 - "mixed b() { return 5; }", - - - "=mixed a() { switch(1) { case 1: return 5; case \"\": return 2; case 0: return 3; case 4.0: return 4; } return 0; }\n"+ // test 3999 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { default: return 0; case 1: return 5; case \"\": return 2; case 0: return 3; case 4.0: return 4; } return -1; }\n"+ // test 4000 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case 1: return 5; default: return 0; case \"\": return 2; case 0: return 3; case 4.0: return 4; } return -1; }\n"+ // test 4001 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case 1: return 5; case \"\": return 2; default: return 0; case 0: return 3; case 4.0: return 4; } return -1; }\n"+ // test 4002 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case 1: return 5; case \"\": return 2; case 0: return 3; default: return 0; case 4.0: return 4; } return -1; }\n"+ // test 4003 - "mixed b() { return 5; }", - "=mixed a() { switch(1) { case 1: return 5; case \"\": return 2; case 0: return 3; case 4.0: return 4; default: return 0; } return -1; }\n"+ // test 4004 - "mixed b() { return 5; }", - - - - - - - "=mixed a() { int e;string t=\"\"; for(e=0;e<10;e++) switch(e) { default: t+=e; case 4..8: } return t; }\n"+ // test 4005 - "mixed b() { return \"01239\"; }", - "=mixed a() { float e,q; q=0.0; for(e=0.1;e<10.0;e+=1.0) switch(e) { default: q+=e; case 4.0..8.0: } return q; }\n"+ // test 4006 - "mixed b() { return 0.1+1.1+2.1+3.1+8.1+9.1; }", - -// testing preprocessor -// #define - "=mixed a() { \n#define FOOa 1\nreturn FOOa;\n; }\n"+ // test 4007 - "mixed b() { return 1; }", - - "=mixed a() { \n#define FOOb 17\n#undef FOOb\n#define FOOb 1\nreturn FOOb;\n; }\n"+ // test 4008 - "mixed b() { return 1; }", - - "cmixed a() { \n#define FOOc FOOc FOO\nFOO\n; }\n", // test 4009 - - "cmixed a() { \n#error FOOd\nFOO\n; }\n", // test 4010 - -// /* */ - "=mixed a() { \n/* return 99; * / /* */\nreturn 1;\n; }\n"+ // test 4011 - "mixed b() { return 1; }", - -// // - "=mixed a() { \n// return 99;\nreturn 1;\n; }\n"+ // test 4012 - "mixed b() { return 1; }", - -// #if - - - - "=mixed a() { \n#if 1\nreturn 1;\n#else\nreturn 0;\n#endif\n; }\n"+ // test 4013 - "mixed b() { return 1; }", - "=mixed a() { \n#if 0\nreturn 1;\n#else\nreturn 0;\n#endif\n; }\n"+ // test 4014 - "mixed b() { return 0; }", - -// #if == - "=mixed a() { \n#if 1==1\nreturn 1;\n#else\nreturn 0;\n#endif\n; }\n"+ // test 4015 - "mixed b() { return 1; }", - "=mixed a() { \n#if 1==2\nreturn 1;\n#else\nreturn 0;\n#endif\n; }\n"+ // test 4016 - "mixed b() { return 0; }", - -// #if != - "=mixed a() { \n#if 1!=2\nreturn 1;\n#else\nreturn 0;\n#endif\n; }\n"+ // test 4017 - "mixed b() { return 1; }", - "=mixed a() { \n#if 1!=1\nreturn 1;\n#else\nreturn 0;\n#endif\n; }\n"+ // test 4018 - "mixed b() { return 0; }", - -// #if ( ) - "=mixed a() { \n#if (((1))==1) \nreturn 1;\n#else\nreturn 0;\n#endif\n; }\n"+ // test 4019 - "mixed b() { return 1; }", - "=mixed a() { \n#if ((1)==(2)) \nreturn 1;\n#else\nreturn 0;\n#endif\n; }\n"+ // test 4020 - "mixed b() { return 0; }", - -// #if -1 - "=mixed a() { \n#if -1 \nreturn 1;\n#else\nreturn 0;\n#endif\n; }\n"+ // test 4021 - "mixed b() { return 1; }", - "=mixed a() { \n#if (-1) \nreturn 1;\n#else\nreturn 0;\n#endif\n; }\n"+ // test 4022 - "mixed b() { return 1; }", - "=mixed a() { \n#if (-1==0-1) \nreturn 1;\n#else\nreturn 0;\n#endif\n; }\n"+ // test 4023 - "mixed b() { return 1; }", - -// #if ~ - "=mixed a() { \n#if (-1-1==~1) \nreturn 1;\n#else\nreturn 0;\n#endif\n; }\n"+ // test 4024 - "mixed b() { return 1; }", - -// #if ?: - "=mixed a() { \n#if 17 == ( 1 ? 17 : 18 ) \nreturn 1;\n#else\nreturn 0;\n#endif\n; }\n"+ // test 4025 - "mixed b() { return 1; }", - "=mixed a() { \n#if 18 == ( 0 ? 17 : 18 ) \nreturn 1;\n#else\nreturn 0;\n#endif\n; }\n"+ // test 4026 - "mixed b() { return 1; }", - -// #if || - "=mixed a() { \n#if 10 == ( 10 || 20 ) \nreturn 1;\n#else\nreturn 0;\n#endif\n; }\n"+ // test 4027 - "mixed b() { return 1; }", - "=mixed a() { \n#if 20 == ( 0 || 20 ) \nreturn 1;\n#else\nreturn 0;\n#endif\n; }\n"+ // test 4028 - "mixed b() { return 1; }", - -// #if && - "=mixed a() { \n#if 0 == ( 0 && 20 ) \nreturn 1;\n#else\nreturn 0;\n#endif\n; }\n"+ // test 4029 - "mixed b() { return 1; }", - "=mixed a() { \n#if 20 == ( 10 && 20 ) \nreturn 1;\n#else\nreturn 0;\n#endif\n; }\n"+ // test 4030 - "mixed b() { return 1; }", - -// #if | - "=mixed a() { \n#if 3 == ( 1 | 2 ) \nreturn 1;\n#else\nreturn 0;\n#endif\n; }\n"+ // test 4031 - "mixed b() { return 1; }", - "=mixed a() { \n#if 2 == ( 2 | 2 ) \nreturn 1;\n#else\nreturn 0;\n#endif\n; }\n"+ // test 4032 - "mixed b() { return 1; }", - -// #if ^ - "=mixed a() { \n#if 0 == ( 2 ^ 2 ) \nreturn 1;\n#else\nreturn 0;\n#endif\n; }\n"+ // test 4033 - "mixed b() { return 1; }", - "=mixed a() { \n#if 3 == ( 1 ^ 2 ) \nreturn 1;\n#else\nreturn 0;\n#endif\n; }\n"+ // test 4034 - "mixed b() { return 1; }", - -// #if & - "=mixed a() { \n#if 0 == ( 1 & 2 ) \nreturn 1;\n#else\nreturn 0;\n#endif\n; }\n"+ // test 4035 - "mixed b() { return 1; }", - "=mixed a() { \n#if 2 == ( 2 & 7 ) \nreturn 1;\n#else\nreturn 0;\n#endif\n; }\n"+ // test 4036 - "mixed b() { return 1; }", - -// #if <= >= < > ! strings, floats - - - - - "=mixed a() { \n#if 1<2\nreturn 1;\n#else\nreturn 0;\n#endif\n; }\n"+ // test 4037 - "mixed b() { return 1; }", - "=mixed a() { \n#if !(1>2)\nreturn 1;\n#else\nreturn 0;\n#endif\n; }\n"+ // test 4038 - "mixed b() { return 1; }", - "=mixed a() { \n#if 2>1\nreturn 1;\n#else\nreturn 0;\n#endif\n; }\n"+ // test 4039 - "mixed b() { return 1; }", - "=mixed a() { \n#if !(2<1)\nreturn 1;\n#else\nreturn 0;\n#endif\n; }\n"+ // test 4040 - "mixed b() { return 1; }", - "=mixed a() { \n#if 1<=2\nreturn 1;\n#else\nreturn 0;\n#endif\n; }\n"+ // test 4041 - "mixed b() { return 1; }", - "=mixed a() { \n#if !(1>=2)\nreturn 1;\n#else\nreturn 0;\n#endif\n; }\n"+ // test 4042 - "mixed b() { return 1; }", - "=mixed a() { \n#if 2>=1\nreturn 1;\n#else\nreturn 0;\n#endif\n; }\n"+ // test 4043 - "mixed b() { return 1; }", - "=mixed a() { \n#if !(2<=1)\nreturn 1;\n#else\nreturn 0;\n#endif\n; }\n"+ // test 4044 - "mixed b() { return 1; }", - "=mixed a() { \n#if 2<=2\nreturn 1;\n#else\nreturn 0;\n#endif\n; }\n"+ // test 4045 - "mixed b() { return 1; }", - "=mixed a() { \n#if 1>=1\nreturn 1;\n#else\nreturn 0;\n#endif\n; }\n"+ // test 4046 - "mixed b() { return 1; }", - - "=mixed a() { \n#if 1.0<2.0\nreturn 1;\n#else\nreturn 0;\n#endif\n; }\n"+ // test 4047 - "mixed b() { return 1; }", - "=mixed a() { \n#if !(1.0>2.0)\nreturn 1;\n#else\nreturn 0;\n#endif\n; }\n"+ // test 4048 - "mixed b() { return 1; }", - "=mixed a() { \n#if 2.0>1.0\nreturn 1;\n#else\nreturn 0;\n#endif\n; }\n"+ // test 4049 - "mixed b() { return 1; }", - "=mixed a() { \n#if !(2.0<1.0)\nreturn 1;\n#else\nreturn 0;\n#endif\n; }\n"+ // test 4050 - "mixed b() { return 1; }", - "=mixed a() { \n#if 1.0<=2.0\nreturn 1;\n#else\nreturn 0;\n#endif\n; }\n"+ // test 4051 - "mixed b() { return 1; }", - "=mixed a() { \n#if !(1.0>=2.0)\nreturn 1;\n#else\nreturn 0;\n#endif\n; }\n"+ // test 4052 - "mixed b() { return 1; }", - "=mixed a() { \n#if 2.0>=1.0\nreturn 1;\n#else\nreturn 0;\n#endif\n; }\n"+ // test 4053 - "mixed b() { return 1; }", - "=mixed a() { \n#if !(2.0<=1.0)\nreturn 1;\n#else\nreturn 0;\n#endif\n; }\n"+ // test 4054 - "mixed b() { return 1; }", - "=mixed a() { \n#if 2.0<=2.0\nreturn 1;\n#else\nreturn 0;\n#endif\n; }\n"+ // test 4055 - "mixed b() { return 1; }", - "=mixed a() { \n#if 1.0>=1.0\nreturn 1;\n#else\nreturn 0;\n#endif\n; }\n"+ // test 4056 - "mixed b() { return 1; }", - - "=mixed a() { \n#if \"a\"<\"b\"\nreturn 1;\n#else\nreturn 0;\n#endif\n; }\n"+ // test 4057 - "mixed b() { return 1; }", - "=mixed a() { \n#if !(\"a\">\"b\")\nreturn 1;\n#else\nreturn 0;\n#endif\n; }\n"+ // test 4058 - "mixed b() { return 1; }", - "=mixed a() { \n#if \"b\">\"a\"\nreturn 1;\n#else\nreturn 0;\n#endif\n; }\n"+ // test 4059 - "mixed b() { return 1; }", - "=mixed a() { \n#if !(\"b\"<\"a\")\nreturn 1;\n#else\nreturn 0;\n#endif\n; }\n"+ // test 4060 - "mixed b() { return 1; }", - "=mixed a() { \n#if \"a\"<=\"b\"\nreturn 1;\n#else\nreturn 0;\n#endif\n; }\n"+ // test 4061 - "mixed b() { return 1; }", - "=mixed a() { \n#if !(\"a\">=\"b\")\nreturn 1;\n#else\nreturn 0;\n#endif\n; }\n"+ // test 4062 - "mixed b() { return 1; }", - "=mixed a() { \n#if \"b\">=\"a\"\nreturn 1;\n#else\nreturn 0;\n#endif\n; }\n"+ // test 4063 - "mixed b() { return 1; }", - "=mixed a() { \n#if !(\"b\"<=\"a\")\nreturn 1;\n#else\nreturn 0;\n#endif\n; }\n"+ // test 4064 - "mixed b() { return 1; }", - "=mixed a() { \n#if \"b\"<=\"b\"\nreturn 1;\n#else\nreturn 0;\n#endif\n; }\n"+ // test 4065 - "mixed b() { return 1; }", - "=mixed a() { \n#if \"a\">=\"a\"\nreturn 1;\n#else\nreturn 0;\n#endif\n; }\n"+ // test 4066 - "mixed b() { return 1; }", - -// #if << - "=mixed a() { \n#if 1<<10==1024\nreturn 1;\n#else\nreturn 0;\n#endif\n; }\n"+ // test 4067 - "mixed b() { return 1; }", - "=mixed a() { \n#if 5<<3==40\nreturn 1;\n#else\nreturn 0;\n#endif\n; }\n"+ // test 4068 - "mixed b() { return 1; }", - -// #if >> - "=mixed a() { \n#if 1024>>10==1\nreturn 1;\n#else\nreturn 0;\n#endif\n; }\n"+ // test 4069 - "mixed b() { return 1; }", - "=mixed a() { \n#if 47>>3==5\nreturn 1;\n#else\nreturn 0;\n#endif\n; }\n"+ // test 4070 - "mixed b() { return 1; }", - -// #if + - "=mixed a() { \n#if 1024+10==1034\nreturn 1;\n#else\nreturn 0;\n#endif\n; }\n"+ // test 4071 - "mixed b() { return 1; }", - "=mixed a() { \n#if 47+3==50\nreturn 1;\n#else\nreturn 0;\n#endif\n; }\n"+ // test 4072 - "mixed b() { return 1; }", - -// #if - - "=mixed a() { \n#if 1024-10==1014\nreturn 1;\n#else\nreturn 0;\n#endif\n; }\n"+ // test 4073 - "mixed b() { return 1; }", - "=mixed a() { \n#if 47-3==44\nreturn 1;\n#else\nreturn 0;\n#endif\n; }\n"+ // test 4074 - "mixed b() { return 1; }", - -// #if * - "=mixed a() { \n#if 1024*10==10240\nreturn 1;\n#else\nreturn 0;\n#endif\n; }\n"+ // test 4075 - "mixed b() { return 1; }", - -// #if / - "=mixed a() { \n#if 47/3==15\nreturn 1;\n#else\nreturn 0;\n#endif\n; }\n"+ // test 4076 - "mixed b() { return 1; }", - - "cmixed a() { \n#if 1/0\nreturn 1;\n#else\nreturn 0;\n#endif\n; }\n", // test 4077 - -// #if % - "=mixed a() { \n#if 47%3==2\nreturn 1;\n#else\nreturn 0;\n#endif\n; }\n"+ // test 4078 - "mixed b() { return 1; }", - "cmixed a() { \n#if 1%0\nreturn 1;\n#else\nreturn 0;\n#endif\n; }\n", // test 4079 - -// #if [ ] - "=mixed a() { \n#if \"foo\"[0]=='f'\nreturn 1;\n#else\nreturn 0;\n#endif\n; }\n"+ // test 4080 - "mixed b() { return 1; }", - -// #if defined - "=mixed a() { \n#define FOOe 0\n#if defined(FOOe)\nreturn 1;\n#else\nreturn 0;\n#endif\n; }\n"+ // test 4081 - "mixed b() { return 1; }", - -// #if define < x - "=mixed a() { \n#define FOOf 1\n#if FOOf < 2\nreturn 1;\n#else\nreturn 0;\n#endif\n; }\n"+ // test 4082 - "mixed b() { return 1; }", - -// #if define < x - "=mixed a() { \n#define FOOg 1\n#if FOOg < 0\nreturn 0;\n#else\nreturn 1;\n#endif\n; }\n"+ // test 4083 - "mixed b() { return 1; }", - -// #if x < define - "=mixed a() { \n#define FOOh 1\n#if 0 < FOOh\nreturn 1;\n#else\nreturn 0;\n#endif\n; }\n"+ // test 4084 - "mixed b() { return 1; }", - -// #if x < define - "=mixed a() { \n#define FOOi 1\n#if 2 < FOOi\nreturn 0;\n#else\nreturn 1;\n#endif\n; }\n"+ // test 4085 - "mixed b() { return 1; }", - -// #if efun -// see test for add_efun() - -// #if /* */ - "=mixed a() { \n#if 1 /* trying to be mean // * / */ /* /* */\nreturn 1; /* */\n#define foo\n# 1 \"---\"\n#undef foo\n#else /* trying to be mean // * / */ /* /* */\nreturn 0; //\n#endif /* trying to be mean // * / */ /* /* */\n; }\n"+ // test 4086 - "mixed b() { return 1; }", - - "=mixed a() { \n#if 0 /* trying to be mean // * / */ /* /* */\nreturn 0; /* */\n#define foo\n# 1 \"---\"\n#undef foo\n#else /* trying to be mean // * / */ /* /* */\nreturn 1; //\n#endif /* trying to be mean // * / */ /* /* */\n; }\n"+ // test 4087 - "mixed b() { return 1; }", - -// #if // - "=mixed a() { \n#if 1 //* trying to be mean // */ */\nreturn 1;\n#else //* trying to be mean // */ */\nreturn 0;\n#endif //* trying to be mean // */ */\n; }\n"+ // test 4088 - "mixed b() { return 1; }", - - "=mixed a() { \n#if 0 //* trying to be mean // */ */\nreturn 0;\n#else //* trying to be mean // */ */\nreturn 1;\n#endif //* trying to be mean // */ */\n; }\n"+ // test 4089 - "mixed b() { return 1; }", - - "=mixed a() { \n#define FOOj\n#if defined(FOOj)\nreturn 1;\n#else\nreturn 0;\n#endif\n; }\n"+ // test 4090 - "mixed b() { return 1; }", - - "=mixed a() { \n#if defined(FOOk)\nreturn 0;\n#else\nreturn 1;\n#endif\n; }\n"+ // test 4091 - "mixed b() { return 1; }", - -// #ifdef - "=mixed a() { \n#ifdef FOOl\nreturn 0;\n#else\nreturn 1;\n#endif\n; }\n"+ // test 4092 - "mixed b() { return 1; }", - - "=mixed a() { \n#define FOOm\n#ifdef FOOm\nreturn 1;\n#else\nreturn 0;\n#endif\n; }\n"+ // test 4093 - "mixed b() { return 1; }", - -// #ifndef - "=mixed a() { \n#define FOOo\n#ifndef FOOo\nreturn 0;\n#else\nreturn 1;\n#endif\n; }\n"+ // test 4094 - "mixed b() { return 1; }", - - "=mixed a() { \n#ifndef FOOp\nreturn 1;\n#else\nreturn 0;\n#endif\n; }\n"+ // test 4095 - "mixed b() { return 1; }", - -// #else - "=mixed a() { \n#if 1\nreturn 1;\n#else\nFEL\n#if 0\nFEL\n#else\nFEL\n#endif\nreturn 0;\n#endif\n; }\n"+ // test 4096 - "mixed b() { return 1; }", - - "=mixed a() { \n#if 0\nFEL\n#if 0\nFEL\n#else\nFEL\n#if 1\nFEL\n#else\nFEL\n#endif\n#endif\nreturn 0;\n#else\nreturn 1;\n#endif\n; }\n"+ // test 4097 - "mixed b() { return 1; }", - -// #elif - "=mixed a() { \n#if 0\nreturn 0;\n#elif 0\nreturn 0;\n#else\nreturn 1;\n#endif\n; }\n"+ // test 4098 - "mixed b() { return 1; }", - - "=mixed a() { \n#if 0\nreturn 0;\n#elif 1\nreturn 1;\n#else\nreturn 0;\n#endif\n; }\n"+ // test 4099 - "mixed b() { return 1; }", - - "=mixed a() { \n#if 1\nreturn 1;\n#elif 1\nreturn 0;\n#else\nreturn 0;\n#endif\n; }\n"+ // test 4100 - "mixed b() { return 1; }", - -// #elseif - "=mixed a() { \n#if 0\nreturn 0;\n#elseif 0\nreturn 0;\n#else\nreturn 1;\n#endif\n; }\n"+ // test 4101 - "mixed b() { return 1; }", - - "=mixed a() { \n#if 0\nreturn 0;\n#elseif 0\nreturn 0;\n#elseif 1\nreturn 1;\n#elseif 0\nreturn 0;\n#elseif 0\nreturn 0;\n#else\nFEL\n#endif\n; }\n"+ // test 4102 - "mixed b() { return 1; }", - - "=mixed a() { \n#if 0\nreturn 0;\n#elseif 1\nreturn 1;\n#else\nreturn 0;\n#endif\n; }\n"+ // test 4103 - "mixed b() { return 1; }", - - "=mixed a() { \n#if 1\nreturn 1;\n#elseif 1\nreturn 0;\n#else\nreturn 0;\n#endif\n; }\n"+ // test 4104 - "mixed b() { return 1; }", - -// #pragma -// FIXME: add tests for real pragmas - "=mixed a() { \n#pragma whatever\nreturn 1;\n; }\n"+ // test 4105 - "mixed b() { return 1; }", - -// #include -// FIXME add test for #include - -// tests for file module - "tmixed a() { return programp((program)\"/precompiled/file\"); }", // test 4106 - "tmixed a() { return programp((program)\"/precompiled/port\"); }", // test 4107 - "=mixed a() { object o; o=clone((program)\"/precompiled/file\"); destruct(o); return 1; }\n"+ // test 4108 - "mixed b() { return 1; }", - -// - file->open -// - file->close - "=mixed a() { object o=clone((program)\"/precompiled/file\"); return o->open(\"conftest\",\"wct\") && o->close(); }\n"+ // test 4109 - "mixed b() { return 1; }", - -// - file_stat - "=mixed a() { return file_stat(\"conftest\")[1]; }\n"+ // test 4110 - "mixed b() { return 0; }", - -// - rm - "tmixed a() { return rm(\"conftest\"); }", // test 4111 - "=mixed a() { return file_stat(\"conftest\"); }\n"+ // test 4112 - "mixed b() { return 0; }", - -// - file->write - "=mixed a() { int e; object o=clone((program)\"/precompiled/file\"); if(!o->open(\"conftest\",\"wct\")) return -1; e=o->write(\"sune\"); if(!o->close()) return -1; return e; }\n"+ // test 4113 - "mixed b() { return 4; }", - -// - file->read - "=mixed a() { string s; object o=clone((program)\"/precompiled/file\"); if(!o->open(\"conftest\",\"r\")) return -1; s=o->read(4); if(!o->close()) return -1; return s; }\n"+ // test 4114 - "mixed b() { return \"sune\"; }", - - "=mixed a() { string s; object o=clone((program)\"/precompiled/file\"); if(!o->open(\"conftest\",\"r\")) return -1; s=o->read(999999); if(!o->close()) return -1; return s; }\n"+ // test 4115 - "mixed b() { return \"sune\"; }", - - "=mixed a() { int e; object o=clone((program)\"/precompiled/file\"); if(!o->open(\"conftest\",\"wct\")) return -1; e=o->write(sprintf(\"%'+-*'100000s\",\"\")); if(!o->close()) return -1; return e; }\n"+ // test 4116 - "mixed b() { return 100000; }", - - "=mixed a() { string s; object o=clone((program)\"/precompiled/file\"); if(!o->open(\"conftest\",\"r\")) return -1; s=o->read(9999999); if(!o->close()) return -1; return s; }\n"+ // test 4117 - "mixed b() { return sprintf(\"%'+-*'100000s\",\"\"); }", - -// - file->seek -// - file->tell - "=mixed a() { object o=clone((program)\"/precompiled/file\"); return o->open(\"conftest\",\"r\") && o->read(4711) && o->tell() == 4711 && o->close(); }\n"+ // test 4118 - "mixed b() { return 1; }", - -// - file->stat - "=mixed a() { object o=clone((program)\"/precompiled/file\"); return equal(o->open(\"conftest\",\"r\") && o->stat(), file_stat(\"conftest\")); }\n"+ // test 4119 - "mixed b() { return 1; }", - -// - file->errno - "dmixed a() { clone((program)\"/precompiled/file\")->errno(); }\n", // test 4120 - -// - file->set_nonblocking -// - file->set_blocking -// - file->set_id -// - file->query_id - "=mixed a() { object o=clone((program)\"/precompiled/file\"); return o->query_id()==o; }\n"+ // test 4121 - "mixed b() { return 1; }", - -// - file->query_read_callback - "dmixed a() { clone((program)\"/precompiled/file\")->query_read_callback(); }\n", // test 4122 - -// - file->query_write_callback - "dmixed a() { clone((program)\"/precompiled/file\")->query_write_callback(); }\n", // test 4123 - -// - file->query_close_callback - "dmixed a() { clone((program)\"/precompiled/file\")->query_close_callback(); }\n", // test 4124 - -// - file->dup -// - file->assign -// - file->assign2 -// - file->open_socket -// - file->connect -// - file->query_address - -// - socket->bind -// - socket->set_id -// - socket->query_id -// - socket->errno -// - socket->accept - - "tmixed a() { return rm(\"conftest\"); }", // test 4125 - "=mixed a() { return file_stat(\"conftest\"); }\n"+ // test 4126 - "mixed b() { return 0; }", - -// - file_stat -// - perror -// - rm -// - mkdir -// - get_dir -// - cd -// - getcwd - "tmixed a() { return stringp(getcwd()); }", // test 4127 - "=mixed a() { return '/'; }\n"+ // test 4128 - "mixed b() { return getcwd()[0]; }", - -// - sprintf module - "tmixed a() { return stringp(sprintf(\"\")); }", // test 4129 - "=mixed a() { return sprintf(\"%d\",1); }\n"+ // test 4130 - "mixed b() { return \"1\"; }", - "=mixed a() { return sprintf(\"%%\"); }\n"+ // test 4131 - "mixed b() { return \"%\"; }", - "=mixed a() { return sprintf(\"%d\",1); }\n"+ // test 4132 - "mixed b() { return \"1\"; }", - "=mixed a() { return sprintf(\"%d\",-1); }\n"+ // test 4133 - "mixed b() { return \"-1\"; }", - "=mixed a() { return sprintf(\"%u\",1<<31); }\n"+ // test 4134 - "mixed b() { return \"2147483648\"; }", - "=mixed a() { return sprintf(\"%o\",255); }\n"+ // test 4135 - "mixed b() { return \"377\"; }", - "=mixed a() { return sprintf(\"%x\",255); }\n"+ // test 4136 - "mixed b() { return \"ff\"; }", - "=mixed a() { return sprintf(\"%X\",255); }\n"+ // test 4137 - "mixed b() { return \"FF\"; }", - "=mixed a() { return sprintf(\"%c\",255); }\n"+ // test 4138 - "mixed b() { return \"\\377\"; }", - "tmixed a() { return stringp(sprintf(\"%f\",255.0)); }", // test 4139 - "tmixed a() { return stringp(sprintf(\"%g\",255.0)); }", // test 4140 - "tmixed a() { return stringp(sprintf(\"%e\",255.0)); }", // test 4141 - "tmixed a() { return stringp(sprintf(\"%e\",255.0)); }", // test 4142 - "=mixed a() { return sprintf(\"%s\",\"foobaR\"); }\n"+ // test 4143 - "mixed b() { return \"foobaR\"; }", - "=mixed a() { return sprintf(\"%s\",\"foo\\nbar\"); }\n"+ // test 4144 - "mixed b() { return \"foo\\nbar\"; }", - "tmixed a() { return stringp(sprintf(\"%O\",this_object())); }", // test 4145 - "tmixed a() { return stringp(sprintf(\"%O\",({}))); }", // test 4146 - "=mixed a() { return sprintf(\"%n\"); }\n"+ // test 4147 - "mixed b() { return \"\"; }", - "=mixed a() { return sprintf(\"%t\",1); }\n"+ // test 4148 - "mixed b() { return \"int\"; }", - "=mixed a() { return sprintf(\"%t\",this_object()); }\n"+ // test 4149 - "mixed b() { return \"object\"; }", - "=mixed a() { return sprintf(\"%{%d\\n%}\",({1,2,3,4})); }\n"+ // test 4150 - "mixed b() { return \"1\\n2\\n3\\n4\\n\"; }", - - "=mixed a() { return strlen(sprintf(\"%1000s\",\"\")); }\n"+ // test 4151 - "mixed b() { return 1000; }", - "=mixed a() { return sprintf(\"%2d\",1); }\n"+ // test 4152 - "mixed b() { return \" 1\"; }", - "=mixed a() { return sprintf(\"%2d\",1); }\n"+ // test 4153 - "mixed b() { return \" 1\"; }", - "=mixed a() { return sprintf(\"%2d\",2222); }\n"+ // test 4154 - "mixed b() { return \"2222\"; }", - "=mixed a() { return sprintf(\"%!2d\",2222); }\n"+ // test 4155 - "mixed b() { return \"22\"; }", - "=mixed a() { return sprintf(\"%!!2d\",2222); }\n"+ // test 4156 - "mixed b() { return \"2222\"; }", - "=mixed a() { return sprintf(\"% d\",2); }\n"+ // test 4157 - "mixed b() { return \" 2\"; }", - "=mixed a() { return sprintf(\"% d\",-2); }\n"+ // test 4158 - "mixed b() { return \"-2\"; }", - "=mixed a() { return sprintf(\"%+d\",2); }\n"+ // test 4159 - "mixed b() { return \"+2\"; }", - "=mixed a() { return sprintf(\"%+d\",-2); }\n"+ // test 4160 - "mixed b() { return \"-2\"; }", - "=mixed a() { return sprintf(\"%-2d\",2); }\n"+ // test 4161 - "mixed b() { return \"2 \"; }", - "=mixed a() { return sprintf(\"%|3d\",2); }\n"+ // test 4162 - "mixed b() { return \" 2 \"; }", - "=mixed a() { return sprintf(\"%-=3s\",\"f o bar gaz\"); }\n"+ // test 4163 - "mixed b() { return \"f o\\nbar\\ngaz\"; }", - "=mixed a() { return sprintf(\"%*d\",3,3); }\n"+ // test 4164 - "mixed b() { return \" 3\"; }", - "=mixed a() { return sprintf(\"%'FOO'10s\",\"BAR\"); }\n"+ // test 4165 - "mixed b() { return \"FOOFOOFBAR\"; }", - "=mixed a() { return sprintf(\"%d %<d %<d\",2); }\n"+ // test 4166 - "mixed b() { return \"2 2 2\"; }", - "Emixed a() { sprintf(\"%d\"); }\n", // test 4167 - -// - Here we try the regexp module - "tmixed a() { return programp((program)\"/precompiled/regexp\"); }", // test 4168 - "=mixed a() { object o; o=clone((program)\"/precompiled/regexp\"); destruct(o); return 1; }\n"+ // test 4169 - "mixed b() { return 1; }", - -// regexp->create - "=mixed a() { object o; o=clone((program)\"/precompiled/regexp\",\"^.*$\"); destruct(o); return 1; }\n"+ // test 4170 - "mixed b() { return 1; }", - -// regexp->match - "=mixed a() { return clone((program)\"/precompiled/regexp\",\"^.*$\")->match(\"\"); }\n"+ // test 4171 - "mixed b() { return 1; }", - "=mixed a() { return clone((program)\"/precompiled/regexp\",\"^.*$\")->match(\"a\"); }\n"+ // test 4172 - "mixed b() { return 1; }", - "=mixed a() { return clone((program)\"/precompiled/regexp\",\"^.*$\")->match(\"-\"); }\n"+ // test 4173 - "mixed b() { return 1; }", - "=mixed a() { return clone((program)\"/precompiled/regexp\",\"^$\")->match(\"\"); }\n"+ // test 4174 - "mixed b() { return 1; }", - "=mixed a() { return clone((program)\"/precompiled/regexp\",\"^.$\")->match(\"a\"); }\n"+ // test 4175 - "mixed b() { return 1; }", - "=mixed a() { return clone((program)\"/precompiled/regexp\",\"^.$\")->match(\"-\"); }\n"+ // test 4176 - "mixed b() { return 1; }", - "=mixed a() { return clone((program)\"/precompiled/regexp\",\"^[abc]$\")->match(\"-\"); }\n"+ // test 4177 - "mixed b() { return 0; }", - "=mixed a() { return clone((program)\"/precompiled/regexp\",\"^[abc]$\")->match(\"a\"); }\n"+ // test 4178 - "mixed b() { return 1; }", - "=mixed a() { return clone((program)\"/precompiled/regexp\",\"^[abc]$\")->match(\"c\"); }\n"+ // test 4179 - "mixed b() { return 1; }", - "=mixed a() { return clone((program)\"/precompiled/regexp\",\"^[^abc]$\")->match(\"-\"); }\n"+ // test 4180 - "mixed b() { return 1; }", - "=mixed a() { return clone((program)\"/precompiled/regexp\",\"^[^abc]$\")->match(\"a\"); }\n"+ // test 4181 - "mixed b() { return 0; }", - "=mixed a() { return clone((program)\"/precompiled/regexp\",\"^[^abc]$\")->match(\"c\"); }\n"+ // test 4182 - "mixed b() { return 0; }", - "=mixed a() { return clone((program)\"/precompiled/regexp\",\"^a*$\")->match(\"aaaa\"); }\n"+ // test 4183 - "mixed b() { return 1; }", - "=mixed a() { return clone((program)\"/precompiled/regexp\",\"^a|b$\")->match(\"a\"); }\n"+ // test 4184 - "mixed b() { return 1; }", - "=mixed a() { return clone((program)\"/precompiled/regexp\",\"^a|b$\")->match(\"b\"); }\n"+ // test 4185 - "mixed b() { return 1; }", - -// regexp->split - "emixed a() { return clone((program)\"/precompiled/regexp\",\"^(a*)[^a]*$\")->split(\"aaabbb\"); }\n"+ // test 4186 - "mixed b() { return ({\"aaa\"}); }", - - -// - Here we try the math module - -// - tan - "tmixed a() { return floatp(tan(0.5)); }", // test 4187 - "=mixed a() { return 0.5; }\n"+ // test 4188 - "mixed b() { return tan(atan(0.5)); }", - "=mixed a() { return 0.5; }\n"+ // test 4189 - "mixed b() { return atan(tan(0.5)); }", -// - asin - "tmixed a() { return floatp(asin(0.7)); }", // test 4190 - "=mixed a() { return asin(0.0); }\n"+ // test 4191 - "mixed b() { return 0.0; }", -// - atan - "tmixed a() { return floatp(atan(0.7)); }", // test 4192 - "tmixed a() { return 3.1415 < 4.0*atan(1.0); }", // test 4193 - "tmixed a() { return 3.1416 > 4.0*atan(1.0); }", // test 4194 -// - sin - "tmixed a() { return floatp(sin(1.2)); }", // test 4195 - "tmixed a() { return sin(atan(1.0))>0.707; }", // test 4196 - "tmixed a() { return sin(atan(1.0))<0.708; }", // test 4197 -// - acos - "tmixed a() { return acos(0.7) > 0.795; }", // test 4198 - "tmixed a() { return acos(0.7) < 0.796; }", // test 4199 -// - cos - "tmixed a() { return floatp(cos(1.2)); }", // test 4200 - "tmixed a() { return cos(atan(1.0))>0.707; }", // test 4201 - "tmixed a() { return cos(atan(1.0))<0.708; }", // test 4202 -// - sqrt - "=mixed a() { return 4; }\n"+ // test 4203 - "mixed b() { return sqrt(16); }", - "=mixed a() { return 4; }\n"+ // test 4204 - "mixed b() { return sqrt(17); }", - "=mixed a() { return 4; }\n"+ // test 4205 - "mixed b() { return sqrt(24); }", - "=mixed a() { return 4.0; }\n"+ // test 4206 - "mixed b() { return sqrt(16.0); }", -// - floor - "=mixed a() { return 17.0; }\n"+ // test 4207 - "mixed b() { return floor(17.0); }", - "=mixed a() { return 17.0; }\n"+ // test 4208 - "mixed b() { return floor(17.1); }", - "=mixed a() { return 17.0; }\n"+ // test 4209 - "mixed b() { return floor(17.7); }", -// - ceil - "=mixed a() { return 17.0; }\n"+ // test 4210 - "mixed b() { return ceil(17.0); }", - "=mixed a() { return 18.0; }\n"+ // test 4211 - "mixed b() { return ceil(17.1); }", - "=mixed a() { return 18.0; }\n"+ // test 4212 - "mixed b() { return ceil(17.7); }", -// - exp -// - log - "tmixed a() { return 2.70001>exp(log(2.7)); }", // test 4213 - "tmixed a() { return 2.69999<exp(log(2.7)); }", // test 4214 - "tmixed a() { return 2.70001>log(exp(2.7)); }", // test 4215 - "tmixed a() { return 2.69999<log(exp(2.7)); }", // test 4216 -// - pow - "=mixed a() { return pow(10.0,10.0); }\n"+ // test 4217 - "mixed b() { return 10000000000.0; }", - -// foop - - - - "=mixed a() { return intp (17); }\n"+ // test 4218 - "mixed b() { return !(0); }", - "=mixed a() { return intp (1.7); }\n"+ // test 4219 - "mixed b() { return !(0-1); }", - "=mixed a() { return intp (\"17\"); }\n"+ // test 4220 - "mixed b() { return !(0-2); }", - "=mixed a() { return intp (this_object()); }\n"+ // test 4221 - "mixed b() { return !(0-3); }", - "=mixed a() { return intp (a); }\n"+ // test 4222 - "mixed b() { return !(0-4); }", // a is the test function - "=mixed a() { return intp (({})); }\n"+ // test 4223 - "mixed b() { return !(0-5); }", - "=mixed a() { return intp (([])); }\n"+ // test 4224 - "mixed b() { return !(0-6); }", - "=mixed a() { return intp ((<>)); }\n"+ // test 4225 - "mixed b() { return !(0-7); }", - "=mixed a() { return intp (object_program(this_object())); }\n"+ // test 4226 - "mixed b() { return !(0-8); }", - - - "=mixed a() { return floatp (17); }\n"+ // test 4227 - "mixed b() { return !(1); }", - "=mixed a() { return floatp (1.7); }\n"+ // test 4228 - "mixed b() { return !(1-1); }", - "=mixed a() { return floatp (\"17\"); }\n"+ // test 4229 - "mixed b() { return !(1-2); }", - "=mixed a() { return floatp (this_object()); }\n"+ // test 4230 - "mixed b() { return !(1-3); }", - "=mixed a() { return floatp (a); }\n"+ // test 4231 - "mixed b() { return !(1-4); }", // a is the test function - "=mixed a() { return floatp (({})); }\n"+ // test 4232 - "mixed b() { return !(1-5); }", - "=mixed a() { return floatp (([])); }\n"+ // test 4233 - "mixed b() { return !(1-6); }", - "=mixed a() { return floatp ((<>)); }\n"+ // test 4234 - "mixed b() { return !(1-7); }", - "=mixed a() { return floatp (object_program(this_object())); }\n"+ // test 4235 - "mixed b() { return !(1-8); }", - - - "=mixed a() { return stringp (17); }\n"+ // test 4236 - "mixed b() { return !(2); }", - "=mixed a() { return stringp (1.7); }\n"+ // test 4237 - "mixed b() { return !(2-1); }", - "=mixed a() { return stringp (\"17\"); }\n"+ // test 4238 - "mixed b() { return !(2-2); }", - "=mixed a() { return stringp (this_object()); }\n"+ // test 4239 - "mixed b() { return !(2-3); }", - "=mixed a() { return stringp (a); }\n"+ // test 4240 - "mixed b() { return !(2-4); }", // a is the test function - "=mixed a() { return stringp (({})); }\n"+ // test 4241 - "mixed b() { return !(2-5); }", - "=mixed a() { return stringp (([])); }\n"+ // test 4242 - "mixed b() { return !(2-6); }", - "=mixed a() { return stringp ((<>)); }\n"+ // test 4243 - "mixed b() { return !(2-7); }", - "=mixed a() { return stringp (object_program(this_object())); }\n"+ // test 4244 - "mixed b() { return !(2-8); }", - - - "=mixed a() { return objectp (17); }\n"+ // test 4245 - "mixed b() { return !(3); }", - "=mixed a() { return objectp (1.7); }\n"+ // test 4246 - "mixed b() { return !(3-1); }", - "=mixed a() { return objectp (\"17\"); }\n"+ // test 4247 - "mixed b() { return !(3-2); }", - "=mixed a() { return objectp (this_object()); }\n"+ // test 4248 - "mixed b() { return !(3-3); }", - "=mixed a() { return objectp (a); }\n"+ // test 4249 - "mixed b() { return !(3-4); }", // a is the test function - "=mixed a() { return objectp (({})); }\n"+ // test 4250 - "mixed b() { return !(3-5); }", - "=mixed a() { return objectp (([])); }\n"+ // test 4251 - "mixed b() { return !(3-6); }", - "=mixed a() { return objectp ((<>)); }\n"+ // test 4252 - "mixed b() { return !(3-7); }", - "=mixed a() { return objectp (object_program(this_object())); }\n"+ // test 4253 - "mixed b() { return !(3-8); }", - - - "=mixed a() { return functionp (17); }\n"+ // test 4254 - "mixed b() { return !(4); }", - "=mixed a() { return functionp (1.7); }\n"+ // test 4255 - "mixed b() { return !(4-1); }", - "=mixed a() { return functionp (\"17\"); }\n"+ // test 4256 - "mixed b() { return !(4-2); }", - "=mixed a() { return functionp (this_object()); }\n"+ // test 4257 - "mixed b() { return !(4-3); }", - "=mixed a() { return functionp (a); }\n"+ // test 4258 - "mixed b() { return !(4-4); }", // a is the test function - "=mixed a() { return functionp (({})); }\n"+ // test 4259 - "mixed b() { return !(4-5); }", - "=mixed a() { return functionp (([])); }\n"+ // test 4260 - "mixed b() { return !(4-6); }", - "=mixed a() { return functionp ((<>)); }\n"+ // test 4261 - "mixed b() { return !(4-7); }", - "=mixed a() { return functionp (object_program(this_object())); }\n"+ // test 4262 - "mixed b() { return !(4-8); }", - - - "=mixed a() { return arrayp (17); }\n"+ // test 4263 - "mixed b() { return !(5); }", - "=mixed a() { return arrayp (1.7); }\n"+ // test 4264 - "mixed b() { return !(5-1); }", - "=mixed a() { return arrayp (\"17\"); }\n"+ // test 4265 - "mixed b() { return !(5-2); }", - "=mixed a() { return arrayp (this_object()); }\n"+ // test 4266 - "mixed b() { return !(5-3); }", - "=mixed a() { return arrayp (a); }\n"+ // test 4267 - "mixed b() { return !(5-4); }", // a is the test function - "=mixed a() { return arrayp (({})); }\n"+ // test 4268 - "mixed b() { return !(5-5); }", - "=mixed a() { return arrayp (([])); }\n"+ // test 4269 - "mixed b() { return !(5-6); }", - "=mixed a() { return arrayp ((<>)); }\n"+ // test 4270 - "mixed b() { return !(5-7); }", - "=mixed a() { return arrayp (object_program(this_object())); }\n"+ // test 4271 - "mixed b() { return !(5-8); }", - - - "=mixed a() { return mappingp (17); }\n"+ // test 4272 - "mixed b() { return !(6); }", - "=mixed a() { return mappingp (1.7); }\n"+ // test 4273 - "mixed b() { return !(6-1); }", - "=mixed a() { return mappingp (\"17\"); }\n"+ // test 4274 - "mixed b() { return !(6-2); }", - "=mixed a() { return mappingp (this_object()); }\n"+ // test 4275 - "mixed b() { return !(6-3); }", - "=mixed a() { return mappingp (a); }\n"+ // test 4276 - "mixed b() { return !(6-4); }", // a is the test function - "=mixed a() { return mappingp (({})); }\n"+ // test 4277 - "mixed b() { return !(6-5); }", - "=mixed a() { return mappingp (([])); }\n"+ // test 4278 - "mixed b() { return !(6-6); }", - "=mixed a() { return mappingp ((<>)); }\n"+ // test 4279 - "mixed b() { return !(6-7); }", - "=mixed a() { return mappingp (object_program(this_object())); }\n"+ // test 4280 - "mixed b() { return !(6-8); }", - - - "=mixed a() { return listp (17); }\n"+ // test 4281 - "mixed b() { return !(7); }", - "=mixed a() { return listp (1.7); }\n"+ // test 4282 - "mixed b() { return !(7-1); }", - "=mixed a() { return listp (\"17\"); }\n"+ // test 4283 - "mixed b() { return !(7-2); }", - "=mixed a() { return listp (this_object()); }\n"+ // test 4284 - "mixed b() { return !(7-3); }", - "=mixed a() { return listp (a); }\n"+ // test 4285 - "mixed b() { return !(7-4); }", // a is the test function - "=mixed a() { return listp (({})); }\n"+ // test 4286 - "mixed b() { return !(7-5); }", - "=mixed a() { return listp (([])); }\n"+ // test 4287 - "mixed b() { return !(7-6); }", - "=mixed a() { return listp ((<>)); }\n"+ // test 4288 - "mixed b() { return !(7-7); }", - "=mixed a() { return listp (object_program(this_object())); }\n"+ // test 4289 - "mixed b() { return !(7-8); }", - - - "=mixed a() { return programp (17); }\n"+ // test 4290 - "mixed b() { return !(8); }", - "=mixed a() { return programp (1.7); }\n"+ // test 4291 - "mixed b() { return !(8-1); }", - "=mixed a() { return programp (\"17\"); }\n"+ // test 4292 - "mixed b() { return !(8-2); }", - "=mixed a() { return programp (this_object()); }\n"+ // test 4293 - "mixed b() { return !(8-3); }", - "=mixed a() { return programp (a); }\n"+ // test 4294 - "mixed b() { return !(8-4); }", // a is the test function - "=mixed a() { return programp (({})); }\n"+ // test 4295 - "mixed b() { return !(8-5); }", - "=mixed a() { return programp (([])); }\n"+ // test 4296 - "mixed b() { return !(8-6); }", - "=mixed a() { return programp ((<>)); }\n"+ // test 4297 - "mixed b() { return !(8-7); }", - "=mixed a() { return programp (object_program(this_object())); }\n"+ // test 4298 - "mixed b() { return !(8-8); }", - - -// add_efun - "dmixed a() { add_efun(\"foobar\",lambda() { return 1; }); }\n", // test 4299 - "=mixed a() { \n#if efun(foobar)\nreturn 1;\n#else\nreturn 0;\n#endif\n; }\n"+ // test 4300 - "mixed b() { return 1; }", - "=mixed a() { return foobar(); }\n"+ // test 4301 - "mixed b() { return 1; }", - "dmixed a() { add_efun(\"foobar\"); }\n", // test 4302 - "=mixed a() { \n#if efun(foobar)\nreturn 1;\n#else\nreturn 0;\n#endif\n; }\n"+ // test 4303 - "mixed b() { return 0; }", - -// - aggregate - "tmixed a() { return arrayp(aggregate()); }", // test 4304 - "=mixed a() { return sizeof(aggregate()); }\n"+ // test 4305 - "mixed b() { return 0; }", - "emixed a() { return aggregate(1,2,3,4); }\n"+ // test 4306 - "mixed b() { return ({1,2,3,4}); }", - -// - aggregate_list - "tmixed a() { return listp(aggregate_list()); }", // test 4307 - -// - aggregate_mapping - "tmixed a() { return listp(aggregate_list()); }", // test 4308 - -// - all_efuns - "tmixed a() { return mappingp(all_efuns()); }", // test 4309 - "tmixed a() { return all_efuns()[\"all_efuns\"]; }", // test 4310 - "=mixed a() { return all_efuns()[\"all_efuns\"]; }\n"+ // test 4311 - "mixed b() { return all_efuns; }", - -// - allocate - "tmixed a() { return arrayp(allocate(0)); }", // test 4312 - "emixed a() { return allocate(2); }\n"+ // test 4313 - "mixed b() { return ({0,0}); }", - "fmixed a() { return allocate(2)==({0,0}); }", // test 4314 - -// - backtrace - "tmixed a() { return arrayp(backtrace()); }", // test 4315 - "=mixed a() { return backtrace()[-1][2]; }\n"+ // test 4316 - "mixed b() { return a; }", - -// - call_function - "=mixed a() { return 1; }\n"+ // test 4317 - "mixed b() { return call_function(a); }", - "=mixed a() { return 1; }\n"+ // test 4318 - "mixed b() { return call_function(lambda(int a){ return a; },1); }", - "=mixed a() { return 1; }\n"+ // test 4319 - "mixed b() { return call_function(intp,1); }", - -// - capitalize - "=mixed a() { return capitalize(\"fubar\"); }\n"+ // test 4320 - "mixed b() { return \"Fubar\"; }", - "=mixed a() { return capitalize(\"FooBar\"); }\n"+ // test 4321 - "mixed b() { return \"FooBar\"; }", - "=mixed a() { return capitalize(\"-\"); }\n"+ // test 4322 - "mixed b() { return \"-\"; }", - -// - clone -// clone is already tested a lot by this script - "tmixed a() { return objectp(clone(compile_string(\"int foo() { return 17; }\"))); }", // test 4323 - "=mixed a() { return clone(compile_string(\"int foo() { return 17; }\"))->foo(); }\n"+ // test 4324 - "mixed b() { return 17; }", - -// - combine_path - "=mixed a() { return combine_path(\"/foo/bar/gazonk/\",\"..\"); }\n"+ // test 4325 - "mixed b() { return \"/foo/bar\"; }", - "=mixed a() { return combine_path(\"/.../\",\"sune\"); }\n"+ // test 4326 - "mixed b() { return \"/.../sune\"; }", - "=mixed a() { return combine_path(\"/\",\"foo/.../sune\"); }\n"+ // test 4327 - "mixed b() { return \"/foo/.../sune\"; }", - "=mixed a() { return combine_path(\"/./foo/bar//gazonk/\",\"../\"); }\n"+ // test 4328 - "mixed b() { return \"/foo/bar/\"; }", - "=mixed a() { return combine_path(\"/\",\"/foo/./bar/gazonk/..\"); }\n"+ // test 4329 - "mixed b() { return \"/foo/bar\"; }", - "=mixed a() { return combine_path(\"/\",\"/foo/bar/gazonk/../../\"); }\n"+ // test 4330 - "mixed b() { return \"/foo/\"; }", - "=mixed a() { return combine_path(\"/\",\"/foo//bar/gazonk/../..\"); }\n"+ // test 4331 - "mixed b() { return \"/foo\"; }", - "=mixed a() { return combine_path(\"/\",\"/foo/bar/./gazonk/../../..\"); }\n"+ // test 4332 - "mixed b() { return \"/\"; }", - "=mixed a() { return combine_path(\"/\",\"/foo/../bar//./gazonk/../..\"); }\n"+ // test 4333 - "mixed b() { return \"/\"; }", - "=mixed a() { return combine_path(\"/\",\"/foo/././/bar/gazonk/../../../..\"); }\n"+ // test 4334 - "mixed b() { return \"/\"; }", - -// - compile_file -// FIXME: add tests for compile_file - -// - compile_string -// see test for clone() - -// - copy_value - "=mixed a() { return copy_value(1); }\n"+ // test 4335 - "mixed b() { return 1; }", - "=mixed a() { return copy_value(\"\"); }\n"+ // test 4336 - "mixed b() { return \"\"; }", - "=mixed a() { return copy_value(1.0); }\n"+ // test 4337 - "mixed b() { return 1.0; }", - "=mixed a() { return copy_value(this_object()); }\n"+ // test 4338 - "mixed b() { return this_object(); }", - "=mixed a() { return copy_value(a); }\n"+ // test 4339 - "mixed b() { return a; }", - - - "=mixed a() { mixed x=({1}) ; return x==x; }\n"+ // test 4340 - "mixed b() { return 1; }", - "=mixed a() { mixed x=({1}) ; return copy_value(x)!=x; }\n"+ // test 4341 - "mixed b() { return 1; }", - "=mixed a() { mixed x=({1}) ; return equal(copy_value(x),x); }\n"+ // test 4342 - "mixed b() { return 1; }", - - "=mixed a() { mixed x=([]) ; return x==x; }\n"+ // test 4343 - "mixed b() { return 1; }", - "=mixed a() { mixed x=([]) ; return copy_value(x)!=x; }\n"+ // test 4344 - "mixed b() { return 1; }", - "=mixed a() { mixed x=([]) ; return equal(copy_value(x),x); }\n"+ // test 4345 - "mixed b() { return 1; }", - - "=mixed a() { mixed x=(<>) ; return x==x; }\n"+ // test 4346 - "mixed b() { return 1; }", - "=mixed a() { mixed x=(<>) ; return copy_value(x)!=x; }\n"+ // test 4347 - "mixed b() { return 1; }", - "=mixed a() { mixed x=(<>) ; return equal(copy_value(x),x); }\n"+ // test 4348 - "mixed b() { return 1; }", - - "=mixed a() { mixed x=(< ([]), ({1}) ,\"\" , 1.0 >) ; return x==x; }\n"+ // test 4349 - "mixed b() { return 1; }", - "=mixed a() { mixed x=(< ([]), ({1}) ,\"\" , 1.0 >) ; return copy_value(x)!=x; }\n"+ // test 4350 - "mixed b() { return 1; }", - "=mixed a() { mixed x=(< ([]), ({1}) ,\"\" , 1.0 >) ; return equal(copy_value(x),x); }\n"+ // test 4351 - "mixed b() { return 1; }", - -// - crypt - "tmixed a() { return stringp(crypt(\"hej\")); }", // test 4352 - "tmixed a() { return crypt(\"hej\",crypt(\"hej\")); }", // test 4353 - -// - ctime - "tmixed a() { return stringp(ctime(0)); }", // test 4354 - -// - destruct -// FIXME put tests for destruct here. - -// - equal -// equl is already tested by this script - -// - exit -// FIXME put test for exit here - -// - explode - "emixed a() { return ({\"a\",\"b\",\"c\",}); }\n"+ // test 4355 - "mixed b() { return explode(\"anna bnna c\",\"nna \"); }", - "emixed a() { return ({\"\",\"\",}); }\n"+ // test 4356 - "mixed b() { return explode(\"hej\",\"hej\"); }", - "emixed a() { return ({\"\",}); }\n"+ // test 4357 - "mixed b() { return explode(\"\",\"hej\"); }", - -// - fork() -// FIXME: add tests for fork - -// - function_name - "=mixed a() { return function_name(a); }\n"+ // test 4358 - "mixed b() { return \"a\"; }", - "=mixed a() { return function_name(function_name); }\n"+ // test 4359 - "mixed b() { return 0; }", - -// - function_object - "=mixed a() { return function_object(a); }\n"+ // test 4360 - "mixed b() { return this_object(); }", - "=mixed a() { return function_name(function_object); }\n"+ // test 4361 - "mixed b() { return 0; }", - -// - get_function (actually in simulate.lpc) - "=mixed a() { return a; }\n"+ // test 4362 - "mixed b() { return get_function(this_object(),\"a\"); }", - "=mixed a() { return a; }\n"+ // test 4363 - "mixed b() { return this_object()->a; }", - -// - hash - "tmixed a() { return intp(hash(\"foo\")); }", // test 4364 - "tmixed a() { return intp(hash(\"foo\",10)); }", // test 4365 - "tmixed a() { return hash(\"foo\",10)<10; }", // test 4366 - "tmixed a() { return hash(\"bar\",10)<10; }", // test 4367 - "tmixed a() { return hash(\"gazonk\",10)<10; }", // test 4368 - "=mixed a() { return hash(\"foobargazonk\"); }\n"+ // test 4369 - "mixed b() { return hash(\"foobargazonk\"); }", - -// - implode - "=mixed a() { return implode(({}),\"\"); }\n"+ // test 4370 - "mixed b() { return \"\"; }", - "=mixed a() { return implode(explode(\"foo\",\"o\"),\"o\"); }\n"+ // test 4371 - "mixed b() { return \"foo\"; }", - "=mixed a() { return implode(({\"foo\",\"bar\"}),\"-\"); }\n"+ // test 4372 - "mixed b() { return \"foo-bar\"; }", - "=mixed a() { return implode(({\"foo\",0,\"bar\"}),\"-\"); }\n"+ // test 4373 - "mixed b() { return \"foo-bar\"; }", - "=mixed a() { return implode(({1.0,\"foo\",0,\"bar\",this_object(),([])}),\"-\"); }\n"+ // test 4374 - "mixed b() { return \"foo-bar\"; }", - "=mixed a() { return implode(({\"f\",\"o\",\"o\"})); }\n"+ // test 4375 - "mixed b() { return \"foo\"; }", - -// - indices - "emixed a() { return indices(\"foo\"); }\n"+ // test 4376 - "mixed b() { return ({0,1,2}); }", - "emixed a() { return indices(({'f','o','o'})); }\n"+ // test 4377 - "mixed b() { return ({0,1,2}); }", - "emixed a() { return sort_array(indices(([7:3,8:9,99:12]))); }\n"+ // test 4378 - "mixed b() { return ({7,8,99}); }", - "emixed a() { return sort_array(indices((<7,8,99>))); }\n"+ // test 4379 - "mixed b() { return ({7,8,99}); }", - -// - lower_case - "emixed a() { return lower_case(\"foo\"); }\n"+ // test 4380 - "mixed b() { return \"foo\"; }", - "emixed a() { return lower_case(\"Foo\"); }\n"+ // test 4381 - "mixed b() { return \"foo\"; }", - "emixed a() { return lower_case(\"Foo1234-*~\\n\"); }\n"+ // test 4382 - "mixed b() { return \"foo1234-*~\\n\"; }", - -// - next_object - "tmixed a() { return objectp(next_object()); }", // test 4383 - "=mixed a() { int e;object o=next_object(); for(e=0;e<1000 && o;e++) o=next_object(o); return o; }\n"+ // test 4384 - "mixed b() { return 0; }", - -// - object_program - "tmixed a() { return programp(object_program(this_object())); }", // test 4385 - -// - query_host_name - "tmixed a() { return stringp(query_host_name()); }", // test 4386 - -// - query_num_arg - "=mixed a() { return lambda(int ... q) { return query_num_arg(); }(); }\n"+ // test 4387 - "mixed b() { return 0; }", - "=mixed a() { return lambda(int ... q) { return query_num_arg(); }(1); }\n"+ // test 4388 - "mixed b() { return 1; }", - "=mixed a() { return lambda(int ... q) { return query_num_arg(); }(1,1); }\n"+ // test 4389 - "mixed b() { return 2; }", - "=mixed a() { return lambda(int ... q) { return query_num_arg(); }(1,1,1); }\n"+ // test 4390 - "mixed b() { return 3; }", - "=mixed a() { return lambda(int ... q) { return query_num_arg(); }(1,1,1,1); }\n"+ // test 4391 - "mixed b() { return 4; }", - -// - random - "=mixed a() { int e,d;for(e=0;e<1000;e++){d=random(10); if(d<0 || d>=10) return 0;} return 1; }\n"+ // test 4392 - "mixed b() { return 1; }", - -// - replace - "=mixed a() { return replace(\"foobargazonk\",\"o\",\"-\"); }\n"+ // test 4393 - "mixed b() { return \"f--bargaz-nk\"; }", - "=mixed a() { return replace(\"foobargazonk\",({\"o\",\"a\"}),({\"()\",\"<>\"})); }\n"+ // test 4394 - "mixed b() { return \"f()()b<>rg<>z()nk\"; }", - "=mixed a() { return replace(\"f--barf--\",({\"f--\",\"f--bar\"}),({\"f--bar\",\"f--\"})); }\n"+ // test 4395 - "mixed b() { return \"f--f--bar\"; }", - "=mixed a() { return replace(\"f--barf--\",({\"f--bar\",\"f--\"}),({\"f--\",\"f--bar\"})); }\n"+ // test 4396 - "mixed b() { return \"f--f--bar\"; }", - "emixed a() { return replace(({1,2,3,4,5,1,2,3,4}),3,-1); }\n"+ // test 4397 - "mixed b() { return ({1,2,-1,4,5,1,2,-1,4}); }", - "emixed a() { return replace(([1:2,3:4,5:1,2:3]),3,-1); }\n"+ // test 4398 - "mixed b() { return ([1:2,3:4,5:1,2:-1]); }", - -// - reverse - "=mixed a() { return reverse(\"reverse\"); }\n"+ // test 4399 - "mixed b() { return \"esrever\"; }", - "=mixed a() { return reverse(\"\"); }\n"+ // test 4400 - "mixed b() { return \"\"; }", - "=mixed a() { return reverse(\"a\"); }\n"+ // test 4401 - "mixed b() { return \"a\"; }", - "emixed a() { return reverse(({1,5,9})); }\n"+ // test 4402 - "mixed b() { return ({9,5,1}); }", - "emixed a() { return reverse(0x12345678); }\n"+ // test 4403 - "mixed b() { return 0x1e6a2c48; }", - -// - rusage - "tmixed a() { return arrayp(rusage()); }", // test 4404 - "tmixed a() { return sizeof(rusage())>0; }", // test 4405 - -// - search - "=mixed a() { return search(\"foolbar\",\"gazonk\"); }\n"+ // test 4406 - "mixed b() { return -1; }", - "=mixed a() { return search(\"qowiueproqiuweproiwqueoplkjljlklksjjriwueproiuwerowieu\",\"lkjljlklksjj\"); }\n"+ // test 4407 - "mixed b() { return 24; }", - "=mixed a() { return search(\"lkjljlklksjjriwueproiuwerlskjdvlaskjfowieu\",\"lkjljlklksjj\"); }\n"+ // test 4408 - "mixed b() { return 0; }", - "=mixed a() { return search(\"aaaaaaaaaaaaaaaaaaaaaaaalkjljlklksjj\",\"lkjljlklksjj\"); }\n"+ // test 4409 - "mixed b() { return 24; }", - "=mixed a() { return search(\"foobargazonk\",\"oo\"); }\n"+ // test 4410 - "mixed b() { return 1; }", - "=mixed a() { return search(\"foobargazonk\",\"o\",3); }\n"+ // test 4411 - "mixed b() { return 9; }", - "=mixed a() { return search(\"foobargazonk\",\"o\",9); }\n"+ // test 4412 - "mixed b() { return 9; }", - "=mixed a() { return search(\"foobargazonk\",\"o\",10); }\n"+ // test 4413 - "mixed b() { return -1; }", - "=mixed a() { return search(\"foobargazonk\",\"x\",9); }\n"+ // test 4414 - "mixed b() { return -1; }", - "=mixed a() { return search(({56,8,2,6,2,7,3,56,7}),8); }\n"+ // test 4415 - "mixed b() { return 1; }", - "=mixed a() { return search(({56,8,2,6,2,7,3,56,7}),56,0); }\n"+ // test 4416 - "mixed b() { return 0; }", - "=mixed a() { return search(({56,8,2,6,2,7,3,56,7}),56,1); }\n"+ // test 4417 - "mixed b() { return 7; }", - "=mixed a() { return search(({56,8,2,6,2,7,3,56,7}),56,7); }\n"+ // test 4418 - "mixed b() { return 7; }", - "=mixed a() { return search(({56,8,2,6,2,7,3,56,7}),56,8); }\n"+ // test 4419 - "mixed b() { return -1; }", - "=mixed a() { return search(({\"foo\"}),\"foo\"); }\n"+ // test 4420 - "mixed b() { return 0; }", - "=mixed a() { return search(\"fo-obar|gazonk\"/\"|\",\"fo-obar\"); }\n"+ // test 4421 - "mixed b() { return 0; }", - "=mixed a() { return search(\"fo-obar|gazonk\"/\"|\",\"gazonk\"); }\n"+ // test 4422 - "mixed b() { return 1; }", - "=mixed a() { return search(([1:2,3:4,5:6,7:8]),4); }\n"+ // test 4423 - "mixed b() { return 3; }", - "tmixed a() { return zero_type(search(([1:2,3:4,5:6,7:8]),1)); }", // test 4424 - "=mixed a() { return search(([1:2,3:4,5:6,7:8]),8); }\n"+ // test 4425 - "mixed b() { return 7; }", - -// test large searches (find string, size, pattern) - - - - - - - - - - "=mixed a() { return search(sprintf(\"SUNE\"+\"%'\"+\"+-*\"+\"'*n\",10),\"SUNE\"); }\n"+ // test 4426 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\" ,10),\"SUNE\"); }\n"+ // test 4427 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+\"SUNE\",10),\"SUNE\"); }\n"+ // test 4428 - "mixed b() { return 10; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+\"SUNE\"+\"%'\"+\"+-*\"+\"'*n\",10,10),\"SUNE\"); }\n"+ // test 4429 - "mixed b() { return 10; }", - - - "=mixed a() { return search(sprintf(\"SUNE\"+\"%'\"+\"+-*\"+\"'*n\",10+1),\"SUNE\"); }\n"+ // test 4430 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\" ,10+1),\"SUNE\"); }\n"+ // test 4431 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+\"SUNE\",10+1),\"SUNE\"); }\n"+ // test 4432 - "mixed b() { return 10+1; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+\"SUNE\"+\"%'\"+\"+-*\"+\"'*n\",10+1,10+1),\"SUNE\"); }\n"+ // test 4433 - "mixed b() { return 10+1; }", - - - "=mixed a() { return search(sprintf(\"SUNE\"+\"%'\"+\"+-*\"+\"'*n\",10+2),\"SUNE\"); }\n"+ // test 4434 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\" ,10+2),\"SUNE\"); }\n"+ // test 4435 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+\"SUNE\",10+2),\"SUNE\"); }\n"+ // test 4436 - "mixed b() { return 10+2; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+\"SUNE\"+\"%'\"+\"+-*\"+\"'*n\",10+2,10+2),\"SUNE\"); }\n"+ // test 4437 - "mixed b() { return 10+2; }", - - - "=mixed a() { return search(sprintf(\"SUNE\"+\"%'\"+\"+-*\"+\"'*n\",10+3),\"SUNE\"); }\n"+ // test 4438 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\" ,10+3),\"SUNE\"); }\n"+ // test 4439 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+\"SUNE\",10+3),\"SUNE\"); }\n"+ // test 4440 - "mixed b() { return 10+3; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+\"SUNE\"+\"%'\"+\"+-*\"+\"'*n\",10+3,10+3),\"SUNE\"); }\n"+ // test 4441 - "mixed b() { return 10+3; }", - - - - "=mixed a() { return search(sprintf(\"SUNE\"+\"%'\"+\"+-*\"+\"'*n\",1000),\"SUNE\"); }\n"+ // test 4442 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\" ,1000),\"SUNE\"); }\n"+ // test 4443 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+\"SUNE\",1000),\"SUNE\"); }\n"+ // test 4444 - "mixed b() { return 1000; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+\"SUNE\"+\"%'\"+\"+-*\"+\"'*n\",1000,1000),\"SUNE\"); }\n"+ // test 4445 - "mixed b() { return 1000; }", - - - "=mixed a() { return search(sprintf(\"SUNE\"+\"%'\"+\"+-*\"+\"'*n\",1000+1),\"SUNE\"); }\n"+ // test 4446 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\" ,1000+1),\"SUNE\"); }\n"+ // test 4447 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+\"SUNE\",1000+1),\"SUNE\"); }\n"+ // test 4448 - "mixed b() { return 1000+1; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+\"SUNE\"+\"%'\"+\"+-*\"+\"'*n\",1000+1,1000+1),\"SUNE\"); }\n"+ // test 4449 - "mixed b() { return 1000+1; }", - - - "=mixed a() { return search(sprintf(\"SUNE\"+\"%'\"+\"+-*\"+\"'*n\",1000+2),\"SUNE\"); }\n"+ // test 4450 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\" ,1000+2),\"SUNE\"); }\n"+ // test 4451 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+\"SUNE\",1000+2),\"SUNE\"); }\n"+ // test 4452 - "mixed b() { return 1000+2; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+\"SUNE\"+\"%'\"+\"+-*\"+\"'*n\",1000+2,1000+2),\"SUNE\"); }\n"+ // test 4453 - "mixed b() { return 1000+2; }", - - - "=mixed a() { return search(sprintf(\"SUNE\"+\"%'\"+\"+-*\"+\"'*n\",1000+3),\"SUNE\"); }\n"+ // test 4454 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\" ,1000+3),\"SUNE\"); }\n"+ // test 4455 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+\"SUNE\",1000+3),\"SUNE\"); }\n"+ // test 4456 - "mixed b() { return 1000+3; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+\"SUNE\"+\"%'\"+\"+-*\"+\"'*n\",1000+3,1000+3),\"SUNE\"); }\n"+ // test 4457 - "mixed b() { return 1000+3; }", - - - - "=mixed a() { return search(sprintf(\"SUNE\"+\"%'\"+\"+-*\"+\"'*n\",100000),\"SUNE\"); }\n"+ // test 4458 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\" ,100000),\"SUNE\"); }\n"+ // test 4459 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+\"SUNE\",100000),\"SUNE\"); }\n"+ // test 4460 - "mixed b() { return 100000; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+\"SUNE\"+\"%'\"+\"+-*\"+\"'*n\",100000,100000),\"SUNE\"); }\n"+ // test 4461 - "mixed b() { return 100000; }", - - - "=mixed a() { return search(sprintf(\"SUNE\"+\"%'\"+\"+-*\"+\"'*n\",100000+1),\"SUNE\"); }\n"+ // test 4462 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\" ,100000+1),\"SUNE\"); }\n"+ // test 4463 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+\"SUNE\",100000+1),\"SUNE\"); }\n"+ // test 4464 - "mixed b() { return 100000+1; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+\"SUNE\"+\"%'\"+\"+-*\"+\"'*n\",100000+1,100000+1),\"SUNE\"); }\n"+ // test 4465 - "mixed b() { return 100000+1; }", - - - "=mixed a() { return search(sprintf(\"SUNE\"+\"%'\"+\"+-*\"+\"'*n\",100000+2),\"SUNE\"); }\n"+ // test 4466 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\" ,100000+2),\"SUNE\"); }\n"+ // test 4467 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+\"SUNE\",100000+2),\"SUNE\"); }\n"+ // test 4468 - "mixed b() { return 100000+2; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+\"SUNE\"+\"%'\"+\"+-*\"+\"'*n\",100000+2,100000+2),\"SUNE\"); }\n"+ // test 4469 - "mixed b() { return 100000+2; }", - - - "=mixed a() { return search(sprintf(\"SUNE\"+\"%'\"+\"+-*\"+\"'*n\",100000+3),\"SUNE\"); }\n"+ // test 4470 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\" ,100000+3),\"SUNE\"); }\n"+ // test 4471 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+\"SUNE\",100000+3),\"SUNE\"); }\n"+ // test 4472 - "mixed b() { return 100000+3; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+\"SUNE\"+\"%'\"+\"+-*\"+\"'*n\",100000+3,100000+3),\"SUNE\"); }\n"+ // test 4473 - "mixed b() { return 100000+3; }", - - - - - "=mixed a() { return search(sprintf(\"SUNE\"+\"%'\"+(\"SUNE\"[0..strlen(\"SUNE\")-2])+\"'*n\",10),\"SUNE\"); }\n"+ // test 4474 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"SUNE\"[0..strlen(\"SUNE\")-2])+\"'*n\" ,10),\"SUNE\"); }\n"+ // test 4475 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"SUNE\"[0..strlen(\"SUNE\")-2])+\"'*n\"+\"SUNE\",10),\"SUNE\"); }\n"+ // test 4476 - "mixed b() { return 10; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"SUNE\"[0..strlen(\"SUNE\")-2])+\"'*n\"+\"SUNE\"+\"%'\"+(\"SUNE\"[0..strlen(\"SUNE\")-2])+\"'*n\",10,10),\"SUNE\"); }\n"+ // test 4477 - "mixed b() { return 10; }", - - - "=mixed a() { return search(sprintf(\"SUNE\"+\"%'\"+(\"SUNE\"[0..strlen(\"SUNE\")-2])+\"'*n\",10+1),\"SUNE\"); }\n"+ // test 4478 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"SUNE\"[0..strlen(\"SUNE\")-2])+\"'*n\" ,10+1),\"SUNE\"); }\n"+ // test 4479 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"SUNE\"[0..strlen(\"SUNE\")-2])+\"'*n\"+\"SUNE\",10+1),\"SUNE\"); }\n"+ // test 4480 - "mixed b() { return 10+1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"SUNE\"[0..strlen(\"SUNE\")-2])+\"'*n\"+\"SUNE\"+\"%'\"+(\"SUNE\"[0..strlen(\"SUNE\")-2])+\"'*n\",10+1,10+1),\"SUNE\"); }\n"+ // test 4481 - "mixed b() { return 10+1; }", - - - "=mixed a() { return search(sprintf(\"SUNE\"+\"%'\"+(\"SUNE\"[0..strlen(\"SUNE\")-2])+\"'*n\",10+2),\"SUNE\"); }\n"+ // test 4482 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"SUNE\"[0..strlen(\"SUNE\")-2])+\"'*n\" ,10+2),\"SUNE\"); }\n"+ // test 4483 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"SUNE\"[0..strlen(\"SUNE\")-2])+\"'*n\"+\"SUNE\",10+2),\"SUNE\"); }\n"+ // test 4484 - "mixed b() { return 10+2; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"SUNE\"[0..strlen(\"SUNE\")-2])+\"'*n\"+\"SUNE\"+\"%'\"+(\"SUNE\"[0..strlen(\"SUNE\")-2])+\"'*n\",10+2,10+2),\"SUNE\"); }\n"+ // test 4485 - "mixed b() { return 10+2; }", - - - "=mixed a() { return search(sprintf(\"SUNE\"+\"%'\"+(\"SUNE\"[0..strlen(\"SUNE\")-2])+\"'*n\",10+3),\"SUNE\"); }\n"+ // test 4486 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"SUNE\"[0..strlen(\"SUNE\")-2])+\"'*n\" ,10+3),\"SUNE\"); }\n"+ // test 4487 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"SUNE\"[0..strlen(\"SUNE\")-2])+\"'*n\"+\"SUNE\",10+3),\"SUNE\"); }\n"+ // test 4488 - "mixed b() { return 10+3; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"SUNE\"[0..strlen(\"SUNE\")-2])+\"'*n\"+\"SUNE\"+\"%'\"+(\"SUNE\"[0..strlen(\"SUNE\")-2])+\"'*n\",10+3,10+3),\"SUNE\"); }\n"+ // test 4489 - "mixed b() { return 10+3; }", - - - - "=mixed a() { return search(sprintf(\"SUNE\"+\"%'\"+(\"SUNE\"[0..strlen(\"SUNE\")-2])+\"'*n\",1000),\"SUNE\"); }\n"+ // test 4490 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"SUNE\"[0..strlen(\"SUNE\")-2])+\"'*n\" ,1000),\"SUNE\"); }\n"+ // test 4491 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"SUNE\"[0..strlen(\"SUNE\")-2])+\"'*n\"+\"SUNE\",1000),\"SUNE\"); }\n"+ // test 4492 - "mixed b() { return 1000; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"SUNE\"[0..strlen(\"SUNE\")-2])+\"'*n\"+\"SUNE\"+\"%'\"+(\"SUNE\"[0..strlen(\"SUNE\")-2])+\"'*n\",1000,1000),\"SUNE\"); }\n"+ // test 4493 - "mixed b() { return 1000; }", - - - "=mixed a() { return search(sprintf(\"SUNE\"+\"%'\"+(\"SUNE\"[0..strlen(\"SUNE\")-2])+\"'*n\",1000+1),\"SUNE\"); }\n"+ // test 4494 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"SUNE\"[0..strlen(\"SUNE\")-2])+\"'*n\" ,1000+1),\"SUNE\"); }\n"+ // test 4495 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"SUNE\"[0..strlen(\"SUNE\")-2])+\"'*n\"+\"SUNE\",1000+1),\"SUNE\"); }\n"+ // test 4496 - "mixed b() { return 1000+1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"SUNE\"[0..strlen(\"SUNE\")-2])+\"'*n\"+\"SUNE\"+\"%'\"+(\"SUNE\"[0..strlen(\"SUNE\")-2])+\"'*n\",1000+1,1000+1),\"SUNE\"); }\n"+ // test 4497 - "mixed b() { return 1000+1; }", - - - "=mixed a() { return search(sprintf(\"SUNE\"+\"%'\"+(\"SUNE\"[0..strlen(\"SUNE\")-2])+\"'*n\",1000+2),\"SUNE\"); }\n"+ // test 4498 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"SUNE\"[0..strlen(\"SUNE\")-2])+\"'*n\" ,1000+2),\"SUNE\"); }\n"+ // test 4499 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"SUNE\"[0..strlen(\"SUNE\")-2])+\"'*n\"+\"SUNE\",1000+2),\"SUNE\"); }\n"+ // test 4500 - "mixed b() { return 1000+2; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"SUNE\"[0..strlen(\"SUNE\")-2])+\"'*n\"+\"SUNE\"+\"%'\"+(\"SUNE\"[0..strlen(\"SUNE\")-2])+\"'*n\",1000+2,1000+2),\"SUNE\"); }\n"+ // test 4501 - "mixed b() { return 1000+2; }", - - - "=mixed a() { return search(sprintf(\"SUNE\"+\"%'\"+(\"SUNE\"[0..strlen(\"SUNE\")-2])+\"'*n\",1000+3),\"SUNE\"); }\n"+ // test 4502 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"SUNE\"[0..strlen(\"SUNE\")-2])+\"'*n\" ,1000+3),\"SUNE\"); }\n"+ // test 4503 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"SUNE\"[0..strlen(\"SUNE\")-2])+\"'*n\"+\"SUNE\",1000+3),\"SUNE\"); }\n"+ // test 4504 - "mixed b() { return 1000+3; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"SUNE\"[0..strlen(\"SUNE\")-2])+\"'*n\"+\"SUNE\"+\"%'\"+(\"SUNE\"[0..strlen(\"SUNE\")-2])+\"'*n\",1000+3,1000+3),\"SUNE\"); }\n"+ // test 4505 - "mixed b() { return 1000+3; }", - - - - "=mixed a() { return search(sprintf(\"SUNE\"+\"%'\"+(\"SUNE\"[0..strlen(\"SUNE\")-2])+\"'*n\",100000),\"SUNE\"); }\n"+ // test 4506 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"SUNE\"[0..strlen(\"SUNE\")-2])+\"'*n\" ,100000),\"SUNE\"); }\n"+ // test 4507 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"SUNE\"[0..strlen(\"SUNE\")-2])+\"'*n\"+\"SUNE\",100000),\"SUNE\"); }\n"+ // test 4508 - "mixed b() { return 100000; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"SUNE\"[0..strlen(\"SUNE\")-2])+\"'*n\"+\"SUNE\"+\"%'\"+(\"SUNE\"[0..strlen(\"SUNE\")-2])+\"'*n\",100000,100000),\"SUNE\"); }\n"+ // test 4509 - "mixed b() { return 100000; }", - - - "=mixed a() { return search(sprintf(\"SUNE\"+\"%'\"+(\"SUNE\"[0..strlen(\"SUNE\")-2])+\"'*n\",100000+1),\"SUNE\"); }\n"+ // test 4510 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"SUNE\"[0..strlen(\"SUNE\")-2])+\"'*n\" ,100000+1),\"SUNE\"); }\n"+ // test 4511 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"SUNE\"[0..strlen(\"SUNE\")-2])+\"'*n\"+\"SUNE\",100000+1),\"SUNE\"); }\n"+ // test 4512 - "mixed b() { return 100000+1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"SUNE\"[0..strlen(\"SUNE\")-2])+\"'*n\"+\"SUNE\"+\"%'\"+(\"SUNE\"[0..strlen(\"SUNE\")-2])+\"'*n\",100000+1,100000+1),\"SUNE\"); }\n"+ // test 4513 - "mixed b() { return 100000+1; }", - - - "=mixed a() { return search(sprintf(\"SUNE\"+\"%'\"+(\"SUNE\"[0..strlen(\"SUNE\")-2])+\"'*n\",100000+2),\"SUNE\"); }\n"+ // test 4514 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"SUNE\"[0..strlen(\"SUNE\")-2])+\"'*n\" ,100000+2),\"SUNE\"); }\n"+ // test 4515 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"SUNE\"[0..strlen(\"SUNE\")-2])+\"'*n\"+\"SUNE\",100000+2),\"SUNE\"); }\n"+ // test 4516 - "mixed b() { return 100000+2; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"SUNE\"[0..strlen(\"SUNE\")-2])+\"'*n\"+\"SUNE\"+\"%'\"+(\"SUNE\"[0..strlen(\"SUNE\")-2])+\"'*n\",100000+2,100000+2),\"SUNE\"); }\n"+ // test 4517 - "mixed b() { return 100000+2; }", - - - "=mixed a() { return search(sprintf(\"SUNE\"+\"%'\"+(\"SUNE\"[0..strlen(\"SUNE\")-2])+\"'*n\",100000+3),\"SUNE\"); }\n"+ // test 4518 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"SUNE\"[0..strlen(\"SUNE\")-2])+\"'*n\" ,100000+3),\"SUNE\"); }\n"+ // test 4519 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"SUNE\"[0..strlen(\"SUNE\")-2])+\"'*n\"+\"SUNE\",100000+3),\"SUNE\"); }\n"+ // test 4520 - "mixed b() { return 100000+3; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"SUNE\"[0..strlen(\"SUNE\")-2])+\"'*n\"+\"SUNE\"+\"%'\"+(\"SUNE\"[0..strlen(\"SUNE\")-2])+\"'*n\",100000+3,100000+3),\"SUNE\"); }\n"+ // test 4521 - "mixed b() { return 100000+3; }", - - - - - "=mixed a() { return search(sprintf(\"SUNE\"+\"%'\"+(\"SUNE\"[1..0x7fffffff])+\"'*n\",10),\"SUNE\"); }\n"+ // test 4522 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"SUNE\"[1..0x7fffffff])+\"'*n\" ,10),\"SUNE\"); }\n"+ // test 4523 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"SUNE\"[1..0x7fffffff])+\"'*n\"+\"SUNE\",10),\"SUNE\"); }\n"+ // test 4524 - "mixed b() { return 10; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"SUNE\"[1..0x7fffffff])+\"'*n\"+\"SUNE\"+\"%'\"+(\"SUNE\"[1..0x7fffffff])+\"'*n\",10,10),\"SUNE\"); }\n"+ // test 4525 - "mixed b() { return 10; }", - - - "=mixed a() { return search(sprintf(\"SUNE\"+\"%'\"+(\"SUNE\"[1..0x7fffffff])+\"'*n\",10+1),\"SUNE\"); }\n"+ // test 4526 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"SUNE\"[1..0x7fffffff])+\"'*n\" ,10+1),\"SUNE\"); }\n"+ // test 4527 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"SUNE\"[1..0x7fffffff])+\"'*n\"+\"SUNE\",10+1),\"SUNE\"); }\n"+ // test 4528 - "mixed b() { return 10+1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"SUNE\"[1..0x7fffffff])+\"'*n\"+\"SUNE\"+\"%'\"+(\"SUNE\"[1..0x7fffffff])+\"'*n\",10+1,10+1),\"SUNE\"); }\n"+ // test 4529 - "mixed b() { return 10+1; }", - - - "=mixed a() { return search(sprintf(\"SUNE\"+\"%'\"+(\"SUNE\"[1..0x7fffffff])+\"'*n\",10+2),\"SUNE\"); }\n"+ // test 4530 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"SUNE\"[1..0x7fffffff])+\"'*n\" ,10+2),\"SUNE\"); }\n"+ // test 4531 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"SUNE\"[1..0x7fffffff])+\"'*n\"+\"SUNE\",10+2),\"SUNE\"); }\n"+ // test 4532 - "mixed b() { return 10+2; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"SUNE\"[1..0x7fffffff])+\"'*n\"+\"SUNE\"+\"%'\"+(\"SUNE\"[1..0x7fffffff])+\"'*n\",10+2,10+2),\"SUNE\"); }\n"+ // test 4533 - "mixed b() { return 10+2; }", - - - "=mixed a() { return search(sprintf(\"SUNE\"+\"%'\"+(\"SUNE\"[1..0x7fffffff])+\"'*n\",10+3),\"SUNE\"); }\n"+ // test 4534 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"SUNE\"[1..0x7fffffff])+\"'*n\" ,10+3),\"SUNE\"); }\n"+ // test 4535 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"SUNE\"[1..0x7fffffff])+\"'*n\"+\"SUNE\",10+3),\"SUNE\"); }\n"+ // test 4536 - "mixed b() { return 10+3; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"SUNE\"[1..0x7fffffff])+\"'*n\"+\"SUNE\"+\"%'\"+(\"SUNE\"[1..0x7fffffff])+\"'*n\",10+3,10+3),\"SUNE\"); }\n"+ // test 4537 - "mixed b() { return 10+3; }", - - - - "=mixed a() { return search(sprintf(\"SUNE\"+\"%'\"+(\"SUNE\"[1..0x7fffffff])+\"'*n\",1000),\"SUNE\"); }\n"+ // test 4538 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"SUNE\"[1..0x7fffffff])+\"'*n\" ,1000),\"SUNE\"); }\n"+ // test 4539 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"SUNE\"[1..0x7fffffff])+\"'*n\"+\"SUNE\",1000),\"SUNE\"); }\n"+ // test 4540 - "mixed b() { return 1000; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"SUNE\"[1..0x7fffffff])+\"'*n\"+\"SUNE\"+\"%'\"+(\"SUNE\"[1..0x7fffffff])+\"'*n\",1000,1000),\"SUNE\"); }\n"+ // test 4541 - "mixed b() { return 1000; }", - - - "=mixed a() { return search(sprintf(\"SUNE\"+\"%'\"+(\"SUNE\"[1..0x7fffffff])+\"'*n\",1000+1),\"SUNE\"); }\n"+ // test 4542 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"SUNE\"[1..0x7fffffff])+\"'*n\" ,1000+1),\"SUNE\"); }\n"+ // test 4543 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"SUNE\"[1..0x7fffffff])+\"'*n\"+\"SUNE\",1000+1),\"SUNE\"); }\n"+ // test 4544 - "mixed b() { return 1000+1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"SUNE\"[1..0x7fffffff])+\"'*n\"+\"SUNE\"+\"%'\"+(\"SUNE\"[1..0x7fffffff])+\"'*n\",1000+1,1000+1),\"SUNE\"); }\n"+ // test 4545 - "mixed b() { return 1000+1; }", - - - "=mixed a() { return search(sprintf(\"SUNE\"+\"%'\"+(\"SUNE\"[1..0x7fffffff])+\"'*n\",1000+2),\"SUNE\"); }\n"+ // test 4546 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"SUNE\"[1..0x7fffffff])+\"'*n\" ,1000+2),\"SUNE\"); }\n"+ // test 4547 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"SUNE\"[1..0x7fffffff])+\"'*n\"+\"SUNE\",1000+2),\"SUNE\"); }\n"+ // test 4548 - "mixed b() { return 1000+2; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"SUNE\"[1..0x7fffffff])+\"'*n\"+\"SUNE\"+\"%'\"+(\"SUNE\"[1..0x7fffffff])+\"'*n\",1000+2,1000+2),\"SUNE\"); }\n"+ // test 4549 - "mixed b() { return 1000+2; }", - - - "=mixed a() { return search(sprintf(\"SUNE\"+\"%'\"+(\"SUNE\"[1..0x7fffffff])+\"'*n\",1000+3),\"SUNE\"); }\n"+ // test 4550 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"SUNE\"[1..0x7fffffff])+\"'*n\" ,1000+3),\"SUNE\"); }\n"+ // test 4551 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"SUNE\"[1..0x7fffffff])+\"'*n\"+\"SUNE\",1000+3),\"SUNE\"); }\n"+ // test 4552 - "mixed b() { return 1000+3; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"SUNE\"[1..0x7fffffff])+\"'*n\"+\"SUNE\"+\"%'\"+(\"SUNE\"[1..0x7fffffff])+\"'*n\",1000+3,1000+3),\"SUNE\"); }\n"+ // test 4553 - "mixed b() { return 1000+3; }", - - - - "=mixed a() { return search(sprintf(\"SUNE\"+\"%'\"+(\"SUNE\"[1..0x7fffffff])+\"'*n\",100000),\"SUNE\"); }\n"+ // test 4554 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"SUNE\"[1..0x7fffffff])+\"'*n\" ,100000),\"SUNE\"); }\n"+ // test 4555 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"SUNE\"[1..0x7fffffff])+\"'*n\"+\"SUNE\",100000),\"SUNE\"); }\n"+ // test 4556 - "mixed b() { return 100000; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"SUNE\"[1..0x7fffffff])+\"'*n\"+\"SUNE\"+\"%'\"+(\"SUNE\"[1..0x7fffffff])+\"'*n\",100000,100000),\"SUNE\"); }\n"+ // test 4557 - "mixed b() { return 100000; }", - - - "=mixed a() { return search(sprintf(\"SUNE\"+\"%'\"+(\"SUNE\"[1..0x7fffffff])+\"'*n\",100000+1),\"SUNE\"); }\n"+ // test 4558 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"SUNE\"[1..0x7fffffff])+\"'*n\" ,100000+1),\"SUNE\"); }\n"+ // test 4559 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"SUNE\"[1..0x7fffffff])+\"'*n\"+\"SUNE\",100000+1),\"SUNE\"); }\n"+ // test 4560 - "mixed b() { return 100000+1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"SUNE\"[1..0x7fffffff])+\"'*n\"+\"SUNE\"+\"%'\"+(\"SUNE\"[1..0x7fffffff])+\"'*n\",100000+1,100000+1),\"SUNE\"); }\n"+ // test 4561 - "mixed b() { return 100000+1; }", - - - "=mixed a() { return search(sprintf(\"SUNE\"+\"%'\"+(\"SUNE\"[1..0x7fffffff])+\"'*n\",100000+2),\"SUNE\"); }\n"+ // test 4562 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"SUNE\"[1..0x7fffffff])+\"'*n\" ,100000+2),\"SUNE\"); }\n"+ // test 4563 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"SUNE\"[1..0x7fffffff])+\"'*n\"+\"SUNE\",100000+2),\"SUNE\"); }\n"+ // test 4564 - "mixed b() { return 100000+2; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"SUNE\"[1..0x7fffffff])+\"'*n\"+\"SUNE\"+\"%'\"+(\"SUNE\"[1..0x7fffffff])+\"'*n\",100000+2,100000+2),\"SUNE\"); }\n"+ // test 4565 - "mixed b() { return 100000+2; }", - - - "=mixed a() { return search(sprintf(\"SUNE\"+\"%'\"+(\"SUNE\"[1..0x7fffffff])+\"'*n\",100000+3),\"SUNE\"); }\n"+ // test 4566 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"SUNE\"[1..0x7fffffff])+\"'*n\" ,100000+3),\"SUNE\"); }\n"+ // test 4567 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"SUNE\"[1..0x7fffffff])+\"'*n\"+\"SUNE\",100000+3),\"SUNE\"); }\n"+ // test 4568 - "mixed b() { return 100000+3; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"SUNE\"[1..0x7fffffff])+\"'*n\"+\"SUNE\"+\"%'\"+(\"SUNE\"[1..0x7fffffff])+\"'*n\",100000+3,100000+3),\"SUNE\"); }\n"+ // test 4569 - "mixed b() { return 100000+3; }", - - - - - - "=mixed a() { return search(sprintf(\"-------------------+\"+\"%'\"+\"+-*\"+\"'*n\",10),\"-------------------+\"); }\n"+ // test 4570 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\" ,10),\"-------------------+\"); }\n"+ // test 4571 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+\"-------------------+\",10),\"-------------------+\"); }\n"+ // test 4572 - "mixed b() { return 10; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+\"-------------------+\"+\"%'\"+\"+-*\"+\"'*n\",10,10),\"-------------------+\"); }\n"+ // test 4573 - "mixed b() { return 10; }", - - - "=mixed a() { return search(sprintf(\"-------------------+\"+\"%'\"+\"+-*\"+\"'*n\",10+1),\"-------------------+\"); }\n"+ // test 4574 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\" ,10+1),\"-------------------+\"); }\n"+ // test 4575 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+\"-------------------+\",10+1),\"-------------------+\"); }\n"+ // test 4576 - "mixed b() { return 10+1; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+\"-------------------+\"+\"%'\"+\"+-*\"+\"'*n\",10+1,10+1),\"-------------------+\"); }\n"+ // test 4577 - "mixed b() { return 10+1; }", - - - "=mixed a() { return search(sprintf(\"-------------------+\"+\"%'\"+\"+-*\"+\"'*n\",10+2),\"-------------------+\"); }\n"+ // test 4578 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\" ,10+2),\"-------------------+\"); }\n"+ // test 4579 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+\"-------------------+\",10+2),\"-------------------+\"); }\n"+ // test 4580 - "mixed b() { return 10+2; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+\"-------------------+\"+\"%'\"+\"+-*\"+\"'*n\",10+2,10+2),\"-------------------+\"); }\n"+ // test 4581 - "mixed b() { return 10+2; }", - - - "=mixed a() { return search(sprintf(\"-------------------+\"+\"%'\"+\"+-*\"+\"'*n\",10+3),\"-------------------+\"); }\n"+ // test 4582 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\" ,10+3),\"-------------------+\"); }\n"+ // test 4583 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+\"-------------------+\",10+3),\"-------------------+\"); }\n"+ // test 4584 - "mixed b() { return 10+3; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+\"-------------------+\"+\"%'\"+\"+-*\"+\"'*n\",10+3,10+3),\"-------------------+\"); }\n"+ // test 4585 - "mixed b() { return 10+3; }", - - - - "=mixed a() { return search(sprintf(\"-------------------+\"+\"%'\"+\"+-*\"+\"'*n\",1000),\"-------------------+\"); }\n"+ // test 4586 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\" ,1000),\"-------------------+\"); }\n"+ // test 4587 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+\"-------------------+\",1000),\"-------------------+\"); }\n"+ // test 4588 - "mixed b() { return 1000; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+\"-------------------+\"+\"%'\"+\"+-*\"+\"'*n\",1000,1000),\"-------------------+\"); }\n"+ // test 4589 - "mixed b() { return 1000; }", - - - "=mixed a() { return search(sprintf(\"-------------------+\"+\"%'\"+\"+-*\"+\"'*n\",1000+1),\"-------------------+\"); }\n"+ // test 4590 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\" ,1000+1),\"-------------------+\"); }\n"+ // test 4591 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+\"-------------------+\",1000+1),\"-------------------+\"); }\n"+ // test 4592 - "mixed b() { return 1000+1; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+\"-------------------+\"+\"%'\"+\"+-*\"+\"'*n\",1000+1,1000+1),\"-------------------+\"); }\n"+ // test 4593 - "mixed b() { return 1000+1; }", - - - "=mixed a() { return search(sprintf(\"-------------------+\"+\"%'\"+\"+-*\"+\"'*n\",1000+2),\"-------------------+\"); }\n"+ // test 4594 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\" ,1000+2),\"-------------------+\"); }\n"+ // test 4595 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+\"-------------------+\",1000+2),\"-------------------+\"); }\n"+ // test 4596 - "mixed b() { return 1000+2; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+\"-------------------+\"+\"%'\"+\"+-*\"+\"'*n\",1000+2,1000+2),\"-------------------+\"); }\n"+ // test 4597 - "mixed b() { return 1000+2; }", - - - "=mixed a() { return search(sprintf(\"-------------------+\"+\"%'\"+\"+-*\"+\"'*n\",1000+3),\"-------------------+\"); }\n"+ // test 4598 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\" ,1000+3),\"-------------------+\"); }\n"+ // test 4599 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+\"-------------------+\",1000+3),\"-------------------+\"); }\n"+ // test 4600 - "mixed b() { return 1000+3; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+\"-------------------+\"+\"%'\"+\"+-*\"+\"'*n\",1000+3,1000+3),\"-------------------+\"); }\n"+ // test 4601 - "mixed b() { return 1000+3; }", - - - - "=mixed a() { return search(sprintf(\"-------------------+\"+\"%'\"+\"+-*\"+\"'*n\",100000),\"-------------------+\"); }\n"+ // test 4602 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\" ,100000),\"-------------------+\"); }\n"+ // test 4603 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+\"-------------------+\",100000),\"-------------------+\"); }\n"+ // test 4604 - "mixed b() { return 100000; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+\"-------------------+\"+\"%'\"+\"+-*\"+\"'*n\",100000,100000),\"-------------------+\"); }\n"+ // test 4605 - "mixed b() { return 100000; }", - - - "=mixed a() { return search(sprintf(\"-------------------+\"+\"%'\"+\"+-*\"+\"'*n\",100000+1),\"-------------------+\"); }\n"+ // test 4606 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\" ,100000+1),\"-------------------+\"); }\n"+ // test 4607 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+\"-------------------+\",100000+1),\"-------------------+\"); }\n"+ // test 4608 - "mixed b() { return 100000+1; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+\"-------------------+\"+\"%'\"+\"+-*\"+\"'*n\",100000+1,100000+1),\"-------------------+\"); }\n"+ // test 4609 - "mixed b() { return 100000+1; }", - - - "=mixed a() { return search(sprintf(\"-------------------+\"+\"%'\"+\"+-*\"+\"'*n\",100000+2),\"-------------------+\"); }\n"+ // test 4610 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\" ,100000+2),\"-------------------+\"); }\n"+ // test 4611 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+\"-------------------+\",100000+2),\"-------------------+\"); }\n"+ // test 4612 - "mixed b() { return 100000+2; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+\"-------------------+\"+\"%'\"+\"+-*\"+\"'*n\",100000+2,100000+2),\"-------------------+\"); }\n"+ // test 4613 - "mixed b() { return 100000+2; }", - - - "=mixed a() { return search(sprintf(\"-------------------+\"+\"%'\"+\"+-*\"+\"'*n\",100000+3),\"-------------------+\"); }\n"+ // test 4614 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\" ,100000+3),\"-------------------+\"); }\n"+ // test 4615 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+\"-------------------+\",100000+3),\"-------------------+\"); }\n"+ // test 4616 - "mixed b() { return 100000+3; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+\"-------------------+\"+\"%'\"+\"+-*\"+\"'*n\",100000+3,100000+3),\"-------------------+\"); }\n"+ // test 4617 - "mixed b() { return 100000+3; }", - - - - - "=mixed a() { return search(sprintf(\"-------------------+\"+\"%'\"+(\"-------------------+\"[0..strlen(\"-------------------+\")-2])+\"'*n\",10),\"-------------------+\"); }\n"+ // test 4618 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"-------------------+\"[0..strlen(\"-------------------+\")-2])+\"'*n\" ,10),\"-------------------+\"); }\n"+ // test 4619 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"-------------------+\"[0..strlen(\"-------------------+\")-2])+\"'*n\"+\"-------------------+\",10),\"-------------------+\"); }\n"+ // test 4620 - "mixed b() { return 10; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"-------------------+\"[0..strlen(\"-------------------+\")-2])+\"'*n\"+\"-------------------+\"+\"%'\"+(\"-------------------+\"[0..strlen(\"-------------------+\")-2])+\"'*n\",10,10),\"-------------------+\"); }\n"+ // test 4621 - "mixed b() { return 10; }", - - - "=mixed a() { return search(sprintf(\"-------------------+\"+\"%'\"+(\"-------------------+\"[0..strlen(\"-------------------+\")-2])+\"'*n\",10+1),\"-------------------+\"); }\n"+ // test 4622 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"-------------------+\"[0..strlen(\"-------------------+\")-2])+\"'*n\" ,10+1),\"-------------------+\"); }\n"+ // test 4623 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"-------------------+\"[0..strlen(\"-------------------+\")-2])+\"'*n\"+\"-------------------+\",10+1),\"-------------------+\"); }\n"+ // test 4624 - "mixed b() { return 10+1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"-------------------+\"[0..strlen(\"-------------------+\")-2])+\"'*n\"+\"-------------------+\"+\"%'\"+(\"-------------------+\"[0..strlen(\"-------------------+\")-2])+\"'*n\",10+1,10+1),\"-------------------+\"); }\n"+ // test 4625 - "mixed b() { return 10+1; }", - - - "=mixed a() { return search(sprintf(\"-------------------+\"+\"%'\"+(\"-------------------+\"[0..strlen(\"-------------------+\")-2])+\"'*n\",10+2),\"-------------------+\"); }\n"+ // test 4626 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"-------------------+\"[0..strlen(\"-------------------+\")-2])+\"'*n\" ,10+2),\"-------------------+\"); }\n"+ // test 4627 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"-------------------+\"[0..strlen(\"-------------------+\")-2])+\"'*n\"+\"-------------------+\",10+2),\"-------------------+\"); }\n"+ // test 4628 - "mixed b() { return 10+2; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"-------------------+\"[0..strlen(\"-------------------+\")-2])+\"'*n\"+\"-------------------+\"+\"%'\"+(\"-------------------+\"[0..strlen(\"-------------------+\")-2])+\"'*n\",10+2,10+2),\"-------------------+\"); }\n"+ // test 4629 - "mixed b() { return 10+2; }", - - - "=mixed a() { return search(sprintf(\"-------------------+\"+\"%'\"+(\"-------------------+\"[0..strlen(\"-------------------+\")-2])+\"'*n\",10+3),\"-------------------+\"); }\n"+ // test 4630 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"-------------------+\"[0..strlen(\"-------------------+\")-2])+\"'*n\" ,10+3),\"-------------------+\"); }\n"+ // test 4631 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"-------------------+\"[0..strlen(\"-------------------+\")-2])+\"'*n\"+\"-------------------+\",10+3),\"-------------------+\"); }\n"+ // test 4632 - "mixed b() { return 10+3; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"-------------------+\"[0..strlen(\"-------------------+\")-2])+\"'*n\"+\"-------------------+\"+\"%'\"+(\"-------------------+\"[0..strlen(\"-------------------+\")-2])+\"'*n\",10+3,10+3),\"-------------------+\"); }\n"+ // test 4633 - "mixed b() { return 10+3; }", - - - - "=mixed a() { return search(sprintf(\"-------------------+\"+\"%'\"+(\"-------------------+\"[0..strlen(\"-------------------+\")-2])+\"'*n\",1000),\"-------------------+\"); }\n"+ // test 4634 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"-------------------+\"[0..strlen(\"-------------------+\")-2])+\"'*n\" ,1000),\"-------------------+\"); }\n"+ // test 4635 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"-------------------+\"[0..strlen(\"-------------------+\")-2])+\"'*n\"+\"-------------------+\",1000),\"-------------------+\"); }\n"+ // test 4636 - "mixed b() { return 1000; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"-------------------+\"[0..strlen(\"-------------------+\")-2])+\"'*n\"+\"-------------------+\"+\"%'\"+(\"-------------------+\"[0..strlen(\"-------------------+\")-2])+\"'*n\",1000,1000),\"-------------------+\"); }\n"+ // test 4637 - "mixed b() { return 1000; }", - - - "=mixed a() { return search(sprintf(\"-------------------+\"+\"%'\"+(\"-------------------+\"[0..strlen(\"-------------------+\")-2])+\"'*n\",1000+1),\"-------------------+\"); }\n"+ // test 4638 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"-------------------+\"[0..strlen(\"-------------------+\")-2])+\"'*n\" ,1000+1),\"-------------------+\"); }\n"+ // test 4639 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"-------------------+\"[0..strlen(\"-------------------+\")-2])+\"'*n\"+\"-------------------+\",1000+1),\"-------------------+\"); }\n"+ // test 4640 - "mixed b() { return 1000+1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"-------------------+\"[0..strlen(\"-------------------+\")-2])+\"'*n\"+\"-------------------+\"+\"%'\"+(\"-------------------+\"[0..strlen(\"-------------------+\")-2])+\"'*n\",1000+1,1000+1),\"-------------------+\"); }\n"+ // test 4641 - "mixed b() { return 1000+1; }", - - - "=mixed a() { return search(sprintf(\"-------------------+\"+\"%'\"+(\"-------------------+\"[0..strlen(\"-------------------+\")-2])+\"'*n\",1000+2),\"-------------------+\"); }\n"+ // test 4642 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"-------------------+\"[0..strlen(\"-------------------+\")-2])+\"'*n\" ,1000+2),\"-------------------+\"); }\n"+ // test 4643 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"-------------------+\"[0..strlen(\"-------------------+\")-2])+\"'*n\"+\"-------------------+\",1000+2),\"-------------------+\"); }\n"+ // test 4644 - "mixed b() { return 1000+2; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"-------------------+\"[0..strlen(\"-------------------+\")-2])+\"'*n\"+\"-------------------+\"+\"%'\"+(\"-------------------+\"[0..strlen(\"-------------------+\")-2])+\"'*n\",1000+2,1000+2),\"-------------------+\"); }\n"+ // test 4645 - "mixed b() { return 1000+2; }", - - - "=mixed a() { return search(sprintf(\"-------------------+\"+\"%'\"+(\"-------------------+\"[0..strlen(\"-------------------+\")-2])+\"'*n\",1000+3),\"-------------------+\"); }\n"+ // test 4646 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"-------------------+\"[0..strlen(\"-------------------+\")-2])+\"'*n\" ,1000+3),\"-------------------+\"); }\n"+ // test 4647 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"-------------------+\"[0..strlen(\"-------------------+\")-2])+\"'*n\"+\"-------------------+\",1000+3),\"-------------------+\"); }\n"+ // test 4648 - "mixed b() { return 1000+3; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"-------------------+\"[0..strlen(\"-------------------+\")-2])+\"'*n\"+\"-------------------+\"+\"%'\"+(\"-------------------+\"[0..strlen(\"-------------------+\")-2])+\"'*n\",1000+3,1000+3),\"-------------------+\"); }\n"+ // test 4649 - "mixed b() { return 1000+3; }", - - - - "=mixed a() { return search(sprintf(\"-------------------+\"+\"%'\"+(\"-------------------+\"[0..strlen(\"-------------------+\")-2])+\"'*n\",100000),\"-------------------+\"); }\n"+ // test 4650 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"-------------------+\"[0..strlen(\"-------------------+\")-2])+\"'*n\" ,100000),\"-------------------+\"); }\n"+ // test 4651 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"-------------------+\"[0..strlen(\"-------------------+\")-2])+\"'*n\"+\"-------------------+\",100000),\"-------------------+\"); }\n"+ // test 4652 - "mixed b() { return 100000; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"-------------------+\"[0..strlen(\"-------------------+\")-2])+\"'*n\"+\"-------------------+\"+\"%'\"+(\"-------------------+\"[0..strlen(\"-------------------+\")-2])+\"'*n\",100000,100000),\"-------------------+\"); }\n"+ // test 4653 - "mixed b() { return 100000; }", - - - "=mixed a() { return search(sprintf(\"-------------------+\"+\"%'\"+(\"-------------------+\"[0..strlen(\"-------------------+\")-2])+\"'*n\",100000+1),\"-------------------+\"); }\n"+ // test 4654 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"-------------------+\"[0..strlen(\"-------------------+\")-2])+\"'*n\" ,100000+1),\"-------------------+\"); }\n"+ // test 4655 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"-------------------+\"[0..strlen(\"-------------------+\")-2])+\"'*n\"+\"-------------------+\",100000+1),\"-------------------+\"); }\n"+ // test 4656 - "mixed b() { return 100000+1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"-------------------+\"[0..strlen(\"-------------------+\")-2])+\"'*n\"+\"-------------------+\"+\"%'\"+(\"-------------------+\"[0..strlen(\"-------------------+\")-2])+\"'*n\",100000+1,100000+1),\"-------------------+\"); }\n"+ // test 4657 - "mixed b() { return 100000+1; }", - - - "=mixed a() { return search(sprintf(\"-------------------+\"+\"%'\"+(\"-------------------+\"[0..strlen(\"-------------------+\")-2])+\"'*n\",100000+2),\"-------------------+\"); }\n"+ // test 4658 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"-------------------+\"[0..strlen(\"-------------------+\")-2])+\"'*n\" ,100000+2),\"-------------------+\"); }\n"+ // test 4659 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"-------------------+\"[0..strlen(\"-------------------+\")-2])+\"'*n\"+\"-------------------+\",100000+2),\"-------------------+\"); }\n"+ // test 4660 - "mixed b() { return 100000+2; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"-------------------+\"[0..strlen(\"-------------------+\")-2])+\"'*n\"+\"-------------------+\"+\"%'\"+(\"-------------------+\"[0..strlen(\"-------------------+\")-2])+\"'*n\",100000+2,100000+2),\"-------------------+\"); }\n"+ // test 4661 - "mixed b() { return 100000+2; }", - - - "=mixed a() { return search(sprintf(\"-------------------+\"+\"%'\"+(\"-------------------+\"[0..strlen(\"-------------------+\")-2])+\"'*n\",100000+3),\"-------------------+\"); }\n"+ // test 4662 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"-------------------+\"[0..strlen(\"-------------------+\")-2])+\"'*n\" ,100000+3),\"-------------------+\"); }\n"+ // test 4663 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"-------------------+\"[0..strlen(\"-------------------+\")-2])+\"'*n\"+\"-------------------+\",100000+3),\"-------------------+\"); }\n"+ // test 4664 - "mixed b() { return 100000+3; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"-------------------+\"[0..strlen(\"-------------------+\")-2])+\"'*n\"+\"-------------------+\"+\"%'\"+(\"-------------------+\"[0..strlen(\"-------------------+\")-2])+\"'*n\",100000+3,100000+3),\"-------------------+\"); }\n"+ // test 4665 - "mixed b() { return 100000+3; }", - - - - - "=mixed a() { return search(sprintf(\"-------------------+\"+\"%'\"+(\"-------------------+\"[1..0x7fffffff])+\"'*n\",10),\"-------------------+\"); }\n"+ // test 4666 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"-------------------+\"[1..0x7fffffff])+\"'*n\" ,10),\"-------------------+\"); }\n"+ // test 4667 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"-------------------+\"[1..0x7fffffff])+\"'*n\"+\"-------------------+\",10),\"-------------------+\"); }\n"+ // test 4668 - "mixed b() { return 10; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"-------------------+\"[1..0x7fffffff])+\"'*n\"+\"-------------------+\"+\"%'\"+(\"-------------------+\"[1..0x7fffffff])+\"'*n\",10,10),\"-------------------+\"); }\n"+ // test 4669 - "mixed b() { return 10; }", - - - "=mixed a() { return search(sprintf(\"-------------------+\"+\"%'\"+(\"-------------------+\"[1..0x7fffffff])+\"'*n\",10+1),\"-------------------+\"); }\n"+ // test 4670 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"-------------------+\"[1..0x7fffffff])+\"'*n\" ,10+1),\"-------------------+\"); }\n"+ // test 4671 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"-------------------+\"[1..0x7fffffff])+\"'*n\"+\"-------------------+\",10+1),\"-------------------+\"); }\n"+ // test 4672 - "mixed b() { return 10+1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"-------------------+\"[1..0x7fffffff])+\"'*n\"+\"-------------------+\"+\"%'\"+(\"-------------------+\"[1..0x7fffffff])+\"'*n\",10+1,10+1),\"-------------------+\"); }\n"+ // test 4673 - "mixed b() { return 10+1; }", - - - "=mixed a() { return search(sprintf(\"-------------------+\"+\"%'\"+(\"-------------------+\"[1..0x7fffffff])+\"'*n\",10+2),\"-------------------+\"); }\n"+ // test 4674 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"-------------------+\"[1..0x7fffffff])+\"'*n\" ,10+2),\"-------------------+\"); }\n"+ // test 4675 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"-------------------+\"[1..0x7fffffff])+\"'*n\"+\"-------------------+\",10+2),\"-------------------+\"); }\n"+ // test 4676 - "mixed b() { return 10+2; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"-------------------+\"[1..0x7fffffff])+\"'*n\"+\"-------------------+\"+\"%'\"+(\"-------------------+\"[1..0x7fffffff])+\"'*n\",10+2,10+2),\"-------------------+\"); }\n"+ // test 4677 - "mixed b() { return 10+2; }", - - - "=mixed a() { return search(sprintf(\"-------------------+\"+\"%'\"+(\"-------------------+\"[1..0x7fffffff])+\"'*n\",10+3),\"-------------------+\"); }\n"+ // test 4678 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"-------------------+\"[1..0x7fffffff])+\"'*n\" ,10+3),\"-------------------+\"); }\n"+ // test 4679 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"-------------------+\"[1..0x7fffffff])+\"'*n\"+\"-------------------+\",10+3),\"-------------------+\"); }\n"+ // test 4680 - "mixed b() { return 10+3; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"-------------------+\"[1..0x7fffffff])+\"'*n\"+\"-------------------+\"+\"%'\"+(\"-------------------+\"[1..0x7fffffff])+\"'*n\",10+3,10+3),\"-------------------+\"); }\n"+ // test 4681 - "mixed b() { return 10+3; }", - - - - "=mixed a() { return search(sprintf(\"-------------------+\"+\"%'\"+(\"-------------------+\"[1..0x7fffffff])+\"'*n\",1000),\"-------------------+\"); }\n"+ // test 4682 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"-------------------+\"[1..0x7fffffff])+\"'*n\" ,1000),\"-------------------+\"); }\n"+ // test 4683 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"-------------------+\"[1..0x7fffffff])+\"'*n\"+\"-------------------+\",1000),\"-------------------+\"); }\n"+ // test 4684 - "mixed b() { return 1000; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"-------------------+\"[1..0x7fffffff])+\"'*n\"+\"-------------------+\"+\"%'\"+(\"-------------------+\"[1..0x7fffffff])+\"'*n\",1000,1000),\"-------------------+\"); }\n"+ // test 4685 - "mixed b() { return 1000; }", - - - "=mixed a() { return search(sprintf(\"-------------------+\"+\"%'\"+(\"-------------------+\"[1..0x7fffffff])+\"'*n\",1000+1),\"-------------------+\"); }\n"+ // test 4686 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"-------------------+\"[1..0x7fffffff])+\"'*n\" ,1000+1),\"-------------------+\"); }\n"+ // test 4687 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"-------------------+\"[1..0x7fffffff])+\"'*n\"+\"-------------------+\",1000+1),\"-------------------+\"); }\n"+ // test 4688 - "mixed b() { return 1000+1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"-------------------+\"[1..0x7fffffff])+\"'*n\"+\"-------------------+\"+\"%'\"+(\"-------------------+\"[1..0x7fffffff])+\"'*n\",1000+1,1000+1),\"-------------------+\"); }\n"+ // test 4689 - "mixed b() { return 1000+1; }", - - - "=mixed a() { return search(sprintf(\"-------------------+\"+\"%'\"+(\"-------------------+\"[1..0x7fffffff])+\"'*n\",1000+2),\"-------------------+\"); }\n"+ // test 4690 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"-------------------+\"[1..0x7fffffff])+\"'*n\" ,1000+2),\"-------------------+\"); }\n"+ // test 4691 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"-------------------+\"[1..0x7fffffff])+\"'*n\"+\"-------------------+\",1000+2),\"-------------------+\"); }\n"+ // test 4692 - "mixed b() { return 1000+2; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"-------------------+\"[1..0x7fffffff])+\"'*n\"+\"-------------------+\"+\"%'\"+(\"-------------------+\"[1..0x7fffffff])+\"'*n\",1000+2,1000+2),\"-------------------+\"); }\n"+ // test 4693 - "mixed b() { return 1000+2; }", - - - "=mixed a() { return search(sprintf(\"-------------------+\"+\"%'\"+(\"-------------------+\"[1..0x7fffffff])+\"'*n\",1000+3),\"-------------------+\"); }\n"+ // test 4694 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"-------------------+\"[1..0x7fffffff])+\"'*n\" ,1000+3),\"-------------------+\"); }\n"+ // test 4695 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"-------------------+\"[1..0x7fffffff])+\"'*n\"+\"-------------------+\",1000+3),\"-------------------+\"); }\n"+ // test 4696 - "mixed b() { return 1000+3; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"-------------------+\"[1..0x7fffffff])+\"'*n\"+\"-------------------+\"+\"%'\"+(\"-------------------+\"[1..0x7fffffff])+\"'*n\",1000+3,1000+3),\"-------------------+\"); }\n"+ // test 4697 - "mixed b() { return 1000+3; }", - - - - "=mixed a() { return search(sprintf(\"-------------------+\"+\"%'\"+(\"-------------------+\"[1..0x7fffffff])+\"'*n\",100000),\"-------------------+\"); }\n"+ // test 4698 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"-------------------+\"[1..0x7fffffff])+\"'*n\" ,100000),\"-------------------+\"); }\n"+ // test 4699 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"-------------------+\"[1..0x7fffffff])+\"'*n\"+\"-------------------+\",100000),\"-------------------+\"); }\n"+ // test 4700 - "mixed b() { return 100000; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"-------------------+\"[1..0x7fffffff])+\"'*n\"+\"-------------------+\"+\"%'\"+(\"-------------------+\"[1..0x7fffffff])+\"'*n\",100000,100000),\"-------------------+\"); }\n"+ // test 4701 - "mixed b() { return 100000; }", - - - "=mixed a() { return search(sprintf(\"-------------------+\"+\"%'\"+(\"-------------------+\"[1..0x7fffffff])+\"'*n\",100000+1),\"-------------------+\"); }\n"+ // test 4702 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"-------------------+\"[1..0x7fffffff])+\"'*n\" ,100000+1),\"-------------------+\"); }\n"+ // test 4703 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"-------------------+\"[1..0x7fffffff])+\"'*n\"+\"-------------------+\",100000+1),\"-------------------+\"); }\n"+ // test 4704 - "mixed b() { return 100000+1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"-------------------+\"[1..0x7fffffff])+\"'*n\"+\"-------------------+\"+\"%'\"+(\"-------------------+\"[1..0x7fffffff])+\"'*n\",100000+1,100000+1),\"-------------------+\"); }\n"+ // test 4705 - "mixed b() { return 100000+1; }", - - - "=mixed a() { return search(sprintf(\"-------------------+\"+\"%'\"+(\"-------------------+\"[1..0x7fffffff])+\"'*n\",100000+2),\"-------------------+\"); }\n"+ // test 4706 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"-------------------+\"[1..0x7fffffff])+\"'*n\" ,100000+2),\"-------------------+\"); }\n"+ // test 4707 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"-------------------+\"[1..0x7fffffff])+\"'*n\"+\"-------------------+\",100000+2),\"-------------------+\"); }\n"+ // test 4708 - "mixed b() { return 100000+2; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"-------------------+\"[1..0x7fffffff])+\"'*n\"+\"-------------------+\"+\"%'\"+(\"-------------------+\"[1..0x7fffffff])+\"'*n\",100000+2,100000+2),\"-------------------+\"); }\n"+ // test 4709 - "mixed b() { return 100000+2; }", - - - "=mixed a() { return search(sprintf(\"-------------------+\"+\"%'\"+(\"-------------------+\"[1..0x7fffffff])+\"'*n\",100000+3),\"-------------------+\"); }\n"+ // test 4710 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"-------------------+\"[1..0x7fffffff])+\"'*n\" ,100000+3),\"-------------------+\"); }\n"+ // test 4711 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"-------------------+\"[1..0x7fffffff])+\"'*n\"+\"-------------------+\",100000+3),\"-------------------+\"); }\n"+ // test 4712 - "mixed b() { return 100000+3; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"-------------------+\"[1..0x7fffffff])+\"'*n\"+\"-------------------+\"+\"%'\"+(\"-------------------+\"[1..0x7fffffff])+\"'*n\",100000+3,100000+3),\"-------------------+\"); }\n"+ // test 4713 - "mixed b() { return 100000+3; }", - - - - - - "=mixed a() { return search(sprintf(\"+-------------------\"+\"%'\"+\"+-*\"+\"'*n\",10),\"+-------------------\"); }\n"+ // test 4714 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\" ,10),\"+-------------------\"); }\n"+ // test 4715 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+\"+-------------------\",10),\"+-------------------\"); }\n"+ // test 4716 - "mixed b() { return 10; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+\"+-------------------\"+\"%'\"+\"+-*\"+\"'*n\",10,10),\"+-------------------\"); }\n"+ // test 4717 - "mixed b() { return 10; }", - - - "=mixed a() { return search(sprintf(\"+-------------------\"+\"%'\"+\"+-*\"+\"'*n\",10+1),\"+-------------------\"); }\n"+ // test 4718 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\" ,10+1),\"+-------------------\"); }\n"+ // test 4719 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+\"+-------------------\",10+1),\"+-------------------\"); }\n"+ // test 4720 - "mixed b() { return 10+1; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+\"+-------------------\"+\"%'\"+\"+-*\"+\"'*n\",10+1,10+1),\"+-------------------\"); }\n"+ // test 4721 - "mixed b() { return 10+1; }", - - - "=mixed a() { return search(sprintf(\"+-------------------\"+\"%'\"+\"+-*\"+\"'*n\",10+2),\"+-------------------\"); }\n"+ // test 4722 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\" ,10+2),\"+-------------------\"); }\n"+ // test 4723 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+\"+-------------------\",10+2),\"+-------------------\"); }\n"+ // test 4724 - "mixed b() { return 10+2; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+\"+-------------------\"+\"%'\"+\"+-*\"+\"'*n\",10+2,10+2),\"+-------------------\"); }\n"+ // test 4725 - "mixed b() { return 10+2; }", - - - "=mixed a() { return search(sprintf(\"+-------------------\"+\"%'\"+\"+-*\"+\"'*n\",10+3),\"+-------------------\"); }\n"+ // test 4726 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\" ,10+3),\"+-------------------\"); }\n"+ // test 4727 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+\"+-------------------\",10+3),\"+-------------------\"); }\n"+ // test 4728 - "mixed b() { return 10+3; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+\"+-------------------\"+\"%'\"+\"+-*\"+\"'*n\",10+3,10+3),\"+-------------------\"); }\n"+ // test 4729 - "mixed b() { return 10+3; }", - - - - "=mixed a() { return search(sprintf(\"+-------------------\"+\"%'\"+\"+-*\"+\"'*n\",1000),\"+-------------------\"); }\n"+ // test 4730 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\" ,1000),\"+-------------------\"); }\n"+ // test 4731 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+\"+-------------------\",1000),\"+-------------------\"); }\n"+ // test 4732 - "mixed b() { return 1000; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+\"+-------------------\"+\"%'\"+\"+-*\"+\"'*n\",1000,1000),\"+-------------------\"); }\n"+ // test 4733 - "mixed b() { return 1000; }", - - - "=mixed a() { return search(sprintf(\"+-------------------\"+\"%'\"+\"+-*\"+\"'*n\",1000+1),\"+-------------------\"); }\n"+ // test 4734 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\" ,1000+1),\"+-------------------\"); }\n"+ // test 4735 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+\"+-------------------\",1000+1),\"+-------------------\"); }\n"+ // test 4736 - "mixed b() { return 1000+1; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+\"+-------------------\"+\"%'\"+\"+-*\"+\"'*n\",1000+1,1000+1),\"+-------------------\"); }\n"+ // test 4737 - "mixed b() { return 1000+1; }", - - - "=mixed a() { return search(sprintf(\"+-------------------\"+\"%'\"+\"+-*\"+\"'*n\",1000+2),\"+-------------------\"); }\n"+ // test 4738 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\" ,1000+2),\"+-------------------\"); }\n"+ // test 4739 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+\"+-------------------\",1000+2),\"+-------------------\"); }\n"+ // test 4740 - "mixed b() { return 1000+2; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+\"+-------------------\"+\"%'\"+\"+-*\"+\"'*n\",1000+2,1000+2),\"+-------------------\"); }\n"+ // test 4741 - "mixed b() { return 1000+2; }", - - - "=mixed a() { return search(sprintf(\"+-------------------\"+\"%'\"+\"+-*\"+\"'*n\",1000+3),\"+-------------------\"); }\n"+ // test 4742 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\" ,1000+3),\"+-------------------\"); }\n"+ // test 4743 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+\"+-------------------\",1000+3),\"+-------------------\"); }\n"+ // test 4744 - "mixed b() { return 1000+3; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+\"+-------------------\"+\"%'\"+\"+-*\"+\"'*n\",1000+3,1000+3),\"+-------------------\"); }\n"+ // test 4745 - "mixed b() { return 1000+3; }", - - - - "=mixed a() { return search(sprintf(\"+-------------------\"+\"%'\"+\"+-*\"+\"'*n\",100000),\"+-------------------\"); }\n"+ // test 4746 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\" ,100000),\"+-------------------\"); }\n"+ // test 4747 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+\"+-------------------\",100000),\"+-------------------\"); }\n"+ // test 4748 - "mixed b() { return 100000; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+\"+-------------------\"+\"%'\"+\"+-*\"+\"'*n\",100000,100000),\"+-------------------\"); }\n"+ // test 4749 - "mixed b() { return 100000; }", - - - "=mixed a() { return search(sprintf(\"+-------------------\"+\"%'\"+\"+-*\"+\"'*n\",100000+1),\"+-------------------\"); }\n"+ // test 4750 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\" ,100000+1),\"+-------------------\"); }\n"+ // test 4751 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+\"+-------------------\",100000+1),\"+-------------------\"); }\n"+ // test 4752 - "mixed b() { return 100000+1; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+\"+-------------------\"+\"%'\"+\"+-*\"+\"'*n\",100000+1,100000+1),\"+-------------------\"); }\n"+ // test 4753 - "mixed b() { return 100000+1; }", - - - "=mixed a() { return search(sprintf(\"+-------------------\"+\"%'\"+\"+-*\"+\"'*n\",100000+2),\"+-------------------\"); }\n"+ // test 4754 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\" ,100000+2),\"+-------------------\"); }\n"+ // test 4755 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+\"+-------------------\",100000+2),\"+-------------------\"); }\n"+ // test 4756 - "mixed b() { return 100000+2; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+\"+-------------------\"+\"%'\"+\"+-*\"+\"'*n\",100000+2,100000+2),\"+-------------------\"); }\n"+ // test 4757 - "mixed b() { return 100000+2; }", - - - "=mixed a() { return search(sprintf(\"+-------------------\"+\"%'\"+\"+-*\"+\"'*n\",100000+3),\"+-------------------\"); }\n"+ // test 4758 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\" ,100000+3),\"+-------------------\"); }\n"+ // test 4759 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+\"+-------------------\",100000+3),\"+-------------------\"); }\n"+ // test 4760 - "mixed b() { return 100000+3; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+\"+-------------------\"+\"%'\"+\"+-*\"+\"'*n\",100000+3,100000+3),\"+-------------------\"); }\n"+ // test 4761 - "mixed b() { return 100000+3; }", - - - - - "=mixed a() { return search(sprintf(\"+-------------------\"+\"%'\"+(\"+-------------------\"[0..strlen(\"+-------------------\")-2])+\"'*n\",10),\"+-------------------\"); }\n"+ // test 4762 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"+-------------------\"[0..strlen(\"+-------------------\")-2])+\"'*n\" ,10),\"+-------------------\"); }\n"+ // test 4763 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"+-------------------\"[0..strlen(\"+-------------------\")-2])+\"'*n\"+\"+-------------------\",10),\"+-------------------\"); }\n"+ // test 4764 - "mixed b() { return 10; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"+-------------------\"[0..strlen(\"+-------------------\")-2])+\"'*n\"+\"+-------------------\"+\"%'\"+(\"+-------------------\"[0..strlen(\"+-------------------\")-2])+\"'*n\",10,10),\"+-------------------\"); }\n"+ // test 4765 - "mixed b() { return 10; }", - - - "=mixed a() { return search(sprintf(\"+-------------------\"+\"%'\"+(\"+-------------------\"[0..strlen(\"+-------------------\")-2])+\"'*n\",10+1),\"+-------------------\"); }\n"+ // test 4766 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"+-------------------\"[0..strlen(\"+-------------------\")-2])+\"'*n\" ,10+1),\"+-------------------\"); }\n"+ // test 4767 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"+-------------------\"[0..strlen(\"+-------------------\")-2])+\"'*n\"+\"+-------------------\",10+1),\"+-------------------\"); }\n"+ // test 4768 - "mixed b() { return 10+1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"+-------------------\"[0..strlen(\"+-------------------\")-2])+\"'*n\"+\"+-------------------\"+\"%'\"+(\"+-------------------\"[0..strlen(\"+-------------------\")-2])+\"'*n\",10+1,10+1),\"+-------------------\"); }\n"+ // test 4769 - "mixed b() { return 10+1; }", - - - "=mixed a() { return search(sprintf(\"+-------------------\"+\"%'\"+(\"+-------------------\"[0..strlen(\"+-------------------\")-2])+\"'*n\",10+2),\"+-------------------\"); }\n"+ // test 4770 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"+-------------------\"[0..strlen(\"+-------------------\")-2])+\"'*n\" ,10+2),\"+-------------------\"); }\n"+ // test 4771 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"+-------------------\"[0..strlen(\"+-------------------\")-2])+\"'*n\"+\"+-------------------\",10+2),\"+-------------------\"); }\n"+ // test 4772 - "mixed b() { return 10+2; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"+-------------------\"[0..strlen(\"+-------------------\")-2])+\"'*n\"+\"+-------------------\"+\"%'\"+(\"+-------------------\"[0..strlen(\"+-------------------\")-2])+\"'*n\",10+2,10+2),\"+-------------------\"); }\n"+ // test 4773 - "mixed b() { return 10+2; }", - - - "=mixed a() { return search(sprintf(\"+-------------------\"+\"%'\"+(\"+-------------------\"[0..strlen(\"+-------------------\")-2])+\"'*n\",10+3),\"+-------------------\"); }\n"+ // test 4774 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"+-------------------\"[0..strlen(\"+-------------------\")-2])+\"'*n\" ,10+3),\"+-------------------\"); }\n"+ // test 4775 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"+-------------------\"[0..strlen(\"+-------------------\")-2])+\"'*n\"+\"+-------------------\",10+3),\"+-------------------\"); }\n"+ // test 4776 - "mixed b() { return 10+3; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"+-------------------\"[0..strlen(\"+-------------------\")-2])+\"'*n\"+\"+-------------------\"+\"%'\"+(\"+-------------------\"[0..strlen(\"+-------------------\")-2])+\"'*n\",10+3,10+3),\"+-------------------\"); }\n"+ // test 4777 - "mixed b() { return 10+3; }", - - - - "=mixed a() { return search(sprintf(\"+-------------------\"+\"%'\"+(\"+-------------------\"[0..strlen(\"+-------------------\")-2])+\"'*n\",1000),\"+-------------------\"); }\n"+ // test 4778 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"+-------------------\"[0..strlen(\"+-------------------\")-2])+\"'*n\" ,1000),\"+-------------------\"); }\n"+ // test 4779 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"+-------------------\"[0..strlen(\"+-------------------\")-2])+\"'*n\"+\"+-------------------\",1000),\"+-------------------\"); }\n"+ // test 4780 - "mixed b() { return 1000; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"+-------------------\"[0..strlen(\"+-------------------\")-2])+\"'*n\"+\"+-------------------\"+\"%'\"+(\"+-------------------\"[0..strlen(\"+-------------------\")-2])+\"'*n\",1000,1000),\"+-------------------\"); }\n"+ // test 4781 - "mixed b() { return 1000; }", - - - "=mixed a() { return search(sprintf(\"+-------------------\"+\"%'\"+(\"+-------------------\"[0..strlen(\"+-------------------\")-2])+\"'*n\",1000+1),\"+-------------------\"); }\n"+ // test 4782 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"+-------------------\"[0..strlen(\"+-------------------\")-2])+\"'*n\" ,1000+1),\"+-------------------\"); }\n"+ // test 4783 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"+-------------------\"[0..strlen(\"+-------------------\")-2])+\"'*n\"+\"+-------------------\",1000+1),\"+-------------------\"); }\n"+ // test 4784 - "mixed b() { return 1000+1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"+-------------------\"[0..strlen(\"+-------------------\")-2])+\"'*n\"+\"+-------------------\"+\"%'\"+(\"+-------------------\"[0..strlen(\"+-------------------\")-2])+\"'*n\",1000+1,1000+1),\"+-------------------\"); }\n"+ // test 4785 - "mixed b() { return 1000+1; }", - - - "=mixed a() { return search(sprintf(\"+-------------------\"+\"%'\"+(\"+-------------------\"[0..strlen(\"+-------------------\")-2])+\"'*n\",1000+2),\"+-------------------\"); }\n"+ // test 4786 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"+-------------------\"[0..strlen(\"+-------------------\")-2])+\"'*n\" ,1000+2),\"+-------------------\"); }\n"+ // test 4787 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"+-------------------\"[0..strlen(\"+-------------------\")-2])+\"'*n\"+\"+-------------------\",1000+2),\"+-------------------\"); }\n"+ // test 4788 - "mixed b() { return 1000+2; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"+-------------------\"[0..strlen(\"+-------------------\")-2])+\"'*n\"+\"+-------------------\"+\"%'\"+(\"+-------------------\"[0..strlen(\"+-------------------\")-2])+\"'*n\",1000+2,1000+2),\"+-------------------\"); }\n"+ // test 4789 - "mixed b() { return 1000+2; }", - - - "=mixed a() { return search(sprintf(\"+-------------------\"+\"%'\"+(\"+-------------------\"[0..strlen(\"+-------------------\")-2])+\"'*n\",1000+3),\"+-------------------\"); }\n"+ // test 4790 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"+-------------------\"[0..strlen(\"+-------------------\")-2])+\"'*n\" ,1000+3),\"+-------------------\"); }\n"+ // test 4791 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"+-------------------\"[0..strlen(\"+-------------------\")-2])+\"'*n\"+\"+-------------------\",1000+3),\"+-------------------\"); }\n"+ // test 4792 - "mixed b() { return 1000+3; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"+-------------------\"[0..strlen(\"+-------------------\")-2])+\"'*n\"+\"+-------------------\"+\"%'\"+(\"+-------------------\"[0..strlen(\"+-------------------\")-2])+\"'*n\",1000+3,1000+3),\"+-------------------\"); }\n"+ // test 4793 - "mixed b() { return 1000+3; }", - - - - "=mixed a() { return search(sprintf(\"+-------------------\"+\"%'\"+(\"+-------------------\"[0..strlen(\"+-------------------\")-2])+\"'*n\",100000),\"+-------------------\"); }\n"+ // test 4794 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"+-------------------\"[0..strlen(\"+-------------------\")-2])+\"'*n\" ,100000),\"+-------------------\"); }\n"+ // test 4795 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"+-------------------\"[0..strlen(\"+-------------------\")-2])+\"'*n\"+\"+-------------------\",100000),\"+-------------------\"); }\n"+ // test 4796 - "mixed b() { return 100000; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"+-------------------\"[0..strlen(\"+-------------------\")-2])+\"'*n\"+\"+-------------------\"+\"%'\"+(\"+-------------------\"[0..strlen(\"+-------------------\")-2])+\"'*n\",100000,100000),\"+-------------------\"); }\n"+ // test 4797 - "mixed b() { return 100000; }", - - - "=mixed a() { return search(sprintf(\"+-------------------\"+\"%'\"+(\"+-------------------\"[0..strlen(\"+-------------------\")-2])+\"'*n\",100000+1),\"+-------------------\"); }\n"+ // test 4798 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"+-------------------\"[0..strlen(\"+-------------------\")-2])+\"'*n\" ,100000+1),\"+-------------------\"); }\n"+ // test 4799 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"+-------------------\"[0..strlen(\"+-------------------\")-2])+\"'*n\"+\"+-------------------\",100000+1),\"+-------------------\"); }\n"+ // test 4800 - "mixed b() { return 100000+1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"+-------------------\"[0..strlen(\"+-------------------\")-2])+\"'*n\"+\"+-------------------\"+\"%'\"+(\"+-------------------\"[0..strlen(\"+-------------------\")-2])+\"'*n\",100000+1,100000+1),\"+-------------------\"); }\n"+ // test 4801 - "mixed b() { return 100000+1; }", - - - "=mixed a() { return search(sprintf(\"+-------------------\"+\"%'\"+(\"+-------------------\"[0..strlen(\"+-------------------\")-2])+\"'*n\",100000+2),\"+-------------------\"); }\n"+ // test 4802 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"+-------------------\"[0..strlen(\"+-------------------\")-2])+\"'*n\" ,100000+2),\"+-------------------\"); }\n"+ // test 4803 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"+-------------------\"[0..strlen(\"+-------------------\")-2])+\"'*n\"+\"+-------------------\",100000+2),\"+-------------------\"); }\n"+ // test 4804 - "mixed b() { return 100000+2; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"+-------------------\"[0..strlen(\"+-------------------\")-2])+\"'*n\"+\"+-------------------\"+\"%'\"+(\"+-------------------\"[0..strlen(\"+-------------------\")-2])+\"'*n\",100000+2,100000+2),\"+-------------------\"); }\n"+ // test 4805 - "mixed b() { return 100000+2; }", - - - "=mixed a() { return search(sprintf(\"+-------------------\"+\"%'\"+(\"+-------------------\"[0..strlen(\"+-------------------\")-2])+\"'*n\",100000+3),\"+-------------------\"); }\n"+ // test 4806 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"+-------------------\"[0..strlen(\"+-------------------\")-2])+\"'*n\" ,100000+3),\"+-------------------\"); }\n"+ // test 4807 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"+-------------------\"[0..strlen(\"+-------------------\")-2])+\"'*n\"+\"+-------------------\",100000+3),\"+-------------------\"); }\n"+ // test 4808 - "mixed b() { return 100000+3; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"+-------------------\"[0..strlen(\"+-------------------\")-2])+\"'*n\"+\"+-------------------\"+\"%'\"+(\"+-------------------\"[0..strlen(\"+-------------------\")-2])+\"'*n\",100000+3,100000+3),\"+-------------------\"); }\n"+ // test 4809 - "mixed b() { return 100000+3; }", - - - - - "=mixed a() { return search(sprintf(\"+-------------------\"+\"%'\"+(\"+-------------------\"[1..0x7fffffff])+\"'*n\",10),\"+-------------------\"); }\n"+ // test 4810 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"+-------------------\"[1..0x7fffffff])+\"'*n\" ,10),\"+-------------------\"); }\n"+ // test 4811 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"+-------------------\"[1..0x7fffffff])+\"'*n\"+\"+-------------------\",10),\"+-------------------\"); }\n"+ // test 4812 - "mixed b() { return 10; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"+-------------------\"[1..0x7fffffff])+\"'*n\"+\"+-------------------\"+\"%'\"+(\"+-------------------\"[1..0x7fffffff])+\"'*n\",10,10),\"+-------------------\"); }\n"+ // test 4813 - "mixed b() { return 10; }", - - - "=mixed a() { return search(sprintf(\"+-------------------\"+\"%'\"+(\"+-------------------\"[1..0x7fffffff])+\"'*n\",10+1),\"+-------------------\"); }\n"+ // test 4814 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"+-------------------\"[1..0x7fffffff])+\"'*n\" ,10+1),\"+-------------------\"); }\n"+ // test 4815 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"+-------------------\"[1..0x7fffffff])+\"'*n\"+\"+-------------------\",10+1),\"+-------------------\"); }\n"+ // test 4816 - "mixed b() { return 10+1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"+-------------------\"[1..0x7fffffff])+\"'*n\"+\"+-------------------\"+\"%'\"+(\"+-------------------\"[1..0x7fffffff])+\"'*n\",10+1,10+1),\"+-------------------\"); }\n"+ // test 4817 - "mixed b() { return 10+1; }", - - - "=mixed a() { return search(sprintf(\"+-------------------\"+\"%'\"+(\"+-------------------\"[1..0x7fffffff])+\"'*n\",10+2),\"+-------------------\"); }\n"+ // test 4818 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"+-------------------\"[1..0x7fffffff])+\"'*n\" ,10+2),\"+-------------------\"); }\n"+ // test 4819 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"+-------------------\"[1..0x7fffffff])+\"'*n\"+\"+-------------------\",10+2),\"+-------------------\"); }\n"+ // test 4820 - "mixed b() { return 10+2; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"+-------------------\"[1..0x7fffffff])+\"'*n\"+\"+-------------------\"+\"%'\"+(\"+-------------------\"[1..0x7fffffff])+\"'*n\",10+2,10+2),\"+-------------------\"); }\n"+ // test 4821 - "mixed b() { return 10+2; }", - - - "=mixed a() { return search(sprintf(\"+-------------------\"+\"%'\"+(\"+-------------------\"[1..0x7fffffff])+\"'*n\",10+3),\"+-------------------\"); }\n"+ // test 4822 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"+-------------------\"[1..0x7fffffff])+\"'*n\" ,10+3),\"+-------------------\"); }\n"+ // test 4823 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"+-------------------\"[1..0x7fffffff])+\"'*n\"+\"+-------------------\",10+3),\"+-------------------\"); }\n"+ // test 4824 - "mixed b() { return 10+3; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"+-------------------\"[1..0x7fffffff])+\"'*n\"+\"+-------------------\"+\"%'\"+(\"+-------------------\"[1..0x7fffffff])+\"'*n\",10+3,10+3),\"+-------------------\"); }\n"+ // test 4825 - "mixed b() { return 10+3; }", - - - - "=mixed a() { return search(sprintf(\"+-------------------\"+\"%'\"+(\"+-------------------\"[1..0x7fffffff])+\"'*n\",1000),\"+-------------------\"); }\n"+ // test 4826 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"+-------------------\"[1..0x7fffffff])+\"'*n\" ,1000),\"+-------------------\"); }\n"+ // test 4827 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"+-------------------\"[1..0x7fffffff])+\"'*n\"+\"+-------------------\",1000),\"+-------------------\"); }\n"+ // test 4828 - "mixed b() { return 1000; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"+-------------------\"[1..0x7fffffff])+\"'*n\"+\"+-------------------\"+\"%'\"+(\"+-------------------\"[1..0x7fffffff])+\"'*n\",1000,1000),\"+-------------------\"); }\n"+ // test 4829 - "mixed b() { return 1000; }", - - - "=mixed a() { return search(sprintf(\"+-------------------\"+\"%'\"+(\"+-------------------\"[1..0x7fffffff])+\"'*n\",1000+1),\"+-------------------\"); }\n"+ // test 4830 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"+-------------------\"[1..0x7fffffff])+\"'*n\" ,1000+1),\"+-------------------\"); }\n"+ // test 4831 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"+-------------------\"[1..0x7fffffff])+\"'*n\"+\"+-------------------\",1000+1),\"+-------------------\"); }\n"+ // test 4832 - "mixed b() { return 1000+1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"+-------------------\"[1..0x7fffffff])+\"'*n\"+\"+-------------------\"+\"%'\"+(\"+-------------------\"[1..0x7fffffff])+\"'*n\",1000+1,1000+1),\"+-------------------\"); }\n"+ // test 4833 - "mixed b() { return 1000+1; }", - - - "=mixed a() { return search(sprintf(\"+-------------------\"+\"%'\"+(\"+-------------------\"[1..0x7fffffff])+\"'*n\",1000+2),\"+-------------------\"); }\n"+ // test 4834 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"+-------------------\"[1..0x7fffffff])+\"'*n\" ,1000+2),\"+-------------------\"); }\n"+ // test 4835 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"+-------------------\"[1..0x7fffffff])+\"'*n\"+\"+-------------------\",1000+2),\"+-------------------\"); }\n"+ // test 4836 - "mixed b() { return 1000+2; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"+-------------------\"[1..0x7fffffff])+\"'*n\"+\"+-------------------\"+\"%'\"+(\"+-------------------\"[1..0x7fffffff])+\"'*n\",1000+2,1000+2),\"+-------------------\"); }\n"+ // test 4837 - "mixed b() { return 1000+2; }", - - - "=mixed a() { return search(sprintf(\"+-------------------\"+\"%'\"+(\"+-------------------\"[1..0x7fffffff])+\"'*n\",1000+3),\"+-------------------\"); }\n"+ // test 4838 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"+-------------------\"[1..0x7fffffff])+\"'*n\" ,1000+3),\"+-------------------\"); }\n"+ // test 4839 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"+-------------------\"[1..0x7fffffff])+\"'*n\"+\"+-------------------\",1000+3),\"+-------------------\"); }\n"+ // test 4840 - "mixed b() { return 1000+3; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"+-------------------\"[1..0x7fffffff])+\"'*n\"+\"+-------------------\"+\"%'\"+(\"+-------------------\"[1..0x7fffffff])+\"'*n\",1000+3,1000+3),\"+-------------------\"); }\n"+ // test 4841 - "mixed b() { return 1000+3; }", - - - - "=mixed a() { return search(sprintf(\"+-------------------\"+\"%'\"+(\"+-------------------\"[1..0x7fffffff])+\"'*n\",100000),\"+-------------------\"); }\n"+ // test 4842 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"+-------------------\"[1..0x7fffffff])+\"'*n\" ,100000),\"+-------------------\"); }\n"+ // test 4843 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"+-------------------\"[1..0x7fffffff])+\"'*n\"+\"+-------------------\",100000),\"+-------------------\"); }\n"+ // test 4844 - "mixed b() { return 100000; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"+-------------------\"[1..0x7fffffff])+\"'*n\"+\"+-------------------\"+\"%'\"+(\"+-------------------\"[1..0x7fffffff])+\"'*n\",100000,100000),\"+-------------------\"); }\n"+ // test 4845 - "mixed b() { return 100000; }", - - - "=mixed a() { return search(sprintf(\"+-------------------\"+\"%'\"+(\"+-------------------\"[1..0x7fffffff])+\"'*n\",100000+1),\"+-------------------\"); }\n"+ // test 4846 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"+-------------------\"[1..0x7fffffff])+\"'*n\" ,100000+1),\"+-------------------\"); }\n"+ // test 4847 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"+-------------------\"[1..0x7fffffff])+\"'*n\"+\"+-------------------\",100000+1),\"+-------------------\"); }\n"+ // test 4848 - "mixed b() { return 100000+1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"+-------------------\"[1..0x7fffffff])+\"'*n\"+\"+-------------------\"+\"%'\"+(\"+-------------------\"[1..0x7fffffff])+\"'*n\",100000+1,100000+1),\"+-------------------\"); }\n"+ // test 4849 - "mixed b() { return 100000+1; }", - - - "=mixed a() { return search(sprintf(\"+-------------------\"+\"%'\"+(\"+-------------------\"[1..0x7fffffff])+\"'*n\",100000+2),\"+-------------------\"); }\n"+ // test 4850 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"+-------------------\"[1..0x7fffffff])+\"'*n\" ,100000+2),\"+-------------------\"); }\n"+ // test 4851 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"+-------------------\"[1..0x7fffffff])+\"'*n\"+\"+-------------------\",100000+2),\"+-------------------\"); }\n"+ // test 4852 - "mixed b() { return 100000+2; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"+-------------------\"[1..0x7fffffff])+\"'*n\"+\"+-------------------\"+\"%'\"+(\"+-------------------\"[1..0x7fffffff])+\"'*n\",100000+2,100000+2),\"+-------------------\"); }\n"+ // test 4853 - "mixed b() { return 100000+2; }", - - - "=mixed a() { return search(sprintf(\"+-------------------\"+\"%'\"+(\"+-------------------\"[1..0x7fffffff])+\"'*n\",100000+3),\"+-------------------\"); }\n"+ // test 4854 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"+-------------------\"[1..0x7fffffff])+\"'*n\" ,100000+3),\"+-------------------\"); }\n"+ // test 4855 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"+-------------------\"[1..0x7fffffff])+\"'*n\"+\"+-------------------\",100000+3),\"+-------------------\"); }\n"+ // test 4856 - "mixed b() { return 100000+3; }", - "=mixed a() { return search(sprintf(\"%'\"+(\"+-------------------\"[1..0x7fffffff])+\"'*n\"+\"+-------------------\"+\"%'\"+(\"+-------------------\"[1..0x7fffffff])+\"'*n\",100000+3,100000+3),\"+-------------------\"); }\n"+ // test 4857 - "mixed b() { return 100000+3; }", - - - - - - "=mixed a() { return search(sprintf(sprintf(\"%'argel-bargel glop-glyf?'2000n\")+\"%'\"+\"+-*\"+\"'*n\",10),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4858 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\" ,10),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4859 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+sprintf(\"%'argel-bargel glop-glyf?'2000n\"),10),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4860 - "mixed b() { return 10; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+sprintf(\"%'argel-bargel glop-glyf?'2000n\")+\"%'\"+\"+-*\"+\"'*n\",10,10),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4861 - "mixed b() { return 10; }", - - - "=mixed a() { return search(sprintf(sprintf(\"%'argel-bargel glop-glyf?'2000n\")+\"%'\"+\"+-*\"+\"'*n\",10+1),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4862 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\" ,10+1),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4863 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+sprintf(\"%'argel-bargel glop-glyf?'2000n\"),10+1),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4864 - "mixed b() { return 10+1; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+sprintf(\"%'argel-bargel glop-glyf?'2000n\")+\"%'\"+\"+-*\"+\"'*n\",10+1,10+1),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4865 - "mixed b() { return 10+1; }", - - - "=mixed a() { return search(sprintf(sprintf(\"%'argel-bargel glop-glyf?'2000n\")+\"%'\"+\"+-*\"+\"'*n\",10+2),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4866 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\" ,10+2),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4867 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+sprintf(\"%'argel-bargel glop-glyf?'2000n\"),10+2),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4868 - "mixed b() { return 10+2; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+sprintf(\"%'argel-bargel glop-glyf?'2000n\")+\"%'\"+\"+-*\"+\"'*n\",10+2,10+2),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4869 - "mixed b() { return 10+2; }", - - - "=mixed a() { return search(sprintf(sprintf(\"%'argel-bargel glop-glyf?'2000n\")+\"%'\"+\"+-*\"+\"'*n\",10+3),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4870 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\" ,10+3),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4871 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+sprintf(\"%'argel-bargel glop-glyf?'2000n\"),10+3),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4872 - "mixed b() { return 10+3; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+sprintf(\"%'argel-bargel glop-glyf?'2000n\")+\"%'\"+\"+-*\"+\"'*n\",10+3,10+3),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4873 - "mixed b() { return 10+3; }", - - - - "=mixed a() { return search(sprintf(sprintf(\"%'argel-bargel glop-glyf?'2000n\")+\"%'\"+\"+-*\"+\"'*n\",1000),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4874 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\" ,1000),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4875 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+sprintf(\"%'argel-bargel glop-glyf?'2000n\"),1000),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4876 - "mixed b() { return 1000; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+sprintf(\"%'argel-bargel glop-glyf?'2000n\")+\"%'\"+\"+-*\"+\"'*n\",1000,1000),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4877 - "mixed b() { return 1000; }", - - - "=mixed a() { return search(sprintf(sprintf(\"%'argel-bargel glop-glyf?'2000n\")+\"%'\"+\"+-*\"+\"'*n\",1000+1),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4878 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\" ,1000+1),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4879 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+sprintf(\"%'argel-bargel glop-glyf?'2000n\"),1000+1),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4880 - "mixed b() { return 1000+1; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+sprintf(\"%'argel-bargel glop-glyf?'2000n\")+\"%'\"+\"+-*\"+\"'*n\",1000+1,1000+1),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4881 - "mixed b() { return 1000+1; }", - - - "=mixed a() { return search(sprintf(sprintf(\"%'argel-bargel glop-glyf?'2000n\")+\"%'\"+\"+-*\"+\"'*n\",1000+2),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4882 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\" ,1000+2),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4883 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+sprintf(\"%'argel-bargel glop-glyf?'2000n\"),1000+2),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4884 - "mixed b() { return 1000+2; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+sprintf(\"%'argel-bargel glop-glyf?'2000n\")+\"%'\"+\"+-*\"+\"'*n\",1000+2,1000+2),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4885 - "mixed b() { return 1000+2; }", - - - "=mixed a() { return search(sprintf(sprintf(\"%'argel-bargel glop-glyf?'2000n\")+\"%'\"+\"+-*\"+\"'*n\",1000+3),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4886 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\" ,1000+3),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4887 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+sprintf(\"%'argel-bargel glop-glyf?'2000n\"),1000+3),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4888 - "mixed b() { return 1000+3; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+sprintf(\"%'argel-bargel glop-glyf?'2000n\")+\"%'\"+\"+-*\"+\"'*n\",1000+3,1000+3),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4889 - "mixed b() { return 1000+3; }", - - - - "=mixed a() { return search(sprintf(sprintf(\"%'argel-bargel glop-glyf?'2000n\")+\"%'\"+\"+-*\"+\"'*n\",100000),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4890 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\" ,100000),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4891 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+sprintf(\"%'argel-bargel glop-glyf?'2000n\"),100000),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4892 - "mixed b() { return 100000; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+sprintf(\"%'argel-bargel glop-glyf?'2000n\")+\"%'\"+\"+-*\"+\"'*n\",100000,100000),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4893 - "mixed b() { return 100000; }", - - - "=mixed a() { return search(sprintf(sprintf(\"%'argel-bargel glop-glyf?'2000n\")+\"%'\"+\"+-*\"+\"'*n\",100000+1),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4894 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\" ,100000+1),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4895 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+sprintf(\"%'argel-bargel glop-glyf?'2000n\"),100000+1),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4896 - "mixed b() { return 100000+1; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+sprintf(\"%'argel-bargel glop-glyf?'2000n\")+\"%'\"+\"+-*\"+\"'*n\",100000+1,100000+1),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4897 - "mixed b() { return 100000+1; }", - - - "=mixed a() { return search(sprintf(sprintf(\"%'argel-bargel glop-glyf?'2000n\")+\"%'\"+\"+-*\"+\"'*n\",100000+2),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4898 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\" ,100000+2),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4899 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+sprintf(\"%'argel-bargel glop-glyf?'2000n\"),100000+2),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4900 - "mixed b() { return 100000+2; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+sprintf(\"%'argel-bargel glop-glyf?'2000n\")+\"%'\"+\"+-*\"+\"'*n\",100000+2,100000+2),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4901 - "mixed b() { return 100000+2; }", - - - "=mixed a() { return search(sprintf(sprintf(\"%'argel-bargel glop-glyf?'2000n\")+\"%'\"+\"+-*\"+\"'*n\",100000+3),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4902 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\" ,100000+3),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4903 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+sprintf(\"%'argel-bargel glop-glyf?'2000n\"),100000+3),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4904 - "mixed b() { return 100000+3; }", - "=mixed a() { return search(sprintf(\"%'\"+\"+-*\"+\"'*n\"+sprintf(\"%'argel-bargel glop-glyf?'2000n\")+\"%'\"+\"+-*\"+\"'*n\",100000+3,100000+3),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4905 - "mixed b() { return 100000+3; }", - - - - - "=mixed a() { return search(sprintf(sprintf(\"%'argel-bargel glop-glyf?'2000n\")+\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[0..strlen(sprintf(\"%'argel-bargel glop-glyf?'2000n\"))-2])+\"'*n\",10),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4906 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[0..strlen(sprintf(\"%'argel-bargel glop-glyf?'2000n\"))-2])+\"'*n\" ,10),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4907 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[0..strlen(sprintf(\"%'argel-bargel glop-glyf?'2000n\"))-2])+\"'*n\"+sprintf(\"%'argel-bargel glop-glyf?'2000n\"),10),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4908 - "mixed b() { return 10; }", - "=mixed a() { return search(sprintf(\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[0..strlen(sprintf(\"%'argel-bargel glop-glyf?'2000n\"))-2])+\"'*n\"+sprintf(\"%'argel-bargel glop-glyf?'2000n\")+\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[0..strlen(sprintf(\"%'argel-bargel glop-glyf?'2000n\"))-2])+\"'*n\",10,10),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4909 - "mixed b() { return 10; }", - - - "=mixed a() { return search(sprintf(sprintf(\"%'argel-bargel glop-glyf?'2000n\")+\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[0..strlen(sprintf(\"%'argel-bargel glop-glyf?'2000n\"))-2])+\"'*n\",10+1),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4910 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[0..strlen(sprintf(\"%'argel-bargel glop-glyf?'2000n\"))-2])+\"'*n\" ,10+1),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4911 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[0..strlen(sprintf(\"%'argel-bargel glop-glyf?'2000n\"))-2])+\"'*n\"+sprintf(\"%'argel-bargel glop-glyf?'2000n\"),10+1),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4912 - "mixed b() { return 10+1; }", - "=mixed a() { return search(sprintf(\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[0..strlen(sprintf(\"%'argel-bargel glop-glyf?'2000n\"))-2])+\"'*n\"+sprintf(\"%'argel-bargel glop-glyf?'2000n\")+\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[0..strlen(sprintf(\"%'argel-bargel glop-glyf?'2000n\"))-2])+\"'*n\",10+1,10+1),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4913 - "mixed b() { return 10+1; }", - - - "=mixed a() { return search(sprintf(sprintf(\"%'argel-bargel glop-glyf?'2000n\")+\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[0..strlen(sprintf(\"%'argel-bargel glop-glyf?'2000n\"))-2])+\"'*n\",10+2),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4914 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[0..strlen(sprintf(\"%'argel-bargel glop-glyf?'2000n\"))-2])+\"'*n\" ,10+2),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4915 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[0..strlen(sprintf(\"%'argel-bargel glop-glyf?'2000n\"))-2])+\"'*n\"+sprintf(\"%'argel-bargel glop-glyf?'2000n\"),10+2),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4916 - "mixed b() { return 10+2; }", - "=mixed a() { return search(sprintf(\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[0..strlen(sprintf(\"%'argel-bargel glop-glyf?'2000n\"))-2])+\"'*n\"+sprintf(\"%'argel-bargel glop-glyf?'2000n\")+\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[0..strlen(sprintf(\"%'argel-bargel glop-glyf?'2000n\"))-2])+\"'*n\",10+2,10+2),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4917 - "mixed b() { return 10+2; }", - - - "=mixed a() { return search(sprintf(sprintf(\"%'argel-bargel glop-glyf?'2000n\")+\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[0..strlen(sprintf(\"%'argel-bargel glop-glyf?'2000n\"))-2])+\"'*n\",10+3),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4918 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[0..strlen(sprintf(\"%'argel-bargel glop-glyf?'2000n\"))-2])+\"'*n\" ,10+3),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4919 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[0..strlen(sprintf(\"%'argel-bargel glop-glyf?'2000n\"))-2])+\"'*n\"+sprintf(\"%'argel-bargel glop-glyf?'2000n\"),10+3),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4920 - "mixed b() { return 10+3; }", - "=mixed a() { return search(sprintf(\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[0..strlen(sprintf(\"%'argel-bargel glop-glyf?'2000n\"))-2])+\"'*n\"+sprintf(\"%'argel-bargel glop-glyf?'2000n\")+\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[0..strlen(sprintf(\"%'argel-bargel glop-glyf?'2000n\"))-2])+\"'*n\",10+3,10+3),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4921 - "mixed b() { return 10+3; }", - - - - "=mixed a() { return search(sprintf(sprintf(\"%'argel-bargel glop-glyf?'2000n\")+\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[0..strlen(sprintf(\"%'argel-bargel glop-glyf?'2000n\"))-2])+\"'*n\",1000),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4922 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[0..strlen(sprintf(\"%'argel-bargel glop-glyf?'2000n\"))-2])+\"'*n\" ,1000),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4923 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[0..strlen(sprintf(\"%'argel-bargel glop-glyf?'2000n\"))-2])+\"'*n\"+sprintf(\"%'argel-bargel glop-glyf?'2000n\"),1000),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4924 - "mixed b() { return 1000; }", - "=mixed a() { return search(sprintf(\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[0..strlen(sprintf(\"%'argel-bargel glop-glyf?'2000n\"))-2])+\"'*n\"+sprintf(\"%'argel-bargel glop-glyf?'2000n\")+\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[0..strlen(sprintf(\"%'argel-bargel glop-glyf?'2000n\"))-2])+\"'*n\",1000,1000),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4925 - "mixed b() { return 1000; }", - - - "=mixed a() { return search(sprintf(sprintf(\"%'argel-bargel glop-glyf?'2000n\")+\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[0..strlen(sprintf(\"%'argel-bargel glop-glyf?'2000n\"))-2])+\"'*n\",1000+1),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4926 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[0..strlen(sprintf(\"%'argel-bargel glop-glyf?'2000n\"))-2])+\"'*n\" ,1000+1),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4927 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[0..strlen(sprintf(\"%'argel-bargel glop-glyf?'2000n\"))-2])+\"'*n\"+sprintf(\"%'argel-bargel glop-glyf?'2000n\"),1000+1),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4928 - "mixed b() { return 1000+1; }", - "=mixed a() { return search(sprintf(\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[0..strlen(sprintf(\"%'argel-bargel glop-glyf?'2000n\"))-2])+\"'*n\"+sprintf(\"%'argel-bargel glop-glyf?'2000n\")+\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[0..strlen(sprintf(\"%'argel-bargel glop-glyf?'2000n\"))-2])+\"'*n\",1000+1,1000+1),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4929 - "mixed b() { return 1000+1; }", - - - "=mixed a() { return search(sprintf(sprintf(\"%'argel-bargel glop-glyf?'2000n\")+\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[0..strlen(sprintf(\"%'argel-bargel glop-glyf?'2000n\"))-2])+\"'*n\",1000+2),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4930 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[0..strlen(sprintf(\"%'argel-bargel glop-glyf?'2000n\"))-2])+\"'*n\" ,1000+2),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4931 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[0..strlen(sprintf(\"%'argel-bargel glop-glyf?'2000n\"))-2])+\"'*n\"+sprintf(\"%'argel-bargel glop-glyf?'2000n\"),1000+2),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4932 - "mixed b() { return 1000+2; }", - "=mixed a() { return search(sprintf(\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[0..strlen(sprintf(\"%'argel-bargel glop-glyf?'2000n\"))-2])+\"'*n\"+sprintf(\"%'argel-bargel glop-glyf?'2000n\")+\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[0..strlen(sprintf(\"%'argel-bargel glop-glyf?'2000n\"))-2])+\"'*n\",1000+2,1000+2),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4933 - "mixed b() { return 1000+2; }", - - - "=mixed a() { return search(sprintf(sprintf(\"%'argel-bargel glop-glyf?'2000n\")+\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[0..strlen(sprintf(\"%'argel-bargel glop-glyf?'2000n\"))-2])+\"'*n\",1000+3),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4934 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[0..strlen(sprintf(\"%'argel-bargel glop-glyf?'2000n\"))-2])+\"'*n\" ,1000+3),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4935 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[0..strlen(sprintf(\"%'argel-bargel glop-glyf?'2000n\"))-2])+\"'*n\"+sprintf(\"%'argel-bargel glop-glyf?'2000n\"),1000+3),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4936 - "mixed b() { return 1000+3; }", - "=mixed a() { return search(sprintf(\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[0..strlen(sprintf(\"%'argel-bargel glop-glyf?'2000n\"))-2])+\"'*n\"+sprintf(\"%'argel-bargel glop-glyf?'2000n\")+\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[0..strlen(sprintf(\"%'argel-bargel glop-glyf?'2000n\"))-2])+\"'*n\",1000+3,1000+3),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4937 - "mixed b() { return 1000+3; }", - - - - "=mixed a() { return search(sprintf(sprintf(\"%'argel-bargel glop-glyf?'2000n\")+\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[0..strlen(sprintf(\"%'argel-bargel glop-glyf?'2000n\"))-2])+\"'*n\",100000),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4938 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[0..strlen(sprintf(\"%'argel-bargel glop-glyf?'2000n\"))-2])+\"'*n\" ,100000),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4939 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[0..strlen(sprintf(\"%'argel-bargel glop-glyf?'2000n\"))-2])+\"'*n\"+sprintf(\"%'argel-bargel glop-glyf?'2000n\"),100000),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4940 - "mixed b() { return 100000; }", - "=mixed a() { return search(sprintf(\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[0..strlen(sprintf(\"%'argel-bargel glop-glyf?'2000n\"))-2])+\"'*n\"+sprintf(\"%'argel-bargel glop-glyf?'2000n\")+\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[0..strlen(sprintf(\"%'argel-bargel glop-glyf?'2000n\"))-2])+\"'*n\",100000,100000),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4941 - "mixed b() { return 100000; }", - - - "=mixed a() { return search(sprintf(sprintf(\"%'argel-bargel glop-glyf?'2000n\")+\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[0..strlen(sprintf(\"%'argel-bargel glop-glyf?'2000n\"))-2])+\"'*n\",100000+1),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4942 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[0..strlen(sprintf(\"%'argel-bargel glop-glyf?'2000n\"))-2])+\"'*n\" ,100000+1),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4943 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[0..strlen(sprintf(\"%'argel-bargel glop-glyf?'2000n\"))-2])+\"'*n\"+sprintf(\"%'argel-bargel glop-glyf?'2000n\"),100000+1),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4944 - "mixed b() { return 100000+1; }", - "=mixed a() { return search(sprintf(\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[0..strlen(sprintf(\"%'argel-bargel glop-glyf?'2000n\"))-2])+\"'*n\"+sprintf(\"%'argel-bargel glop-glyf?'2000n\")+\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[0..strlen(sprintf(\"%'argel-bargel glop-glyf?'2000n\"))-2])+\"'*n\",100000+1,100000+1),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4945 - "mixed b() { return 100000+1; }", - - - "=mixed a() { return search(sprintf(sprintf(\"%'argel-bargel glop-glyf?'2000n\")+\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[0..strlen(sprintf(\"%'argel-bargel glop-glyf?'2000n\"))-2])+\"'*n\",100000+2),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4946 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[0..strlen(sprintf(\"%'argel-bargel glop-glyf?'2000n\"))-2])+\"'*n\" ,100000+2),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4947 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[0..strlen(sprintf(\"%'argel-bargel glop-glyf?'2000n\"))-2])+\"'*n\"+sprintf(\"%'argel-bargel glop-glyf?'2000n\"),100000+2),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4948 - "mixed b() { return 100000+2; }", - "=mixed a() { return search(sprintf(\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[0..strlen(sprintf(\"%'argel-bargel glop-glyf?'2000n\"))-2])+\"'*n\"+sprintf(\"%'argel-bargel glop-glyf?'2000n\")+\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[0..strlen(sprintf(\"%'argel-bargel glop-glyf?'2000n\"))-2])+\"'*n\",100000+2,100000+2),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4949 - "mixed b() { return 100000+2; }", - - - "=mixed a() { return search(sprintf(sprintf(\"%'argel-bargel glop-glyf?'2000n\")+\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[0..strlen(sprintf(\"%'argel-bargel glop-glyf?'2000n\"))-2])+\"'*n\",100000+3),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4950 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[0..strlen(sprintf(\"%'argel-bargel glop-glyf?'2000n\"))-2])+\"'*n\" ,100000+3),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4951 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[0..strlen(sprintf(\"%'argel-bargel glop-glyf?'2000n\"))-2])+\"'*n\"+sprintf(\"%'argel-bargel glop-glyf?'2000n\"),100000+3),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4952 - "mixed b() { return 100000+3; }", - "=mixed a() { return search(sprintf(\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[0..strlen(sprintf(\"%'argel-bargel glop-glyf?'2000n\"))-2])+\"'*n\"+sprintf(\"%'argel-bargel glop-glyf?'2000n\")+\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[0..strlen(sprintf(\"%'argel-bargel glop-glyf?'2000n\"))-2])+\"'*n\",100000+3,100000+3),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4953 - "mixed b() { return 100000+3; }", - - - - - "=mixed a() { return search(sprintf(sprintf(\"%'argel-bargel glop-glyf?'2000n\")+\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[1..0x7fffffff])+\"'*n\",10),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4954 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[1..0x7fffffff])+\"'*n\" ,10),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4955 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[1..0x7fffffff])+\"'*n\"+sprintf(\"%'argel-bargel glop-glyf?'2000n\"),10),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4956 - "mixed b() { return 10; }", - "=mixed a() { return search(sprintf(\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[1..0x7fffffff])+\"'*n\"+sprintf(\"%'argel-bargel glop-glyf?'2000n\")+\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[1..0x7fffffff])+\"'*n\",10,10),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4957 - "mixed b() { return 10; }", - - - "=mixed a() { return search(sprintf(sprintf(\"%'argel-bargel glop-glyf?'2000n\")+\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[1..0x7fffffff])+\"'*n\",10+1),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4958 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[1..0x7fffffff])+\"'*n\" ,10+1),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4959 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[1..0x7fffffff])+\"'*n\"+sprintf(\"%'argel-bargel glop-glyf?'2000n\"),10+1),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4960 - "mixed b() { return 10+1; }", - "=mixed a() { return search(sprintf(\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[1..0x7fffffff])+\"'*n\"+sprintf(\"%'argel-bargel glop-glyf?'2000n\")+\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[1..0x7fffffff])+\"'*n\",10+1,10+1),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4961 - "mixed b() { return 10+1; }", - - - "=mixed a() { return search(sprintf(sprintf(\"%'argel-bargel glop-glyf?'2000n\")+\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[1..0x7fffffff])+\"'*n\",10+2),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4962 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[1..0x7fffffff])+\"'*n\" ,10+2),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4963 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[1..0x7fffffff])+\"'*n\"+sprintf(\"%'argel-bargel glop-glyf?'2000n\"),10+2),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4964 - "mixed b() { return 10+2; }", - "=mixed a() { return search(sprintf(\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[1..0x7fffffff])+\"'*n\"+sprintf(\"%'argel-bargel glop-glyf?'2000n\")+\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[1..0x7fffffff])+\"'*n\",10+2,10+2),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4965 - "mixed b() { return 10+2; }", - - - "=mixed a() { return search(sprintf(sprintf(\"%'argel-bargel glop-glyf?'2000n\")+\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[1..0x7fffffff])+\"'*n\",10+3),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4966 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[1..0x7fffffff])+\"'*n\" ,10+3),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4967 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[1..0x7fffffff])+\"'*n\"+sprintf(\"%'argel-bargel glop-glyf?'2000n\"),10+3),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4968 - "mixed b() { return 10+3; }", - "=mixed a() { return search(sprintf(\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[1..0x7fffffff])+\"'*n\"+sprintf(\"%'argel-bargel glop-glyf?'2000n\")+\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[1..0x7fffffff])+\"'*n\",10+3,10+3),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4969 - "mixed b() { return 10+3; }", - - - - "=mixed a() { return search(sprintf(sprintf(\"%'argel-bargel glop-glyf?'2000n\")+\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[1..0x7fffffff])+\"'*n\",1000),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4970 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[1..0x7fffffff])+\"'*n\" ,1000),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4971 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[1..0x7fffffff])+\"'*n\"+sprintf(\"%'argel-bargel glop-glyf?'2000n\"),1000),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4972 - "mixed b() { return 1000; }", - "=mixed a() { return search(sprintf(\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[1..0x7fffffff])+\"'*n\"+sprintf(\"%'argel-bargel glop-glyf?'2000n\")+\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[1..0x7fffffff])+\"'*n\",1000,1000),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4973 - "mixed b() { return 1000; }", - - - "=mixed a() { return search(sprintf(sprintf(\"%'argel-bargel glop-glyf?'2000n\")+\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[1..0x7fffffff])+\"'*n\",1000+1),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4974 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[1..0x7fffffff])+\"'*n\" ,1000+1),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4975 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[1..0x7fffffff])+\"'*n\"+sprintf(\"%'argel-bargel glop-glyf?'2000n\"),1000+1),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4976 - "mixed b() { return 1000+1; }", - "=mixed a() { return search(sprintf(\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[1..0x7fffffff])+\"'*n\"+sprintf(\"%'argel-bargel glop-glyf?'2000n\")+\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[1..0x7fffffff])+\"'*n\",1000+1,1000+1),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4977 - "mixed b() { return 1000+1; }", - - - "=mixed a() { return search(sprintf(sprintf(\"%'argel-bargel glop-glyf?'2000n\")+\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[1..0x7fffffff])+\"'*n\",1000+2),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4978 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[1..0x7fffffff])+\"'*n\" ,1000+2),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4979 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[1..0x7fffffff])+\"'*n\"+sprintf(\"%'argel-bargel glop-glyf?'2000n\"),1000+2),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4980 - "mixed b() { return 1000+2; }", - "=mixed a() { return search(sprintf(\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[1..0x7fffffff])+\"'*n\"+sprintf(\"%'argel-bargel glop-glyf?'2000n\")+\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[1..0x7fffffff])+\"'*n\",1000+2,1000+2),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4981 - "mixed b() { return 1000+2; }", - - - "=mixed a() { return search(sprintf(sprintf(\"%'argel-bargel glop-glyf?'2000n\")+\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[1..0x7fffffff])+\"'*n\",1000+3),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4982 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[1..0x7fffffff])+\"'*n\" ,1000+3),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4983 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[1..0x7fffffff])+\"'*n\"+sprintf(\"%'argel-bargel glop-glyf?'2000n\"),1000+3),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4984 - "mixed b() { return 1000+3; }", - "=mixed a() { return search(sprintf(\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[1..0x7fffffff])+\"'*n\"+sprintf(\"%'argel-bargel glop-glyf?'2000n\")+\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[1..0x7fffffff])+\"'*n\",1000+3,1000+3),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4985 - "mixed b() { return 1000+3; }", - - - - "=mixed a() { return search(sprintf(sprintf(\"%'argel-bargel glop-glyf?'2000n\")+\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[1..0x7fffffff])+\"'*n\",100000),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4986 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[1..0x7fffffff])+\"'*n\" ,100000),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4987 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[1..0x7fffffff])+\"'*n\"+sprintf(\"%'argel-bargel glop-glyf?'2000n\"),100000),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4988 - "mixed b() { return 100000; }", - "=mixed a() { return search(sprintf(\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[1..0x7fffffff])+\"'*n\"+sprintf(\"%'argel-bargel glop-glyf?'2000n\")+\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[1..0x7fffffff])+\"'*n\",100000,100000),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4989 - "mixed b() { return 100000; }", - - - "=mixed a() { return search(sprintf(sprintf(\"%'argel-bargel glop-glyf?'2000n\")+\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[1..0x7fffffff])+\"'*n\",100000+1),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4990 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[1..0x7fffffff])+\"'*n\" ,100000+1),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4991 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[1..0x7fffffff])+\"'*n\"+sprintf(\"%'argel-bargel glop-glyf?'2000n\"),100000+1),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4992 - "mixed b() { return 100000+1; }", - "=mixed a() { return search(sprintf(\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[1..0x7fffffff])+\"'*n\"+sprintf(\"%'argel-bargel glop-glyf?'2000n\")+\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[1..0x7fffffff])+\"'*n\",100000+1,100000+1),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4993 - "mixed b() { return 100000+1; }", - - - "=mixed a() { return search(sprintf(sprintf(\"%'argel-bargel glop-glyf?'2000n\")+\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[1..0x7fffffff])+\"'*n\",100000+2),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4994 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[1..0x7fffffff])+\"'*n\" ,100000+2),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4995 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[1..0x7fffffff])+\"'*n\"+sprintf(\"%'argel-bargel glop-glyf?'2000n\"),100000+2),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4996 - "mixed b() { return 100000+2; }", - "=mixed a() { return search(sprintf(\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[1..0x7fffffff])+\"'*n\"+sprintf(\"%'argel-bargel glop-glyf?'2000n\")+\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[1..0x7fffffff])+\"'*n\",100000+2,100000+2),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4997 - "mixed b() { return 100000+2; }", - - - "=mixed a() { return search(sprintf(sprintf(\"%'argel-bargel glop-glyf?'2000n\")+\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[1..0x7fffffff])+\"'*n\",100000+3),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4998 - "mixed b() { return 0; }", - "=mixed a() { return search(sprintf(\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[1..0x7fffffff])+\"'*n\" ,100000+3),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 4999 - "mixed b() { return -1; }", - "=mixed a() { return search(sprintf(\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[1..0x7fffffff])+\"'*n\"+sprintf(\"%'argel-bargel glop-glyf?'2000n\"),100000+3),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 5000 - "mixed b() { return 100000+3; }", - "=mixed a() { return search(sprintf(\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[1..0x7fffffff])+\"'*n\"+sprintf(\"%'argel-bargel glop-glyf?'2000n\")+\"%'\"+(sprintf(\"%'argel-bargel glop-glyf?'2000n\")[1..0x7fffffff])+\"'*n\",100000+3,100000+3),sprintf(\"%'argel-bargel glop-glyf?'2000n\")); }\n"+ // test 5001 - "mixed b() { return 100000+3; }", - - - - - -// - sizeof - "=mixed a() { return sizeof(\"felbar\"); }\n"+ // test 5002 - "mixed b() { return 6; }", - "=mixed a() { return sizeof(({\"fulbar\",\"gazonk\",7})); }\n"+ // test 5003 - "mixed b() { return 3; }", - "=mixed a() { return sizeof(([8:3,6:6,7:0])); }\n"+ // test 5004 - "mixed b() { return 3; }", - "=mixed a() { return sizeof((<8,7,6,5,4,7>)); }\n"+ // test 5005 - "mixed b() { return 6; }", - -// - sum - "=mixed a() { return sum(1,1); }\n"+ // test 5006 - "mixed b() { return 2; }", - "=mixed a() { return sum(1,-2); }\n"+ // test 5007 - "mixed b() { return -1; }", - "=mixed a() { return sum(-2,-2); }\n"+ // test 5008 - "mixed b() { return -4; }", - "=mixed a() { return sum(\"hi\",\"there\"); }\n"+ // test 5009 - "mixed b() { return \"hithere\"; }", - "=mixed a() { return sum(\"human\",\"number\",666); }\n"+ // test 5010 - "mixed b() { return \"humannumber666\"; }", - "=mixed a() { return sum(\"human\",\"number\",666); }\n"+ // test 5011 - "mixed b() { return \"humannumber666\"; }", - "=mixed a() { return sum(\"human\",\"number\",666); }\n"+ // test 5012 - "mixed b() { return \"humannumber666\"; }", - "=mixed a() { return sum(\"human\",\"number\",666,111); }\n"+ // test 5013 - "mixed b() { return \"humannumber666111\"; }", - "=mixed a() { return sum(\"humannumber\",sum(666+111)); }\n"+ // test 5014 - "mixed b() { return \"humannumber777\"; }", - "=mixed a() { return sum(\"a\",\"b\",\"c\",\"d\",\"e\",\"f\",\"g\",\"h\",\"i\",\"j\",\"k\",\"l\",\"m\",\"n\",\"o\",\"p\",\"q\",\"r\",\"s\",\"t\",\"u\",\"v\",\"x\",\"y\"); }\n"+ // test 5015 - "mixed b() { return \"abcdefghijklmnopqrstuvxy\"; }", - "=mixed a() { return sum(1.0+1.0); }\n"+ // test 5016 - "mixed b() { return 2.0; }", - "=mixed a() { return sum(1.0,-1.0); }\n"+ // test 5017 - "mixed b() { return 0.0; }", - "=mixed a() { return sum(-1.0,-1.0); }\n"+ // test 5018 - "mixed b() { return -2.0; }", - "emixed a() { return sum(({1,2,3}),({4,5,6})); }\n"+ // test 5019 - "mixed b() { return ({1,2,3,4,5,6}); }", - "emixed a() { return sum((<1,2,3,4>),(<4,5,6>)); }\n"+ // test 5020 - "mixed b() { return (<1,2,3,4,4,5,6>); }", - "emixed a() { return sum(([0:1,3:6]),([5:2,3:6])); }\n"+ // test 5021 - "mixed b() { return ([0:1,3:6,3:6,5:2]); }", - -// - this_object - "tmixed a() { return objectp(this_object()); }", // test 5022 - -// - throw - "=mixed a() { return 20; }\n"+ // test 5023 - "mixed b() { return catch(throw(a())); }", - -// - time - "tmixed a() { return intp(time()); }", // test 5024 - -// - trace - "dmixed a() { trace(0); }\n", // test 5025 - "=mixed a() { return trace(0); }\n"+ // test 5026 - "mixed b() { return 0; }", - -// - upper_case - "emixed a() { return upper_case(\"fooq\"); }\n"+ // test 5027 - "mixed b() { return \"FOOQ\"; }", - "emixed a() { return upper_case(\"FooR\"); }\n"+ // test 5028 - "mixed b() { return \"FOOR\"; }", - "emixed a() { return upper_case(\"Foo1234-*~\\n\"); }\n"+ // test 5029 - "mixed b() { return \"FOO1234-*~\\n\"; }", - -// - values - "emixed a() { return values(\"foo\"); }\n"+ // test 5030 - "mixed b() { return ({'f','o','o'}); }", - "emixed a() { return values(({'f','o','o'})); }\n"+ // test 5031 - "mixed b() { return ({'f','o','o'}); }", - "emixed a() { return sort_array(values(([7:3,8:9,99:12]))); }\n"+ // test 5032 - "mixed b() { return ({3,9,12}); }", - "emixed a() { return values((<7,8,99>)); }\n"+ // test 5033 - "mixed b() { return ({1,1,1}); }", - -// - zero_type - "=mixed a() { return zero_type(0); }\n"+ // test 5034 - "mixed b() { return 0; }", - "=mixed a() { return zero_type(([])[7]); }\n"+ // test 5035 - "mixed b() { return 1; }", - -// - call_out, call_out_info, remove_call_out, find_call_out - "dmixed a() { call_out(a,100000); }\n", // test 5036 - "tmixed a() { return arrayp(call_out_info()); }", // test 5037 - "tmixed a() { return sizeof(call_out_info()) > 0; }", // test 5038 - "tmixed a() { return call_out_info()[-1][0] > 1; }", // test 5039 - "=mixed a() { return find_call_out(call_out_info()[-1][2]); }\n"+ // test 5040 - "mixed b() { return call_out_info()[-1][0]; }", - "=mixed a() { return find_call_out(a); }\n"+ // test 5041 - "mixed b() { return -1; }", - "tmixed a() { return zero_type(find_call_out(a)); }", // test 5042 - "dmixed a() { remove_call_out(call_out_info()[-1][2]); }\n", // test 5043 - "tmixed a() { return !sizeof(call_out_info()) || function_name(call_out_info()[-1][2])!=\"a\"; }", // test 5044 - -// m_delete - "emixed a() { return ([1:1]); }\n"+ // test 5045 - "mixed b() { return m_delete(a(),0); }", - "emixed a() { return ([1:1]); }\n"+ // test 5046 - "mixed b() { return m_delete(([1:1,0:3]),0); }", - "=mixed a() { mapping a=([1:1]); return a==m_delete(a,1); }\n"+ // test 5047 - "mixed b() { return 1; }", - - "t\n"+"int b=10; mixed a() { return 1; }\n", // test 5048 - "t\n"+"mixed b=10; mixed a() { return 1;}\n", // test 5049 - "Pstring a() { return \"/test\"; }\n"+ // test 5050 - "string b() { return \"int q,w,e,r,t; mixed foo() { return 10; }\"; }", - - "t\n"+"inherit \"/test\"; mixed a() { return foo()==10; }\n", // test 5051 - "t\n"+"inherit \"/test\"; mixed a() { return test::foo()==10; }\n", // test 5052 - "t\n"+"inherit \"/test\" : bar; mixed a() { return bar::foo()==10; }\n", // test 5053 - - "Pstring a() { return \"/test2\"; }\n"+ // test 5054 - "string b() { return \"int z,x,c,v,b; mixed bar() { return 11; }\"; }", - "t\n"+"inherit \"/test\"; inherit \"/test2\"; mixed a() { return foo()==10 && bar()==11; }\n", // test 5055 - "t\n"+"inherit \"/test2\"; inherit \"/test\"; mixed a() { return foo()==10 && bar()==11; }\n", // test 5056 - - "Pstring a() { return \"/test\"; }\n"+ // test 5057 - "string b() { return \"int q,w,e,r; mixed t; mixed getw() { return w; } void setw(int _) { w=_; }\"; }", - "Pstring a() { return \"/test2\"; }\n"+ // test 5058 - "string b() { return \"int z,x,c,v,b; mixed getb() { return b; } void setb(int _) { b=_; }\"; }", - - "t\n"+"inherit \"/test\"; inherit \"/test2\"; mixed a() { w=20; b=22; return getw()==20 && getb()==22; }\n", // test 5059 - "t\n"+"inherit \"/test\"; inherit \"/test2\"; mixed a() { setw(20); setb(22); return w==20 && b==22; }\n", // test 5060 - "t\n"+"inherit \"/test2\"; inherit \"/test\"; mixed a() { w=20; b=22; return getw()==20 && getb()==22; }\n", // test 5061 - "t\n"+"inherit \"/test2\"; inherit \"/test\"; mixed a() { setw(20); setb(22); return w==20 && b==22; }\n", // test 5062 - - - }); - - for(e=start;e<sizeof(tests);e++) - { - string test; - int type; - object o; - mixed a,b; - - test=tests[e]; - type=test[0]; - test=test[1..strlen(test)-1]; - - if(verbose) - { - perror("Doing test "+(e+1)+"\n"); - if(verbose>1) - perror(test+"\n"); - } - - switch(type) - { - case 'c': - master()->set_inhibit_compile_errors(1); - if(catch(compile_string(test,"Test "+(e+1)))) - { - successes++; - }else{ - perror("Test "+(e+1)+" failed.\n"); - perror(test+"\n"); - errors++; - } - master()->set_inhibit_compile_errors(0); - break; - - case 'E': - master()->set_inhibit_compile_errors(1); - if(catch(clone(compile_string(test,"Test "+(e+1)))->a())) - { - successes++; - }else{ - perror("Test "+(e+1)+" failed.\n"); - perror(test+"\n"); - errors++; - } - master()->set_inhibit_compile_errors(0); - break; - - default: - o=clone(compile_string(test,"Test "+(e+1))); - - if(t) trace(t); - a=b=0; - if(functionp(o->a)) a=o->a(); - if(functionp(o->b)) b=o->b(); - if(t) trace(0); - switch(type) - { - case 'P': - b=compile_string(b,"Test "+(e+1)); - master()->add_precompiled_program(a,b); - successes++; - break; - - case 'f': - a=!a; - - case 't': - if(!a) - { - perror("Test "+(e+1)+" failed.\n"); - perror(test+"\n"); - errors++; - }else{ - successes++; - } - break; - - case 'd': - successes++; - break; - - case '=': - if(a!=b) - { - perror("Test "+(e+1)+" failed.\n"); - perror(test+"\n"); - perror(sprintf("o->a(): %O\n",a)); - perror(sprintf("o->b(): %O\n",b)); - errors++; - }else{ - successes++; - } - break; - - case 'e': - if(!equal(a,b)) - { - perror("Test "+(e+1)+" failed.\n"); - perror(test+"\n"); - perror(sprintf("o->a(): %O\n",a)); - perror(sprintf("o->b(): %O\n",b)); - errors++; - }else{ - successes++; - } - break; - - default: - perror("Unknown test type.\n"); - errors++; - } - } - if(fail && errors) - exit(1); - } - - if(errors + successes != sizeof(tests)) - { - perror("Errors + Successes != number of tests!\n"); - errors++; - } - if(errors || verbose) - { - perror("Failed tests: "+errors+".\n"); - } - - return errors; -} - diff --git a/src/.cvsignore b/src/.cvsignore new file mode 100644 index 0000000000000000000000000000000000000000..d978d3ea859e50c7859ab6270e35f99f4c24c5ab --- /dev/null +++ b/src/.cvsignore @@ -0,0 +1,5 @@ +configure +language.c +language.h +peep_engine.c +Makefile.in diff --git a/src/.gitignore b/src/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..c96df2a4ca7cffa30d41196206f816494e18d32a --- /dev/null +++ b/src/.gitignore @@ -0,0 +1,5 @@ +/configure +/language.c +/language.h +/peep_engine.c +/Makefile.in diff --git a/src/BUGS b/src/BUGS index bd425dc94123d4605a1f25b3a7d5f610d3271485..e4cc1c6c5907f5f57debd07ddc1cd26a8fe92758 100644 --- a/src/BUGS +++ b/src/BUGS @@ -308,7 +308,7 @@ Version: 1.0E-15: Still to do: -* really large constant arrays crashes uLPC +* really large constant arrays crashes Pike * need some way of using shared and non-shared module dirs.. @@ -327,3 +327,5 @@ Still to do: * 'array' does not match 'string *' ? (in function calls) * compile errors generate memory leaks + +* file->write bugs when given a zero as argument? diff --git a/src/COPYRIGHT b/src/COPYRIGHT index 4dcf08f94bdea95556cc137a29cb37aaeb8bffe1..d57ba64fa9614ea0f419656f71f63f85a1dd9dc1 100644 --- a/src/COPYRIGHT +++ b/src/COPYRIGHT @@ -1,4 +1,4 @@ -uLPC, is copyright by Fredrik Hubinette, 1994 +Pike, is copyright by Fredrik Hubinette, 1994-1996 Source code herein refers to the source code, and any executables created from the same source code. diff --git a/src/ChangeLog b/src/ChangeLog index a0a03c90ae85bc331566ab37ad782cca87b2466d..058fc3eb2efcbbb858b792f45348a56f40afe376 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,283 @@ +Thu Sep 19 14:25:07 1996 Fredrik Hubinette <hubbe@jolt.infovav.se.> + + * all_efuns renamed to all_constants + * new efun: errno + * flat and old mappings removed + * -p for opcode profiling added + * gc <-> mapping interaction bug fixed + * memory leak in for() fixed + * new opcodes: F_LOCAL_INDEX F_POS_INT_INDEX F_NEG_INT_INDEX + * F_STRING_INDEX + * F_ASSIGN_GLOBAL now works + * stack allocation through mmap now works + * gc() and destruct() delayed to be called inside evaluator. + * put #include <simulate.h> in your files to get old behaviour + * simulate.lpc removed. + * perror renamed to werror + * list renamed to multiset + * add_efun renamed to add_constant + * uLPC renamed to Pike + +Tue Aug 20 01:16:48 1996 Fredrik Hubinette <hubbe@signum.se> + + * version 0.000002 released + +Tue Aug 13 12:16:06 1996 Fredrik Hubinette <hubbe@freeone.signum.se> + + * gpmmod should now work with older versions of GMP. + +Mon Aug 12 18:08:12 1996 Fredrik Hubinette <hubbe@sparky.signum.se> + + * array.c: some bugs in type_field fixed + * array.c: more debug added + * main.c: -s <stacksize> added + * svalue.c: made is_eq 'safe' (it does not change the svalue argument) + * svalue.c: type_field bug fixed in garbage collect + * file.c: a memory trashing bug fixed when opening files... + +Tue Aug 6 13:33:51 1996 Fredrik Hubinette <hubbe@axel.signum.se> + + * call_out.c: call outs now have unique ids, so you can remove + them individually. + * opcodes.c: sscanf now accepts field sizes for %c and %s + * signal_handler.c: signal(signum,0) now means SIG_IGN + +Tue Aug 6 00:02:14 1996 Fredrik Hubinette <hubbe@sparky.signum.se> + + * memory.c: fixed a bug in memory searcher (8 bit chars) + * las.c: fixed so that the --loop and ++loop works again + * docode.c: if(foo && bar) opimized (one jump less) + * simulate.c (regexp): now frees regexp correctly + +Thu Aug 1 15:26:12 1996 Fredrik Hubinette <hubbe@sparky.signum.se> + + * Makefile.src: a few bugs fixed + * backend.c: now handles unsigned tv_sec better + * callback.c: bugs fixed, comments added + * configure.in: now checks for mmap + * docode.c: if() no longer uses count_args + * docode.c: one jump eliminated from for() loops + * interpret.c: stack now allocated with mmap when possible + * interpret.c: catch() inline warning removed... + * interpret.c: F_DEC_LOCAL_AND_POP now works... + * interpret.c: new opcodes: F_MARK2, F_SIZEOF, F_SIZEOF_LOCAL + * F_CALL_LFUN_AND_POP + * language.y: gauge can now take a block of code as argument + * lex.c: added `[] and `[]= + * rusage.c: bug fixed when no rusage() was found + * mpz module now checks that libgmp is new enough + * readline module now checks for both <readline.h> and + <readline/readline.h> + +Mon Jul 22 12:04:34 1996 Fredrik Hubinette <hubbe@freeone.signum.se> + + * interpret.c (catch): return should now work from inside catch + all catch statements are now exited through return or throw + * readlinemod: now checks for <readline/readline.h> too + +Mon Jul 8 23:52:48 1996 Fredrik Hubinette <hubbe@axel.signum.se> + + * Pike v1.0E-6 released + * hilfe.lpc now uses readline (line editing! history!) + * bug in true/false values fixed + * readline module added + +Tue Jul 2 13:44:02 1996 Fredrik Hubinette <hubbe@freeone.signum.se> + + * Pike v1.2E-7 released + * added check to see if gettimeofday takes one or two args, + Pike should now compile on HP and Linux again. + +Mon Jul 1 17:55:26 1996 Fredrik Hubinette <hubbe@sparky.signum.se> + + * Pike v1.1E-7 released + * call_out and sleep now works again. + +Sat Jun 22 02:46:22 1996 Fredrik Hubinette <hubbe@axel.signum.se> + + * Pike v1.0E-7 released + +Fri Jun 21 20:32:00 1996 Fredrik Hubinette <hubbe@tymin.signum.se> + + * simulate.lpc optimized + * reorganize optimized (used by lists and sort and other stuff) + * type checks now optimize int|int to just int + * #include now honours "" and <> + * stack size increased + * callback.c is actually useful now.. + * sleep now handles floats for delays smaller than seconds. + * backend now handles delays shorter than seconds. + * backend has callbacks to allow call_out for module(s) + * explode and string replace optimized (memory searcher) + * better stack checks added + * `<< method added to /precompiled/file + * call_out moved to a module, call_out now handles floating point + delays. + * Makefile and configure script added to the module directory. + * 'private inherit' now works as you might expect + +Wed Jun 19 01:22:53 1996 Fredrik Hubinette <hubbe@tymin.signum.se> + + * Operator overloading added. + * new simulated function: putenv + * gmp module added, implements LARGE numbers. (/precompiled/mpz) + * C++ style output is now possible with << + +Sun Jun 9 16:33:16 1996 Fredrik Hubinette <hubbe@tymin.signum.se> + + * second argument to file->read() added + * 2 new mapping implementations, the default one is an open + hashtable implementation. + * new efuns: sort, rows, column, _verify_internals + * signal_handler.c: signal calling is now blocked when inside + a signal call. + * soon available: glob, localtime, strerror + +Thu May 30 03:12:15 1996 Fredrik Hubinette <hubbe@tymin.signum.se> + + * file->read() now takes a second argument which can tell it + that it sould only make one read() + * new efun: sort() + * new mapping implementation (hashed mappings) + +Mon May 27 03:39:20 1996 Fredrik Hubinette <hubbe@axel.signum.se> + + * Pike v1.0E-8 released + +Thu May 16 00:53:16 1996 Fredrik Hubinette <hubbe@sparky.signum.se> + + * fixed some major bugs in gc() + * undefing GC2 now works + * create_testsuite: tests for gdbmmod added + * test_lpc.lpc: added conditional tests + * module doc dirs moved to the module dirs. + +Mon May 13 22:20:24 1996 Fredrik Hubinette <hubbe@axel.signum.se> + + * -Wunused removed + * new module: gdbmmod + * svalue.c: bug in garbage collect fixed + +Fri May 3 13:50:05 1996 Fredrik Hubinette <hubbe@freeone.signum.se> + + * las.c: type-checking improved + +Sat May 4 13:40:48 1996 Fredrik Hubinette <hubbe@tymin.signum.se> + + * Pike_v1.1E-9 released. + * pike_types.c (internal_parse_typeA): fixed a minor bug + +Wed May 1 00:49:36 1996 Fredrik Hubinette <hubbe@sparky.signum.se> + + * Pike_v1.0E-9 released. + +Mon Apr 29 20:47:31 1996 Fredrik Hubinette <hubbe@sparky.signum.se> + + * Makefile.in: All makefiles are now generated from Makefile.src -> + Makefile.in -> Makefile. This is so I don't have to save + dependencies in my CVS repository :) + +Tue Apr 23 22:32:04 1996 Fredrik Hubinette <hubbe@sparky.signum.se> + + * Makefile.in: Now language.c and language.h is a part of the + distribution so you won't need bison to compile. + +Sat Apr 13 04:00:45 1996 Fredrik Hubinette <hubbe@tymin.signum.se> + + * simulate.lpc: replaced sort_array with a faster one + * operators.c: optimization fixed for operators + * crypt() should now work with BSD crypt() I hope + * lots of files: added a peephole optimizer + +Thu Apr 11 23:13:24 1996 Fredrik Hubinette <hubbe@sparky.signum.se> + + * apply on void functions fixed + * case -1 fixed + +Tue Apr 2 17:01:10 1996 Fredrik Hubinette <hubbe@tymin.signum.se> + + * signal.c: alarm() added + * language.y: gauge() fixed + +Sun Mar 31 22:12:43 1996 Fredrik Hubinette <hubbe@axel.signum.se> + + * Pike v1.0E-10 released. + +Sun Mar 31 00:29:22 1996 Fredrik Hubinette <hubbe@sparky.signum.se> + + * make html_docs: new command to create a directory with + html documentation for Pike. This documentation can then + be copied to a WWW directory. + +Sat Mar 23 19:02:40 1996 Fredrik Hubinette <hubbe@tymin.signum.se> + + * array.c: arrays are always initalized to zero to avoid + gc() blowups + +Fri Mar 22 21:57:43 1996 Fredrik Hubinette <hubbe@sparky.signum.se> + + * regexp.c: added + operator, and added support for 8-bit + characters. + +Mon Mar 4 00:00:19 1996 Fredrik Hubinette <hubbe@tymin.signum.se> + + * hilfe.lpc: fixed a bug when doing 'mapping m=([]);' + +Fri Mar 1 00:35:40 1996 Fredrik Hubinette <hubbe@tymin.signum.se> + + * language.y: Added support for a[..n] and a[n..] + * configure.in: added test for %pure_parser + +Sun Feb 25 22:42:48 1996 Fredrik Hubinette <hubbe@tymin.signum.se> + + * operator functions implemented + * typeof() added + +Sat Feb 24 04:12:52 1996 Fredrik Hubinette <hubbe@tymin.signum.se> + + * program.c, array.c, object.c, gc.c: + Added routines to remove cyclic structures. + * sprintf: added support for %2c + * removed compact arrays + +Fri Feb 23 02:39:11 1996 Fredrik Hubinette <hubbe@tymin.signum.se> + + * version 1.7E-12 released + * file->close() fixed to handle unknown errors + +Sun Feb 11 01:04:38 1996 Fredrik Hubinette <hubbe@sparky.signum.se> + + * export.lpc: now updates configure files if needed + * create_testsuite: added tests for sscanfs %d %o and %x + * opcodes.c: changed sscanf to use strtol + * machine.h.in: changed USE_FCNTL_NONBLOCK to what it should be: + USE_FCNTL_O_NONBLOCK + * simulate.lpc: fixed an add_efun for exec + * Updated a LOT of docfiles. + +Sat Feb 10 02:26:25 1996 Fredrik Hubinette <hubbe@tymin.signum.se> + + * array.c: fixed a coredump when doing & on one compact and + one noncompact array. + * language.y: fixed so that continue now always need a semicolon + after it. + * builtin_efuns.c: replace_many fixed. + * array.c: fix_type_field fixed. + * las.c: fixed node_is_equal, it can now see the differance between + different global variables :P + +Mon Nov 20 16:52:32 1995 Fredrik Hubinette <hubbe@sparky.signum.se> + + * builtin_efuns.c (replace_many): Fixed an array bound read. + * compilation.h: No more macros with empty arguments. + * configure.in: changed the mystic 'oneshot signals' message + * interpret.c: print_treturn_type -> print_return_value + * language.y: inline now implies no_mask + * machine.h.in: moved HAVE_GETWD & HAVE_GETCWD to files module + * opcodes.c: changed strtod to STRTOD + * sprintf.c: fixed some typos, optimized and a bugfix in truncating + * create_testsuite: added test for get_dir() + Wed Nov 15 10:56:45 1995 Fredrik Hubinette <hubbe@sparky.signum.se> * version 1.6E-12 released @@ -19,7 +299,7 @@ Tue Nov 14 04:57:29 1995 Fredrik Hubinette <hubbe@sparky.signum.se> * configure.in: Added a kluge for the linux -g -lm bug * language.y: major bug: free on totally wrong value fixed - * lpc_signals.c: forgot to initialize an element in the struct + * signal_handler.c: forgot to initialize an element in the struct sigvec or sigaction: fixed * array.c (compact_array): Used wrong type, screwed up a lot of things. Now fixed @@ -58,7 +338,7 @@ Mon Nov 6 00:26:48 1995 Fredrik Hubinette <hubbe@sparky.signum.se> * moved the testsuite to src/tests/ * created a testsuite that verifies the doc/ directory (test/verifymanual.lpc) - * lpc_signals.c: fixed to use sigvec/sigaction if possible + * signal_handler.c: fixed to use sigvec/sigaction if possible also added checks for EINTR all over the place. Sat Nov 4 04:08:46 1995 Fredrik Hubinette <hubbe@sparky.signum.se> @@ -79,7 +359,7 @@ Thu Nov 2 00:13:20 1995 Fredrik Hubinette <hubbe@sparky.signum.se> Tue Oct 31 18:57:49 1995 Fredrik Hubinette <hubbe@sparky.signum.se> * Makefile.in, config.h: moved DEBUG to Makefile - * lpc_signals.c: fixed a warning + * signal_handler.c: fixed a warning Sun Oct 29 04:02:03 1995 Fredrik Hubinette <hubbe@sparky.signum.se> @@ -158,7 +438,7 @@ Tue Oct 17 21:45:31 1995 Fredrik Hubinette <hubbe@sparky.signum.se> * language.y: fixed so you can declare variables as: function(int,int:int) foo; - * lpc_types.c: fixed a nasty bug in typechecker, also made + * pike_types.c: fixed a nasty bug in typechecker, also made 'mixed' match 'void' (simpler that way) * program.c: Fixed a nasty bug that made ::identifier dump core if identifier was inherited indirectly. @@ -180,7 +460,7 @@ Thu Oct 12 22:33:26 1995 Fredrik Hubinette <hubbe@sparky.signum.se> * v1.0E-15 Released * Makefile.in: targets 'export' added, and 'depend' fixed - make depend now uses a uLPC script to get rid of include + make depend now uses a Pike script to get rid of include and pathnames * simulate.lpc: added system() * file.c: added file->set_close_on_exec() diff --git a/src/Makefile.in b/src/Makefile.in deleted file mode 100644 index e0c95c5990757926e91b41406ef39afc60bf543a..0000000000000000000000000000000000000000 --- a/src/Makefile.in +++ /dev/null @@ -1,464 +0,0 @@ -# This line is needed on some machines. -@SET_MAKE@ - -# Don't change this line. Define EXTRALIBS before this line if you -# wish to add any libraries. -LIBS=@LIBS@ $(EXTRALIBS) - -# not used yet -INSTALL=@INSTALL@ - -SRCDIR=@srcdir@ -VPATH=@srcdir@ - -# These are used while compiling -TMP_LIBDIR = @LIBDIR@ -TMP_BINDIR = @BINDIR@ -TMP_BUILDDIR = @BUILDDIR@ -TMP_DOCDIR = @DOCDIR@ - -prefix = @prefix@ -exec_prefix = $(prefix)/bin -lib_prefix = $(prefix)/lib/ulpc - -# -# use bison please, yacc doesn't always work good enough. -# -YACC=@YACC@ -YFLAGS=-d -v - -# If you don't have 'strchr', then add next flag to CFLAGS. -# -Dstrchr=index -Dstrrchr=rindex -# -PROFIL= -#PROFIL=-pg - -# -#Enable warnings from the compiler, if wanted. -# -WARN=@WARN@ -#WARN=-W -Wunused -Wformat -#WARN -Wunused -Wformat -Wuninitialized -#WARN= -Wall -Wshadow -Dlint - -#add extra defines here -# Be sure to use -g and -DDEBUG when looking for bugs -DEFINES=-DDEBUG -DDEFAULT_MASTER=\"$(lib_prefix)/master.lpc\" - -# -O should work with all compilers -OPTIMIZE=@OPTIMIZE@ - -# Preprocessor flags. -PREFLAGS=-I. -I$(SRCDIR) $(DEFINES) -OTHERFLAGS=$(OSFLAGS) $(OPTIMIZE) $(WARN) $(PROFIL) -CFLAGS=$(PREFLAGS) $(OTHERFLAGS) - -CC=@CC@ -CPP=@CPP@ - -LD=$(CC) -LDFLAGS=$(CFLAGS) - -RUNULPC=$(TMP_BUILDDIR)/ulpc -m $(TMP_LIBDIR)/master.lpc -FIXDEP=$(RUNULPC) $(TMP_BINDIR)/fixdepends.lpc - -MAKE_FLAGS = "prefix=$(prefix)" "exex_prefix=$(exex_prefix)" "CC=$(CC)" "OTHERFLAGS=$(OTHERFLAGS)" "FIXDEP=$(FIXDEP)" - -# Add alloca.o if you don't have alloca() on your machine. -# Add ualarm.o if you don't have ualarm() on your machine. -# -OBJ=language.o add_efun.o array.o builtin_efuns.o backend.o \ - call_out.o docode.o dynamic_buffer.o error.o fd_control.o \ - fsort.o hashtable.o interpret.o lex.o las.o list.o \ - lpc_types.o main.o mapping.o memory.o module.o object.o \ - opcodes.o operators.o port.o program.o rusage.o stralloc.o \ - stuff.o svalue.o debug.o callback.o lpc_signal.o @EXTRA_OBJS@ - -# -MODULES=@subdirs@ -MODULE_OBJS=@MODULE_OBJS@ - -# -# User callable targets -# - -all: ulpc - -ulpc: $(OBJ) module_objects - -mv ulpc ulpc.old - $(LD) $(LDFLAGS) $(OBJ) $(MODULE_OBJS) -o ulpc $(LIBS) - - -# purify -pure: $(OBJ) module_objects - -mv ulpc ulpc.old - purify -free-queue-length=500 -inuse-at-exit=yes -chain-length=12 $(LD) $(LDFLAGS) $(OBJ) $(MODULE_OBJS) -o ulpc $(LIBS) - -# purecov -cover: $(OBJ) module_objects - -mv ulpc ulpc.old - purecov purify -free-queue-length=500 -inuse-at-exit=yes -chain-length=12 $(LD) $(LDFLAGS) $(OBJ) $(MODULE_OBJS) -o ulpc $(LIBS) - -# quantify -quant: $(OBJ) module_objects - -mv ulpc ulpc.old - quantify $(LD) $(LDFLAGS) $(OBJ) $(MODULE_OBJS) -o ulpc $(LIBS) - -# install -install: - if [ ! -d "$(prefix)" ]; then mkdir "$(prefix)" ; chmod 755 "$(prefix)" ; fi - if [ ! -d "$(exec_prefix)" ]; then mkdir "$(exec_prefix)" ; chmod 755 "$(exec_prefix)" ; fi - $(INSTALL) ./ulpc $(exec_prefix) - if [ ! -d "$(prefix)/lib" ]; then mkdir "$(prefix)/lib" ; chmod 755 "$(prefix)/lib" ; fi - if [ ! -d "$(lib_prefix)" ]; then mkdir "$(lib_prefix)" ; chmod 755 "$(lib_prefix)" ; fi - $(INSTALL) $(TMP_LIBDIR)/master.lpc $(lib_prefix) - $(INSTALL) $(TMP_LIBDIR)/simulate.lpc $(lib_prefix) - -# tidy up a bit -tidy: - -rm -f *.o core $(MUD_LIB)/core y.output y.tab.c y.tab.h - -rm -f $(TMP_BINDIR)/core *.o *.i *.i~ - -# make clean -clean: tidy - -for a in $(MODULES) ; do ( cd $$a ; ${MAKE} $(MAKE_FLAGS) clean ) ; done - -for a in $(MODULES) ; do rm -f $$a/*.o ; done - -rm -f language.h language.c TAGS tags - -rm -f yacc.acts yacc.debug yacc.tmp *.debug.log a.out - -# make _really_ clean -spotless: clean - rm -f Makefile machine.h - find . -type f '(' -name '*~' -o -name '.*~' -o -name core -o -name '.nfs*' -name '#*#' ')' -print | xargs rm -f - -rm -f lexical.c mon.out *.ln config.status - -rm -f $(TMP_BINDIR)/driver $(TMP_BINDIR)/*~ $(TMP_BINDIR)/#*# - -rm -f .pure driver* l.outa* - -# create tags -tags: - ctags *.c - -TAGS: - etags -t *.h *.c - -# verify / debug -verify_manual: - $(RUNULPC) $(SRCDIR)/test/verifymanual.lpc $(TMP_DOCDIR) - -verify: $(SRCDIR)/test/testsuite verify_manual - $(RUNULPC) $(SRCDIR)/test/test_lpc.lpc $(SRCDIR)/test/testsuite - -# verify / debug verbose -verbose_verify: $(SRCDIR)/test/testsuite verify_manual - $(RUNULPC) $(SRCDIR)/test/test_lpc.lpc $(SRCDIR)/test/testsuite --verbose - -# verify & debug VERBOSE -gdb_verify: $(SRCDIR)/test/testsuite - echo >.gdbinit handle SIGUSR1 nostop noprint pass - echo >>.gdbinit run -m $(TMP_LIBDIR)/master.lpc $(SRCDIR)/test/test_lpc.lpc $(SRCDIR)/test/testsuite -v -v -f - gdb ./ulpc - -# run hilfe, for interactive testing -run_hilfe: - $(RUNULPC) $(TMP_BINDIR)/hilfe - -# make export archive (requires compiled uLPC) -# Do not compile in source tree if you want to use this! -export: $(SRCDIR)/test/testsuite configure - $(RUNULPC) $(TMP_BINDIR)/export.lpc - -# make dependencies (requires compiled uLPC) -depend: language.c - gcc -MM $(PREFLAGS) *.c $(SRCDIR)/*.c | $(FIXDEP) $(SRCDIR)/Makefile.in - for a in $(MODULES) ; do ( cd $$a ; ${MAKE} $(MAKE_FLAGS) depend ) ; done - -# -# uLPC internal targets -# -module_objects: - for a in $(MODULES) ; do ( cd $$a ; ${MAKE} $(MAKE_FLAGS) ) ; done - -lang.o: lang.c config.h object.h interpret.h program.h - -language.h: language.y - @echo "Expect 1 shift/reduce conflict." - $(YACC) $(YFLAGS) $(SRCDIR)/language.y - mv y.tab.c language.c - mv y.tab.h language.h - -language.c: language.h - touch language.c - -module.c: modlist.h - -configure: configure.in - cd $(SRCDIR) && autoconf - -config.status: configure - ./config.status --recheck - - -Makefile: Makefile.in config.status - ./config.status - -machine.h: stamp-h - -stamp-h: machine.h.in config.status - ./config.status - -modlist.h: - ./config.status - -$(SRCDIR)/test/testsuite: $(SRCDIR)/test/create_testsuite - m4 <$(SRCDIR)/test/create_testsuite >$(SRCDIR)/test/testsuite - - -#Dependencies begin here, DO NOT REMOVE THIS LINE!!!! -language.o: language.c global.h machine.h \ - config.h debug.h \ - port.h interpret.h \ - program.h array.h \ - las.h svalue.h \ - dynamic_buffer.h object.h \ - stralloc.h lex.h \ - lpc_types.h add_efun.h \ - hashtable.h macros.h \ - error.h docode.h -add_efun.o: add_efun.c add_efun.h \ - svalue.h types.h machine.h \ - hashtable.h las.h \ - config.h dynamic_buffer.h \ - program.h macros.h \ - memory.h lpc_types.h \ - stralloc.h interpret.h -alloca.o: alloca.c -array.o: array.c global.h \ - machine.h config.h debug.h \ - port.h svalue.h \ - array.h las.h \ - dynamic_buffer.h program.h \ - object.h stralloc.h \ - interpret.h language.h error.h \ - lpc_types.h fsort.h \ - builtin_efuns.h -backend.o: backend.c global.h \ - machine.h config.h debug.h \ - port.h interpret.h \ - program.h object.h \ - svalue.h error.h \ - call_out.h backend.h \ - fd_control.h main.h \ - callback.h array.h \ - las.h dynamic_buffer.h -builtin_efuns.o: builtin_efuns.c \ - global.h machine.h config.h \ - debug.h port.h \ - interpret.h program.h \ - svalue.h macros.h \ - object.h array.h \ - las.h dynamic_buffer.h \ - error.h add_efun.h \ - hashtable.h mapping.h \ - stralloc.h lex.h \ - list.h lpc_types.h \ - rusage.h operators.h \ - fsort.h call_out.h \ - callback.h -call_out.o: call_out.c global.h \ - machine.h config.h debug.h \ - port.h array.h \ - las.h svalue.h \ - dynamic_buffer.h program.h \ - call_out.h object.h \ - interpret.h error.h \ - builtin_efuns.h main.h -callback.o: callback.c macros.h \ - memory.h types.h machine.h \ - callback.h array.h \ - las.h config.h \ - svalue.h dynamic_buffer.h \ - program.h -debug.o: debug.c global.h \ - machine.h config.h debug.h \ - port.h -docode.o: docode.c global.h \ - machine.h config.h debug.h \ - port.h las.h \ - svalue.h dynamic_buffer.h \ - program.h language.h \ - lpc_types.h stralloc.h \ - interpret.h add_efun.h \ - hashtable.h array.h \ - macros.h error.h \ - main.h lex.h \ - builtin_efuns.h -dynamic_buffer.o: dynamic_buffer.c \ - global.h machine.h config.h \ - debug.h port.h \ - dynamic_buffer.h stralloc.h \ - error.h svalue.h -error.o: error.c global.h \ - machine.h config.h debug.h \ - port.h macros.h \ - error.h svalue.h \ - interpret.h program.h \ - stralloc.h builtin_efuns.h \ - array.h las.h \ - dynamic_buffer.h object.h -fd_control.o: fd_control.c \ - fd_control.h global.h \ - machine.h config.h debug.h \ - port.h -fsort.o: fsort.c global.h \ - machine.h config.h debug.h \ - port.h fsort.h -hashtable.o: hashtable.c global.h \ - machine.h config.h debug.h \ - port.h hashtable.h \ - stralloc.h stuff.h \ - error.h svalue.h -interpret.o: interpret.c global.h \ - machine.h config.h debug.h \ - port.h interpret.h \ - program.h object.h \ - svalue.h array.h \ - las.h dynamic_buffer.h \ - mapping.h error.h language.h \ - stralloc.h add_efun.h \ - hashtable.h macros.h \ - list.h backend.h \ - operators.h opcodes.h \ - main.h lex.h \ - builtin_efuns.h lpc_signal.h -las.o: las.c global.h machine.h \ - config.h debug.h \ - port.h language.h interpret.h \ - program.h las.h \ - svalue.h dynamic_buffer.h \ - array.h object.h \ - stralloc.h lex.h \ - lpc_types.h add_efun.h \ - hashtable.h mapping.h \ - list.h error.h \ - docode.h main.h -lex.o: lex.c global.h machine.h \ - config.h debug.h \ - port.h language.h array.h \ - las.h svalue.h \ - dynamic_buffer.h program.h \ - lex.h stralloc.h \ - add_efun.h hashtable.h \ - stuff.h interpret.h \ - error.h object.h \ - operators.h opcodes.h \ - builtin_efuns.h macros.h -list.o: list.c global.h \ - machine.h config.h debug.h \ - port.h array.h \ - las.h svalue.h \ - dynamic_buffer.h program.h \ - list.h macros.h \ - error.h interpret.h \ - builtin_efuns.h -lpc_signal.o: lpc_signal.c \ - global.h machine.h config.h \ - debug.h port.h \ - svalue.h interpret.h \ - program.h stralloc.h \ - add_efun.h hashtable.h \ - las.h dynamic_buffer.h \ - macros.h backend.h -lpc_types.o: lpc_types.c global.h \ - machine.h config.h debug.h \ - port.h svalue.h \ - lpc_types.h stralloc.h \ - stuff.h array.h \ - las.h dynamic_buffer.h \ - program.h add_efun.h \ - hashtable.h object.h \ - list.h mapping.h \ - macros.h error.h -main.o: main.c global.h \ - machine.h config.h debug.h \ - port.h backend.h \ - module.h object.h \ - svalue.h lex.h \ - lpc_types.h builtin_efuns.h \ - array.h las.h \ - dynamic_buffer.h program.h \ - stralloc.h interpret.h \ - error.h macros.h \ - callback.h lpc_signal.h -mapping.o: mapping.c global.h \ - machine.h config.h debug.h \ - port.h mapping.h \ - las.h svalue.h \ - dynamic_buffer.h program.h \ - array.h macros.h language.h \ - error.h interpret.h -memory.o: memory.c global.h \ - machine.h config.h debug.h \ - port.h error.h \ - svalue.h -module.o: module.c module.h \ - types.h machine.h macros.h \ - memory.h error.h \ - svalue.h modlist.h -object.o: object.c global.h \ - machine.h config.h debug.h \ - port.h object.h \ - svalue.h dynamic_buffer.h \ - interpret.h program.h \ - stralloc.h macros.h \ - error.h main.h -opcodes.o: opcodes.c global.h \ - machine.h config.h debug.h \ - port.h interpret.h \ - program.h svalue.h \ - array.h las.h \ - dynamic_buffer.h stralloc.h \ - mapping.h list.h \ - opcodes.h object.h \ - error.h lpc_types.h -operators.o: operators.c global.h \ - machine.h config.h debug.h \ - port.h interpret.h \ - program.h svalue.h \ - list.h las.h \ - dynamic_buffer.h mapping.h \ - array.h stralloc.h \ - opcodes.h operators.h \ - language.h error.h -port.o: port.c global.h \ - machine.h config.h debug.h \ - port.h macros.h -program.o: program.c global.h \ - machine.h config.h debug.h \ - port.h program.h \ - object.h svalue.h \ - dynamic_buffer.h lpc_types.h \ - stralloc.h las.h language.h \ - lex.h macros.h \ - fsort.h error.h \ - docode.h interpret.h \ - hashtable.h compilation.h -rusage.o: rusage.c global.h \ - machine.h config.h debug.h \ - port.h rusage.h -stralloc.o: stralloc.c global.h \ - machine.h config.h debug.h \ - port.h stralloc.h \ - macros.h dynamic_buffer.h \ - error.h svalue.h -stuff.o: stuff.c stuff.h \ - types.h machine.h -svalue.o: svalue.c global.h \ - machine.h config.h debug.h \ - port.h svalue.h \ - stralloc.h array.h \ - las.h dynamic_buffer.h \ - program.h mapping.h \ - list.h object.h \ - add_efun.h hashtable.h \ - error.h -ualarm.o: ualarm.c diff --git a/src/Makefile.src b/src/Makefile.src new file mode 100644 index 0000000000000000000000000000000000000000..4b67679eb2db1393f160d320a32d56865f63d387 --- /dev/null +++ b/src/Makefile.src @@ -0,0 +1,254 @@ +# This line is needed on some machines. +@SET_MAKE@ + +# Don't change this line. Define EXTRALIBS before this line if you +# wish to add any libraries. +LIBS=@LIBS@ $(EXTRALIBS) + +# not used yet +INSTALL=@INSTALL@ + +SRCDIR=@srcdir@ +VPATH=@srcdir@ + +# These are used while compiling +TMP_LIBDIR = @LIBDIR@ +TMP_BINDIR = @BINDIR@ +TMP_BUILDDIR = @BUILDDIR@ +TMP_DOCDIR = @DOCDIR@ + +prefix = @prefix@ +exec_prefix = $(prefix)/bin +lib_prefix = $(prefix)/lib/pike + +# +# use bison please, yacc doesn't always work good enough. +# +YACC=@YACC@ +YFLAGS=-d -v + +# If you don't have 'strchr', then add next flag to CFLAGS. +# -Dstrchr=index -Dstrrchr=rindex +# +PROFIL= +#PROFIL=-pg + +# +#Enable warnings from the compiler, if wanted. +# +WARN=@WARN@ +#WARN=-W -Wunused -Wformat +#WARN -Wunused -Wformat -Wuninitialized +#WARN= -Wall -Wshadow -Dlint + +#add extra defines here +# Be sure to use -g and -DDEBUG when looking for bugs +DEBUGDEF=-DDEBUG +DEFINES=-DDEFAULT_MASTER=\"$(lib_prefix)/master.pike\" + +# -O should work with all compilers +OPTIMIZE=@OPTIMIZE@ + +# Preprocessor flags. +PREFLAGS=-I. -I$(SRCDIR) $(DEFINES) +OTHERFLAGS=$(DEBUGDEF) $(OSFLAGS) $(OPTIMIZE) $(WARN) $(PROFIL) +CFLAGS=$(PREFLAGS) $(OTHERFLAGS) + +CC=@CC@ +CPP=@CPP@ + +LD=$(CC) +LDFLAGS=$(CFLAGS) + +RUNPIKE=$(TMP_BUILDDIR)/pike -m $(TMP_LIBDIR)/master.pike $(PIKEOPTS) +FIXDEP=$(TMP_BINDIR)/fixdepends.sh + +MAKE_FLAGS = "prefix=$(prefix)" "exex_prefix=$(exex_prefix)" "CC=$(CC)" "OTHERFLAGS=$(OTHERFLAGS)" "FIXDEP=$(FIXDEP)" "DEBUGDEF=$(DEBUGDEF)" + +# Add alloca.o if you don't have alloca() on your machine. +# Add ualarm.o if you don't have ualarm() on your machine. +# +OBJ= \ + constants.o \ + array.o \ + backend.o \ + builtin_functions.o \ + callback.o \ + docode.o \ + dynamic_buffer.o \ + error.o \ + fd_control.o \ + fsort.o \ + gc.o \ + hashtable.o \ + interpret.o \ + language.o \ + las.o \ + lex.o \ + multiset.o \ + signal_handler.o \ + pike_types.o \ + main.o \ + mapping.o \ + memory.o \ + module.o \ + object.o \ + opcodes.o \ + operators.o \ + peep.o \ + port.o \ + program.o \ + rusage.o \ + stralloc.o \ + stuff.o \ + svalue.o @EXTRA_OBJS@ + +# +# User callable targets +# + +all: $(OBJ) module_objects + $(MAKE) $(MAKE_FLAGS) pike + +pike: $(OBJ) modules/linker_options + -mv pike pike.old + $(LD) $(LDFLAGS) $(OBJ) `cat modules/linker_options` $(LIBS) -o pike + +# purify +pure: $(OBJ) module_objects + -mv pike pike.old + purify -free-queue-length=500 -inuse-at-exit=yes -chain-length=12 $(LD) $(LDFLAGS) $(OBJ) `cat modules/linker_options` $(LIBS) -o pike + +# purecov +cover: $(OBJ) module_objects + -mv pike pike.old + purecov purify -free-queue-length=500 -inuse-at-exit=yes -chain-length=12 $(LD) $(LDFLAGS) $(OBJ) `cat modules/linker_options` $(LIBS) -o pike + +# quantify +quant: $(OBJ) module_objects + -mv pike pike.old + quantify $(LD) $(LDFLAGS) $(OBJ) `cat modules/linker_options` $(LIBS) -o pike + +# install +install: + if [ ! -d "$(prefix)" ]; then mkdir "$(prefix)" ; chmod 755 "$(prefix)" ; fi + if [ ! -d "$(exec_prefix)" ]; then mkdir "$(exec_prefix)" ; chmod 755 "$(exec_prefix)" ; fi + $(INSTALL) ./pike $(exec_prefix) + if [ ! -d "$(prefix)/lib" ]; then mkdir "$(prefix)/lib" ; chmod 755 "$(prefix)/lib" ; fi + if [ ! -d "$(lib_prefix)" ]; then mkdir "$(lib_prefix)" ; chmod 755 "$(lib_prefix)" ; fi + $(INSTALL) $(TMP_LIBDIR)/master.pike $(lib_prefix) + cp -r $(TMP_LIBDIR)/include $(lib_prefix) + +# tidy up a bit +tidy: + -rm -f *.o core y.output y.tab.c y.tab.h + -rm -f $(TMP_BINDIR)/core *.o *.i *.i~ testsuite + +# make clean +clean: tidy + -( cd modules; ${MAKE} $(MAKE_FLAGS) clean ) + -rm -f TAGS tags + -rm -f yacc.acts yacc.debug yacc.tmp *.debug.log a.out + +# make _really_ clean +spotless: clean + rm -f Makefile machine.h + find . -type f '(' -name '*~' -o -name '.*~' -o -name core -o -name '.nfs*' -name '#*#' ')' -print | xargs rm -f + -rm -f lexical.c mon.out *.ln config.status + -rm -f $(TMP_BINDIR)/driver $(TMP_BINDIR)/*~ $(TMP_BINDIR)/#*# + -rm -f .pure driver* l.outa* + +# create tags +tags: + ctags *.c + +TAGS: + etags -t *.h *.c + +# verify / debug +verify: testsuite + $(RUNPIKE) $(SRCDIR)/test/test_pike.pike testsuite + +# verify / debug verbose +verbose_verify: testsuite + $(RUNPIKE) $(SRCDIR)/test/test_pike.pike testsuite --verbose + +# verify & debug VERBOSE +gdb_verify: testsuite + @echo >.gdbinit handle SIGUSR1 nostop noprint pass + @echo >>.gdbinit run -m $(TMP_LIBDIR)/master.pike $(PIKEOPTS) $(SRCDIR)/test/test_pike.pike testsuite -v -v -f + gdb ./pike + @rm .gdbinit + +# run hilfe, for interactive testing +run_hilfe: + $(RUNPIKE) $(TMP_BINDIR)/hilfe + +# make export archive (requires compiled Pike) +# Do not compile in source tree if you want to use this! +# Beware that export archive this includes bison/yacc/byacc source +# and thus has to follow the rules stated in that code. +export: new_peep_engine $(SRCDIR)/language.c $(SRCDIR)/language.h depend + chmod +x $(SRCDIR)/install-sh + $(RUNPIKE) $(TMP_BINDIR)/export.pike + +new_peep_engine: + $(RUNPIKE) $(TMP_BINDIR)/mkpeep.pike $(SRCDIR)/peep.in >$(SRCDIR)/peep_engine.c + +peep_engine.c: peep.in + echo "" >$(SRCDIR)/peep_engine.c + -$(RUNPIKE) $(TMP_BINDIR)/mkpeep.pike $(SRCDIR)/peep.in >$(SRCDIR)/peep_engine.c + +peep.o: peep_engine.c + +# make dependencies (requires compiled Pike) +depend: language.c + gcc -MM $(PREFLAGS) $(SRCDIR)/*.c | $(FIXDEP) $(SRCDIR) + ( cd modules ; $(MAKE) $(MAKE_FLAGS) depend ) + +docs: + mkdir docs + +html_docs: docs + $(RUNPIKE) $(TMP_BINDIR)/htmlify_docs docs $(TMP_DOCDIR) `echo $(SRCDIR)/modules/*/doc` +# +# Pike internal targets +# +module_objects: + ( cd modules ; ${MAKE} $(MAKE_FLAGS) ) + +lang.o: lang.c config.h object.h interpret.h program.h + +$(SRCDIR)/language.h: language.y + @echo "Expect 1 shift/reduce conflict." + $(YACC) $(YFLAGS) $(SRCDIR)/language.y + mv y.tab.c $(SRCDIR)/language.c + mv y.tab.h $(SRCDIR)/language.h + +$(SRCDIR)/language.c: language.h + touch $(SRCDIR)/language.c + +module.c: modlist.h + +$(SRCDIR)/configure: configure.in + cd $(SRCDIR) && autoconf + +config.status: $(SRCDIR)/configure + ./config.status --recheck + +$(SRCDIR)/Makefile.in: $(SRCDIR)/Makefile.src + gcc -MM $(PREFLAGS) $(SRCDIR)/*.c | $(FIXDEP) $(SRCDIR) + +Makefile: $(SRCDIR)/Makefile.in config.status + CONFIG_FILES=Makefile CONFIG_HEADERS= ./config.status + @echo "Run make again" + @exit 1 + +machine.h: stamp-h +stamp-h: machine.h.in config.status + CONFIG_FILES= CONFIG_HEADERS=machine.h ./config.status + +testsuite: $(SRCDIR)/test/create_testsuite + m4 <$(SRCDIR)/test/create_testsuite >testsuite + + diff --git a/src/README b/src/README index 5a1d0864b402576cff2e27d3d6584f9d691dea81..7581a539974b0853997862bb88fd324609184a09 100644 --- a/src/README +++ b/src/README @@ -1,8 +1,13 @@ -This is what you need to do to install uLPC: +This is what you need to do to install Pike: 1) Run ./configure, this is a sh script that will generate machine.h and Makefile from machine.h.in and Makefile.in, use --prefix=/foo/bar - if you want to install ulpc in /foo/bar, default is /usr/local. + if you want to install Pike in /foo/bar, default is /usr/local. + + You might have to set the environment variables C_INCLUDE_PATH and + LD_LIBRARY_PATH to enable the configure script to find gdbm, readline + and gmp. If the configure script does not find those libraries those + modules will not be available. 2) edit config.h and Makefile to suit your purposes. I've tried to make it so that you don't have to change config.h or @@ -17,7 +22,11 @@ This is what you need to do to install uLPC: quite a lot of memory, because the testprogram is quite large. If everything works out fine no extra messages are written. -5) If you want to install ulpc, write 'make install' +5) If you want to install Pike, write 'make install' + +6) Optionally do 'make html_docs' to create a directory called docs which + will contain the Pike documentation in html. This directory can then + be copied to anywhere you want. What to do when it doesn't work: 1) Try again. @@ -38,7 +47,7 @@ What to do when it doesn't work: 5) Try a different compiler, malloc, compiler-compiler and/or make. (if you have any other) -6) On Linux Slackware machines (older than slackware 3.0), uLPC sometimes +6) On Linux Slackware machines (older than slackware 3.0), Pike sometimes fails to find -lm, this is because of a bug in /usr/lib/libm.sa (or possibly libg.a) in slackware. Compile with 'make EXTRALIBS="-lc -lm"' to get around this bug. @@ -50,10 +59,10 @@ and see if you get another error. When you've done this, please report the bug to hubbe@lysator.liu.se and include as much as you can muster of the following: - o The version of the driver. (can be found in lib/simulate.lpc) + o The version of the driver. (can be found in lib/simulate.pike) o What kind of system hardware/software you use (OS, compiler, etc.) o the piece of code that crashes or bugs. - (preferably in a very small lpc-script with the bug isolated) + (preferably in a very small pike-script with the bug isolated) Please send a complete running example of something that makes the interpreter bug. o a description of what it is that bugs and when. diff --git a/src/add_efun.h b/src/add_efun.h deleted file mode 100644 index f27b34a2c26e2c50f498e90f7a7ae251e7918b0d..0000000000000000000000000000000000000000 --- a/src/add_efun.h +++ /dev/null @@ -1,40 +0,0 @@ -/*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) -||| See the files COPYING and DISCLAIMER for more information. -\*/ -#ifndef ADD_EFUN_H -#define ADD_EFUN_H - -#include "svalue.h" -#include "hashtable.h" -#include "las.h" /* For OPT_SIDE_EFFECT etc. */ - -struct efun -{ - struct svalue function; - struct hash_entry link; -}; - -typedef void (*c_fun)(INT32); - -struct callable -{ - INT32 refs; - c_fun function; - struct lpc_string *type; - struct lpc_string *name; - INT16 flags; -}; - -/* Prototypes begin here */ -struct efun *lookup_efun(struct lpc_string *name); -void low_add_efun(struct lpc_string *name, struct svalue *fun); -struct callable *make_callable(c_fun fun,char *name, char *type, INT16 flags); -void really_free_callable(struct callable *fun); -void add_efun(char *name, c_fun fun, char *type, INT16 flags); -void push_all_efuns_on_stack(); -void cleanup_added_efuns(); -/* Prototypes end here */ - -#endif diff --git a/src/alloca.c b/src/alloca.c index 092c2ce10b753828dbc111350171b9dd36819e14..88c2f32c81712b808ccdf61aac37c90353340fd7 100644 --- a/src/alloca.c +++ b/src/alloca.c @@ -1,6 +1,6 @@ /*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ #include <stdio.h> diff --git a/src/array.c b/src/array.c index ff504ba561f3c40d22e85ba66f04293fa58eef5d..9cf7ed14d02401a7b02ff1840641d75403c41acd 100644 --- a/src/array.c +++ b/src/array.c @@ -1,6 +1,6 @@ /*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ #include "global.h" @@ -12,10 +12,12 @@ #include "interpret.h" #include "language.h" #include "error.h" -#include "lpc_types.h" +#include "pike_types.h" #include "fsort.h" -#include "builtin_efuns.h" +#include "builtin_functions.h" #include "memory.h" +#include "gc.h" +#include "main.h" struct array empty_array= { @@ -25,8 +27,6 @@ struct array empty_array= 0, /* Size = 0 */ 0, /* malloced Size = 0 */ 0, /* no types */ - T_MIXED, /* mixed array */ - 0, /* no flags */ }; @@ -36,63 +36,44 @@ struct array empty_array= * NOTE: the new array have zero references */ -struct array *allocate_array_no_init(INT32 size,INT32 extra_space,TYPE_T type) +struct array *low_allocate_array(INT32 size,INT32 extra_space) { struct array *v; + INT32 e; - if(size == 0 && type == T_MIXED) + if(size == 0) { empty_array.refs++; return &empty_array; } - if(type == T_FUNCTION || type == T_MIXED) - { - v=(struct array *)malloc(sizeof(struct array_of_svalues)+ - (size+extra_space-1)*sizeof(struct svalue)); - if(!v) - error("Couldn't allocate array, out of memory.\n"); - v->array_type=T_MIXED; - /* for now, we don't know what will go in here */ - v->type_field=BIT_MIXED; - }else{ - v=(struct array *)malloc(sizeof(struct array_of_short_svalues)+ - (size+extra_space-1)*sizeof(union anything)); - if(!v) - error("Couldn't allocate array, out of memory.\n"); - v->array_type=type; - /* This array can only contain zeros and 'type' */ - v->type_field=BIT_INT | (1 << type); - } + GC_ALLOC(); + + v=(struct array *)malloc(sizeof(struct array)+ + (size+extra_space-1)*sizeof(struct svalue)); + if(!v) + error("Couldn't allocate array, out of memory.\n"); + + + /* for now, we don't know what will go in here */ + v->type_field=BIT_MIXED | BIT_UNFINISHED; + v->malloced_size=size+extra_space; v->size=size; - v->flags=0; v->refs=1; v->prev=&empty_array; v->next=empty_array.next; empty_array.next=v; v->next->prev=v; - return v; -} - -struct array *allocate_array(INT32 size,TYPE_T type) -{ - INT32 e; - struct array *a; - a=allocate_array_no_init(size,0,type); - if(a->array_type==T_MIXED) + for(e=0;e<v->size;e++) { - for(e=0;e<a->size;e++) - { - ITEM(a)[e].type=T_INT; - ITEM(a)[e].subtype=NUMBER_NUMBER; - ITEM(a)[e].u.integer=0; - } - }else{ - MEMSET((char *)SHORT_ITEM(a),0,sizeof(union anything)*a->size); + ITEM(v)[e].type=T_INT; + ITEM(v)[e].subtype=NUMBER_NUMBER; + ITEM(v)[e].u.integer=0; } - return a; + + return v; } /* @@ -109,6 +90,8 @@ static void array_free_no_free(struct array *v) v->next->prev=prev; free((char *)v); + + GC_FREE(); } /* @@ -122,13 +105,13 @@ void really_free_array(struct array *v) fatal("Tried to free the empty_array.\n"); #endif - if(v->array_type == T_MIXED) - { - free_svalues(ITEM(v), v->size); - }else{ - free_short_svalues(SHORT_ITEM(v), v->size, v->array_type); - } +#ifdef DEBUG + if(d_flag > 1) array_check_type_field(v); +#endif + v->refs++; + free_svalues(ITEM(v), v->size, v->type_field); + v->refs--; array_free_no_free(v); } @@ -142,12 +125,7 @@ void array_index_no_free(struct svalue *s,struct array *v,INT32 index) fatal("Illegal index in low level index routine.\n"); #endif - if(v->array_type == T_MIXED) - { - assign_svalue_no_free(s, ITEM(v) + index); - }else{ - assign_from_short_svalue_no_free(s, SHORT_ITEM(v) + index, v->array_type); - } + assign_svalue_no_free(s, ITEM(v) + index); } /* @@ -161,13 +139,7 @@ void array_index(struct svalue *s,struct array *v,INT32 index) #endif v->refs++; - if(v->array_type == T_MIXED) - { - assign_svalue(s, ITEM(v) + index); - }else{ - free_svalue(s); - assign_from_short_svalue_no_free(s, SHORT_ITEM(v) + index, v->array_type); - } + assign_svalue(s, ITEM(v) + index); free_array(v); } @@ -203,12 +175,7 @@ void array_free_index(struct array *v,INT32 index) fatal("Illegal index in low level free index routine.\n"); #endif - if(v->array_type == T_MIXED) - { - free_svalue(ITEM(v) + index); - }else{ - free_short_svalue(SHORT_ITEM(v) + index, v->array_type); - } + free_svalue(ITEM(v) + index); } /* @@ -223,22 +190,9 @@ void array_set_index(struct array *v,INT32 index, struct svalue *s) v->refs++; check_destructed(s); - if(v->array_type == T_MIXED) - { - v->type_field |= 1 << s->type; - assign_svalue( ITEM(v) + index, s); - }else if(IS_ZERO(s)){ - v->type_field |= BIT_INT; - SHORT_ITEM(v)[index].refs=0; - }else if(v->array_type == s->type){ - v->type_field |= 1 << s->type; - assign_to_short_svalue( SHORT_ITEM(v)+index, v->array_type, s); - }else{ - free_array(v); - error("Wrong type in array assignment (%s != %s)\n", - get_name_of_type(v->array_type), - get_name_of_type(s->type)); - } + + v->type_field = (v->type_field & ~BIT_UNFINISHED) | 1 << s->type; + assign_svalue( ITEM(v) + index, s); free_array(v); } @@ -267,46 +221,28 @@ struct array *array_insert(struct array *v,struct svalue *s,INT32 index) /* Can we fit it into the existing block? */ if(v->refs<=1 && v->malloced_size > v->size) { - if(v->array_type == T_MIXED) - { - MEMMOVE((char *)(ITEM(v)+index+1), - (char *)(ITEM(v)+index), - (v->size-index) * sizeof(struct svalue)); - ITEM(v)[index].type=T_INT; + MEMMOVE((char *)(ITEM(v)+index+1), + (char *)(ITEM(v)+index), + (v->size-index) * sizeof(struct svalue)); + ITEM(v)[index].type=T_INT; #ifdef __CHECKER__ - ITEM(v)[index].subtype=0; - ITEM(v)[index].u.refs=0; + ITEM(v)[index].subtype=0; + ITEM(v)[index].u.refs=0; #endif - }else{ - MEMMOVE((char *)(SHORT_ITEM(v)+index+1), - (char *)(SHORT_ITEM(v)+index), - (v->size-index) * sizeof(union anything)); - SHORT_ITEM(v)[index].refs=0; - } v->size++; }else{ struct array *ret; - ret=allocate_array_no_init(v->size+1, (v->size >> 3) + 1, v->array_type); + ret=allocate_array_no_init(v->size+1, (v->size >> 3) + 1); ret->type_field = v->type_field; - if(v->array_type == T_MIXED) - { - MEMCPY(ITEM(ret), ITEM(v), sizeof(struct svalue) * index); - MEMCPY(ITEM(ret)+index+1, ITEM(v)+index, sizeof(struct svalue) * (v->size-index)); - ITEM(ret)[index].type=T_INT; + MEMCPY(ITEM(ret), ITEM(v), sizeof(struct svalue) * index); + MEMCPY(ITEM(ret)+index+1, ITEM(v)+index, sizeof(struct svalue) * (v->size-index)); + ITEM(ret)[index].type=T_INT; #ifdef __CHECKER__ - ITEM(ret)[index].subtype=0; - ITEM(ret)[index].u.refs=0; + ITEM(ret)[index].subtype=0; + ITEM(ret)[index].u.refs=0; #endif - }else{ - MEMCPY(SHORT_ITEM(ret), SHORT_ITEM(v), sizeof(union anything) * index); - - MEMCPY(SHORT_ITEM(ret)+index+1, - SHORT_ITEM(v)+index, - sizeof(union anything) * (v->size-index)); - SHORT_ITEM(ret)[index].refs=0; - } v->size=0; free_array(v); v=ret; @@ -328,42 +264,26 @@ static struct array *resize_array(struct array *a, INT32 size) /* We should grow the array */ if(a->malloced_size >= size) { - if(a->array_type == T_MIXED) + for(;a->size < size; a->size++) { - for(;a->size < size; a->size++) - { - ITEM(a)[a->size].type=T_INT; - ITEM(a)[a->size].subtype=NUMBER_NUMBER; - ITEM(a)[a->size].u.integer=0; - } - }else{ - MEMSET(SHORT_ITEM(a)+a->size, - 0, - sizeof(union anything)*(size-a->size)); - a->size=size; + ITEM(a)[a->size].type=T_INT; + ITEM(a)[a->size].subtype=NUMBER_NUMBER; + ITEM(a)[a->size].u.integer=0; } + a->type_field |= BIT_INT; return a; }else{ struct array *ret; - ret=allocate_array_no_init(size, (size>>3)+1, a->array_type); - if(a->array_type == T_MIXED) - { - MEMCPY(ITEM(ret),ITEM(a),sizeof(struct svalue)*a->size); - }else{ - MEMCPY(SHORT_ITEM(ret),SHORT_ITEM(a),sizeof(union anything)*a->size); - } + ret=allocate_array_no_init(size, (size>>3)+1); + MEMCPY(ITEM(ret),ITEM(a),sizeof(struct svalue)*a->size); + ret->type_field = a->type_field | BIT_INT; a->size=0; free_array(a); return ret; } }else{ /* We should shrink the array */ - if(a->array_type == T_MIXED) - { - free_svalues(ITEM(a)+size, a->size - size); - }else{ - free_short_svalues(SHORT_ITEM(a)+size, a->size - size, a->array_type); - } + free_svalues(ITEM(a)+size, a->size - size, a->type_field); a->size = size; return a; } @@ -386,27 +306,16 @@ struct array *array_shrink(struct array *v,INT32 size) if(size*2 < v->malloced_size + 4) /* Should we realloc it? */ { - a=allocate_array_no_init(size,0,v->array_type); + a=allocate_array_no_init(size,0); a->type_field = v->type_field; - if(v->array_type == T_MIXED) - { - free_svalues(ITEM(v) + size, v->size - size); - MEMCPY(ITEM(a), ITEM(v), size*sizeof(struct svalue)); - }else{ - free_short_svalues(SHORT_ITEM(v) + size, v->size - size, v->array_type); - MEMCPY(ITEM(a), ITEM(v), size*sizeof(union anything)); - } + free_svalues(ITEM(v) + size, v->size - size, v->type_field); + MEMCPY(ITEM(a), ITEM(v), size*sizeof(struct svalue)); v->size=0; free_array(v); return a; }else{ - if(v->array_type == T_MIXED) - { - free_svalues(ITEM(v) + size, v->size - size); - }else{ - free_short_svalues(SHORT_ITEM(v) + size, v->size - size, v->array_type); - } + free_svalues(ITEM(v) + size, v->size - size, v->type_field); v->size=size; return v; } @@ -431,41 +340,24 @@ struct array *array_remove(struct array *v,INT32 index) if(v->size!=1 && v->size*2 + 4 < v->malloced_size ) /* Should we realloc it? */ { - a=allocate_array_no_init(v->size-1, 0, v->array_type); + a=allocate_array_no_init(v->size-1, 0); a->type_field = v->type_field; - if(v->array_type == T_MIXED) - { - if(index>0) - MEMCPY(ITEM(a), ITEM(v), index*sizeof(struct svalue)); - if(v->size-index>1) - MEMCPY(ITEM(a)+index, - ITEM(v)+index+1, - (v->size-index-1)*sizeof(struct svalue)); - }else{ - if(index>0) - MEMCPY(SHORT_ITEM(a), SHORT_ITEM(v), index*sizeof(struct svalue)); - if(v->size-index>1) - MEMCPY(SHORT_ITEM(a)+index, - SHORT_ITEM(v)+index+1, - (v->size-index-1)*sizeof(union anything)); - } + if(index>0) + MEMCPY(ITEM(a), ITEM(v), index*sizeof(struct svalue)); + if(v->size-index>1) + MEMCPY(ITEM(a)+index, + ITEM(v)+index+1, + (v->size-index-1)*sizeof(struct svalue)); v->size=0; free_array(v); return a; }else{ if(v->size-index>1) { - if(v->array_type == T_MIXED) - { - MEMMOVE((char *)(ITEM(v)+index), - (char *)(ITEM(v)+index+1), - (v->size-index-1)*sizeof(struct svalue)); - }else{ - MEMMOVE((char *)(SHORT_ITEM(v)+index), - (char *)(SHORT_ITEM(v)+index+1), - (v->size-index-1)*sizeof(union anything)); - } + MEMMOVE((char *)(ITEM(v)+index), + (char *)(ITEM(v)+index+1), + (v->size-index-1)*sizeof(struct svalue)); } v->size--; return v; @@ -486,42 +378,21 @@ INT32 array_search(struct array *v, struct svalue *s,INT32 start) check_destructed(s); - if(v->type_field & (1 << s->type)) /* Why search for something that is not there? */ + /* Why search for something that is not there? */ +#ifdef DEBUG + if(d_flag > 1) array_check_type_field(v); +#endif + + if(v->type_field & (1 << s->type)) { - if(v->array_type == T_MIXED) + TYPE_FIELD t=0; + for(e=start;e<v->size;e++) { - TYPE_FIELD t=0; - for(e=start;e<v->size;e++) - { - if(is_eq(ITEM(v)+e,s)) return e; - t |= 1<<ITEM(v)[e].type; - } - v->type_field=t; - return -1; - }else{ - if(v->array_type == T_FLOAT) - { - if(s->type == T_FLOAT) - for(e=start;e<v->size;e++) - if(SHORT_ITEM(v)[e].float_number == s->u.float_number) - return e; - return -1; - } - if(v->array_type == s->type) - { - for(e=start;e<v->size;e++) - if(SHORT_ITEM(v)[e].refs == s->u.refs) - return e; - return -1; - } - - if(IS_ZERO(s)) - for(e=start;e<v->size;e++) - if(!SHORT_ITEM(v)[e].refs) - return e; - - return -1; + if(is_eq(ITEM(v)+e,s)) return e; + t |= 1<<ITEM(v)[e].type; } + v->type_field=t; + return -1; } return -1; @@ -546,18 +417,10 @@ struct array *slice_array(struct array *v,INT32 start,INT32 end) return array_shrink(v,end); } - a=allocate_array_no_init(end-start,0,v->array_type); + a=allocate_array_no_init(end-start,0); a->type_field = v->type_field; - if(v->array_type == T_MIXED) - { - assign_svalues_no_free(ITEM(a), ITEM(v)+start, end-start); - }else{ - assign_short_svalues_no_free(SHORT_ITEM(a), - SHORT_ITEM(v)+start, - v->array_type, - end-start); - } + assign_svalues_no_free(ITEM(a), ITEM(v)+start, end-start, v->type_field); return a; } @@ -569,18 +432,10 @@ struct array *copy_array(struct array *v) { struct array *a; - a=allocate_array_no_init(v->size, 0, v->array_type); + a=allocate_array_no_init(v->size, 0); a->type_field = v->type_field; - if(v->array_type == T_MIXED) - { - assign_svalues_no_free(ITEM(a), ITEM(v), v->size); - }else{ - assign_short_svalues_no_free(SHORT_ITEM(a), - SHORT_ITEM(v), - v->array_type, - v->size); - } + assign_svalues_no_free(ITEM(a), ITEM(v), v->size, v->type_field); return a; } @@ -594,39 +449,25 @@ void check_array_for_destruct(struct array *v) INT16 types; types = 0; +#ifdef DEBUG + if(d_flag > 1) array_check_type_field(v); +#endif if(v->type_field & (BIT_OBJECT | BIT_FUNCTION)) { - if(v->array_type == T_MIXED) + for(e=0; e<v->size; e++) { - for(e=0; e<v->size; e++) - { - if((ITEM(v)[e].type == T_OBJECT || - (ITEM(v)[e].type == T_FUNCTION && ITEM(v)[e].subtype!=-1)) && - (!ITEM(v)[e].u.object->prog)) - { - free_svalue(ITEM(v)+e); - ITEM(v)[e].type=T_INT; - ITEM(v)[e].subtype=NUMBER_DESTRUCTED; - ITEM(v)[e].u.integer=0; - - types |= BIT_INT; - }else{ - types |= 1<<ITEM(v)[e].type; - } - } - }else{ - for(e=0; e<v->size; e++) + if((ITEM(v)[e].type == T_OBJECT || + (ITEM(v)[e].type == T_FUNCTION && ITEM(v)[e].subtype!=-1)) && + (!ITEM(v)[e].u.object->prog)) { - if(!SHORT_ITEM(v)[e].object) - { - types |= BIT_INT; - } - else if(!SHORT_ITEM(v)[e].object->prog) - { - free_short_svalue(SHORT_ITEM(v)+e,v->array_type); - SHORT_ITEM(v)[e].refs=0; - types |= BIT_INT; - } + free_svalue(ITEM(v)+e); + ITEM(v)[e].type=T_INT; + ITEM(v)[e].subtype=NUMBER_DESTRUCTED; + ITEM(v)[e].u.integer=0; + + types |= BIT_INT; + }else{ + types |= 1<<ITEM(v)[e].type; } } v->type_field = types; @@ -642,47 +483,28 @@ INT32 array_find_destructed_object(struct array *v) { INT32 e; TYPE_FIELD types; +#ifdef DEBUG + if(d_flag > 1) array_check_type_field(v); +#endif if(v->type_field & (BIT_OBJECT | BIT_FUNCTION)) { - if(v->array_type == T_MIXED) + types=0; + for(e=0; e<v->size; e++) { - types=0; - for(e=0; e<v->size; e++) - { - if((ITEM(v)[e].type == T_OBJECT || - (ITEM(v)[e].type == T_FUNCTION && ITEM(v)[e].subtype!=-1)) && - (!ITEM(v)[e].u.object->prog)) - return e; - types |= 1<<ITEM(v)[e].type; - } - }else{ - types=1<<(v->array_type); - for(e=0; e<v->size; e++) - { - if(SHORT_ITEM(v)[e].object) - { - if(!SHORT_ITEM(v)[e].object->prog) - return e; - }else{ - types |= BIT_INT; - } - } + if((ITEM(v)[e].type == T_OBJECT || + (ITEM(v)[e].type == T_FUNCTION && ITEM(v)[e].subtype!=-1)) && + (!ITEM(v)[e].u.object->prog)) + return e; + types |= 1<<ITEM(v)[e].type; } v->type_field = types; } +#ifdef DEBUG + if(d_flag > 1) array_check_type_field(v); +#endif return -1; } - -static short_cmpfun current_short_cmpfun; -static union anything *current_short_array_p; - -static int internal_short_cmpfun(INT32 *a,INT32 *b) -{ - return current_short_cmpfun(current_short_array_p + *a, - current_short_array_p + *b); -} - static struct svalue *current_array_p; static cmpfun current_cmpfun; @@ -691,7 +513,7 @@ static int internal_cmpfun(INT32 *a,INT32 *b) return current_cmpfun(current_array_p + *a, current_array_p + *b); } -INT32 *get_order(struct array *v, cmpfun fun,cmpfun_getter backfun) +INT32 *get_order(struct array *v, cmpfun fun) { INT32 e, *current_order; @@ -701,27 +523,16 @@ INT32 *get_order(struct array *v, cmpfun fun,cmpfun_getter backfun) current_order=(INT32 *)xalloc(v->size * sizeof(INT32)); for(e=0; e<v->size; e++) current_order[e]=e; - if(v->array_type == T_MIXED) - { - current_array_p = ITEM(v); - current_cmpfun = fun; - fsort((char *)current_order, - v->size, - sizeof(INT32), - (fsortfun)internal_cmpfun); - }else{ - current_short_array_p = SHORT_ITEM(v); - current_short_cmpfun = backfun(v->array_type); - fsort((char *)current_order, - v->size, - sizeof(INT32), - (fsortfun)internal_short_cmpfun); - } + current_array_p = ITEM(v); + current_cmpfun = fun; + fsort((char *)current_order, + v->size, + sizeof(INT32), + (fsortfun)internal_cmpfun); return current_order; } - static int set_svalue_cmpfun(struct svalue *a, struct svalue *b) { INT32 tmp; @@ -739,7 +550,9 @@ static int set_svalue_cmpfun(struct svalue *a, struct svalue *b) return a->subtype - b->subtype; case T_INT: - return a->u.integer - b->u.integer; + if(a->u.integer < b->u.integer) return -1; + if(a->u.integer > b->u.integer) return 1; + return 0; default: if(a->u.refs < b->u.refs) return -1; @@ -748,83 +561,75 @@ static int set_svalue_cmpfun(struct svalue *a, struct svalue *b) } } -static int set_anything_cmpfun_int(union anything *a, union anything *b) -{ - return a->integer - b->integer; -} - -static int set_anything_cmpfun_ptr(union anything *a, union anything *b) -{ - if(a->refs < b->refs) return -1; - if(a->refs > b->refs) return 1; - return 0; -} - -static int set_anything_cmpfun_float(union anything *a, union anything *b) -{ - if(a->float_number < b->float_number) return -1; - if(a->float_number > b->float_number) return 1; - return 0; -} - -static short_cmpfun get_set_cmpfun(TYPE_T t) +static int switch_svalue_cmpfun(struct svalue *a, struct svalue *b) { - switch(t) + if(a->type != b->type) return a->type - b->type; + switch(a->type) { - case T_FLOAT: return set_anything_cmpfun_float; - case T_INT: return set_anything_cmpfun_int; - default: return set_anything_cmpfun_ptr; - } -} - -static int switch_anything_cmpfun_string(union anything *a, union anything *b) -{ - if(!a->string || !b->string) - return set_anything_cmpfun_ptr(a,b); - return my_strcmp(a->string, b->string); -} + case T_INT: + if(a->u.integer < b->u.integer) return -1; + if(a->u.integer > b->u.integer) return 1; + return 0; + case T_FLOAT: + if(a->u.float_number < b->u.float_number) return -1; + if(a->u.float_number > b->u.float_number) return 1; + return 0; -static short_cmpfun get_switch_cmpfun(TYPE_T t) -{ - switch(t) - { - case T_INT: return set_anything_cmpfun_int; - case T_FLOAT: return set_anything_cmpfun_float; - case T_STRING: return switch_anything_cmpfun_string; + case T_STRING: + return my_strcmp(a->u.string, b->u.string); + default: - error("Illegal type in switch.\n"); - return 0; /* Make apcc happy */ + return set_svalue_cmpfun(a,b); } } -static int switch_svalue_cmpfun(struct svalue *a, struct svalue *b) +static int alpha_svalue_cmpfun(struct svalue *a, struct svalue *b) { if(a->type != b->type) return a->type - b->type; switch(a->type) { case T_INT: - return a->u.integer - b->u.integer; + if(a->u.integer < b->u.integer) return -1; + if(a->u.integer > b->u.integer) return 1; + return 0; case T_FLOAT: if(a->u.float_number < b->u.float_number) return -1; - if(a->u.float_number > b->u.float_number) return 1; + if(a->u.float_number > b->u.float_number) return 1; return 0; case T_STRING: return my_strcmp(a->u.string, b->u.string); + + case T_ARRAY: + if(a==b) return 0; + if(!a->u.array->size) return -1; + if(!b->u.array->size) return 1; + return alpha_svalue_cmpfun(ITEM(a->u.array), ITEM(b->u.array)); default: return set_svalue_cmpfun(a,b); } } +void sort_array_destructively(struct array *v) +{ + if(!v->size) return; + fsort((char *)ITEM(v), + v->size, + sizeof(struct svalue), + (fsortfun)alpha_svalue_cmpfun); +} + + + /* - * return an 'order' suitable for making mappings, lists other sets + * return an 'order' suitable for making mappings and multisets */ INT32 *get_set_order(struct array *a) { - return get_order(a, set_svalue_cmpfun, get_set_cmpfun); + return get_order(a, set_svalue_cmpfun); } /* @@ -832,76 +637,74 @@ INT32 *get_set_order(struct array *a) */ INT32 *get_switch_order(struct array *a) { - return get_order(a, switch_svalue_cmpfun, get_switch_cmpfun); + return get_order(a, switch_svalue_cmpfun); +} + + +/* + * return an 'order' suitable for sorting. + */ +INT32 *get_alpha_order(struct array *a) +{ + return get_order(a, alpha_svalue_cmpfun); } static INT32 low_lookup(struct array *v, struct svalue *s, - cmpfun fun, - cmpfun_getter backfun) + cmpfun fun) { INT32 a,b,c; int q; - if(v->array_type == T_MIXED) - { - a=0; - b=v->size; - while(b > a) - { - c=(a+b)/2; - q=fun(ITEM(v)+c,s); - - if(q < 0) - a=c+1; - else if(q > 0) - b=c; - else - return c; - } - if(a<v->size && fun(ITEM(v)+a,s)<0) a++; - return ~a; - - }else if(s->type == v->array_type || - (IS_ZERO(s) && v->array_type != T_FLOAT)){ - short_cmpfun fun; - if(IS_ZERO(s)) - MEMSET((char *)&s->u, 0, sizeof(union anything)); - fun=backfun(v->array_type); - - a=0; - b=v->size; - while(b > a) - { - c=(a+b)/2; - q=fun(SHORT_ITEM(v)+c,&s->u); - - if(q < 0) - a=c+1; - else if(q > 0) - b=c; - else - return c; - } - if(a<v->size && fun(SHORT_ITEM(v)+a,&s->u)<0) a++; - return ~a; - - }else{ - /* face it, it's not there */ - if((long)s->type < (long)v->array_type) return -1; - return ~v->size; + a=0; + b=v->size; + while(b > a) + { + c=(a+b)/2; + q=fun(ITEM(v)+c,s); + + if(q < 0) + a=c+1; + else if(q > 0) + b=c; + else + return c; } + if(a<v->size && fun(ITEM(v)+a,s)<0) a++; + return ~a; } INT32 set_lookup(struct array *a, struct svalue *s) { - return low_lookup(a,s,set_svalue_cmpfun,get_set_cmpfun); +#ifdef DEBUG + if(d_flag > 1) array_check_type_field(a); +#endif + /* face it, it's not there */ + if( (((2 << s->type) -1) & a->type_field) == 0) + return -1; + + /* face it, it's not there */ + if( ((BIT_MIXED << s->type) & BIT_MIXED & a->type_field) == 0) + return ~a->size; + + return low_lookup(a,s,set_svalue_cmpfun); } INT32 switch_lookup(struct array *a, struct svalue *s) { - return low_lookup(a,s,switch_svalue_cmpfun,get_switch_cmpfun); + /* face it, it's not there */ +#ifdef DEBUG + if(d_flag > 1) array_check_type_field(a); +#endif + if( (((2 << s->type) -1) & a->type_field) == 0) + return -1; + + /* face it, it's not there */ + if( ((BIT_MIXED << s->type) & BIT_MIXED & a->type_field) == 0) + return ~a->size; + + return low_lookup(a,s,switch_svalue_cmpfun); } @@ -910,11 +713,7 @@ INT32 switch_lookup(struct array *a, struct svalue *s) */ struct array *order_array(struct array *v, INT32 *order) { - if(v->array_type == T_MIXED) - reorder((char *)ITEM(v),v->size,sizeof(struct svalue),order); - else - reorder((char *)SHORT_ITEM(v),v->size,sizeof(union anything),order); - + reorder((char *)ITEM(v),v->size,sizeof(struct svalue),order); return v; } @@ -926,19 +725,11 @@ struct array *reorder_and_copy_array(struct array *v, INT32 *order) { INT32 e; struct array *ret; - ret=allocate_array_no_init(v->size, 0, v->array_type); + ret=allocate_array_no_init(v->size, 0); ret->type_field = v->type_field; - if(v->array_type == T_MIXED) - { - for(e=0;e<v->size;e++) - assign_svalue_no_free(ITEM(ret)+e, ITEM(v)+order[e]); - }else{ - for(e=0;e<v->size;e++) - assign_short_svalue_no_free(SHORT_ITEM(ret)+e, - SHORT_ITEM(v)+order[e], - v->array_type); - } + for(e=0;e<v->size;e++) + assign_svalue_no_free(ITEM(ret)+e, ITEM(v)+order[e]); return ret; } @@ -950,86 +741,33 @@ void array_fix_type_field(struct array *v) TYPE_FIELD t; t=0; - switch(v->array_type) - { - case T_MIXED: - for(e=0; e<v->size; e++) t |= 1 << ITEM(v)[e].type; - break; - - case T_INT: - case T_FLOAT: - t=1 << v->array_type; - break; - default: - v->type_field=1 << v->array_type; - for(e=0; e<v->size; e++) - { - if(! SHORT_ITEM(v)[e].refs) - { - t |= 1 << T_INT; - break; - } - } + for(e=0; e<v->size; e++) t |= 1 << ITEM(v)[e].type; - } +#ifdef DEBUG + if(t & ~(v->type_field)) + fatal("Type field out of order!\n"); +#endif v->type_field = t; } -/* - * Replace a large array with a small one if possible - */ -struct array *compact_array(struct array *v) +#ifdef DEBUG +/* Maybe I should have a 'clean' flag for this computation */ +void array_check_type_field(struct array *v) { - INT32 e; - int type; - struct array *ret; - if(v->array_type != T_MIXED) return v; + int e; + TYPE_FIELD t; - if(!v->size) return v; /* won't become smaller */ + t=0; - array_fix_type_field(v); + for(e=0; e<v->size; e++) t |= 1 << ITEM(v)[e].type; - type=-1; - switch(v->type_field) - { - case BIT_INT | BIT_STRING: type=T_STRING; goto check_possible; - case BIT_INT | BIT_ARRAY: type=T_ARRAY; goto check_possible; - case BIT_INT | BIT_MAPPING: type=T_MAPPING; goto check_possible; - case BIT_INT | BIT_LIST: type=T_LIST; goto check_possible; - case BIT_INT | BIT_OBJECT: type=T_OBJECT; goto check_possible; - case BIT_INT | BIT_PROGRAM: type=T_PROGRAM; - - check_possible: - for(e=0; e<v->size; e++) - if(ITEM(v)[e].type == T_INT) - if(ITEM(v)[e].u.integer != 0) - return v; - - goto do_compact; - - case BIT_INT: type=T_INT; goto do_compact; - case BIT_FLOAT: type=T_FLOAT; goto do_compact; - case BIT_STRING: type=T_STRING; goto do_compact; - case BIT_ARRAY: type=T_ARRAY; goto do_compact; - case BIT_MAPPING: type=T_MAPPING; goto do_compact; - case BIT_LIST: type=T_LIST; goto do_compact; - case BIT_OBJECT: type=T_OBJECT; goto do_compact; - case BIT_PROGRAM: type=T_PROGRAM; goto do_compact; - - do_compact: - ret=allocate_array_no_init(v->size, 0, type); - for(e=0; e<v->size; e++) - assign_to_short_svalue_no_free(SHORT_ITEM(ret)+e, - type, - ITEM(v)+e); - free_array(v); - return ret; - - default: - return v; - } + if(t & ~(v->type_field)) + fatal("Type field out of order!\n"); } +#endif + +struct array *compact_array(struct array *v) { return v; } /* * Get a pointer to the 'union anything' specified IF it is of the specified @@ -1039,13 +777,7 @@ union anything *low_array_get_item_ptr(struct array *a, INT32 ind, TYPE_T t) { - if(a->array_type == T_MIXED) - { - if(ITEM(a)[ind].type == t) - return & (ITEM(a)[ind].u); - }else if(a->array_type == t){ - return SHORT_ITEM(a)+ind; - } + if(ITEM(a)[ind].type == t) return & (ITEM(a)[ind].u); return 0; } @@ -1080,6 +812,13 @@ INT32 * merge(struct array *a,struct array *b,INT32 opcode) INT32 ap,bp,i,*ret,*ptr; ap=bp=0; +#ifdef DEBUG + if(d_flag > 1) + { + array_check_type_field(a); + array_check_type_field(b); + } +#endif if(!(a->type_field & b->type_field)) { /* do smart optimizations */ @@ -1100,85 +839,21 @@ INT32 * merge(struct array *a,struct array *b,INT32 opcode) ptr=ret=(INT32 *)xalloc(sizeof(INT32)*(a->size + b->size + 1)); ptr++; - if(a->array_type == T_MIXED && b->array_type == T_MIXED) - { - while(ap < a->size && bp < b->size) - { - i=set_svalue_cmpfun(ITEM(a)+ap,ITEM(b)+bp); - if(i < 0) - i=opcode >> 8; - else if(i > 0) - i=opcode; - else - i=opcode >> 4; - if(i & OP_A) *(ptr++)=ap; - if(i & OP_B) *(ptr++)=~bp; - if(i & OP_SKIP_A) ap++; - if(i & OP_SKIP_B) bp++; - } - }else if(a->array_type == b->array_type) + while(ap < a->size && bp < b->size) { - short_cmpfun short_alist_cmp; - short_alist_cmp=get_set_cmpfun(a->array_type); - while(ap < a->size && bp < b->size) - { - i=short_alist_cmp(SHORT_ITEM(a)+ap,SHORT_ITEM(b)+bp); - if(i < 0) - i=opcode >> 8; - else if(i > 0) - i=opcode; - else - i=opcode >> 4; - - if(i & OP_A) *(ptr++)=ap; - if(i & OP_B) *(ptr++)=~bp; - if(i & OP_SKIP_A) ap++; - if(i & OP_SKIP_B) bp++; - } - }else{ - struct svalue sa,sb; - while(ap < a->size && bp < b->size) - { - if(a->array_type == T_MIXED) - { - sa=ITEM(a)[ap]; - }else{ - sa.u = SHORT_ITEM(a)[ap]; - if(!sa.u.refs ) - { - if( (sa.type=a->array_type) != T_FLOAT) sa.type=T_INT; - }else{ - sa.type=a->array_type; - } - } - - if(b->array_type == T_MIXED) - { - sb=ITEM(b)[bp]; - }else{ - sb.u=SHORT_ITEM(b)[bp]; - if(!sb.u.refs) - { - if( (sb.type=b->array_type) != T_FLOAT) sb.type=T_INT; - }else{ - sb.type=b->array_type; - } - } - - i=set_svalue_cmpfun(&sa, &sb); - if(i < 0) - i=opcode >> 8; - else if(i > 0) - i=opcode; - else - i=opcode >> 4; - - if(i & OP_A) *(ptr++)=ap; - if(i & OP_B) *(ptr++)=~bp; - if(i & OP_SKIP_A) ap++; - if(i & OP_SKIP_B) bp++; - } + i=set_svalue_cmpfun(ITEM(a)+ap,ITEM(b)+bp); + if(i < 0) + i=opcode >> 8; + else if(i > 0) + i=opcode; + else + i=opcode >> 4; + + if(i & OP_A) *(ptr++)=ap; + if(i & OP_B) *(ptr++)=~bp; + if(i & OP_SKIP_A) ap++; + if(i & OP_SKIP_B) bp++; } if((opcode >> 8) & OP_A) while(ap<a->size) *(ptr++)=ap++; @@ -1200,60 +875,14 @@ struct array *array_zip(struct array *a, struct array *b,INT32 *zipper) size=zipper[0]; zipper++; - if(a->array_type == T_MIXED && b->array_type == T_MIXED) - { - ret=allocate_array_no_init(size,0, T_MIXED); - for(e=0; e<size; e++) - { - if(*zipper >= 0) - assign_svalue_no_free(ITEM(ret)+e, ITEM(a)+*zipper); - else - assign_svalue_no_free(ITEM(ret)+e, ITEM(b)+~*zipper); - zipper++; - } - }else if(a->array_type == b->array_type) + ret=allocate_array_no_init(size,0); + for(e=0; e<size; e++) { - ret=allocate_array_no_init(size, 0, a->array_type); - for(e=0; e<size; e++) - { - if(*zipper >= 0) - { - assign_short_svalue_no_free(SHORT_ITEM(ret)+e, - SHORT_ITEM(a)+*zipper, - a->array_type); - }else{ - assign_short_svalue_no_free(SHORT_ITEM(ret)+e, - SHORT_ITEM(b)+~*zipper, - b->array_type); - } - zipper++; - } - }else{ - ret=allocate_array_no_init(size, 0, T_MIXED); - for(e=0; e<size; e++) - { - if(*zipper >= 0) - { - if(a->array_type == T_MIXED) - { - assign_svalue_no_free(ITEM(ret)+e, ITEM(a)+*zipper); - }else{ - assign_from_short_svalue_no_free(ITEM(ret)+e, - SHORT_ITEM(a)+*zipper, - a->array_type); - } - }else{ - if(b->array_type == T_MIXED) - { - assign_svalue(ITEM(ret)+e, ITEM(a)+*zipper); - }else{ - assign_from_short_svalue_no_free(ITEM(ret)+e, - SHORT_ITEM(b)+~*zipper, - b->array_type); - } - } - zipper++; - } + if(*zipper >= 0) + assign_svalue_no_free(ITEM(ret)+e, ITEM(a)+*zipper); + else + assign_svalue_no_free(ITEM(ret)+e, ITEM(b)+~*zipper); + zipper++; } ret->type_field = a->type_field | b->type_field; return ret; @@ -1263,20 +892,11 @@ struct array *add_arrays(struct svalue *argp, INT32 args) { INT32 e, size; struct array *v; - TYPE_T array_type; - array_type=args ? argp[0].u.array->array_type : T_MIXED; - for(size=e=0; e<args; e++) - { - check_array_for_destruct(argp[e].u.array); + for(size=e=0;e<args;e++) size+=argp[e].u.array->size; - if(array_type != argp[e].u.array->array_type) - array_type=T_MIXED; - } - if(args && - argp[0].u.array->refs==1 && - argp[0].u.array->array_type == array_type) + if(args && argp[0].u.array->refs==1) { e=argp[0].u.array->size; v=resize_array(argp[0].u.array, size); @@ -1284,38 +904,19 @@ struct array *add_arrays(struct svalue *argp, INT32 args) size=e; e=1; }else{ - v=allocate_array_no_init(size, 0, array_type); + v=allocate_array_no_init(size, 0); v->type_field=0; e=size=0; } - if(array_type == T_MIXED) + + for(; e<args; e++) { - for(; e<args; e++) - { - v->type_field|=argp[e].u.array->type_field; - if(argp[e].u.array->array_type == T_MIXED) - { - assign_svalues_no_free(ITEM(v)+size, - ITEM(argp[e].u.array), - argp[e].u.array->size); - }else{ - assign_from_short_svalues_no_free(ITEM(v)+size, - SHORT_ITEM(argp[e].u.array), - argp[e].u.array->array_type, - argp[e].u.array->size); - } - size+=argp[e].u.array->size; - } - }else{ - for(;e<args;e++) - { - v->type_field |= argp[e].u.array->type_field; - assign_short_svalues_no_free(SHORT_ITEM(v)+size, - SHORT_ITEM(argp[e].u.array), - argp[e].u.array->array_type, - argp[e].u.array->size); - size+=argp[e].u.array->size; - } + v->type_field|=argp[e].u.array->type_field; + assign_svalues_no_free(ITEM(v)+size, + ITEM(argp[e].u.array), + argp[e].u.array->size, + argp[e].u.array->type_field); + size+=argp[e].u.array->size; } return v; @@ -1328,6 +929,21 @@ int array_equal_p(struct array *a, struct array *b, struct processing *p) if(a == b) return 1; if(a->size != b->size) return 0; + if(!a->size) return 1; + +#ifdef DEBUG + if(d_flag > 1) + { + array_check_type_field(a); + array_check_type_field(b); + } +#endif + + /* This could be done much better if I KNEW that + * the type fields didn't contain types that + * really aren't in the array + */ + if(!(a->type_field & b->type_field)) return 0; curr.pointer_a = a; curr.pointer_b = b; @@ -1337,46 +953,10 @@ int array_equal_p(struct array *a, struct array *b, struct processing *p) if(p->pointer_a == (void *)a && p->pointer_b == (void *)b) return 1; - if(a->array_type == T_MIXED && b->array_type==T_MIXED) - { - for(e=0; e<a->size; e++) - if(!low_is_equal(ITEM(a)+e, ITEM(b)+e, &curr)) - return 0; - }else{ - for(e=0; e<a->size; e++) - { - struct svalue sa,sb; + for(e=0; e<a->size; e++) + if(!low_is_equal(ITEM(a)+e, ITEM(b)+e, &curr)) + return 0; - if(a->array_type == T_MIXED) - { - sa=ITEM(a)[e]; - }else{ - sa.u=SHORT_ITEM(a)[e]; - if(!sa.u.refs) - { - if( (sa.type=a->array_type) != T_FLOAT) sa.type=T_INT; - }else{ - sa.type=a->array_type; - } - } - - if(b->array_type == T_MIXED) - { - sb=ITEM(b)[e]; - }else{ - sb.u=SHORT_ITEM(b)[e]; - if(!sb.u.refs) - { - if( (sb.type=b->array_type) != T_FLOAT) sb.type=T_INT; - }else{ - sb.type=b->array_type; - } - } - - if(!low_is_equal(&sa, &sb, &curr)) - return 0; - } - } return 1; } @@ -1472,6 +1052,14 @@ struct array *merge_array_without_order(struct array *a, /* subtract an array from another */ struct array *subtract_arrays(struct array *a, struct array *b) { +#ifdef DEBUG + if(d_flag > 1) + { + array_check_type_field(a); + array_check_type_field(b); + } +#endif + if(a->type_field & b->type_field) { return merge_array_with_order(a, b, OP_SUB); @@ -1488,18 +1076,26 @@ struct array *subtract_arrays(struct array *a, struct array *b) /* and two arrays */ struct array *and_arrays(struct array *a, struct array *b) { +#ifdef DEBUG + if(d_flag > 1) + { + array_check_type_field(a); + array_check_type_field(b); + } +#endif + if(a->type_field & b->type_field) { return merge_array_without_order(a, b, OP_AND); }else{ - return allocate_array_no_init(0,0,T_MIXED); + return allocate_array_no_init(0,0); } } int check_that_array_is_constant(struct array *a) { array_fix_type_field(a); - if(a->type_field & ((1 << T_FUNCTION) | (1 << T_OBJECT))) + if(a->type_field & (BIT_FUNCTION | BIT_OBJECT)) return 0; return 1; } @@ -1507,53 +1103,21 @@ int check_that_array_is_constant(struct array *a) node *make_node_from_array(struct array *a) { struct svalue s; - char *str; INT32 e; array_fix_type_field(a); - if(a->type_field == (1 << T_INT)) + if(a->type_field == BIT_INT) { - if(a->array_type == T_MIXED) - { - for(e=0; e<a->size; e++) - if(ITEM(a)[e].u.integer != 0) - break; - if(e == a->size) - { - return mkefuncallnode("allocate", - mknode(F_ARG_LIST, - mkintnode(a->size), - mkstrnode(make_shared_string("mixed")) - )); - } - }else{ - e=a->size; - switch(a->array_type) - { - case T_INT: - str="int"; - for(e=0; e<a->size; e++) - if(SHORT_ITEM(a)[e].integer != 0) - break; + for(e=0; e<a->size; e++) + if(ITEM(a)[e].u.integer != 0) break; - case T_FLOAT: str="float"; break; - case T_STRING: str="string"; break; - case T_ARRAY: str="array"; break; - case T_LIST: str="list"; break; - case T_MAPPING: str="mapping"; break; - case T_OBJECT: str="object"; break; - case T_FUNCTION: str="function"; break; - case T_PROGRAM: str="program"; break; - default: str="mixed"; - } - if(e==a->size) - { - return mkefuncallnode("allocate", - mknode(F_ARG_LIST, - mkintnode(a->size), - mkstrnode(make_shared_string(str)) - )); - } + if(e == a->size) + { + return mkefuncallnode("allocate", + mknode(F_ARG_LIST, + mkintnode(a->size), + mkstrnode(make_shared_string("mixed")) + )); } } if(check_that_array_is_constant(a)) @@ -1564,81 +1128,39 @@ node *make_node_from_array(struct array *a) return mkconstantsvaluenode(&s); }else{ node *ret=0; - if(a->array_type == T_MIXED) - { - for(e=0; e<a->size; e++) - ret=mknode(F_ARG_LIST,ret,mksvaluenode(ITEM(a)+e)); - }else{ - s.type=a->array_type; - s.subtype=0; - for(e=0; e<a->size; e++) - { - s.u=SHORT_ITEM(a)[e]; - if(s.u.refs) - { - ret=mknode(F_ARG_LIST,ret,mksvaluenode(&s)); - }else{ - ret=mknode(F_ARG_LIST,ret,mkintnode(0)); - } - } - } + for(e=0; e<a->size; e++) + ret=mknode(F_ARG_LIST,ret,mksvaluenode(ITEM(a)+e)); return mkefuncallnode("aggregate",ret); } } void push_array_items(struct array *a) { - if(sp + a->size >= &evaluator_stack[EVALUATOR_STACK_SIZE]) - error("Array does not fit on stack.\n"); + check_stack(a->size); check_array_for_destruct(a); - if(a->array_type == T_MIXED) + if(a->refs == 1) { - if(a->refs == 1) - { - MEMCPY(sp,ITEM(a),sizeof(struct svalue)*a->size); - sp += a->size; - a->size=0; - free_array(a); - return; - }else{ - assign_svalues_no_free(sp, ITEM(a), a->size); - } + MEMCPY(sp,ITEM(a),sizeof(struct svalue)*a->size); + sp += a->size; + a->size=0; + free_array(a); }else{ - assign_from_short_svalues_no_free(sp, SHORT_ITEM(a), a->array_type, a->size); + assign_svalues_no_free(sp, ITEM(a), a->size, a->type_field); + sp += a->size; + free_array(a); } - sp += a->size; - free_array(a); } void describe_array_low(struct array *a, struct processing *p, int indent) { INT32 e,d; indent += 2; - if(a->array_type == T_MIXED) + + for(e=0; e<a->size; e++) { - for(e=0; e<a->size; e++) - { - if(e) my_strcat(",\n"); - for(d=0; d<indent; d++) my_putchar(' '); - describe_svalue(ITEM(a)+e,indent,p); - } - }else{ - struct svalue s; - for(e=0; e<a->size; e++) - { - if(e) my_strcat(",\n"); - for(d=0; d<indent; d++) my_putchar(' '); - if(SHORT_ITEM(a)[e].refs) - { - s.type=a->array_type; - s.u=SHORT_ITEM(a)[e]; - }else{ - s.type=T_INT; - s.subtype=NUMBER_NUMBER; - s.u.integer=0; - } - describe_svalue(&s, indent, p); - } + if(e) my_strcat(",\n"); + for(d=0; d<indent; d++) my_putchar(' '); + describe_svalue(ITEM(a)+e,indent,p); } } @@ -1657,22 +1179,7 @@ void describe_index(struct array *a, struct processing *p, int indent) { - if(a->array_type == T_MIXED) - { - describe_svalue(ITEM(a)+e, indent, p); - }else{ - struct svalue s; - if(SHORT_ITEM(a)[e].refs) - { - s.type=a->array_type; - s.u=SHORT_ITEM(a)[e]; - }else{ - s.type=T_INT; - s.subtype=NUMBER_NUMBER; - s.u.integer=0; - } - describe_svalue(&s, indent, p); - } + describe_svalue(ITEM(a)+e, indent, p); } @@ -1680,7 +1187,7 @@ void describe_array(struct array *a,struct processing *p,int indent) { struct processing doing; INT32 e; - char buf[40]; + char buf[60]; if(! a->size) { my_strcat("({ })"); @@ -1707,143 +1214,90 @@ void describe_array(struct array *a,struct processing *p,int indent) my_strcat("})"); } -struct array *aggregate_array(INT32 args, TYPE_T type) +struct array *aggregate_array(INT32 args) { struct array *a; - a=allocate_array_no_init(args,0,type); - if(type == T_MIXED) - { - MEMCPY((char *)ITEM(a),(char *)(sp-args),args*sizeof(struct svalue)); - a->type_field=BIT_MIXED; - sp-=args; - }else{ - struct svalue *save_sp; - save_sp=sp; - while(--args >= 0) - { - sp--; - if(sp->type == type) - { - SHORT_ITEM(a)[args].refs = sp->u.refs; - }else if(IS_ZERO(sp)){ - SHORT_ITEM(a)[args].refs = 0; - }else{ - sp=save_sp; - array_free_no_free(a); - error("Bad type when constructing array.\n"); - } - } - } + a=allocate_array_no_init(args,0); + MEMCPY((char *)ITEM(a),(char *)(sp-args),args*sizeof(struct svalue)); + a->type_field=BIT_MIXED; + sp-=args; return a; } -struct array *explode(struct lpc_string *str, - struct lpc_string *del) +struct array *explode(struct pike_string *str, + struct pike_string *del) { - INT32 e,d; + INT32 e; struct array *ret; char *s, *end, *tmp; if(!del->len) { - ret=allocate_array_no_init(str->len,0,T_STRING); - ret->type_field |= 1<<T_STRING; + ret=allocate_array_no_init(str->len,0); for(e=0;e<str->len;e++) - SHORT_ITEM(ret)[e].string=make_shared_binary_string(str->str+e,1); + { + ITEM(ret)[e].type=T_STRING; + ITEM(ret)[e].u.string=make_shared_binary_string(str->str+e,1); + } }else{ - + struct mem_searcher searcher; + s=str->str; end=s+str->len; e=0; - - while((s=MEMMEM(del->str, del->len, s, end-s))) - { - s+=del->len; - e++; - } - - ret=allocate_array_no_init(e+1,0,T_STRING); - ret->type_field |= 1<<T_STRING; - - s=str->str; - for(d=0;d<e;d++) + + init_memsearch(&searcher, del->str, del->len, str->len); + + while(tmp=memory_search(&searcher, s, end-s)) { - tmp=MEMMEM((char *)(del->str), del->len, (char *)s, end-s); - SHORT_ITEM(ret)[d].string=make_shared_binary_string(s,tmp-s); + check_stack(1); + push_string(make_shared_binary_string(s, tmp-s)); s=tmp+del->len; + e++; } - SHORT_ITEM(ret)[d].string=make_shared_binary_string(s,end-s); + check_stack(1); + push_string(make_shared_binary_string(s, end-s)); + e++; + ret=aggregate_array(e); } + ret->type_field=BIT_STRING; return ret; } -struct lpc_string *implode(struct array *a,struct lpc_string *del) +struct pike_string *implode(struct array *a,struct pike_string *del) { INT32 len,e, inited; char *r; - struct lpc_string *ret,*tmp; + struct pike_string *ret,*tmp; len=0; - if(a->array_type==T_STRING) - { - for(e=0;e<a->size;e++) - if(SHORT_ITEM(a)[e].string) - len+=SHORT_ITEM(a)[e].string->len + del->len; - if(len) len-=del->len; - - ret=begin_shared_string(len); - r=ret->str; - inited=0; - for(e=0;e<a->size;e++) - { - if(SHORT_ITEM(a)[e].string) - { - if(inited) - { - MEMCPY(r,del->str,del->len); - r+=del->len; - } - inited=1; - tmp=SHORT_ITEM(a)[e].string; - MEMCPY(r,tmp->str,tmp->len); - r+=tmp->len; - len++; - } - } - return end_shared_string(ret); - } - if(a->array_type==T_MIXED) + for(e=0;e<a->size;e++) + if(ITEM(a)[e].type==T_STRING) + len+=ITEM(a)[e].u.string->len + del->len; + if(len) len-=del->len; + + ret=begin_shared_string(len); + r=ret->str; + inited=0; + for(e=0;e<a->size;e++) { - for(e=0;e<a->size;e++) - if(ITEM(a)[e].type==T_STRING) - len+=ITEM(a)[e].u.string->len + del->len; - if(len) len-=del->len; - - ret=begin_shared_string(len); - r=ret->str; - inited=0; - for(e=0;e<a->size;e++) + if(ITEM(a)[e].type==T_STRING) { - if(ITEM(a)[e].type==T_STRING) + if(inited) { - if(inited) - { - MEMCPY(r,del->str,del->len); - r+=del->len; - } - inited=1; - tmp=ITEM(a)[e].u.string; - MEMCPY(r,tmp->str,tmp->len); - r+=tmp->len; - len++; + MEMCPY(r,del->str,del->len); + r+=del->len; } + inited=1; + tmp=ITEM(a)[e].u.string; + MEMCPY(r,tmp->str,tmp->len); + r+=tmp->len; + len++; } - return end_shared_string(ret); } - - return make_shared_string(""); + return end_shared_string(ret); } struct array *copy_array_recursively(struct array *a,struct processing *p) @@ -1863,44 +1317,30 @@ struct array *copy_array_recursively(struct array *a,struct processing *p) } } - ret=allocate_array_no_init(a->size,0,a->array_type); + ret=allocate_array_no_init(a->size,0); doing.pointer_b=(void *)ret; - if(a->array_type == T_MIXED) - { - copy_svalues_recursively_no_free(ITEM(ret),ITEM(a),a->size,&doing); - }else{ - copy_short_svalues_recursively_no_free(SHORT_ITEM(ret), - SHORT_ITEM(a), - a->array_type, - a->size,&doing); - } + + copy_svalues_recursively_no_free(ITEM(ret),ITEM(a),a->size,&doing); return ret; } void apply_array(struct array *a, INT32 args) { - struct svalue *argp; INT32 e; struct array *ret; - argp=sp-args; - if(a->array_type == T_MIXED) + INT32 argp; + + argp=sp-args - evaluator_stack; + + check_stack(a->size + args + 1); + + for(e=0;e<a->size;e++) { - for(e=0;e<a->size;e++) - { - assign_svalues_no_free(sp,argp,args); - sp+=args; - apply_svalue(ITEM(a)+e,args); - } - }else{ - for(e=0;e<a->size;e++) - { - array_index_no_free(sp++,a,e); - assign_svalues_no_free(sp,argp,args); - sp+=args; - f_call_function(args+1); - } + assign_svalues_no_free(sp,evaluator_stack+argp,args,BIT_MIXED); + sp+=args; + apply_svalue(ITEM(a)+e,args); } - ret=aggregate_array(a->size,T_MIXED); + ret=aggregate_array(a->size); pop_n_elems(args); push_array(ret); } @@ -1909,17 +1349,11 @@ struct array *reverse_array(struct array *a) { INT32 e; struct array *ret; - ret=allocate_array_no_init(a->size,0,a->array_type); - if(a->array_type == T_MIXED) - { - for(e=0;e<a->size;e++) - assign_svalue_no_free(ITEM(ret)+e,ITEM(a)+a->size+~e); - }else{ - for(e=0;e<a->size;e++) - assign_short_svalue_no_free(SHORT_ITEM(ret)+e, - SHORT_ITEM(a)+a->size+~e, - a->array_type); - } + + /* FIXME: Check refs so we might optimize */ + ret=allocate_array_no_init(a->size,0); + for(e=0;e<a->size;e++) + assign_svalue_no_free(ITEM(ret)+e,ITEM(a)+a->size+~e); return ret; } @@ -1933,20 +1367,9 @@ void array_replace(struct array *a, } #ifdef DEBUG -void check_array(struct array *a, int pass) +void check_array(struct array *a) { INT32 e; - if(pass) - { - e=checked((void *)a,0); - if(e!=a->refs) - { - simple_describe_array(a); - fatal("Above array has wrong number of references. (%ld != %ld)\n", - (long)e,(long)a->refs); - } - return; - } if(a->next->prev != a) fatal("Array check: a->next->prev != a\n"); @@ -1957,48 +1380,155 @@ void check_array(struct array *a, int pass) if(a->refs <=0 ) fatal("Array has zero refs.\n"); - if(a->array_type == T_MIXED) - { - for(e=0;e<a->size;e++) - { - if(! ( (1 << ITEM(a)[e].type) & (a->type_field) )) - fatal("Type field lies.\n"); - - check_svalue(ITEM(a)+e); - } - } - else if(a->array_type <= MAX_TYPE) - { - if(a->type_field & ~(BIT_INT | (1<<a->array_type))) - fatal("Type field in short array lies!\n"); - - for(e=0;e<a->size;e++) - check_short_svalue(SHORT_ITEM(a)+e,a->array_type); - } - else + for(e=0;e<a->size;e++) { - fatal("Array type out of range.\n"); + if(! ( (1 << ITEM(a)[e].type) & (a->type_field) )) + fatal("Type field lies.\n"); + + check_svalue(ITEM(a)+e); } } -void check_all_arrays(int pass) +void check_all_arrays() { struct array *a; a=&empty_array; do { - check_array(a, pass); + check_array(a); a=a->next; if(!a) fatal("Null pointer in array list.\n"); } while (a != & empty_array); +} +#endif /* DEBUG */ + +#ifdef GC2 + +void gc_mark_array_as_referenced(struct array *a) +{ + if(gc_mark(a)) + if(a->type_field & BIT_COMPLEX) + gc_mark_svalues(ITEM(a), a->size); +} + +void gc_check_all_arrays() +{ + struct array *a; + a=&empty_array; + do + { +#ifdef DEBUG + if(d_flag > 1) array_check_type_field(a); +#endif + if(a->type_field & BIT_COMPLEX) + { + TYPE_FIELD t; + t=gc_check_svalues(ITEM(a), a->size); + + /* Ugly, but we are not allowed to change type_field + * at the same time as the array is being built... + * Actually we just need beter primitives for building arrays. + */ + if(!(a->type_field & BIT_UNFINISHED) || a->refs!=1) + a->type_field = t; + else + a->type_field |= t; + } + + a=a->next; + } while (a != & empty_array); +} + + +void gc_mark_all_arrays() +{ + struct array *a; + + a=&empty_array; + do + { + if(gc_is_referenced(a)) + gc_mark_array_as_referenced(a); + + a=a->next; + } while (a != & empty_array); +} - if(!pass) +void gc_free_all_unreferenced_arrays() +{ + struct array *a,*next; + + a=&empty_array; + do { - checked((void *)&empty_array,1); - } + if(gc_do_free(a)) + { + a->refs++; + free_svalues(ITEM(a), a->size, a->type_field); + a->size=0; + + if(!(next=a->next)) + fatal("Null pointer in array list.\n"); + + free_array(a); + a=next; + }else{ + a=a->next; + } + } while (a != & empty_array); +} + + +#endif /* GC2 */ + +#ifdef DEBUG + +void debug_dump_type_field(TYPE_FIELD t) +{ + int e; + for(e=0;e<MAX_TYPE;e++) + if(t & (1<<e)) + fprintf(stderr," %s",get_name_of_type(e)); + + for(;e<16;e++) + if(t & (1<<e)) + fprintf(stderr," <%d>",e); +} + +void debug_dump_array(struct array *a) +{ + fprintf(stderr,"Refs=%d, next=%p, prev=%p, size=%d, malloced_size=%d\n", + a->refs, + a->next, + a->prev, + a->size, + a->malloced_size); + fprintf(stderr,"Type field = "); + debug_dump_type_field(a->type_field); + fprintf(stderr,"\n"); + simple_describe_array(a); } #endif + +void zap_all_arrays() +{ + struct array *a,*next; + + a=&empty_array; + do + { + a->refs++; + free_svalues(ITEM(a), a->size, a->type_field); + a->size=0; + + if(!(next=a->next)) + fatal("Null pointer in array list.\n"); + + free_array(a); + a=next; + } while (a != & empty_array); +} diff --git a/src/array.h b/src/array.h index 9cd029f2f557f83c32e5c21995d3f1bb26d12d20..8e31a29fd382510ce0eb620422861e06d30bff26 100644 --- a/src/array.h +++ b/src/array.h @@ -1,6 +1,6 @@ /*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ #ifndef ARRAY_H @@ -20,27 +20,13 @@ struct array * Bits can be set that don't exist in the array * though. */ - TYPE_T array_type; /* This is T_MIXED for a mixed array, or the type for - * an array that can only contain one type. - */ - INT8 flags; /* flags, like gc_cycle */ -}; - -struct array_of_svalues -{ - struct array array; struct svalue item[1]; }; -struct array_of_short_svalues -{ - struct array array; - union anything item[1]; -}; -#define ITEM(X) (((struct array_of_svalues *)(X))->item) -#define SHORT_ITEM(X) (((struct array_of_short_svalues *)(X))->item) +extern struct array empty_array; +#define ITEM(X) ((X)->item) /* These are arguments for the function 'merge' which merges two sorted * set stored in arrays in the way you specify @@ -62,6 +48,8 @@ struct array_of_short_svalues #define free_array(V) do{ struct array *v_=(V); if(!--v_->refs) really_free_array(v_); }while(0) +#define allocate_array(X) low_allocate_array((X),0) +#define allocate_array_no_init(X,Y) low_allocate_array((X),(Y)) typedef int (*cmpfun)(struct svalue *,struct svalue *); typedef int (*short_cmpfun)(union anything *, union anything *); @@ -69,8 +57,7 @@ typedef short_cmpfun (*cmpfun_getter)(TYPE_T); /* Prototypes begin here */ -struct array *allocate_array_no_init(INT32 size,INT32 extra_space,TYPE_T type); -struct array *allocate_array(INT32 size,TYPE_T type); +struct array *low_allocate_array(INT32 size,INT32 extra_space); void really_free_array(struct array *v); void array_index_no_free(struct svalue *s,struct array *v,INT32 index); void array_index(struct svalue *s,struct array *v,INT32 index); @@ -87,14 +74,17 @@ struct array *slice_array(struct array *v,INT32 start,INT32 end); struct array *copy_array(struct array *v); void check_array_for_destruct(struct array *v); INT32 array_find_destructed_object(struct array *v); -INT32 *get_order(struct array *v, cmpfun fun,cmpfun_getter backfun); +INT32 *get_order(struct array *v, cmpfun fun); +void sort_array_destructively(struct array *v); INT32 *get_set_order(struct array *a); INT32 *get_switch_order(struct array *a); +INT32 *get_alpha_order(struct array *a); INT32 set_lookup(struct array *a, struct svalue *s); INT32 switch_lookup(struct array *a, struct svalue *s); struct array *order_array(struct array *v, INT32 *order); struct array *reorder_and_copy_array(struct array *v, INT32 *order); void array_fix_type_field(struct array *v); +void array_check_type_field(struct array *v); struct array *compact_array(struct array *v); union anything *low_array_get_item_ptr(struct array *a, INT32 ind, @@ -122,17 +112,22 @@ void describe_index(struct array *a, struct processing *p, int indent); void describe_array(struct array *a,struct processing *p,int indent); -struct array *aggregate_array(INT32 args, TYPE_T type); -struct array *explode(struct lpc_string *str, - struct lpc_string *del); -struct lpc_string *implode(struct array *a,struct lpc_string *del); +struct array *aggregate_array(INT32 args); +struct array *explode(struct pike_string *str, + struct pike_string *del); +struct pike_string *implode(struct array *a,struct pike_string *del); struct array *copy_array_recursively(struct array *a,struct processing *p); void apply_array(struct array *a, INT32 args); struct array *reverse_array(struct array *a); void array_replace(struct array *a, struct svalue *from, struct svalue *to); +void check_array(struct array *a); void check_all_arrays(); +void gc_mark_array_as_referenced(struct array *a); +void gc_check_all_arrays(); +void gc_mark_all_arrays(); +void gc_free_all_unreferenced_arrays(); /* Prototypes end here */ diff --git a/src/backend.c b/src/backend.c index f3a47a4d036a83a35dc66af00932052a742e9260..03fe4536e4fe0eaa19de13964e2a0006921a4348 100644 --- a/src/backend.c +++ b/src/backend.c @@ -1,25 +1,20 @@ /*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ #include "global.h" +#include "backend.h" #include <errno.h> #include <sys/types.h> -#ifdef HAVE_SYS_TIME_H -#include <sys/time.h> -#endif #include <sys/param.h> #include <string.h> #include "interpret.h" #include "object.h" #include "types.h" #include "error.h" -#include "call_out.h" -#include "backend.h" #include "fd_control.h" #include "main.h" -#include "debug.h" #include "callback.h" #ifdef HAVE_SYS_SELECT_H @@ -37,19 +32,22 @@ struct selectors static struct selectors selectors; -callback read_callback[MAX_OPEN_FILEDESCRIPTORS]; +file_callback read_callback[MAX_OPEN_FILEDESCRIPTORS]; void *read_callback_data[MAX_OPEN_FILEDESCRIPTORS]; -callback write_callback[MAX_OPEN_FILEDESCRIPTORS]; +file_callback write_callback[MAX_OPEN_FILEDESCRIPTORS]; void *write_callback_data[MAX_OPEN_FILEDESCRIPTORS]; static int max_fd; -time_t current_time; +struct timeval current_time; +struct timeval next_timeout; -static struct callback_list *backend_callbacks; +static struct callback *backend_callbacks = 0; -struct callback_list *add_backend_callback(struct array *a) +struct callback *add_backend_callback(callback_func call, + void *arg, + callback_func free_func) { - return add_to_callback_list(&backend_callbacks, a); + return add_to_callback(&backend_callbacks, call, arg, free_func); } void init_backend() @@ -58,7 +56,7 @@ void init_backend() FD_ZERO(&selectors.write); } -void set_read_callback(int fd,callback cb,void *data) +void set_read_callback(int fd,file_callback cb,void *data) { #ifdef DEBUG if(fd<0 || fd>=MAX_OPEN_FILEDESCRIPTORS) @@ -87,7 +85,7 @@ void set_read_callback(int fd,callback cb,void *data) } } -void set_write_callback(int fd,callback cb,void *data) +void set_write_callback(int fd,file_callback cb,void *data) { #ifdef DEBUG if(fd<0 || fd>=MAX_OPEN_FILEDESCRIPTORS) @@ -116,7 +114,7 @@ void set_write_callback(int fd,callback cb,void *data) } } -callback query_read_callback(int fd) +file_callback query_read_callback(int fd) { #ifdef DEBUG if(fd<0 || fd>=MAX_OPEN_FILEDESCRIPTORS) @@ -126,7 +124,7 @@ callback query_read_callback(int fd) return read_callback[fd]; } -callback query_write_callback(int fd) +file_callback query_write_callback(int fd) { #ifdef DEBUG if(fd<0 || fd>=MAX_OPEN_FILEDESCRIPTORS) @@ -157,40 +155,21 @@ void *query_write_callback_data(int fd) } #ifdef DEBUG -void do_debug(int check_refs) +void do_debug() { - extern void check_all_arrays(int); - extern void check_all_mappings(int); - extern void check_all_programs(int); - extern void check_all_objects(int); - extern void verify_shared_strings_tables(int); - extern void slow_check_stack(int); - -#if 0 - if(d_flag>1) - init_checked(); -#endif - - slow_check_stack(0); - check_all_arrays(0); - check_all_mappings(0); - check_all_programs(0); - verify_all_objects(0); - verify_shared_strings_tables(0); - verify_all_call_outs(); - -#if 0 - if(d_flag>1) - { - check_all_arrays(1); - check_all_mappings(1); - check_all_programs(1); - verify_all_objects(1); - verify_shared_strings_tables(1); - exit_checked(); - } -#endif - + extern void check_all_arrays(); + extern void check_all_mappings(); + extern void check_all_programs(); + extern void check_all_objects(); + extern void verify_shared_strings_tables(); + extern void slow_check_stack(); + + slow_check_stack(); + check_all_arrays(); + check_all_mappings(); + check_all_programs(); + verify_all_objects(); + verify_shared_strings_tables(); } #endif @@ -198,12 +177,11 @@ void backend() { JMP_BUF back; int i, delay; - struct timeval timeout; struct selectors sets; if(SETJMP(back)) { - automatic_fatal="Error in handle_error in master object!\nPrevious error:"; + exit_on_error="Error in handle_error in master object!\nPrevious error:"; assign_svalue_no_free(sp++, & throw_value); APPLY_MASTER("handle_error", 1); pop_stack(); @@ -212,24 +190,34 @@ void backend() while(first_object) { - delay = get_next_call_out(); - if(delay) - { - delay -= get_current_time(); - if(delay < 0) delay = 0; - } else { - delay = 7 * 24 * 60 * 60; /* See you in a week */ - } - timeout.tv_usec = 0; - timeout.tv_sec = delay; + next_timeout.tv_usec = 0; + next_timeout.tv_sec = 7 * 24 * 60 * 60; /* See you in a week */ + my_add_timeval(&next_timeout, ¤t_time); + call_callback(& backend_callbacks, (void *)0); sets=selectors; - i=select(max_fd+1, &sets.read, &sets.write, 0, &timeout); + alloca(0); /* Do garbage collect */ +#ifdef DEBUG + if(d_flag > 1) do_debug(); +#endif + + GETTIMEOFDAY(¤t_time); + + if(my_timercmp(&next_timeout, > , ¤t_time)) + { + my_subtract_timeval(&next_timeout, ¤t_time); + }else{ + next_timeout.tv_usec = 0; + next_timeout.tv_sec = 0; + } - current_time = get_current_time(); - check_signals(); + i=select(max_fd+1, &sets.read, &sets.write, 0, &next_timeout); + GETTIMEOFDAY(¤t_time); + + check_threads_etc(); + if(i>=0) { for(i=0; i<max_fd+1; i++) @@ -256,15 +244,7 @@ void backend() } } - - do_call_outs(); - call_callback_list(& backend_callbacks); - - alloca(0); /* Do garbage collect */ -#ifdef DEBUG - if(d_flag > 1) - do_debug(1); -#endif + call_callback(& backend_callbacks, (void *)1); } UNSETJMP(back); diff --git a/src/backend.h b/src/backend.h index b69daeb74c97fd73537675309b3be5025a47a36e..ab6051fe045ea9e783962d3ff5051b1e9fb4c6eb 100644 --- a/src/backend.h +++ b/src/backend.h @@ -1,32 +1,32 @@ /*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ #ifndef BACKEND_H #define BACKEND_H #include "global.h" +#include "time_stuff.h" +#include "callback.h" -#ifdef HAVE_TIME_H -#include <time.h> -#undef HAVE_TIME_H -#endif - -extern time_t current_time; -typedef void (*callback)(int,void *); +extern struct timeval current_time; +extern struct timeval next_timeout; +typedef void (*file_callback)(int,void *); /* Prototypes begin here */ struct selectors; -struct callback_list *add_backend_callback(struct array *a); +struct callback *add_backend_callback(callback_func call, + void *arg, + callback_func free_func); void init_backend(); -void set_read_callback(int fd,callback cb,void *data); -void set_write_callback(int fd,callback cb,void *data); -callback query_read_callback(int fd); -callback query_write_callback(int fd); +void set_read_callback(int fd,file_callback cb,void *data); +void set_write_callback(int fd,file_callback cb,void *data); +file_callback query_read_callback(int fd); +file_callback query_write_callback(int fd); void *query_read_callback_data(int fd); void *query_write_callback_data(int fd); -void do_debug(int check_refs); +void do_debug(); void backend(); int write_to_stderr(char *a, INT32 len); /* Prototypes end here */ diff --git a/src/build_modlist_h b/src/build_modlist_h old mode 100755 new mode 100644 diff --git a/src/builtin_efuns.c b/src/builtin_functions.c similarity index 70% rename from src/builtin_efuns.c rename to src/builtin_functions.c index 6405bbcffc933fe8faef2d5c271870e5336b23e1..89af7fe95462e93b4f245e4bd376e9244bcb3f14 100644 --- a/src/builtin_efuns.c +++ b/src/builtin_functions.c @@ -1,6 +1,6 @@ /*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ #include "global.h" @@ -11,24 +11,29 @@ #include "program.h" #include "array.h" #include "error.h" -#include "add_efun.h" +#include "constants.h" #include "mapping.h" #include "stralloc.h" #include "lex.h" -#include "list.h" -#include "lpc_types.h" +#include "multiset.h" +#include "pike_types.h" #include "rusage.h" #include "operators.h" #include "fsort.h" -#include "call_out.h" #include "callback.h" -#ifdef HAVE_SYS_TIME_H -#include <sys/time.h> -#endif +#include "gc.h" +#include "backend.h" +#include "main.h" +#include "memory.h" +#include "time_stuff.h" +#include <math.h> +#include <ctype.h> + #ifdef HAVE_CRYPT_H #include <crypt.h> #endif + void f_equal(INT32 args) { int i; @@ -47,7 +52,7 @@ void f_aggregate(INT32 args) if(args < 0) fatal("Negative args to f_aggregate()\n"); #endif - a=aggregate_array(args,T_MIXED); + a=aggregate_array(args); push_array(a); /* beware, macro */ } @@ -56,7 +61,7 @@ void f_trace(INT32 args) extern int t_flag; int old_t_flag; - if(args < 0) + if(args < 1) error("Too few arguments to trace()\n"); if(sp[-args].type != T_INT) @@ -117,7 +122,7 @@ void f_ctime(INT32 args) void f_lower_case(INT32 args) { INT32 i; - struct lpc_string *ret; + struct pike_string *ret; if(!args) error("Too few arguments to lower_case()\n"); if(sp[-args].type != T_STRING) @@ -137,7 +142,7 @@ void f_lower_case(INT32 args) void f_upper_case(INT32 args) { INT32 i; - struct lpc_string *ret; + struct pike_string *ret; if(!args) error("Too few arguments to upper_case()\n"); if(sp[-args].type != T_STRING) @@ -213,10 +218,10 @@ void f_search(INT32 args) } len=sp[-args].u.string->len - start; - if(len>0 && (ptr=MEMMEM(sp[1-args].u.string->str, - sp[1-args].u.string->len, - sp[-args].u.string->str+start, - len))) + if(len>0 && (ptr=my_memmem(sp[1-args].u.string->str, + sp[1-args].u.string->len, + sp[-args].u.string->str+start, + len))) { start=ptr-sp[-args].u.string->str; }else{ @@ -273,10 +278,23 @@ void f_clone(INT32 args) void f_call_function(INT32 args) { + INT32 expected_stack=sp-args+2-evaluator_stack; + strict_apply_svalue(sp-args, args - 1); - free_svalue(sp-2); - sp[-2]=sp[-1]; - sp--; + if(sp < expected_stack + evaluator_stack) + { +#ifdef DEBUG + if(sp+1 != expected_stack + evaluator_stack) + fatal("Stack underflow!\n"); +#endif + + pop_stack(); + push_int(0); + }else{ + free_svalue(sp-2); + sp[-2]=sp[-1]; + sp--; + } } void f_backtrace(INT32 args) @@ -290,7 +308,7 @@ void f_backtrace(INT32 args) for(f=fp;f;f=f->parent_frame) frames++; sp->type=T_ARRAY; - sp->u.array=a=allocate_array_no_init(frames,0,T_ARRAY); + sp->u.array=a=allocate_array_no_init(frames,0); sp++; for(f=fp;f;f=f->parent_frame) @@ -301,7 +319,8 @@ void f_backtrace(INT32 args) if(f->current_object && f->current_object->prog) { - SHORT_ITEM(a)[frames].array=i=allocate_array_no_init(3,0,T_MIXED); + ITEM(a)[frames].u.array=i=allocate_array_no_init(3,0); + ITEM(a)[frames].type=T_ARRAY; ITEM(i)[2].type=T_FUNCTION; ITEM(i)[2].subtype=f->fun; ITEM(i)[2].u.object=f->current_object; @@ -327,13 +346,16 @@ void f_backtrace(INT32 args) ITEM(i)[0].subtype=NUMBER_NUMBER; ITEM(i)[0].type=T_INT; } + i->type_field = BIT_FUNCTION | BIT_INT | BIT_STRING; }else{ - SHORT_ITEM(a)[frames].refs=0; + ITEM(a)[frames].type=T_INT; + ITEM(a)[frames].u.integer=0; } } + a->type_field = BIT_ARRAY | BIT_INT; } -void f_add_efun(INT32 args) +void f_add_constant(INT32 args) { if(args<1) error("Too few arguments to add_efun.\n"); @@ -377,29 +399,11 @@ static char *combine_path(char *cwd,char *file) { cwd="/"; file++; - }else{ - - if(!cwd) - { -#ifdef HAVE_GETWD - -#ifndef MAXPATHLEN -#define MAXPATHLEN 1000 -#endif - - cwd=(char *)getwd(my_cwd=(char *)xalloc(MAXPATHLEN+1)); - if(!cwd) - fatal("Couldn't fetch current path.\n"); -#else -#ifdef HAVE_GETCWD - my_cwd=cwd=(char *)getcwd(0,1000); -#else - /* maybe autoconf was wrong.... if not, insert your method here */ - my_cwd=cwd=(char *)getcwd(0,1000); -#endif -#endif - } } +#ifdef DEBUG + if(!cwd) + fatal("No cwd in combine_path!\n"); +#endif if(cwd[strlen(cwd)-1]=='/') { @@ -473,47 +477,6 @@ void f_combine_path(INT32 args) free(path); } -void f_implode(INT32 args) -{ - struct lpc_string *ret; - - if(args < 1) - error("Too few arguments to implode.\n"); - - if(sp[-args].type != T_ARRAY) - error("Bad argument 1 to implode.\n"); - - if(args<2) - { - push_string(make_shared_string("")); - }else{ - pop_n_elems(args-2); - if(sp[-1].type != T_STRING) - error("Bad argument 2 to implode.\n"); - } - - ret=implode(sp[-2].u.array, sp[-1].u.string); - pop_n_elems(2); - push_string(ret); -} - -void f_explode(INT32 args) -{ - struct array *ret; - if(args < 2) - error("Too few arguments to explode.\n"); - - if(sp[-args].type != T_STRING) - error("Bad argument 1 to explode.\n"); - - if(sp[1-args].type != T_STRING) - error("Bad argument 2 to explode.\n"); - - ret=explode(sp[-args].u.string, sp[1-args].u.string); - pop_n_elems(args); - push_array(ret); -} - void f_function_object(INT32 args) { if(args < 1) @@ -533,7 +496,7 @@ void f_function_object(INT32 args) void f_function_name(INT32 args) { - struct lpc_string *s; + struct pike_string *s; if(args < 1) error("Too few arguments to function_object()\n"); if(sp[-args].type != T_FUNCTION) @@ -569,18 +532,17 @@ void f_zero_type(INT32 args) sp[-1].subtype=NUMBER_NUMBER; } -void f_all_efuns(INT32 args) +void f_all_constants(INT32 args) { - struct svalue *save_sp; + INT32 stack_size; pop_n_elems(args); - save_sp=sp; + stack_size=sp - evaluator_stack; push_all_efuns_on_stack(); - f_aggregate_mapping(sp-save_sp); + f_aggregate_mapping(sp - evaluator_stack - stack_size); } void f_allocate(INT32 args) { - TYPE_T t; INT32 size; if(args < 1) @@ -589,75 +551,31 @@ void f_allocate(INT32 args) if(sp[-args].type!=T_INT) error("Bad argument 1 to allocate.\n"); - if(args > 1) - { - struct lpc_string *s; - if(sp[1-args].type != T_STRING) - error("Bad argument 2 to allocate.\n"); - - s=sp[1-args].u.string; - s=parse_type(s->str); - t=compile_type_to_runtime_type(s); - free_string(s); - }else{ - t=T_MIXED; - } size=sp[-args].u.integer; if(size < 0) error("Allocate on negative number.\n"); pop_n_elems(args); - push_array( allocate_array(size, t) ); -} - -void f_sizeof(INT32 args) -{ - INT32 tmp; - if(args<1) - error("Too few arguments to sizeof()\n"); - - pop_n_elems(args-1); - switch(sp[-1].type) - { - case T_STRING: - tmp=sp[-1].u.string->len; - free_string(sp[-1].u.string); - break; - - case T_ARRAY: - tmp=sp[-1].u.array->size; - free_array(sp[-1].u.array); - break; - - case T_MAPPING: - tmp=sp[-1].u.mapping->ind->size; - free_mapping(sp[-1].u.mapping); - break; - - case T_LIST: - tmp=sp[-1].u.list->ind->size; - free_list(sp[-1].u.list); - break; - - default: - error("Bad argument 1 to sizeof().\n"); - return; /* make apcc happy */ - } - sp[-1].type=T_INT; - sp[-1].subtype=NUMBER_NUMBER; - sp[-1].u.integer=tmp; + push_array( allocate_array(size) ); } void f_rusage(INT32 args) { - INT32 *rus; + INT32 *rus,e; struct array *v; pop_n_elems(args); rus=low_rusage(); if(!rus) error("System rusage information not available.\n"); - v=allocate_array_no_init(29,0,T_INT); - MEMCPY((char *)SHORT_ITEM(v),(char *)rus,sizeof(INT32)*29); + v=allocate_array_no_init(29,0); + + for(e=0;e<29;e++) + { + ITEM(v)[e].type=T_INT; + ITEM(v)[e].subtype=NUMBER_NUMBER; + ITEM(v)[e].u.integer=rus[e]; + } + sp->u.array=v; sp->type=T_ARRAY; sp++; @@ -687,12 +605,13 @@ void f_throw(INT32 args) throw(); } -static struct callback_list *exit_callbacks=0; +static struct callback *exit_callbacks=0; -struct callback_list *add_exit_callback(struct array *a) +struct callback *add_exit_callback(callback_func call, + void *arg, + callback_func free_func) { - return add_to_callback_list(&exit_callbacks, a); - + return add_to_callback(&exit_callbacks, call, arg, free_func); } void f_exit(INT32 args) @@ -704,7 +623,8 @@ void f_exit(INT32 args) if(sp[-args].type != T_INT) error("Bad argument 1 to exit.\n"); - call_and_free_callback_list(& exit_callbacks); + call_callback(&exit_callbacks, (void *)0); + free_callback(&exit_callbacks); i=sp[-args].u.integer; #ifdef DEBUG @@ -724,18 +644,17 @@ void f_query_host_name(INT32 args) void f_time(INT32 args) { - extern time_t current_time; pop_n_elems(args); if(args) - push_int(current_time); + push_int(current_time.tv_sec); else - push_int(get_current_time()); + push_int((INT32)TIME(0)); } void f_crypt(INT32 args) { char salt[2]; - char *ret; + char *ret, *saltp; char *choise = "cbhisjKlm4k65p7qrJfLMNQOPxwzyAaBDFgnoWXYCZ0123tvdHueEGISRTUV89./"; @@ -752,17 +671,17 @@ void f_crypt(INT32 args) sp[1-args].u.string->len < 2) error("Bad argument 2 to crypt()\n"); - salt[0] = sp[1-args].u.string->str[0]; - salt[1] = sp[1-args].u.string->str[1]; + saltp=sp[1-args].u.string->str; } else { salt[0] = choise[my_rand()%strlen(choise)]; salt[1] = choise[my_rand()%strlen(choise)]; + saltp=salt; } #ifdef HAVE_CRYPT - ret = (char *)crypt(sp[-args].u.string->str, salt); + ret = (char *)crypt(sp[-args].u.string->str, saltp); #else #ifdef HAVE__CRYPT - ret = (char *)_crypt(sp[-args].u.string->str, salt); + ret = (char *)_crypt(sp[-args].u.string->str, saltp); #else ret = sp[-args].u.string->str; #endif @@ -796,7 +715,6 @@ void f_destruct(INT32 args) } destruct(o); pop_n_elems(args); - push_int(0); } void f_indices(INT32 args) @@ -816,17 +734,21 @@ void f_indices(INT32 args) size=sp[-args].u.array->size; qjump: - a=allocate_array_no_init(size,0,T_INT); + a=allocate_array_no_init(size,0); while(--size>=0) - SHORT_ITEM(a)[size].integer=size; + { + ITEM(a)[size].type=T_INT; + ITEM(a)[size].subtype=NUMBER_NUMBER; + ITEM(a)[size].u.integer=size; + } break; case T_MAPPING: - a=copy_array(sp[-args].u.mapping->ind); + a=mapping_indices(sp[-args].u.mapping); break; - case T_LIST: - a=copy_array(sp[-args].u.list->ind); + case T_MULTISET: + a=copy_array(sp[-args].u.multiset->ind); break; case T_OBJECT: @@ -846,15 +768,19 @@ void f_values(INT32 args) INT32 size; struct array *a; if(args < 1) - error("Too few arguments to indices()\n"); + error("Too few arguments to values()\n"); switch(sp[-args].type) { case T_STRING: size=sp[-args].u.string->len; - a=allocate_array_no_init(size,0,T_INT); + a=allocate_array_no_init(size,0); while(--size>=0) - SHORT_ITEM(a)[size].integer=EXTRACT_UCHAR(sp[-args].u.string->str+size); + { + ITEM(a)[size].type=T_INT; + ITEM(a)[size].subtype=NUMBER_NUMBER; + ITEM(a)[size].u.integer=EXTRACT_UCHAR(sp[-args].u.string->str+size); + } break; case T_ARRAY: @@ -862,14 +788,18 @@ void f_values(INT32 args) break; case T_MAPPING: - a=copy_array(sp[-args].u.mapping->val); + a=mapping_values(sp[-args].u.mapping); break; - case T_LIST: - size=sp[-args].u.list->ind->size; - a=allocate_array_no_init(size,0,T_INT); - while(size>0) - SHORT_ITEM(a)[--size].integer=1; + case T_MULTISET: + size=sp[-args].u.multiset->ind->size; + a=allocate_array_no_init(size,0); + while(--size>=0) + { + ITEM(a)[size].type=T_INT; + ITEM(a)[size].subtype=NUMBER_NUMBER; + ITEM(a)[size].u.integer=1; + } break; case T_OBJECT: @@ -936,7 +866,7 @@ void f_reverse(INT32 args) case T_STRING: { INT32 e; - struct lpc_string *s; + struct pike_string *s; s=begin_shared_string(sp[-args].u.string->len); for(e=0;e<sp[-args].u.string->len;e++) s->str[e]=sp[-args].u.string->str[sp[-args].u.string->len-1-e]; @@ -977,7 +907,7 @@ void f_reverse(INT32 args) struct tupel { - struct lpc_string *ind,*val; + struct pike_string *ind,*val; }; static int replace_sortfun(void *a,void *b) @@ -985,9 +915,9 @@ static int replace_sortfun(void *a,void *b) return my_quick_strcmp( ((struct tupel *)a)->ind, ((struct tupel *)b)->ind); } -struct lpc_string * replace_many(struct lpc_string *str, - struct array *from, - struct array *to) +static struct pike_string * replace_many(struct pike_string *str, + struct array *from, + struct array *to) { char *s; INT32 length,e; @@ -1008,50 +938,18 @@ struct lpc_string * replace_many(struct lpc_string *str, v=(struct tupel *)xalloc(sizeof(struct tupel)*from->size); - if(from->array_type == T_MIXED) - { - for(e=0;e<from->size;e++) - { - if(ITEM(from)[e].type != T_STRING) - error("Replace: from array not string *\n"); - v[e].ind=ITEM(from)[e].u.string; - } - } - else if(from->array_type == T_STRING) - { - for(e=0;e<from->size;e++) - { - if(!SHORT_ITEM(from)[e].string) - error("Replace: from array not string *\n"); - v[e].ind=SHORT_ITEM(from)[e].string; - } - } - else + for(e=0;e<from->size;e++) { - error("Replace: from array is not string *\n"); + if(ITEM(from)[e].type != T_STRING) + error("Replace: from array not string *\n"); + v[e].ind=ITEM(from)[e].u.string; } - if(to->array_type == T_MIXED) - { - for(e=0;e<to->size;e++) - { - if(ITEM(to)[e].type != T_STRING) - error("Replace: to array not string *\n"); - v[e].val=ITEM(to)[e].u.string; - } - } - else if(to->array_type == T_STRING) + for(e=0;e<to->size;e++) { - for(e=0;e<to->size;e++) - { - if(!SHORT_ITEM(to)[e].string) - error("Replace: to array not string *\n"); - v[e].val=SHORT_ITEM(to)[e].string; - } - } - else - { - error("Replace: to array is not string *\n"); + if(ITEM(to)[e].type != T_STRING) + error("Replace: to array not string *\n"); + v[e].val=ITEM(to)[e].u.string; } fsort((char *)v,from->size,sizeof(struct tupel),(fsortfun)replace_sortfun); @@ -1088,7 +986,10 @@ struct lpc_string * replace_many(struct lpc_string *str, b=c; } } - if(a<from->size && !MEMCMP(v[a].ind->str,s,v[a].ind->len)) + if(a<from->size && + length >= v[a].ind->len && + !low_quick_binary_strcmp(v[a].ind->str,v[a].ind->len, + s,v[a].ind->len)) { c=v[a].ind->len; if(!c) c=1; @@ -1123,14 +1024,14 @@ void f_replace(INT32 args) case T_MAPPING: { - array_replace(sp[-args].u.mapping->val,sp+1-args,sp+2-args); + mapping_replace(sp[-args].u.mapping,sp+1-args,sp+2-args); pop_n_elems(args-1); break; } case T_STRING: { - struct lpc_string *s; + struct pike_string *s; switch(sp[1-args].type) { default: @@ -1158,6 +1059,9 @@ void f_replace(INT32 args) push_string(s); break; } + + default: + error("Bad argument 1 to replace().\n"); } } @@ -1229,27 +1133,62 @@ void f_functionp(INT32 args) void f_sleep(INT32 args) { - struct timeval timeout; + struct timeval t1,t2,t3; INT32 a,b; - if(!args) error("Too few arguments to sleep.\n"); - if(sp[-args].type!=T_INT) + if(!args) + error("Too few arguments to sleep.\n"); + + GETTIMEOFDAY(&t1); + + switch(sp[-args].type) + { + case T_INT: + t2.tv_sec=sp[-args].u.integer; + t2.tv_usec=0; + break; + + case T_FLOAT: + { + FLOAT_TYPE f; + f=sp[-args].u.float_number; + t2.tv_sec=floor(f); + t2.tv_usec=(long)(1000000.0*(f-floor(f))); + break; + } + + default: error("Bad argument 1 to sleep.\n"); - a=get_current_time()+sp[-args].u.integer; + } + + my_add_timeval(&t1, &t2); pop_n_elems(args); while(1) { - timeout.tv_usec=0; - b=a-get_current_time(); - if(b<0) break; + GETTIMEOFDAY(&t2); + if(my_timercmp(&t1, <= , &t2)) + break; + + t3=t1; + my_subtract_timeval(&t3, &t2); - timeout.tv_sec=b; - select(0,0,0,0,&timeout); - check_signals(); + select(0,0,0,0,&t3); + check_threads_etc(); } } +#ifdef GC2 +void f_gc(INT32 args) +{ + INT32 tmp; + pop_n_elems(args); + tmp=num_objects; + do_gc(); + push_int(tmp - num_objects); +} +#endif + #ifdef TYPEP #undef TYPEP #endif @@ -1268,24 +1207,244 @@ TYPEP(f_programp, "programp", T_PROGRAM) TYPEP(f_intp, "intpp", T_INT) TYPEP(f_mappingp, "mappingp", T_MAPPING) TYPEP(f_arrayp, "arrayp", T_ARRAY) -TYPEP(f_listp, "listp", T_LIST) +TYPEP(f_multisetp, "multisetp", T_MULTISET) TYPEP(f_stringp, "stringp", T_STRING) TYPEP(f_floatp, "floatp", T_FLOAT) +void f_sort(INT32 args) +{ + INT32 e,*order; + + if(args < 0) + fatal("Too few arguments to sort().\n"); + + for(e=0;e<args;e++) + { + if(sp[e-args].type != T_ARRAY) + error("Bad argument %ld to sort().\n",(long)(e+1)); + + if(sp[e-args].u.array->size != sp[-args].u.array->size) + error("Argument %ld to sort() has wrong size.\n",(long)(e+1)); + } + + if(args > 1) + { + order=get_alpha_order(sp[-args].u.array); + for(e=0;e<args;e++) order_array(sp[e-args].u.array,order); + free((char *)order); + pop_n_elems(args-1); + } else { + sort_array_destructively(sp[-args].u.array); + } +} + +void f_rows(INT32 args) +{ + INT32 e; + struct array *a,*tmp; + + if(args < 2) + error("Too few arguments to rows().\n"); + + if(sp[1-args].type!=T_ARRAY) + error("Bad argument 1 to rows().\n"); + + tmp=sp[1-args].u.array; + push_array(a=allocate_array(tmp->size)); + + for(e=0;e<a->size;e++) + index_no_free(ITEM(a)+e, sp-args-1, ITEM(tmp)+e); + + a->refs++; + pop_n_elems(args+1); + push_array(a); +} + +void f_column(INT32 args) +{ + INT32 e; + struct array *a,*tmp; + + if(args < 2) + error("Too few arguments to column().\n"); + + if(sp[-args].type!=T_ARRAY) + error("Bad argument 1 to column().\n"); + + tmp=sp[-args].u.array; + push_array(a=allocate_array(tmp->size)); + + for(e=0;e<a->size;e++) + index_no_free(ITEM(a)+e, ITEM(tmp)+e, sp-args); + + a->refs++; + pop_n_elems(args+1); + push_array(a); +} + +#ifdef DEBUG +void f__verify_internals(INT32 args) +{ + INT32 tmp; + tmp=d_flag; + d_flag=0x7fffffff; + do_debug(); + d_flag=tmp; + pop_n_elems(args); +} + +#endif + +#ifdef HAVE_LOCALTIME +void f_localtime(INT32 args) +{ + struct tm *tm; + time_t t; + if (args<1 || sp[-1].type!=T_INT) + error("Illegal argument to localtime"); + + t=sp[-1].u.integer; + tm=localtime(&t); + pop_n_elems(args); + + push_string(make_shared_string("sec")); + push_int(tm->tm_sec); + push_string(make_shared_string("min")); + push_int(tm->tm_min); + push_string(make_shared_string("hour")); + push_int(tm->tm_hour); + + push_string(make_shared_string("mday")); + push_int(tm->tm_mday); + push_string(make_shared_string("mon")); + push_int(tm->tm_mon); + push_string(make_shared_string("year")); + push_int(tm->tm_year); + + push_string(make_shared_string("wday")); + push_int(tm->tm_wday); + push_string(make_shared_string("yday")); + push_int(tm->tm_yday); + push_string(make_shared_string("isdst")); + push_int(tm->tm_isdst); + +#ifdef HAVE_EXTERNAL_TIMEZONE + push_string(make_shared_string("timezone")); + push_int(timezone); + f_aggregate_mapping(20); +#else +#ifdef STRUCT_TM_HAS_GMTOFF + push_string(make_shared_string("timezone")); + push_int(tm->tm_gmtoff); + f_aggregate_mapping(20); +#else + f_aggregate_mapping(18); +#endif +#endif +} +#endif + + +/* Check if the glob s[0..len[ matches the string m[0..mlen[ */ +static int does_match(char *s, int len, char *m, int mlen) +{ + int i,j; + for (i=j=0; i<mlen && j<len; i++,j++) + { + switch (m[i]) + { + case '?': break; + + case '*': + i++; + if (i==mlen) return 1; /* slut */ + + for (;j<len;j++) + if (does_match(s+j,len-j,m+i,mlen-i)) + return 1; + + return 0; + + default: + if (m[i]!=s[j]) return 0; + } + } + if (i==mlen && j==len) return 1; + return 0; +} + +void f_glob(INT32 args) +{ + INT32 i,matches; + struct array *a; + struct svalue *sval, tmp; + struct pike_string *glob; + + if(args < 2) + error("Too few arguments to glob().\n"); + + if(args > 2) pop_n_elems(args-2); + args=2; + + if (sp[-args].type!=T_STRING) + error("Bad argument 2 to glob().\n"); + + glob=sp[-args].u.string; + + switch(sp[1-args].type) + { + case T_STRING: + i=does_match(sp[1-args].u.string->str, + sp[1-args].u.string->len, + glob->str, + glob->len); + pop_n_elems(2); + push_int(i); + break; + + case T_ARRAY: + a=sp[1-args].u.array; + matches=0; + for(i=0;i<a->size;i++) + { + if(does_match(ITEM(a)[i].u.string->str, + ITEM(a)[i].u.string->len, + glob->str, + glob->len)) + { + ITEM(a)[i].u.string->refs++; + push_string(ITEM(a)[i].u.string); + matches++; + } + } + f_aggregate(matches); + tmp=sp[-1]; + sp--; + pop_n_elems(2); + sp[0]=tmp; + sp++; + break; + + default: + error("Bad argument 2 to glob().\n"); + } +} + void init_builtin_efuns() { - add_efun("add_efun",f_add_efun,"function(string,void|mixed:void)",OPT_SIDE_EFFECT); + init_operators(); + + add_efun("add_constant",f_add_constant,"function(string,void|mixed:void)",OPT_SIDE_EFFECT); add_efun("aggregate",f_aggregate,"function(mixed ...:mixed *)",OPT_TRY_OPTIMIZE); - add_efun("aggregate_list",f_aggregate_list,"function(mixed ...:list)",OPT_TRY_OPTIMIZE); + add_efun("aggregate_multiset",f_aggregate_multiset,"function(mixed ...:multiset)",OPT_TRY_OPTIMIZE); add_efun("aggregate_mapping",f_aggregate_mapping,"function(mixed ...:mapping)",OPT_TRY_OPTIMIZE); - add_efun("all_efuns",f_all_efuns,"function(:mapping(string:mixed))",OPT_EXTERNAL_DEPEND); + add_efun("all_constants",f_all_constants,"function(:mapping(string:mixed))",OPT_EXTERNAL_DEPEND); add_efun("allocate", f_allocate, "function(int, string|void:mixed *)", 0); add_efun("arrayp", f_arrayp, "function(mixed:int)",0); - add_efun("backtrace",f_backtrace,"function(:array(array(function|int)))",OPT_EXTERNAL_DEPEND); + add_efun("backtrace",f_backtrace,"function(:array(array(function|int|string)))",OPT_EXTERNAL_DEPEND); add_efun("call_function",f_call_function,"function(mixed,mixed ...:mixed)",OPT_SIDE_EFFECT | OPT_EXTERNAL_DEPEND); - add_efun("call_out",f_call_out,"function(function,int,mixed...:void)",OPT_SIDE_EFFECT); - add_efun("call_out_info",f_call_out_info,"function(:array*)",OPT_EXTERNAL_DEPEND); add_efun("clone",f_clone,"function(program,mixed...:object)",OPT_EXTERNAL_DEPEND); + add_efun("column",f_column,"function(array,mixed:array)",0); add_efun("combine_path",f_combine_path,"function(string,string:string)",0); add_efun("compile_file",f_compile_file,"function(string:program)",OPT_EXTERNAL_DEPEND); add_efun("compile_string",f_compile_string,"function(string,string|void:program)",OPT_EXTERNAL_DEPEND); @@ -1295,20 +1454,18 @@ void init_builtin_efuns() add_efun("destruct",f_destruct,"function(object|void:void)",OPT_SIDE_EFFECT); add_efun("equal",f_equal,"function(mixed,mixed:int)",OPT_TRY_OPTIMIZE); add_efun("exit",f_exit,"function(int:void)",OPT_SIDE_EFFECT); - add_efun("explode",f_explode,"function(string,string:array(string))",OPT_TRY_OPTIMIZE); - add_efun("find_call_out",f_find_call_out,"function(function:int)",OPT_EXTERNAL_DEPEND); add_efun("floatp", f_floatp, "function(mixed:int)",OPT_TRY_OPTIMIZE); add_efun("function_name",f_function_name,"function(function:string)",OPT_TRY_OPTIMIZE); add_efun("function_object",f_function_object,"function(function:object)",OPT_TRY_OPTIMIZE); add_efun("functionp", f_functionp, "function(mixed:int)",OPT_TRY_OPTIMIZE); + add_efun("glob",f_glob,"function(string,string:int)|function(string,string*:array(string))",OPT_TRY_OPTIMIZE); add_efun("hash",f_hash,"function(string,int|void:int)",OPT_TRY_OPTIMIZE); - add_efun("implode",f_implode,"function(array,string|void:string)",OPT_TRY_OPTIMIZE); - add_efun("indices",f_indices,"function(string|array:int*)|function(mapping|list:mixed*)|function(object:string*)",0); + add_efun("indices",f_indices,"function(string|array:int*)|function(mapping|multiset:mixed*)|function(object:string*)",0); add_efun("intp", f_intp, "function(mixed:int)",OPT_TRY_OPTIMIZE); - add_efun("listp", f_listp, "function(mixed:int)",OPT_TRY_OPTIMIZE); + add_efun("multisetp", f_multisetp, "function(mixed:int)",OPT_TRY_OPTIMIZE); add_efun("lower_case",f_lower_case,"function(string:string)",OPT_TRY_OPTIMIZE); - add_efun("mappingp",f_mappingp,"function(mixed:int)",OPT_TRY_OPTIMIZE); add_efun("m_delete",f_m_delete,"function(mapping,mixed:mapping)",0); + add_efun("mappingp",f_mappingp,"function(mixed:int)",OPT_TRY_OPTIMIZE); add_efun("mkmapping",f_mkmapping,"function(mixed *,mixed *:mapping)",OPT_TRY_OPTIMIZE); add_efun("next_object",f_next_object,"function(void|object:object)",OPT_EXTERNAL_DEPEND); add_efun("object_program",f_object_program,"function(object:program)",0); @@ -1318,22 +1475,32 @@ void init_builtin_efuns() add_efun("query_num_arg",f_query_num_arg,"function(:int)",OPT_EXTERNAL_DEPEND); add_efun("random",f_random,"function(int:int)",OPT_EXTERNAL_DEPEND); add_efun("random_seed",f_random_seed,"function(int:void)",OPT_SIDE_EFFECT); - add_efun("remove_call_out",f_remove_call_out,"function(function:int)",OPT_SIDE_EFFECT); add_efun("replace",f_replace,"function(string,string,string:string)|function(string,string*,string*:string)|function(array,mixed,mixed:array)|function(mapping,mixed,mixed:array)",0); add_efun("reverse",f_reverse,"function(int:int)|function(string:string)|function(array:array)",0); + add_efun("rows",f_rows,"function(mixed,array:array)",0); add_efun("rusage", f_rusage, "function(:int *)",OPT_EXTERNAL_DEPEND); add_efun("search",f_search,"function(string,string,void|int:int)|function(array,mixed,void|int:int)|function(mapping,mixed:mixed)",0); - add_efun("sizeof", f_sizeof, "function(string|list|array|mapping:int)",0); - add_efun("sleep", f_sleep, "function(int:void)",OPT_SIDE_EFFECT); + add_efun("sleep", f_sleep, "function(float|int:void)",OPT_SIDE_EFFECT); + add_efun("sort",f_sort,"function(array(mixed),array(mixed)...:array(mixed))",OPT_SIDE_EFFECT); add_efun("stringp", f_stringp, "function(mixed:int)",0); - add_efun("sum",f_sum,"function(int ...:int)|function(float ...:float)|function(string,string|int|float ...:string)|function(string,string|int|float ...:string)|function(int|float,string,string|int|float:string)|function(array ...:array)|function(mapping ...:mapping)|function(list...:list)",0); add_efun("this_object", f_this_object, "function(:object)",OPT_EXTERNAL_DEPEND); add_efun("throw",f_throw,"function(mixed:void)",0); add_efun("time",f_time,"function(void|int:int)",OPT_EXTERNAL_DEPEND); add_efun("trace",f_trace,"function(int:int)",OPT_SIDE_EFFECT); add_efun("upper_case",f_upper_case,"function(string:string)",0); - add_efun("values",f_values,"function(string|list:int*)|function(array|mapping|object:mixed*)",0); + add_efun("values",f_values,"function(string|multiset:int*)|function(array|mapping|object:mixed*)",0); add_efun("zero_type",f_zero_type,"function(int:int)",0); -} +#ifdef HAVE_LOCALTIME + add_efun("localtime",f_localtime,"function(int:mapping(string:int))",OPT_EXTERNAL_DEPEND); +#endif + +#ifdef DEBUG + add_efun("_verify_internals",f__verify_internals,"function(:void)",OPT_SIDE_EFFECT|OPT_EXTERNAL_DEPEND); +#endif + +#ifdef GC2 + add_efun("gc",f_gc,"function(:int)",OPT_SIDE_EFFECT); +#endif +} diff --git a/src/builtin_efuns.h b/src/builtin_functions.h similarity index 67% rename from src/builtin_efuns.h rename to src/builtin_functions.h index 9b5a8359e9402cf05778a78281b22ec42b1d911b..5ef0f11cb0cb87a35e5c697d85f95dde3b61aa44 100644 --- a/src/builtin_efuns.h +++ b/src/builtin_functions.h @@ -1,6 +1,6 @@ /*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ #ifndef BUILTIN_EFUNS_H @@ -8,8 +8,10 @@ #define TYPEP(ID,NAME,TYPE) void ID(INT32 args); +#include "callback.h" /* Prototypes begin here */ +void f_equal(INT32 args); void f_aggregate(INT32 args); void f_trace(INT32 args); void f_hash(INT32 args); @@ -17,28 +19,27 @@ void f_copy_value(INT32 args); void f_ctime(INT32 args); void f_lower_case(INT32 args); void f_upper_case(INT32 args); -void f_capitalize(INT32 args); void f_random(INT32 args); +void f_random_seed(INT32 args); void f_query_num_arg(INT32 args); void f_search(INT32 args); void f_clone(INT32 args); void f_call_function(INT32 args); void f_backtrace(INT32 args); -void f_add_efun(INT32 args); +void f_add_constant(INT32 args); void f_compile_file(INT32 args); void f_combine_path(INT32 args); -void f_get_function(INT32 args); -void f_implode(INT32 args); -void f_explode(INT32 args); void f_function_object(INT32 args); void f_function_name(INT32 args); void f_zero_type(INT32 args); -void f_all_efuns(INT32 args); +void f_all_constants(INT32 args); void f_allocate(INT32 args); -void f_sizeof(INT32 args); void f_rusage(INT32 args); void f_this_object(INT32 args); void f_throw(INT32 args); +struct callback *add_exit_callback(callback_func call, + void *arg, + callback_func free_func); void f_exit(INT32 args); void f_query_host_name(INT32 args); void f_time(INT32 args); @@ -50,20 +51,26 @@ void f_next_object(INT32 args); void f_object_program(INT32 args); void f_reverse(INT32 args); struct tupel; -struct lpc_string * replace_many(struct lpc_string *str, - struct array *from, - struct array *to); void f_replace(INT32 args); void f_compile_string(INT32 args); +void f_mkmapping(INT32 args); +void f_objectp(INT32 args); +void f_functionp(INT32 args); +void f_sleep(INT32 args); +void f_gc(INT32 args); TYPEP(f_programp, "programp", T_PROGRAM) TYPEP(f_intp, "intpp", T_INT) TYPEP(f_mappingp, "mappingp", T_MAPPING) TYPEP(f_arrayp, "arrayp", T_ARRAY) -TYPEP(f_listp, "listp", T_LIST) +TYPEP(f_multisetp, "multisetp", T_MULTISET) TYPEP(f_stringp, "stringp", T_STRING) -TYPEP(f_objectp, "objectp", T_OBJECT) TYPEP(f_floatp, "floatp", T_FLOAT) -TYPEP(f_functionp, "functionp", T_FUNCTION) +void f_sort(INT32 args); +void f_rows(INT32 args); +void f_column(INT32 args); +void f__verify_internals(INT32 args); +void f_localtime(INT32 args); +void f_glob(INT32 args); void init_builtin_efuns(); /* Prototypes end here */ diff --git a/src/call_out.h b/src/call_out.h deleted file mode 100644 index 7f51b71373327ab8df90a2ab7508881857606773..0000000000000000000000000000000000000000 --- a/src/call_out.h +++ /dev/null @@ -1,41 +0,0 @@ -/*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) -||| See the files COPYING and DISCLAIMER for more information. -\*/ -#ifndef CALL_OUT_H -#define CALL_OUT_H - -#include "types.h" - -#ifdef HAVE_TIME_H -/* Needed for time_t */ -#include <time.h> -#undef HAVE_TIME_H -#endif - -struct call_out_s -{ - time_t time; - struct object *caller; - struct array *args; -}; - -typedef struct call_out_s call_out; - -extern call_out **pending_calls; /* pointer to first busy pointer */ -extern int num_pending_calls; /* no of busy pointers in buffer */ - -/* Prototypes begin here */ -void f_call_out(INT32 args); -void do_call_outs(); -void f_find_call_out(INT32 args); -void f_remove_call_out(INT32 args); -struct array *get_all_call_outs(); -void f_call_out_info(INT32 args); -void free_all_call_outs(); -time_t get_next_call_out(); -void verify_all_call_outs(); -/* Prototypes end here */ - -#endif diff --git a/src/callback.c b/src/callback.c index 414b5eb331ef6d3eac7e26d6270f3b3d0944985c..8832009b0765007cf17c88d34f981a08ef9cb41f 100644 --- a/src/callback.c +++ b/src/callback.c @@ -1,113 +1,127 @@ /*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ #include "macros.h" #include "callback.h" -struct callback_list +/* + * This file is used to simplify the management of callbacks when certain + * events occur. The callbacks are managed as linked lists, allocated in + * chunks. + */ + +/* FIXME: free all chunks of memory at exit */ + +struct callback { - struct callback_list *next; - struct callback call; + struct callback *next; + callback_func call; + callback_func free_func; + void *arg; }; -struct callback *first_callback =0; +#define CALLBACK_CHUNK 128 -void unlink_callback(struct callback *c) -{ - if(c->next) c->next->prev=c->prev; - if(c->prev) c->prev->next=c->next; -} +struct callback_block { + struct callback_block *next; + struct callback callbacks[CALLBACK_CHUNK]; +}; -void link_callback(struct callback *c) -{ - if(first_callback) first_callback->prev=c; - first_callback=c; - c->next=first_callback; - c->prev=0; -} +static struct callback_block *callback_chunks=0; +static struct callback *first_callback =0; +static struct callback *free_callbacks =0; -void do_callback(struct callback *c) +/* Return the first free callback struct, allocate more if needed */ +static struct callback *get_free_callback() { - c->args->refs++; - push_array_items(c->args); - f_call_function(c->args->size); -} + struct callback *tmp; + if(!(tmp=free_callbacks)) + { + int e; + struct callback_block *tmp2; + tmp2=ALLOC_STRUCT(callback_block); + tmp2->next=callback_chunks; + callback_chunks=tmp2; -void unlink_and_call_callback(struct callback *c) -{ - int size; - size=c->args->size; - push_array_items(c->args); - c->args=0; - f_call_function(size); - unlink_callback(c); + for(e=0;e<(int)sizeof(CALLBACK_CHUNK);e++) + { + tmp2->callbacks[e].next=tmp; + tmp=tmp2->callbacks+e; + } + } + free_callbacks=tmp->next; + return tmp; } -/*** ***/ - -void call_callback_list(struct callback_list **ptr) +/* Traverse a linked list of callbacks and call all the active callbacks + * in the list. Deactivated callbacks are freed and placed in the free list. + */ +void call_callback(struct callback **ptr, void *arg) { - struct callback_list *l; + struct callback *l; while(l=*ptr) { - if(l->call.args) + if(l->call) l->call(l,l->arg, arg); + + if(!l->call) { - do_callback(& l->call); - ptr=& l->next; - }else{ - unlink_callback(& l->call); *ptr=l->next; - free((char *)l); + l->next=free_callbacks; + free_callbacks=l; + }else{ + ptr=& l->next; } } } -/* NOTICE, eats one reference off array! */ -struct callback_list *add_to_callback_list(struct callback_list **ptr, struct array *a) +/* Add a callback to the linked list pointed to by ptr. */ +struct callback *add_to_callback(struct callback **ptr, + callback_func call, + void *arg, + callback_func free_func) { - struct callback_list *l; - l=ALLOC_STRUCT(callback_list); - link_callback(& l->call); - l->call.args=a; + struct callback *l; + l=get_free_callback(); + l->call=call; + l->arg=arg; + l->next=*ptr; *ptr=l; + return l; } -void remove_callback(struct callback_list *l) +/* This function deactivates a callback. + * It is not actually freed until next time this callback is "called" + */ +void *remove_callback(struct callback *l) { - free_array(l->call.args); - l->call.args=0; + l->call=0; + return l->arg; } -void free_callback_list(struct callback_list **ptr) +/* Free all the callbacks in a linked list of callbacks */ +void free_callback(struct callback **ptr) { - struct callback_list *l; + struct callback *l; while(l=*ptr) { - if(l->call.args) - free_array(l->call.args); - - unlink_callback(& l->call); + if(l->arg && l->free_func) + l->free_func(l, l->arg, 0); *ptr=l->next; - free((char *)l); + l->next=free_callbacks; + free_callbacks=l; } } -void call_and_free_callback_list(struct callback_list **ptr) +void cleanup_callbacks() { - struct callback_list *l; - while(l=*ptr) + while(callback_chunks) { - if(l->call.args) - unlink_and_call_callback(& l->call); - else - unlink_callback(& l->call); - - *ptr=l->next; - free((char *)l); + struct callback_block *tmp=callback_chunks; + callback_chunks=tmp->next; + free((char *)tmp); } } - diff --git a/src/callback.h b/src/callback.h index ff8fd35afa38d65f7a455c79e9a271c2f195826d..29c36594beb40f295f0aa97a7bd4c1870b9b9ee8 100644 --- a/src/callback.h +++ b/src/callback.h @@ -1,6 +1,6 @@ /*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ #ifndef CALLBACK_H @@ -8,20 +8,21 @@ #include "array.h" +struct callback; + +typedef void (*callback_func)(struct callback *, void *,void *); + /* Prototypes begin here */ -struct callback -{ - struct callback *next, *prev; - struct array *args; -}; -struct callback_list; -void unlink_callback(struct callback *c); -void link_callback(struct callback *c); -void do_callback(struct callback *c); -void unlink_and_call_callback(struct callback *c); -void call_callback_list(struct callback_list **ptr); -struct callback_list *add_to_callback_list(struct callback_list **ptr, struct array *a); -void remove_from_callback_list(struct callback_list *l); +struct callback; +struct callback_block; +void call_callback(struct callback **ptr, void *arg); +struct callback *add_to_callback(struct callback **ptr, + callback_func call, + void *arg, + callback_func free_func); +void *remove_callback(struct callback *l); +void free_callback(struct callback **ptr); +void cleanup_callbacks(); /* Prototypes end here */ #endif diff --git a/src/compilation.h b/src/compilation.h index dab80af780f509ead00c582262d54341108fe3ef..4237e2a744284ad4241db1f38b27b675b6f7fa84 100644 --- a/src/compilation.h +++ b/src/compilation.h @@ -19,23 +19,29 @@ */ #ifdef STRUCT -#define IMEMBER(X,Y,Z) X Y Z ; -#define ZMEMBER(X,Y,Z) X Y Z ; +#define IMEMBER(X,Y) X Y ; +#define IMEMBER2(X,Y,Z) X Y Z ; +#define ZMEMBER(X,Y) X Y ; +#define ZMEMBER2(X,Y,Z) X Y Z ; #define SNAME(X,Y) struct X { struct X *previous; #define SEND }; #endif #ifdef DECLARE -#define IMEMBER(X,Y,Z) -#define ZMEMBER(X,Y,Z) +#define IMEMBER(X,Y) +#define IMEMBER2(X,Y,Z) +#define ZMEMBER(X,Y) +#define ZMEMBER2(X,Y,Z) #define SNAME(X,Y) static struct X * Y = 0; #define SEND #endif #ifdef PUSH -#define IMEMBER(X,Y,Z) MEMCPY((char *)&(oLd->Y), (char *)&(Y), sizeof(Y)); -#define ZMEMBER(X,Y,Z) MEMCPY((char *)&(oLd->Y), (char *)&(Y), sizeof(Y)); \ - MEMSET((char *)&(Y), 0, sizeof(Y)); +#define IMEMBER(X,Y) MEMCPY((char *)&(oLd->Y), (char *)&(Y), sizeof(Y)); +#define IMEMBER2(X,Y,Z) IMEMBER(X,Y) +#define ZMEMBER(X,Y) MEMCPY((char *)&(oLd->Y), (char *)&(Y), sizeof(Y)); \ + MEMSET((char *)&(Y), 0, sizeof(Y)); +#define ZMEMBER2(X,Y,Z) ZMEMBER(X,Y) #define SNAME(X,Y) { \ struct X *oLd; \ oLd=ALLOC_STRUCT(X); \ @@ -45,8 +51,10 @@ #ifdef POP -#define IMEMBER(X,Y,Z) MEMCPY((char *)&(Y), (char *)&(oLd->Y), sizeof(Y)); -#define ZMEMBER(X,Y,Z) MEMCPY((char *)&(Y), (char *)&(oLd->Y), sizeof(Y)); +#define IMEMBER(X,Y) MEMCPY((char *)&(Y), (char *)&(oLd->Y), sizeof(Y)); +#define IMEMBER2(X,Y,Z) IMEMBER(X,Y) +#define ZMEMBER(X,Y) MEMCPY((char *)&(Y), (char *)&(oLd->Y), sizeof(Y)); +#define ZMEMBER2(X,Y,Z) ZMEMBER(X,Y) #define SNAME(X,Y) { \ struct X *oLd; \ oLd=Y; Y=oLd->previous; @@ -61,36 +69,36 @@ #ifdef DEBUG #define STRMEMBER(X,Y) \ PCODE(if(X) fatal("Variable %s not deallocated properly.\n",Y);) \ - ZMEMBER(struct lpc_string *,X,) + ZMEMBER(struct pike_string *,X) #else -#define STRMEMBER(X) \ - ZMEMBER(struct lpc_string *,X,) +#define STRMEMBER(X,Y) \ + ZMEMBER(struct pike_string *,X) #endif #ifdef FILE_STATE SNAME(file_state,previous_file_state) - ZMEMBER(INT32,old_line,) - ZMEMBER(INT32,current_line,) - ZMEMBER(INT32,nexpands,) - ZMEMBER(int,pragma_all_inline,) - ZMEMBER(struct inputstate *,istate,) - ZMEMBER(struct hash_table *,defines,) + ZMEMBER(INT32,old_line) + ZMEMBER(INT32,current_line) + ZMEMBER(INT32,nexpands) + ZMEMBER(int,pragma_all_inline) + ZMEMBER(struct inputstate *,istate) + ZMEMBER(struct hash_table *,defines) STRMEMBER(current_file,"current_file") SEND #endif #ifdef PROGRAM_STATE SNAME(program_state,previous_program_state) - ZMEMBER(INT32,last_line,) + ZMEMBER(INT32,last_line) STRMEMBER(last_file,"last_file") - ZMEMBER(struct program,fake_program,) - ZMEMBER(node *,init_node,) - ZMEMBER(INT32,last_pc,) - ZMEMBER(int,num_parse_error,) - ZMEMBER(struct locals *,local_variables,) - ZMEMBER(dynamic_buffer,inherit_names,) - ZMEMBER(dynamic_buffer,areas,[NUM_AREAS]) - IMEMBER(int,comp_stackp,) + ZMEMBER(struct program,fake_program) + ZMEMBER(node *,init_node) + ZMEMBER(INT32,last_pc) + ZMEMBER(int,num_parse_error) + ZMEMBER(struct locals *,local_variables) + ZMEMBER(dynamic_buffer,inherit_names) + ZMEMBER2(dynamic_buffer,areas,[NUM_AREAS]) + IMEMBER(int,comp_stackp) SEND #endif @@ -98,5 +106,7 @@ #undef STRMEMBER #undef IMEMBER #undef ZMEMBER +#undef IMEMBER2 +#undef ZMEMBER2 #undef SNAME #undef SEND diff --git a/src/config.cache b/src/config.cache new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/src/config.h b/src/config.h index fcb99f4b9ab47993a6e74af777c87fbae55d8762..fbb9439b2ee160fa0d74196656e50d131c660c07 100644 --- a/src/config.h +++ b/src/config.h @@ -1,6 +1,6 @@ /*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ #ifndef CONFIG_H @@ -9,7 +9,7 @@ /* * Define the evaluator stack size, used for just about everything. */ -#define EVALUATOR_STACK_SIZE 50000 +#define EVALUATOR_STACK_SIZE 100000 /* * The compiler stack is used when compiling to keep track of data. @@ -32,6 +32,13 @@ * Define the size of the cache that is used for method lookup. */ #define FIND_FUNCTION_HASHSIZE 4711 + +/* + * Undefine this to disable garabge collection + */ +#ifndef NO_GC +#define GC2 +#endif /* diff --git a/src/config.log b/src/config.log new file mode 100644 index 0000000000000000000000000000000000000000..83ea0463d946758c560d3f781d3573fc0d5ab882 --- /dev/null +++ b/src/config.log @@ -0,0 +1,6 @@ +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +configure:602: gcc -E conftest.c +configure:652: gcc -o conftest -g -O conftest.c 1>&5 +configure:742: gcc -o conftest -g -O -O conftest.c 1>&5 diff --git a/src/configure b/src/configure deleted file mode 100755 index cf13f80c6c189a12f092b97d3243e914bbf9bc28..0000000000000000000000000000000000000000 --- a/src/configure +++ /dev/null @@ -1,3831 +0,0 @@ -#! /bin/sh - -# Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.7 -# Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. -# -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. - -# Defaults: -ac_help= -ac_default_prefix=/usr/local -# Any additions from configure.in: - -# Initialize some variables set by options. -# The variables have the same names as the options, with -# dashes changed to underlines. -build=NONE -cache_file=./config.cache -exec_prefix=NONE -host=NONE -no_create= -nonopt=NONE -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -target=NONE -verbose= -x_includes=NONE -x_libraries=NONE -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datadir='${prefix}/share' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -libdir='${exec_prefix}/lib' -includedir='${prefix}/include' -oldincludedir='/usr/include' -infodir='${prefix}/info' -mandir='${prefix}/man' - -# Initialize some other variables. -subdirs= -MFLAGS= MAKEFLAGS= - -ac_prev= -for ac_option -do - - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval "$ac_prev=\$ac_option" - ac_prev= - continue - fi - - case "$ac_option" in - -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; - *) ac_optarg= ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case "$ac_option" in - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir="$ac_optarg" ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build="$ac_optarg" ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file="$ac_optarg" ;; - - -datadir | --datadir | --datadi | --datad | --data | --dat | --da) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ - | --da=*) - datadir="$ac_optarg" ;; - - -disable-* | --disable-*) - ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - eval "enable_${ac_feature}=no" ;; - - -enable-* | --enable-*) - ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; - *) ac_optarg=yes ;; - esac - eval "enable_${ac_feature}='$ac_optarg'" ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix="$ac_optarg" ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he) - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat << EOF -Usage: configure [options] [host] -Options: [defaults in brackets after descriptions] -Configuration: - --cache-file=FILE cache test results in FILE - --help print this message - --no-create do not create output files - --quiet, --silent do not print \`checking...' messages - --version print the version of autoconf that created configure -Directory and file names: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [same as prefix] - --bindir=DIR user executables in DIR [EPREFIX/bin] - --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] - --libexecdir=DIR program executables in DIR [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data in DIR - [PREFIX/share] - --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data in DIR - [PREFIX/com] - --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] - --libdir=DIR object code libraries in DIR [EPREFIX/lib] - --includedir=DIR C header files in DIR [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] - --infodir=DIR info documentation in DIR [PREFIX/info] - --mandir=DIR man documentation in DIR [PREFIX/man] - --srcdir=DIR find the sources in DIR [configure dir or ..] - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM - run sed PROGRAM on installed program names -EOF - cat << EOF -Host type: - --build=BUILD configure for building on BUILD [BUILD=HOST] - --host=HOST configure for HOST [guessed] - --target=TARGET configure for TARGET [TARGET=HOST] -Features and packages: - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --x-includes=DIR X include files are in DIR - --x-libraries=DIR X library files are in DIR -EOF - if test -n "$ac_help"; then - echo "--enable and --with options recognized:$ac_help" - fi - exit 0 ;; - - -host | --host | --hos | --ho) - ac_prev=host ;; - -host=* | --host=* | --hos=* | --ho=*) - host="$ac_optarg" ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir="$ac_optarg" ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir="$ac_optarg" ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir="$ac_optarg" ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir="$ac_optarg" ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst \ - | --locals | --local | --loca | --loc | --lo) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* \ - | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) - localstatedir="$ac_optarg" ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir="$ac_optarg" ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir="$ac_optarg" ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix="$ac_optarg" ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix="$ac_optarg" ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix="$ac_optarg" ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name="$ac_optarg" ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir="$ac_optarg" ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir="$ac_optarg" ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site="$ac_optarg" ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir="$ac_optarg" ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir="$ac_optarg" ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target="$ac_optarg" ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.7" - exit 0 ;; - - -with-* | --with-*) - ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi - ac_package=`echo $ac_package| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; - *) ac_optarg=yes ;; - esac - eval "with_${ac_package}='$ac_optarg'" ;; - - -without-* | --without-*) - ac_package=`echo $ac_option|sed -e 's/-*without-//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi - ac_package=`echo $ac_package| sed 's/-/_/g'` - eval "with_${ac_package}=no" ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes="$ac_optarg" ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries="$ac_optarg" ;; - - -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } - ;; - - *) - if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then - echo "configure: warning: $ac_option: invalid host type" 1>&2 - fi - if test "x$nonopt" != xNONE; then - { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } - fi - nonopt="$ac_option" - ;; - - esac -done - -if test -n "$ac_prev"; then - { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } -fi - -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - -# File descriptor usage: -# 0 standard input -# 1 file creation -# 2 errors and warnings -# 3 some systems may open it to /dev/tty -# 4 used on the Kubota Titan -# 6 checking for... messages and results -# 5 compiler messages saved in config.log -if test "$silent" = yes; then - exec 6>/dev/null -else - exec 6>&1 -fi -exec 5>./config.log - -echo "\ -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. -" 1>&5 - -# Strip out --no-create and --no-recursion so they do not pile up. -# Also quote any args containing shell metacharacters. -ac_configure_args= -for ac_arg -do - case "$ac_arg" in - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) ;; - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) - ac_configure_args="$ac_configure_args '$ac_arg'" ;; - *) ac_configure_args="$ac_configure_args $ac_arg" ;; - esac -done - -# NLS nuisances. -# Only set LANG and LC_ALL to C if already set. -# These must not be set unconditionally because not all systems understand -# e.g. LANG=C (notably SCO). -if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi -if test "${LANG+set}" = set; then LANG=C; export LANG; fi - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo > confdefs.h - -# A filename unique to this package, relative to the directory that -# configure is in, which we can look for to find out if srcdir is correct. -ac_unique_file=interpret.c - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then its parent. - ac_prog=$0 - ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` - test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. - srcdir=$ac_confdir - if test ! -r $srcdir/$ac_unique_file; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r $srcdir/$ac_unique_file; then - if test "$ac_srcdir_defaulted" = yes; then - { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } - else - { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } - fi -fi -srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` - -# Prefer explicitly selected file to automatically selected ones. -if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi -fi -for ac_site_file in $CONFIG_SITE; do - if test -r "$ac_site_file"; then - echo "loading site script $ac_site_file" - . "$ac_site_file" - fi -done - -if test -r "$cache_file"; then - echo "loading cache $cache_file" - . $cache_file -else - echo "creating cache $cache_file" - > $cache_file -fi - -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='echo $CPP $CPPFLAGS 1>&5; -$CPP $CPPFLAGS' -ac_compile='echo ${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5; -${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5' -ac_link='echo ${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5; -${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5' - -if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then - # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. - if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then - ac_n= ac_c=' -' ac_t=' ' - else - ac_n=-n ac_c= ac_t= - fi -else - ac_n= ac_c='\c' ac_t= -fi - - -# Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="gcc" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc" -fi -fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - -echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.c <<EOF -#ifdef __GNUC__ - yes; -#endif -EOF -if ${CC-cc} -E conftest.c 2>&5 | egrep yes >/dev/null 2>&1; then - ac_cv_prog_gcc=yes -else - ac_cv_prog_gcc=no -fi -fi - -echo "$ac_t""$ac_cv_prog_gcc" 1>&6 -if test $ac_cv_prog_gcc = yes; then - GCC=yes - if test "${CFLAGS+set}" != set; then - echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - echo 'void f(){}' > conftest.c -if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then - ac_cv_prog_gcc_g=yes -else - ac_cv_prog_gcc_g=no -fi -rm -f conftest* - -fi - -echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6 - if test $ac_cv_prog_gcc_g = yes; then - CFLAGS="-g -O" - else - CFLAGS="-O" - fi - fi -else - GCC= - test "${CFLAGS+set}" = set || CFLAGS="-g" -fi - - -# We need some special hacks when running slowaris -# Extract the first word of "uname", so it can be a program name with args. -set dummy uname; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_path_uname_prog'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - case "$uname_prog" in - /*) - ac_cv_path_uname_prog="$uname_prog" # Let the user override the test with a path. - ;; - *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_uname_prog="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_path_uname_prog" && ac_cv_path_uname_prog="no" - ;; -esac -fi -uname_prog="$ac_cv_path_uname_prog" -if test -n "$uname_prog"; then - echo "$ac_t""$uname_prog" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -echo $ac_n "checking operating system""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'lpc_cv_sys_os'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - -if test "$uname_prog" != "no"; then - lpc_cv_sys_os="`uname`" - - if test "$lpc_cv_sys_os" = "SunOS"; then - case "`uname -r`" in - 5.*) lpc_cv_sys_os="Solaris"; - esac - fi -else - lpc_cv_sys_os="Not Solaris" -fi - -fi - -echo "$ac_t""$lpc_cv_sys_os" 1>&6 - - -OLD_CFLAGS="$CFLAGS" -OPTIMIZE=""; - -echo $ac_n "checking -O""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'lpc_cv_option_opt'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - - CFLAGS="$OLD_CFLAGS -O" - cat > conftest.$ac_ext <<EOF -#line 659 "configure" -#include "confdefs.h" - -int main() { return 0; } -int t() { - exit(0); -; return 0; } -EOF -if eval $ac_link; then - rm -rf conftest* - lpc_cv_option_opt=yes -else - rm -rf conftest* - lpc_cv_option_opt=no -fi -rm -f conftest* - - -fi - - -if test "$lpc_cv_option_opt" = "yes" ; then - CFLAGS="$OLD_CFLAGS -O" - OPTIMIZE="$OPTIMIZE -O" - echo "$ac_t""-O found" 1>&6 -else - echo "$ac_t""-O not found" 1>&6 -fi - -CFLAGS="$OLD_CFLAGS" - -if test "$GCC" = "yes"; then - WARN="-g -W -Wunused -Wformat" - - echo $ac_n "checking -pipe""... $ac_c" 1>&6 - if eval "test \"`echo '$''{'lpc_cv_option_pipe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - - CFLAGS="$OLD_CFLAGS -pipe" - cat > conftest.$ac_ext <<EOF -#line 700 "configure" -#include "confdefs.h" - -int main() { return 0; } -int t() { - exit(0); -; return 0; } -EOF -if eval $ac_link; then - rm -rf conftest* - lpc_cv_option_pipe=yes -else - rm -rf conftest* - lpc_cv_option_pipe=no -fi -rm -f conftest* - - -fi - - - if test "$lpc_cv_option_pipe" = "yes" ; then - CFLAGS="$OLD_CFLAGS -pipe" - OPTIMIZE="$OPTIMIZE -pipe" - echo "$ac_t""-pipe found" 1>&6 - else - echo "$ac_t""-pipe not found" 1>&6 - CFLAGS="$OLD_CFLAGS" - fi - - -else - WARN="" -# -# Special hack for HP-UX stupid cc -# - if test "$lpc_cv_sys_os" = "HP-UX"; then - OLD_CC="${CC-cc}" - CC="$CC -Aa -D_HPUX_SOURCE +Olibcalls" - cat > conftest.$ac_ext <<EOF -#line 740 "configure" -#include "confdefs.h" -int foo(int bar); -int main() { return 0; } -int t() { - exit(0); -; return 0; } -EOF -if eval $ac_link; then - : -else - rm -rf conftest* - CC="$OLD_CC" -fi -rm -f conftest* - - fi -fi - -echo $ac_n "checking ansi prototype capability""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'lpc_cv_sys_ansi_prototypes'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - - cat > conftest.$ac_ext <<EOF -#line 765 "configure" -#include "confdefs.h" -int foo(int bar); -int main() { return 0; } -int t() { - exit(0); -; return 0; } -EOF -if eval $ac_link; then - rm -rf conftest* - lpc_cv_sys_ansi_prototypes=yes -else - rm -rf conftest* - lpc_cv_sys_ansi_prototypes=no -fi -rm -f conftest* - - -fi - - -if test "$lpc_cv_sys_ansi_prototypes" = "yes"; then - echo "$ac_t""yes" 1>&6 -else - echo "$ac_t""no" 1>&6 - exit 1 -fi - - -ac_aux_dir= -for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do - if test -f $ac_dir/install-sh; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f $ac_dir/install.sh; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - fi -done -if test -z "$ac_aux_dir"; then - { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } -fi -ac_config_guess=$ac_aux_dir/config.guess -ac_config_sub=$ac_aux_dir/config.sub -ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. - -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# ./install, which can be erroneously created by make from ./install.sh. -echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -if test -z "$INSTALL"; then -if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - # Account for people who put trailing slashes in PATH elements. - case "$ac_dir/" in - /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - for ac_prog in ginstall installbsd scoinst install; do - if test -f $ac_dir/$ac_prog; then - if test $ac_prog = install && - grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - # OSF/1 installbsd also uses dspmsg, but is usable. - : - else - ac_cv_path_install="$ac_dir/$ac_prog -c" - break 2 - fi - fi - done - ;; - esac - done - IFS="$ac_save_ifs" - -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL="$ac_cv_path_install" - else - # As a last resort, use the slow shell script. We don't cache a - # path for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the path is relative. - INSTALL="$ac_install_sh" - fi -fi -echo "$ac_t""$INSTALL" 1>&6 - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - -for ac_prog in 'bison -y' byacc -do -# Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$YACC"; then - ac_cv_prog_YACC="$YACC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_YACC="$ac_prog" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -YACC="$ac_cv_prog_YACC" -if test -n "$YACC"; then - echo "$ac_t""$YACC" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -test -n "$YACC" && break -done -test -n "$YACC" || YACC="yacc" - -echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then -if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - # This must be in double quotes, not single quotes, because CPP may get - # substituted into the Makefile and "${CC-cc}" will confuse make. - CPP="${CC-cc} -E" - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. - cat > conftest.$ac_ext <<EOF -#line 920 "configure" -#include "confdefs.h" -#include <assert.h> -Syntax Error -EOF -eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - rm -rf conftest* - CPP="${CC-cc} -E -traditional-cpp" - cat > conftest.$ac_ext <<EOF -#line 934 "configure" -#include "confdefs.h" -#include <assert.h> -Syntax Error -EOF -eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - rm -rf conftest* - CPP=/lib/cpp -fi -rm -f conftest* -fi -rm -f conftest* - ac_cv_prog_CPP="$CPP" -fi - CPP="$ac_cv_prog_CPP" -else - ac_cv_prog_CPP="$CPP" -fi -echo "$ac_t""$CPP" 1>&6 - -# Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_RANLIB="ranlib" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" -fi -fi -RANLIB="$ac_cv_prog_RANLIB" -if test -n "$RANLIB"; then - echo "$ac_t""$RANLIB" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -set dummy ${MAKE-make}; ac_make=$2 -if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftestmake <<\EOF -all: - @echo 'ac_maketemp="${MAKE}"' -EOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. -eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` -if test -n "$ac_maketemp"; then - eval ac_cv_prog_make_${ac_make}_set=yes -else - eval ac_cv_prog_make_${ac_make}_set=no -fi -rm -f conftestmake -fi -if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then - echo "$ac_t""yes" 1>&6 - SET_MAKE= -else - echo "$ac_t""no" 1>&6 - SET_MAKE="MAKE=${MAKE-make}" -fi - - -echo $ac_n "checking first yacc define""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'lpc_cv_yacc_first'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - -cat >conftest.y <<\EOF -%token GURKA -%% -all: GURKA -%% -EOF -lpc_cv_yacc_first=257; -if $YACC -d conftest.y ; then - if test -f y.tab.h; then - lpc_cv_yacc_first=`egrep GURKA y.tab.h | sed 's/^#[^0-9]*\([0-9]*\)[^0-9]*$/\1/'` - echo $lpc_cv_yacc_first >conftest.out - if egrep '^(0|1|2|3|4|5|6|7|8|9)+$' conftest.out >/dev/null 2>&1; then - echo >/dev/null - else - lpc_cv_yacc_first=257 - fi - fi -fi - -fi - -echo "$ac_t""$lpc_cv_yacc_first" 1>&6 -cat >> confdefs.h <<EOF -#define F_OFFSET $lpc_cv_yacc_first -EOF - - -rm -rf conftest.y y.tab.c y.tab.h conftest.out - -for ac_hdr in sys/rusage.h time.h sys/time.h unistd.h stdlib.h memory.h values.h \ - string.h fcntl.h sys/filio.h sys/sockio.h crypt.h locale.h sys/resource.h \ - sys/select.h netdb.h -do -ac_safe=`echo "$ac_hdr" | tr './\055' '___'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <<EOF -#line 1058 "configure" -#include "confdefs.h" -#include <$ac_hdr> -EOF -eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'` - cat >> confdefs.h <<EOF -#define $ac_tr_hdr 1 -EOF - -else - echo "$ac_t""no" 1>&6 -fi -done - -# If we cannot run a trivial program, we must be cross compiling. -echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - ac_cv_c_cross=yes -else -cat > conftest.$ac_ext <<EOF -#line 1095 "configure" -#include "confdefs.h" -main(){return(0);} -EOF -eval $ac_link -if test -s conftest && (./conftest; exit) 2>/dev/null; then - ac_cv_c_cross=no -else - ac_cv_c_cross=yes -fi -fi -rm -fr conftest* -fi - -echo "$ac_t""$ac_cv_c_cross" 1>&6 -cross_compiling=$ac_cv_c_cross - -echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <<EOF -#line 1117 "configure" -#include "confdefs.h" -#include <stdlib.h> -#include <stdarg.h> -#include <string.h> -#include <float.h> -EOF -eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - ac_cv_header_stdc=yes -else - echo "$ac_err" >&5 - rm -rf conftest* - ac_cv_header_stdc=no -fi -rm -f conftest* - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. -cat > conftest.$ac_ext <<EOF -#line 1139 "configure" -#include "confdefs.h" -#include <string.h> -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "memchr" >/dev/null 2>&1; then - : -else - rm -rf conftest* - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. -cat > conftest.$ac_ext <<EOF -#line 1157 "configure" -#include "confdefs.h" -#include <stdlib.h> -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "free" >/dev/null 2>&1; then - : -else - rm -rf conftest* - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. -if test "$cross_compiling" = yes; then - : -else -cat > conftest.$ac_ext <<EOF -#line 1178 "configure" -#include "confdefs.h" -#include <ctype.h> -#define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int main () { int i; for (i = 0; i < 256; i++) -if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); -exit (0); } - -EOF -eval $ac_link -if test -s conftest && (./conftest; exit) 2>/dev/null; then - : -else - ac_cv_header_stdc=no -fi -fi -rm -fr conftest* -fi -fi - -echo "$ac_t""$ac_cv_header_stdc" 1>&6 -if test $ac_cv_header_stdc = yes; then - cat >> confdefs.h <<\EOF -#define STDC_HEADERS 1 -EOF - -fi - - -echo $ac_n "checking size of char *""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_sizeof_char_p'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else -cat > conftest.$ac_ext <<EOF -#line 1217 "configure" -#include "confdefs.h" -#include <stdio.h> -main() -{ - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(char *)); - exit(0); -} -EOF -eval $ac_link -if test -s conftest && (./conftest; exit) 2>/dev/null; then - ac_cv_sizeof_char_p=`cat conftestval` -else - ac_cv_sizeof_char_p=0 -fi -fi -rm -fr conftest* -fi -echo "$ac_t""$ac_cv_sizeof_char_p" 1>&6 -cat >> confdefs.h <<EOF -#define SIZEOF_CHAR_P $ac_cv_sizeof_char_p -EOF - - -echo $ac_n "checking size of long""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else -cat > conftest.$ac_ext <<EOF -#line 1251 "configure" -#include "confdefs.h" -#include <stdio.h> -main() -{ - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(long)); - exit(0); -} -EOF -eval $ac_link -if test -s conftest && (./conftest; exit) 2>/dev/null; then - ac_cv_sizeof_long=`cat conftestval` -else - ac_cv_sizeof_long=0 -fi -fi -rm -fr conftest* -fi -echo "$ac_t""$ac_cv_sizeof_long" 1>&6 -cat >> confdefs.h <<EOF -#define SIZEOF_LONG $ac_cv_sizeof_long -EOF - - -echo $ac_n "checking size of int""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else -cat > conftest.$ac_ext <<EOF -#line 1285 "configure" -#include "confdefs.h" -#include <stdio.h> -main() -{ - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(int)); - exit(0); -} -EOF -eval $ac_link -if test -s conftest && (./conftest; exit) 2>/dev/null; then - ac_cv_sizeof_int=`cat conftestval` -else - ac_cv_sizeof_int=0 -fi -fi -rm -fr conftest* -fi -echo "$ac_t""$ac_cv_sizeof_int" 1>&6 -cat >> confdefs.h <<EOF -#define SIZEOF_INT $ac_cv_sizeof_int -EOF - - -echo $ac_n "checking size of short""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else -cat > conftest.$ac_ext <<EOF -#line 1319 "configure" -#include "confdefs.h" -#include <stdio.h> -main() -{ - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(short)); - exit(0); -} -EOF -eval $ac_link -if test -s conftest && (./conftest; exit) 2>/dev/null; then - ac_cv_sizeof_short=`cat conftestval` -else - ac_cv_sizeof_short=0 -fi -fi -rm -fr conftest* -fi -echo "$ac_t""$ac_cv_sizeof_short" 1>&6 -cat >> confdefs.h <<EOF -#define SIZEOF_SHORT $ac_cv_sizeof_short -EOF - - -echo $ac_n "checking size of float""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else -cat > conftest.$ac_ext <<EOF -#line 1353 "configure" -#include "confdefs.h" -#include <stdio.h> -main() -{ - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(float)); - exit(0); -} -EOF -eval $ac_link -if test -s conftest && (./conftest; exit) 2>/dev/null; then - ac_cv_sizeof_float=`cat conftestval` -else - ac_cv_sizeof_float=0 -fi -fi -rm -fr conftest* -fi -echo "$ac_t""$ac_cv_sizeof_float" 1>&6 -cat >> confdefs.h <<EOF -#define SIZEOF_FLOAT $ac_cv_sizeof_float -EOF - - -echo $ac_n "checking size of double""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else -cat > conftest.$ac_ext <<EOF -#line 1387 "configure" -#include "confdefs.h" -#include <stdio.h> -main() -{ - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(double)); - exit(0); -} -EOF -eval $ac_link -if test -s conftest && (./conftest; exit) 2>/dev/null; then - ac_cv_sizeof_double=`cat conftestval` -else - ac_cv_sizeof_double=0 -fi -fi -rm -fr conftest* -fi -echo "$ac_t""$ac_cv_sizeof_double" 1>&6 -cat >> confdefs.h <<EOF -#define SIZEOF_DOUBLE $ac_cv_sizeof_double -EOF - - - -echo $ac_n "checking for size_t""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <<EOF -#line 1419 "configure" -#include "confdefs.h" -#include <sys/types.h> -#if STDC_HEADERS -#include <stdlib.h> -#endif -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "size_t" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_type_size_t=yes -else - rm -rf conftest* - ac_cv_type_size_t=no -fi -rm -f conftest* - -fi -echo "$ac_t""$ac_cv_type_size_t" 1>&6 -if test $ac_cv_type_size_t = no; then - cat >> confdefs.h <<\EOF -#define size_t unsigned -EOF - -fi - -echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <<EOF -#line 1450 "configure" -#include "confdefs.h" -#include <sys/types.h> -#if STDC_HEADERS -#include <stdlib.h> -#endif -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "pid_t" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_type_pid_t=yes -else - rm -rf conftest* - ac_cv_type_pid_t=no -fi -rm -f conftest* - -fi -echo "$ac_t""$ac_cv_type_pid_t" 1>&6 -if test $ac_cv_type_pid_t = no; then - cat >> confdefs.h <<\EOF -#define pid_t int -EOF - -fi - -echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <<EOF -#line 1481 "configure" -#include "confdefs.h" -#include <sys/types.h> -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "uid_t" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_type_uid_t=yes -else - rm -rf conftest* - ac_cv_type_uid_t=no -fi -rm -f conftest* - -fi - -echo "$ac_t""$ac_cv_type_uid_t" 1>&6 -if test $ac_cv_type_uid_t = no; then - cat >> confdefs.h <<\EOF -#define uid_t int -EOF - - cat >> confdefs.h <<\EOF -#define gid_t int -EOF - -fi - -echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <<EOF -#line 1514 "configure" -#include "confdefs.h" -#include <sys/types.h> -#include <signal.h> -#ifdef signal -#undef signal -#endif -#ifdef __cplusplus -extern "C" void (*signal (int, void (*)(int)))(int); -#else -void (*signal ()) (); -#endif - -int main() { return 0; } -int t() { -int i; -; return 0; } -EOF -if eval $ac_compile; then - rm -rf conftest* - ac_cv_type_signal=void -else - rm -rf conftest* - ac_cv_type_signal=int -fi -rm -f conftest* - -fi - -echo "$ac_t""$ac_cv_type_signal" 1>&6 -cat >> confdefs.h <<EOF -#define RETSIGTYPE $ac_cv_type_signal -EOF - - -echo $ac_n "checking for time_t""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_type_time_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <<EOF -#line 1554 "configure" -#include "confdefs.h" -#include <sys/types.h> -#if STDC_HEADERS -#include <stdlib.h> -#endif -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "time_t" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_type_time_t=yes -else - rm -rf conftest* - ac_cv_type_time_t=no -fi -rm -f conftest* - -fi -echo "$ac_t""$ac_cv_type_time_t" 1>&6 -if test $ac_cv_type_time_t = no; then - cat >> confdefs.h <<\EOF -#define time_t INT32 -EOF - -fi - - -echo $ac_n "checking for -lPW""... $ac_c" 1>&6 -ac_lib_var=`echo PW | tr '.-/+' '___p'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lPW $LIBS" -cat > conftest.$ac_ext <<EOF -#line 1589 "configure" -#include "confdefs.h" - -int main() { return 0; } -int t() { -alloca() -; return 0; } -EOF -if eval $ac_link; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo PW | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <<EOF -#define $ac_tr_lib 1 -EOF - - LIBS="-lPW $LIBS" - -else - echo "$ac_t""no" 1>&6 -fi - -echo $ac_n "checking for -lm""... $ac_c" 1>&6 -ac_lib_var=`echo m | tr '.-/+' '___p'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lm $LIBS" -cat > conftest.$ac_ext <<EOF -#line 1629 "configure" -#include "confdefs.h" - -int main() { return 0; } -int t() { -floor() -; return 0; } -EOF -if eval $ac_link; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo m | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <<EOF -#define $ac_tr_lib 1 -EOF - - LIBS="-lm $LIBS" - -else - echo "$ac_t""no" 1>&6 -fi - -if test "${ac_cv_lib_m}" = "no" -a "${lpc_cv_sys_os}" = "Linux"; then - echo "configure: warning: I will compensate for this by adding -lc -lm" 1>&2 - LIBS="${LIBS} -lc -lm" -fi -echo $ac_n "checking for -lsocket""... $ac_c" 1>&6 -ac_lib_var=`echo socket | tr '.-/+' '___p'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lsocket $LIBS" -cat > conftest.$ac_ext <<EOF -#line 1673 "configure" -#include "confdefs.h" - -int main() { return 0; } -int t() { -socket() -; return 0; } -EOF -if eval $ac_link; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo socket | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <<EOF -#define $ac_tr_lib 1 -EOF - - LIBS="-lsocket $LIBS" - -else - echo "$ac_t""no" 1>&6 -fi - -echo $ac_n "checking for -lcrypt""... $ac_c" 1>&6 -ac_lib_var=`echo crypt | tr '.-/+' '___p'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lcrypt $LIBS" -cat > conftest.$ac_ext <<EOF -#line 1713 "configure" -#include "confdefs.h" - -int main() { return 0; } -int t() { -crypt() -; return 0; } -EOF -if eval $ac_link; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo crypt | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <<EOF -#define $ac_tr_lib 1 -EOF - - LIBS="-lcrypt $LIBS" - -else - echo "$ac_t""no" 1>&6 -fi - -if test "$ac_cv_lib_socket" = yes -o "$ac_cv_lib_ucb"; then - echo $ac_n "checking for -lnsl""... $ac_c" 1>&6 -ac_lib_var=`echo nsl | tr '.-/+' '___p'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lnsl $LIBS" -cat > conftest.$ac_ext <<EOF -#line 1754 "configure" -#include "confdefs.h" - -int main() { return 0; } -int t() { -main() -; return 0; } -EOF -if eval $ac_link; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo nsl | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <<EOF -#define $ac_tr_lib 1 -EOF - - LIBS="-lnsl $LIBS" - -else - echo "$ac_t""no" 1>&6 -fi - -fi - - -OLD_LIBOBJS="${LIBOBJS}" - -echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_func_memcmp'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - ac_cv_func_memcmp=no -else -cat > conftest.$ac_ext <<EOF -#line 1799 "configure" -#include "confdefs.h" - -main() -{ - char c0 = 0x40, c1 = 0x80, c2 = 0x81; - exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1); -} - -EOF -eval $ac_link -if test -s conftest && (./conftest; exit) 2>/dev/null; then - ac_cv_func_memcmp=yes -else - ac_cv_func_memcmp=no -fi -fi -rm -fr conftest* -fi - -echo "$ac_t""$ac_cv_func_memcmp" 1>&6 -test $ac_cv_func_memcmp = no && LIBOBJS="$LIBOBJS memcmp.o" - - -if test "${OLD_LIBOBJS}" = "${LIBOBJS}" ; then - cat >> confdefs.h <<\EOF -#define HAVE_MEMCMP 1 -EOF - -fi - -LIBOBJS="${OLD_LIBOBJS}" - -for ac_func in _crypt \ - bcopy \ - bzero \ - clock \ - crypt \ - fchmod \ - getcwd \ - getenv \ - getrlimit \ - getrusage \ - getwd \ - index \ - memchr \ - memcpy \ - memset \ - rindex \ - setlocale \ - setrlimit \ - sigaction \ - sigvec \ - strcasecmp \ - strchr \ - strcspn \ - strrchr \ - strtod \ - strtok \ - strtol \ - times \ - vfprintf \ - vsprintf \ - wait4 \ - waitpid \ - -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <<EOF -#line 1871 "configure" -#include "confdefs.h" -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ -#include <assert.h> -/* Override any gcc2 internal prototype to avoid an error. */ -char $ac_func(); - -int main() { return 0; } -int t() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if eval $ac_link; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* - -fi -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <<EOF -#define $ac_tr_func 1 -EOF - -else - echo "$ac_t""no" 1>&6 -fi -done - - - - - - echo $ac_n "checking for strchr declaration""... $ac_c" 1>&6 - if eval "test \"`echo '$''{'lpc_cv_decl_strchr'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - - lpc_cv_decl_strchr=nonexistant - for a in string.h unistd.h stdlib.h - do - cat > conftest.$ac_ext <<EOF -#line 1928 "configure" -#include "confdefs.h" -#include <$a> -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "strchr" >/dev/null 2>&1; then - rm -rf conftest* - lpc_cv_decl_strchr=existant; break -fi -rm -f conftest* - - done - -fi - - echo "$ac_t""$lpc_cv_decl_strchr" 1>&6 - if test "$lpc_cv_decl_strchr" = nonexistant; then - cat >> confdefs.h <<\EOF -#define STRCHR_DECL_MISSING 1 -EOF - - fi - - - echo $ac_n "checking for malloc declaration""... $ac_c" 1>&6 - if eval "test \"`echo '$''{'lpc_cv_decl_malloc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - - lpc_cv_decl_malloc=nonexistant - for a in memory.h unistd.h stdlib.h - do - cat > conftest.$ac_ext <<EOF -#line 1961 "configure" -#include "confdefs.h" -#include <$a> -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "malloc" >/dev/null 2>&1; then - rm -rf conftest* - lpc_cv_decl_malloc=existant; break -fi -rm -f conftest* - - done - -fi - - echo "$ac_t""$lpc_cv_decl_malloc" 1>&6 - if test "$lpc_cv_decl_malloc" = nonexistant; then - cat >> confdefs.h <<\EOF -#define MALLOC_DECL_MISSING 1 -EOF - - fi - - - echo $ac_n "checking for getpeername declaration""... $ac_c" 1>&6 - if eval "test \"`echo '$''{'lpc_cv_decl_getpeername'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - - lpc_cv_decl_getpeername=nonexistant - for a in sys/socket.h sys/socketvar.h sys/socketio.h - do - cat > conftest.$ac_ext <<EOF -#line 1994 "configure" -#include "confdefs.h" -#include <$a> -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "getpeername" >/dev/null 2>&1; then - rm -rf conftest* - lpc_cv_decl_getpeername=existant; break -fi -rm -f conftest* - - done - -fi - - echo "$ac_t""$lpc_cv_decl_getpeername" 1>&6 - if test "$lpc_cv_decl_getpeername" = nonexistant; then - cat >> confdefs.h <<\EOF -#define GETPEERNAME_DECL_MISSING 1 -EOF - - fi - - - echo $ac_n "checking for popen declaration""... $ac_c" 1>&6 - if eval "test \"`echo '$''{'lpc_cv_decl_popen'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - - lpc_cv_decl_popen=nonexistant - for a in stdio.h unistd.h - do - cat > conftest.$ac_ext <<EOF -#line 2027 "configure" -#include "confdefs.h" -#include <$a> -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "popen" >/dev/null 2>&1; then - rm -rf conftest* - lpc_cv_decl_popen=existant; break -fi -rm -f conftest* - - done - -fi - - echo "$ac_t""$lpc_cv_decl_popen" 1>&6 - if test "$lpc_cv_decl_popen" = nonexistant; then - cat >> confdefs.h <<\EOF -#define POPEN_DECL_MISSING 1 -EOF - - fi - - - echo $ac_n "checking for getenv declaration""... $ac_c" 1>&6 - if eval "test \"`echo '$''{'lpc_cv_decl_getenv'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - - lpc_cv_decl_getenv=nonexistant - for a in unistd.h stdlib.h - do - cat > conftest.$ac_ext <<EOF -#line 2060 "configure" -#include "confdefs.h" -#include <$a> -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "getenv" >/dev/null 2>&1; then - rm -rf conftest* - lpc_cv_decl_getenv=existant; break -fi -rm -f conftest* - - done - -fi - - echo "$ac_t""$lpc_cv_decl_getenv" 1>&6 - if test "$lpc_cv_decl_getenv" = nonexistant; then - cat >> confdefs.h <<\EOF -#define GETENV_DECL_MISSING 1 -EOF - - fi - - - echo $ac_n "checking for gethostname declaration""... $ac_c" 1>&6 - if eval "test \"`echo '$''{'lpc_cv_decl_gethostname'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - - lpc_cv_decl_gethostname=nonexistant - for a in unistd.h - do - cat > conftest.$ac_ext <<EOF -#line 2093 "configure" -#include "confdefs.h" -#include <$a> -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "gethostname" >/dev/null 2>&1; then - rm -rf conftest* - lpc_cv_decl_gethostname=existant; break -fi -rm -f conftest* - - done - -fi - - echo "$ac_t""$lpc_cv_decl_gethostname" 1>&6 - if test "$lpc_cv_decl_gethostname" = nonexistant; then - cat >> confdefs.h <<\EOF -#define GETHOSTNAME_DECL_MISSING 1 -EOF - - fi - - -echo $ac_n "checking return type of free""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'lpc_cv_sys_free_return'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <<EOF -#line 2122 "configure" -#include "confdefs.h" - -#ifdef HAVE_STDLIB_H -#include <stdlib.h> -#endif - -#ifdef HAVE_UNISTD_H -#include <unistd.h> -#endif - -#if !defined(STDC_HEADERS) && defined(HAVE_MEMORY_H) -#include <memory.h> -#endif - -void free(); - - -int main() { return 0; } -int t() { - -; return 0; } -EOF -if eval $ac_link; then - rm -rf conftest* - lpc_cv_sys_free_return='char *' - -else - rm -rf conftest* - lpc_cv_sys_free_return='void' - -fi -rm -f conftest* - -fi - - -if test "$lpc_cv_sys_free_return" = void; then - cat >> confdefs.h <<\EOF -#define FREE_RETURNS_VOID 1 -EOF - - echo "$ac_t""void" 1>&6; -else - echo "$ac_t""not void" 1>&6 -fi - -echo $ac_n "checking void* or char* from malloc""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'lpc_cv_sys_malloc_return'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - -cat > conftest.$ac_ext <<EOF -#line 2175 "configure" -#include "confdefs.h" - -#include <sys/types.h> - -#ifdef HAVE_STDLIB_H -#include <stdlib.h> -#endif - -#ifdef HAVE_UNISTD_H -#include <unistd.h> -#endif - -#if !defined(STDC_HEADERS) && defined(HAVE_MEMORY_H) -#include <memory.h> -#endif - -#define POINTER void * -POINTER malloc(size_t); - -#ifdef FREE_RETURNS_VOID -void free(POINTER); -#else -int free(POINTER); -#endif - - -int main() { return 0; } -int t() { - -; return 0; } -EOF -if eval $ac_link; then - rm -rf conftest* - lpc_cv_sys_malloc_return="void *" - -else - rm -rf conftest* - lpc_cv_sys_malloc_return="char *" - -fi -rm -f conftest* - -fi - - -echo "$ac_t""$lpc_cv_sys_malloc_return" 1>&6 -cat >> confdefs.h <<EOF -#define POINTER $lpc_cv_sys_malloc_return -EOF - - - -# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works -# for constant arguments. Useless! -echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <<EOF -#line 2235 "configure" -#include "confdefs.h" -#include <alloca.h> -int main() { return 0; } -int t() { -char *p = alloca(2 * sizeof(int)); -; return 0; } -EOF -if eval $ac_link; then - rm -rf conftest* - ac_cv_header_alloca_h=yes -else - rm -rf conftest* - ac_cv_header_alloca_h=no -fi -rm -f conftest* - -fi - -echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 -if test $ac_cv_header_alloca_h = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_ALLOCA_H 1 -EOF - -fi - -echo $ac_n "checking for alloca""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_func_alloca'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <<EOF -#line 2267 "configure" -#include "confdefs.h" - -#ifdef __GNUC__ -# define alloca __builtin_alloca -#else -# if HAVE_ALLOCA_H -# include <alloca.h> -# else -# ifdef _AIX - #pragma alloca -# else -# ifndef alloca /* predefined by HP cc +Olibcalls */ -char *alloca (); -# endif -# endif -# endif -#endif - -int main() { return 0; } -int t() { -char *p = (char *) alloca(1); -; return 0; } -EOF -if eval $ac_link; then - rm -rf conftest* - ac_cv_func_alloca=yes -else - rm -rf conftest* - ac_cv_func_alloca=no -fi -rm -f conftest* - -fi - -echo "$ac_t""$ac_cv_func_alloca" 1>&6 -if test $ac_cv_func_alloca = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_ALLOCA 1 -EOF - -fi - -if test $ac_cv_func_alloca = no; then - # The SVR3 libPW and SVR4 libucb both contain incompatible functions - # that cause trouble. Some versions do not even contain alloca or - # contain a buggy version. If you still want to use their alloca, - # use ar to extract alloca.o from them instead of compiling alloca.c. - ALLOCA=alloca.o - cat >> confdefs.h <<\EOF -#define C_ALLOCA 1 -EOF - - -echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <<EOF -#line 2326 "configure" -#include "confdefs.h" -#if defined(CRAY) && ! defined(CRAY2) -webecray -#else -wenotbecray -#endif - -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "webecray" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_os_cray=yes -else - rm -rf conftest* - ac_cv_os_cray=no -fi -rm -f conftest* - -fi - -echo "$ac_t""$ac_cv_os_cray" 1>&6 -if test $ac_cv_os_cray = yes; then -for ac_func in _getb67 GETB67 getb67; do - echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <<EOF -#line 2355 "configure" -#include "confdefs.h" -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ -#include <assert.h> -/* Override any gcc2 internal prototype to avoid an error. */ -char $ac_func(); - -int main() { return 0; } -int t() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if eval $ac_link; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* - -fi -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<EOF -#define CRAY_STACKSEG_END $ac_func -EOF - - break -else - echo "$ac_t""no" 1>&6 -fi - -done -fi - -echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - ac_cv_c_stack_direction=0 -else -cat > conftest.$ac_ext <<EOF -#line 2409 "configure" -#include "confdefs.h" -find_stack_direction () -{ - static char *addr = 0; - auto char dummy; - if (addr == 0) - { - addr = &dummy; - return find_stack_direction (); - } - else - return (&dummy > addr) ? 1 : -1; -} -main () -{ - exit (find_stack_direction() < 0); -} -EOF -eval $ac_link -if test -s conftest && (./conftest; exit) 2>/dev/null; then - ac_cv_c_stack_direction=1 -else - ac_cv_c_stack_direction=-1 -fi -fi -rm -fr conftest* -fi - -echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 -cat >> confdefs.h <<EOF -#define STACK_DIRECTION $ac_cv_c_stack_direction -EOF - -fi - - -echo $ac_n "checking for working const""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <<EOF -#line 2451 "configure" -#include "confdefs.h" - -int main() { return 0; } -int t() { - -/* Ultrix mips cc rejects this. */ -typedef int charset[2]; const charset x; -/* SunOS 4.1.1 cc rejects this. */ -char const *const *ccp; -char **p; -/* NEC SVR4.0.2 mips cc rejects this. */ -struct point {int x, y;}; -static struct point const zero = {0,0}; -/* AIX XL C 1.02.0.0 rejects this. - It does not let you subtract one const X* pointer from another in an arm - of an if-expression whose if-part is not a constant expression */ -const char *g = "string"; -ccp = &g + (g ? g-g : 0); -/* HPUX 7.0 cc rejects these. */ -++ccp; -p = (char**) ccp; -ccp = (char const *const *) p; -{ /* SCO 3.2v4 cc rejects this. */ - char *t; - char const *s = 0 ? (char *) 0 : (char const *) 0; - - *t++ = 0; -} -{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ - int x[] = {25, 17}; - const int *foo = &x[0]; - ++foo; -} -{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ - typedef const int *iptr; - iptr p = 0; - ++p; -} -{ /* AIX XL C 1.02.0.0 rejects this saying - "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ - struct s { int j; const int *ap[3]; }; - struct s *b; b->j = 5; -} -{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ - const int foo = 10; -} - -; return 0; } -EOF -if eval $ac_compile; then - rm -rf conftest* - ac_cv_c_const=yes -else - rm -rf conftest* - ac_cv_c_const=no -fi -rm -f conftest* - -fi - -echo "$ac_t""$ac_cv_c_const" 1>&6 -if test $ac_cv_c_const = no; then - cat >> confdefs.h <<\EOF -#define const -EOF - -fi - -echo $ac_n "checking for inline""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_cv_c_inline=no -for ac_kw in inline __inline__ __inline; do - cat > conftest.$ac_ext <<EOF -#line 2527 "configure" -#include "confdefs.h" - -int main() { return 0; } -int t() { -} $ac_kw foo() { -; return 0; } -EOF -if eval $ac_compile; then - rm -rf conftest* - ac_cv_c_inline=$ac_kw; break -fi -rm -f conftest* - -done - -fi - -echo "$ac_t""$ac_cv_c_inline" 1>&6 -case "$ac_cv_c_inline" in - inline | yes) ;; - no) cat >> confdefs.h <<\EOF -#define inline -EOF - ;; - *) cat >> confdefs.h <<EOF -#define inline $ac_cv_c_inline -EOF - ;; -esac - - -for ac_func in ualarm -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <<EOF -#line 2566 "configure" -#include "confdefs.h" -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ -#include <assert.h> -/* Override any gcc2 internal prototype to avoid an error. */ -char $ac_func(); - -int main() { return 0; } -int t() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if eval $ac_link; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* - -fi -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 -LIBOBJS="$LIBOBJS ${ac_func}.o" -fi - -done - - -case "$LIBOBJS" in - *ualarm.o*) ;; - *) - cat >> confdefs.h <<\EOF -#define HAVE_UALARM 1 -EOF - - ;; -esac - -echo $ac_n "checking byteorder""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'lpc_cv_hardware_byteorder'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - -if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else -cat > conftest.$ac_ext <<EOF -#line 2628 "configure" -#include "confdefs.h" - -#include <stdio.h> - -int main() -{ -#if SIZEOF_INT == 4 -#define T int -#else -#define T long -#endif - FILE *f; - T a; - int e; - for(e=0;e<sizeof(T);e++) - ((char *)&a)[e]=(e+1) % 10; - - f=fopen("conftest.out.2","w"); - for(e=0;e<sizeof(T);e++) - { - fprintf(f,"%d",(int)(a & 255)); - a>>=8; - } - fprintf(f,"\n"); - fclose(f); - - return 0; -} -EOF -eval $ac_link -if test -s conftest && (./conftest; exit) 2>/dev/null; then - lpc_cv_hardware_byteorder=`cat conftest.out.2` - -else - lpc_cv_hardware_byteorder=0 - -fi -fi -rm -fr conftest* -fi - - -echo "$ac_t""$lpc_cv_hardware_byteorder" 1>&6 -cat >> confdefs.h <<EOF -#define BYTEORDER $lpc_cv_hardware_byteorder -EOF - - -echo $ac_n "checking for working memmem""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'lpc_cv_func_memmem'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - -if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else -cat > conftest.$ac_ext <<EOF -#line 2686 "configure" -#include "confdefs.h" - -#include <string.h> -char *a="foo bar gazonk"; -char *b="foo"; -char *c="bar"; -char *d="gazonk"; -int main() -{ - if(memmem(b,strlen(b),a,strlen(a))!=a || - memmem(c,strlen(c),a,strlen(a))!=(a+4) || - memmem(d,strlen(d),a,strlen(a))!=(a+8) || - memmem(d,0,a,strlen(a))!=a || - memmem(d,strlen(d)+1,a,strlen(a))!=0) - exit(1); - exit(0); -} - -EOF -eval $ac_link -if test -s conftest && (./conftest; exit) 2>/dev/null; then - lpc_cv_func_memmem=yes -else - lpc_cv_func_memmem=no -fi -fi -rm -fr conftest* -fi - - -if test "$lpc_cv_func_memmem" = yes; then - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF -#define HAVE_MEMMEM 1 -EOF - -else - echo "$ac_t""no" 1>&6 -fi - -echo $ac_n "checking for working strcoll""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'lpc_cv_func_strcoll'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - -if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else -cat > conftest.$ac_ext <<EOF -#line 2736 "configure" -#include "confdefs.h" - -#include <string.h> -int main() -{ - if(strcoll("a","b")< 0 && - strcoll("a","a")==0 && - strcoll("b","a")> 0) - exit(0); - exit(1); -} - -EOF -eval $ac_link -if test -s conftest && (./conftest; exit) 2>/dev/null; then - lpc_cv_func_strcoll=yes -else - lpc_cv_func_strcoll=no -fi -fi -rm -fr conftest* -fi - - -if test "$lpc_cv_func_strcoll" = yes; then - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF -#define HAVE_STRCOLL 1 -EOF - -else - echo "$ac_t""no" 1>&6 -fi - -echo $ac_n "checking for working memmove""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'lpc_cv_func_memmove'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - -if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else -cat > conftest.$ac_ext <<EOF -#line 2780 "configure" -#include "confdefs.h" - -#include <string.h> -char buf[100]; -int main() -{ - strcpy(buf,"foo bar gazonk elefantsnabel."); - if(strcmp(buf,"foo bar gazonk elefantsnabel.")) exit(1); - memmove(buf,buf+1,7); - if(strcmp(buf,"oo bar gazonk elefantsnabel.")) exit(1); - memmove(buf+1,buf+1,9); - if(strcmp(buf,"oo bar gazonk elefantsnabel.")) exit(1); - memmove(buf+1,buf,11); - if(strcmp(buf,"ooo bar gaznk elefantsnabel.")) exit(1); - exit(0); -} - -EOF -eval $ac_link -if test -s conftest && (./conftest; exit) 2>/dev/null; then - lpc_cv_func_memmove=yes -else - lpc_cv_func_memmove=no -fi -fi -rm -fr conftest* -fi - - -if test "$lpc_cv_func_memmove" = yes; then - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF -#define HAVE_MEMMOVE 1 -EOF - -else - echo "$ac_t""no" 1>&6 -fi - -echo $ac_n "checking how to extract an unsigned char""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'lpc_cv_method_extract_uchar'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - -if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else -cat > conftest.$ac_ext <<EOF -#line 2829 "configure" -#include "confdefs.h" - -int main() -{ - char i,*p; - i=-10; - p=&i; - if(*(unsigned char *)(p)!= 0x100 - 10) exit(1); - exit(0); -} - -EOF -eval $ac_link -if test -s conftest && (./conftest; exit) 2>/dev/null; then - lpc_cv_method_extract_uchar=by_cast -else - lpc_cv_method_extract_uchar=not_by_cast -fi -fi -rm -fr conftest* -fi - - -if test "$lpc_cv_method_extract_uchar" = by_cast; then - echo "$ac_t""by cast" 1>&6 - cat >> confdefs.h <<\EOF -#define EXTRACT_UCHAR_BY_CAST 1 -EOF - -else - echo "$ac_t""not by cast" 1>&6 -fi - -echo $ac_n "checking how to extract a signed char""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'lpc_cv_method_extract_char'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - -if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else -cat > conftest.$ac_ext <<EOF -#line 2872 "configure" -#include "confdefs.h" - -int main() -{ - char i,*p; - i=-10; - p=&i; - if(*(signed char *)(p)!= -10) exit(1); - exit(0); -} - -EOF -eval $ac_link -if test -s conftest && (./conftest; exit) 2>/dev/null; then - lpc_cv_method_extract_char=by_cast -else - lpc_cv_method_extract_char=not_by_cast -fi -fi -rm -fr conftest* -fi - - -if test "$lpc_cv_method_extract_char" = by_cast; then - echo "$ac_t""by cast" 1>&6 - cat >> confdefs.h <<\EOF -#define EXTRACT_CHAR_BY_CAST 1 -EOF - -else - echo "$ac_t""not by cast" 1>&6 -fi - - -echo $ac_n "checking if signals are oneshot or not""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'lpc_cv_sys_signal_oneshot'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - -if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else -cat > conftest.$ac_ext <<EOF -#line 2916 "configure" -#include "confdefs.h" - -#include <signal.h> -char sigrun=0; -RETSIGTYPE func(int sig) { sigrun=1; } - -int main() -{ -#define sig SIGSEGV - -#ifdef HAVE_SIGACTION - { - struct sigaction action; - action.sa_handler= func; - sigfillset(&action.sa_mask); -#ifdef SA_INTERRUPT - action.sa_flags=SA_INTERRUPT; -#endif - sigaction(sig,&action,0); - } -#else -#ifdef HAVE_SIGVEC - { - struct sigvec action; - action.sv_handler= func; - action.sv_mask=-1; -#ifdef SV_INTERRUPT - action.sv_flags=SV_INTERRUPT; -#endif - sigvec(sig,&action,0); - } -#else - signal(sig, func); -#endif -#endif - - kill(getpid(), sig); - while(!sigrun) sleep(1); - sigrun=0; - kill(getpid(), sig); - while(!sigrun) sleep(1); - sigrun=0; - exit(0); -} - -EOF -eval $ac_link -if test -s conftest && (./conftest; exit) 2>/dev/null; then - lpc_cv_sys_signal_oneshot=no -else - lpc_cv_sys_signal_oneshot=yes -fi -fi -rm -fr conftest* -fi - - -if test "$lpc_cv_sys_signal_oneshot" = yes; then - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF -#define SIGNAL_ONESHOT 1 -EOF - -else - echo "$ac_t""no" 1>&6 -fi - - - -echo $ac_n "checking available file descriptors""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'lpc_cv_max_open_fd'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - -if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else -cat > conftest.$ac_ext <<EOF -#line 2995 "configure" -#include "confdefs.h" - -#include <stdio.h> -#ifdef HAVE_SYS_TIME_H -#include <sys/time.h> -#endif -#ifdef HAVE_SYS_RESOURCE_H -#include <sys/resource.h> -#endif - -#ifndef MAX_FD -#define MAX_FD 256 -#endif - -int main() -{ - FILE *f; - long limit; - -#if !defined(RLIMIT_NOFILE) && defined(RLIMIT_OFILE) -#define RLIMIT_NOFILE RLIMIT_OFILE -#endif - -#if defined(HAVE_SETRLIMIT) && defined(RLIMIT_NOFILE) - struct rlimit lim; - - if(getrlimit(RLIMIT_NOFILE,&lim)) - { - limit = MAX_FD; - }else{ - if(lim.rlim_max == RLIM_INFINITY) - { - limit=16384; /* noone needs more */ - }else{ - limit=lim.rlim_max; - if(limit > 16384) limit=16384; - } - } -#else - limit = MAX_FD; -#endif - - f=fopen("conftest.out.2","w"); - fprintf(f,"%ld\n",(long)limit); - fclose(f); - - return 0; -} - -EOF -eval $ac_link -if test -s conftest && (./conftest; exit) 2>/dev/null; then - lpc_cv_max_open_fd=`cat conftest.out.2` - -else - lpc_cv_max_open_fd=256 - -fi -fi -rm -fr conftest* -fi - -echo "$ac_t""$lpc_cv_max_open_fd" 1>&6 -cat >> confdefs.h <<EOF -#define MAX_OPEN_FILEDESCRIPTORS $lpc_cv_max_open_fd -EOF - - -if test "$ac_cv_func_getrusage" = "yes"; then -echo $ac_n "checking full availability of struct rusage members""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'lpc_cv_func_getrusage_full'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - -cat > conftest.$ac_ext <<EOF -#line 3071 "configure" -#include "confdefs.h" - -#include <sys/time.h> -#ifdef HAVE_SYS_RUSAGE_H -#include <sys/rusage.h> -#endif -#include <sys/resource.h> -#ifndef RUSAGE_SELF -#define RUSAGE_SELF 0 -#endif - -int main() { return 0; } -int t() { - - struct rusage rus; - long *v = (long *)main; - getrusage(RUSAGE_SELF, &rus); - *v++ = rus.ru_maxrss; - *v++ = rus.ru_ixrss; - *v++ = rus.ru_idrss; - *v++ = rus.ru_isrss; - *v++ = rus.ru_minflt; - *v++ = rus.ru_majflt; - *v++ = rus.ru_nswap; - *v++ = rus.ru_inblock; - *v++ = rus.ru_oublock; - *v++ = rus.ru_msgsnd; - *v++ = rus.ru_msgrcv; - *v++ = rus.ru_nsignals; - *v++ = rus.ru_nvcsw; - *v++ = rus.ru_nivcsw; - -; return 0; } -EOF -if eval $ac_link; then - rm -rf conftest* - lpc_cv_func_getrusage_full=yes - -else - rm -rf conftest* - lpc_cv_func_getrusage_full=no - -fi -rm -f conftest* - -fi - - -if test "$lpc_cv_func_getrusage_full" = yes; then - echo "$ac_t""all there" 1>&6 -else - echo "$ac_t""getrusage is restricted" 1>&6 - cat >> confdefs.h <<\EOF -#define GETRUSAGE_RESTRICTED 1 -EOF - -fi - -else - -echo $ac_n "checking getrusage() through procfs""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'lpc_cv_getrusage_procfs'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - -cat > conftest.$ac_ext <<EOF -#line 3138 "configure" -#include "confdefs.h" - -#include <sys/procfs.h> -#include <sys/fcntl.h> -int proc_fd; -char proc_name[20]; - -int main() { return 0; } -int t() { - - sprintf(proc_name, "/proc/%05d", getpid()); - proc_fd = open(proc_name, O_RDONLY); - -; return 0; } -EOF -if eval $ac_link; then - rm -rf conftest* - lpc_cv_getrusage_procfs=yes - -else - rm -rf conftest* - lpc_cv_getrusage_procfs=no - -fi -rm -f conftest* - -fi - - -if test "$lpc_cv_getrusage_procfs" = yes; then - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF -#define GETRUSAGE_THROUGH_PROCFS 1 -EOF - -else - echo "$ac_t""no" 1>&6 -fi -fi - -echo $ac_n "checking checking for volatile""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'lpc_cv_volatile'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - - cat > conftest.$ac_ext <<EOF -#line 3185 "configure" -#include "confdefs.h" - -int main() { return 0; } -int t() { - volatile int foo=1; -; return 0; } -EOF -if eval $ac_link; then - rm -rf conftest* - lpc_cv_volatile=yes -else - rm -rf conftest* - lpc_cv_volatile=no -fi -rm -f conftest* - - -fi - - -if test "$lpc_cv_volatile" = yes; then - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF -#define VOLATILE volatile -EOF - -else - echo "$ac_t""no" 1>&6 - cat >> confdefs.h <<\EOF -#define VOLATILE -EOF - -fi - -echo $ac_n "checking for gcc function attributes""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'lpc_cv_gcc_attributes'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - -if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else -cat > conftest.$ac_ext <<EOF -#line 3229 "configure" -#include "confdefs.h" - -#include <stdarg.h> -void fatal(char *foo,...) __attribute__ ((noreturn,format (printf,1,2))); -int sqr(int x) __attribute__ ((const)); - -int sqr(int x) { return x*x; } - -void fatal(char *foo,...) -{ - va_list args; - va_start(foo,args); - printf(foo,args); - va_end(args); - exit(2); -} -main() { exit(0); } - - -EOF -eval $ac_link -if test -s conftest && (./conftest; exit) 2>/dev/null; then - lpc_cv_gcc_attributes=yes -else - lpc_cv_gcc_attributes=no -fi -fi -rm -fr conftest* -fi - - -echo "$ac_t""$lpc_cv_gcc_attributes" 1>&6 -if test "$lpc_cv_gcc_attributes" = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_FUNCTION_ATTRIBUTES 1 -EOF - -fi - -echo $ac_n "checking how to set things nonblocking""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'lpc_cv_sys_nonblock'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - -if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else -cat > conftest.$ac_ext <<EOF -#line 3278 "configure" -#include "confdefs.h" - -#define TESTING -#define USE_FCNTL_FNDELAY -#include "$srcdir/fd_control.c" - -EOF -eval $ac_link -if test -s conftest && (./conftest; exit) 2>/dev/null; then - lpc_cv_sys_nonblock=USE_FCNTL_FNDELAY -else - if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else -cat > conftest.$ac_ext <<EOF -#line 3294 "configure" -#include "confdefs.h" - -#define TESTING -#define USE_FCNTL_O_NDELAY -#include "$srcdir/fd_control.c" - -EOF -eval $ac_link -if test -s conftest && (./conftest; exit) 2>/dev/null; then - lpc_cv_sys_nonblock=USE_FCNTL_O_NDELAY -else - if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else -cat > conftest.$ac_ext <<EOF -#line 3310 "configure" -#include "confdefs.h" - -#define TESTING -#define USE_FCNTL_O_NONBLOCK -#include "$srcdir/fd_control.c" - -EOF -eval $ac_link -if test -s conftest && (./conftest; exit) 2>/dev/null; then - lpc_cv_sys_nonblock=USE_FCNTL_O_NONBLOCK -else - if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else -cat > conftest.$ac_ext <<EOF -#line 3326 "configure" -#include "confdefs.h" - -#define TESTING -#define USE_IOCTL_FIONBIO -#include "$srcdir/fd_control.c" - -EOF -eval $ac_link -if test -s conftest && (./conftest; exit) 2>/dev/null; then - lpc_cv_sys_nonblock=USE_IOCTL_FIONBIO -else - unset lpc_cv_sys_nonblock - -fi -fi -rm -fr conftest* -fi -fi -rm -fr conftest* -fi -fi -rm -fr conftest* -fi -fi -rm -fr conftest* -fi - - -if test "${lpc_cv_sys_nonblock}" = ""; then - echo "$ac_t""none found" 1>&6 -else - echo "$ac_t""$lpc_cv_sys_nonblock" 1>&6 - cat >> confdefs.h <<EOF -#define $lpc_cv_sys_nonblock 1 -EOF - -fi - -rm -f core - - -dirs= -MODULE_OBJS= -module_names= -for a in `(cd $srcdir/modules ; echo *)` -do - if test "$a" != "CVS" -a "$a" != "RCS" ; then - if test -d "$srcdir/modules/$a" ; then - dirs="$dirs modules/$a" - MODULE_OBJS="$MODULE_OBJS modules/$a/$a.a" - module_names="$module_names $a" - fi - fi -done - -LIBDIR=`(cd $srcdir/../lib ; pwd)` -BINDIR=`(cd $srcdir/../bin ; pwd)` -DOCDIR=`(cd $srcdir/../doc ; pwd)` -BUILDDIR=`pwd` - -subdirs="$dirs" - - - - - - - - - - - - - -trap '' 1 2 15 -cat > confcache <<\EOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs. It is not useful on other systems. -# If it contains results you don't want to keep, you may remove or edit it. -# -# By default, configure uses ./config.cache as the cache file, -# creating it if it does not exist already. You can give configure -# the --cache-file=FILE option to use a different cache file; that is -# what configure does when it calls configure scripts in -# subdirectories, so they share the cache. -# Giving --cache-file=/dev/null disables caching, for debugging configure. -# config.status only pays attention to the cache file if you give it the -# --recheck option to rerun configure. -# -EOF -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -(set) 2>&1 | - sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \ - >> confcache -if cmp -s $cache_file confcache; then - : -else - if test -w $cache_file; then - echo "updating cache $cache_file" - cat confcache > $cache_file - else - echo "not updating unwritable cache $cache_file" - fi -fi -rm -f confcache - -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -# Any assignment to VPATH causes Sun make to only execute -# the first set of double-colon rules, so remove it if not needed. -# If there is a colon in the path, we need to keep it. -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' -fi - -trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 - -DEFS=-DHAVE_CONFIG_H - -# Without the "./", some shells look in PATH for config.status. -: ${CONFIG_STATUS=./config.status} - -echo creating $CONFIG_STATUS -rm -f $CONFIG_STATUS -cat > $CONFIG_STATUS <<EOF -#! /bin/sh -# Generated automatically by configure. -# Run this file to recreate the current configuration. -# This directory was configured as follows, -# on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# -# $0 $ac_configure_args -# -# Compiler output produced by configure, useful for debugging -# configure, is in ./config.log if it exists. - -ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" -for ac_option -do - case "\$ac_option" in - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" - exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; - -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.7" - exit 0 ;; - -help | --help | --hel | --he | --h) - echo "\$ac_cs_usage"; exit 0 ;; - *) echo "\$ac_cs_usage"; exit 1 ;; - esac -done - -ac_given_srcdir=$srcdir -ac_given_INSTALL="$INSTALL" - -trap 'rm -fr `echo "Makefile machine.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 -EOF -cat >> $CONFIG_STATUS <<EOF - -# Protect against being on the right side of a sed subst in config.status. -sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; - s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF -$ac_vpsub -$extrasub -s%@CFLAGS@%$CFLAGS%g -s%@CPPFLAGS@%$CPPFLAGS%g -s%@CXXFLAGS@%$CXXFLAGS%g -s%@DEFS@%$DEFS%g -s%@LDFLAGS@%$LDFLAGS%g -s%@LIBS@%$LIBS%g -s%@exec_prefix@%$exec_prefix%g -s%@prefix@%$prefix%g -s%@program_transform_name@%$program_transform_name%g -s%@bindir@%$bindir%g -s%@sbindir@%$sbindir%g -s%@libexecdir@%$libexecdir%g -s%@datadir@%$datadir%g -s%@sysconfdir@%$sysconfdir%g -s%@sharedstatedir@%$sharedstatedir%g -s%@localstatedir@%$localstatedir%g -s%@libdir@%$libdir%g -s%@includedir@%$includedir%g -s%@oldincludedir@%$oldincludedir%g -s%@infodir@%$infodir%g -s%@mandir@%$mandir%g -s%@CC@%$CC%g -s%@uname_prog@%$uname_prog%g -s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g -s%@INSTALL_DATA@%$INSTALL_DATA%g -s%@YACC@%$YACC%g -s%@CPP@%$CPP%g -s%@RANLIB@%$RANLIB%g -s%@SET_MAKE@%$SET_MAKE%g -s%@LIBOBJS@%$LIBOBJS%g -s%@ALLOCA@%$ALLOCA%g -s%@subdirs@%$subdirs%g -s%@MODULE_OBJS@%$MODULE_OBJS%g -s%@INSTALL@%$INSTALL%g -s%@WARN@%$WARN%g -s%@OPTIMIZE@%$OPTIMIZE%g -s%@EXTRA_OBJS@%$EXTRA_OBJS%g -s%@LIBDIR@%$LIBDIR%g -s%@BINDIR@%$BINDIR%g -s%@BUILDDIR@%$BUILDDIR%g -s%@DOCDIR@%$DOCDIR%g - -CEOF -EOF -cat >> $CONFIG_STATUS <<EOF - -CONFIG_FILES=\${CONFIG_FILES-"Makefile"} -EOF -cat >> $CONFIG_STATUS <<\EOF -for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then - # Support "outfile[:infile]", defaulting infile="outfile.in". - case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.in" ;; - esac - - # Adjust relative srcdir, etc. for subdirectories. - - # Remove last slash and all that follows it. Not all systems have dirname. - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" - ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" - # A "../" for each directory in $ac_dir_suffix. - ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` - else - ac_dir_suffix= ac_dots= - fi - - case "$ac_given_srcdir" in - .) srcdir=. - if test -z "$ac_dots"; then top_srcdir=. - else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; - /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; - *) # Relative path. - srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" - top_srcdir="$ac_dots$ac_given_srcdir" ;; - esac - - case "$ac_given_INSTALL" in - [/$]*) INSTALL="$ac_given_INSTALL" ;; - *) INSTALL="$ac_dots$ac_given_INSTALL" ;; - esac - echo creating "$ac_file" - rm -f "$ac_file" - configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." - case "$ac_file" in - *Makefile*) ac_comsub="1i\\ -# $configure_input" ;; - *) ac_comsub= ;; - esac - sed -e "$ac_comsub -s%@configure_input@%$configure_input%g -s%@srcdir@%$srcdir%g -s%@top_srcdir@%$top_srcdir%g -s%@INSTALL@%$INSTALL%g -" -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file -fi; done -rm -f conftest.subs - -# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where -# NAME is the cpp macro being defined and VALUE is the value it is being given. -# -# ac_d sets the value in "#define NAME VALUE" lines. -ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' -ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' -ac_dC='\3' -ac_dD='%g' -# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". -ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_uB='\([ ]\)%\1#\2define\3' -ac_uC=' ' -ac_uD='\4%g' -# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". -ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_eB='$%\1#\2define\3' -ac_eC=' ' -ac_eD='%g' - -CONFIG_HEADERS=${CONFIG_HEADERS-"machine.h"} -for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then - # Support "outfile[:infile]", defaulting infile="outfile.in". - case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.in" ;; - esac - - echo creating $ac_file - - rm -f conftest.frag conftest.in conftest.out - cp $ac_given_srcdir/$ac_file_in conftest.in - -EOF - -# Transform confdefs.h into a sed script conftest.vals that substitutes -# the proper values into config.h.in to produce config.h. And first: -# Protect against being on the right side of a sed subst in config.status. -# Protect against being in an unquoted here document in config.status. -rm -f conftest.vals -cat > conftest.hdr <<\EOF -s/[\\&%]/\\&/g -s%[\\$`]%\\&%g -s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp -s%ac_d%ac_u%gp -s%ac_u%ac_e%gp -EOF -sed -n -f conftest.hdr confdefs.h > conftest.vals -rm -f conftest.hdr - -# This sed command replaces #undef with comments. This is necessary, for -# example, in the case of _POSIX_SOURCE, which is predefined and required -# on some systems where configure will not decide to define it. -cat >> conftest.vals <<\EOF -s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% -EOF - -# Break up conftest.vals because some shells have a limit on -# the size of here documents, and old seds have small limits too. -# Maximum number of lines to put in a single here document. -ac_max_here_lines=12 - -rm -f conftest.tail -while : -do - ac_lines=`grep -c . conftest.vals` - # grep -c gives empty output for an empty file on some AIX systems. - if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi - # Write a limited-size here document to conftest.frag. - echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS - sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS - echo 'CEOF - sed -f conftest.frag conftest.in > conftest.out - rm -f conftest.in - mv conftest.out conftest.in -' >> $CONFIG_STATUS - sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail - rm -f conftest.vals - mv conftest.tail conftest.vals -done -rm -f conftest.vals - -cat >> $CONFIG_STATUS <<\EOF - rm -f conftest.frag conftest.h - echo "/* $ac_file. Generated automatically by configure. */" > conftest.h - cat conftest.in >> conftest.h - rm -f conftest.in - if cmp -s $ac_file conftest.h 2>/dev/null; then - echo "$ac_file is unchanged" - rm -f conftest.h - else - rm -f $ac_file - mv conftest.h $ac_file - fi -fi; done - -EOF -cat >> $CONFIG_STATUS <<EOF -dirs="$module_names" - -EOF -cat >> $CONFIG_STATUS <<\EOF - -echo "FOO" >stamp-h -if test ! -d ./modules ; then - mkdir modules -fi - -echo "$ac_t""creating modlist.h" 1>&6 -echo "void init_main_efuns(void);" >modlist.h -echo "void init_main_programs(void);" >>modlist.h -echo "void exit_main(void);" >>modlist.h - -for a in $dirs -do - echo "void init_"$a"_efuns(void);" >>modlist.h - echo "void init_"$a"_programs(void);" >>modlist.h - echo "void exit_"$a"(void);" >>modlist.h -done -echo "" >>modlist.h -echo "struct module module_list UGLY_WORKAROUND={" >>modlist.h - -echo " { \"main\", init_main_efuns, init_main_programs, exit_main, 0 }" >>modlist.h -for a in $dirs -do - echo " ,{ \"$a\", init_"$a"_efuns, init_"$a"_programs, exit_$a, 0 }" >>modlist.h -done -echo "};" >>modlist.h - - -exit 0 -EOF -chmod +x $CONFIG_STATUS -rm -fr confdefs* $ac_clean_files -test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 - -if test "$no_recursion" != yes; then - - # Remove --cache-file and --srcdir arguments so they do not pile up. - ac_sub_configure_args= - ac_prev= - for ac_arg in $ac_configure_args; do - if test -n "$ac_prev"; then - ac_prev= - continue - fi - case "$ac_arg" in - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - ;; - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - ;; - *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;; - esac - done - - for ac_config_dir in $dirs; do - - # Do not complain, so a configure script can configure whichever - # parts of a large source tree are present. - if test ! -d $srcdir/$ac_config_dir; then - continue - fi - - echo configuring in $ac_config_dir - - case "$srcdir" in - .) ;; - *) - if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :; - else - { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; } - fi - ;; - esac - - ac_popdir=`pwd` - cd $ac_config_dir - - case "$srcdir" in - .) # No --srcdir option. We are building in place. - ac_sub_srcdir=$srcdir ;; - /*) # Absolute path. - ac_sub_srcdir=$srcdir/$ac_config_dir ;; - *) # Relative path. - ac_sub_srcdir=../$srcdir/$ac_config_dir ;; - esac - - # Check for guested configure; otherwise get Cygnus style configure. - if test -f $ac_sub_srcdir/configure; then - ac_sub_configure=$ac_sub_srcdir/configure - elif test -f $ac_sub_srcdir/configure.in; then - ac_sub_configure=$ac_configure - else - echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2 - ac_sub_configure= - fi - - # The recursion is here. - if test -n "$ac_sub_configure"; then - - # Make the cache file name correct relative to the subdirectory. - # A "../" for each directory in /$ac_config_dir. - ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'` - case "$cache_file" in - /*) ac_sub_cache_file=$cache_file ;; - *) # Relative path. - ac_sub_cache_file="$ac_dots$cache_file" ;; - esac - case "$ac_given_INSTALL" in - [/$]*) INSTALL="$ac_given_INSTALL" ;; - *) INSTALL="$ac_dots$ac_given_INSTALL" ;; - esac - - echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir" - # The eval makes quoting arguments work. - if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir - then : - else - { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; } - fi - fi - - cd $ac_popdir - done -fi - - - diff --git a/src/configure.in b/src/configure.in index 1ce5086c79428c949716248dcda7db7a49f6fa5f..31c67ff4e2810e4b16186e8dee8b9808548ed52b 100644 --- a/src/configure.in +++ b/src/configure.in @@ -1,67 +1,89 @@ AC_INIT(interpret.c) AC_PROG_CC +AC_C_CROSS + +############################################################################# # We need some special hacks when running slowaris AC_PATH_PROG(uname_prog,uname,no) AC_MSG_CHECKING(operating system) -AC_CACHE_VAL(lpc_cv_sys_os, +AC_CACHE_VAL(pike_cv_sys_os, [ if test "$uname_prog" != "no"; then - lpc_cv_sys_os="`uname`" + pike_cv_sys_os="`uname`" - if test "$lpc_cv_sys_os" = "SunOS"; then + if test "$pike_cv_sys_os" = "SunOS"; then case "`uname -r`" in - 5.*) lpc_cv_sys_os="Solaris"; + 5.*) pike_cv_sys_os="Solaris"; esac fi else - lpc_cv_sys_os="Not Solaris" + pike_cv_sys_os="Not Solaris" fi ]) -AC_MSG_RESULT($lpc_cv_sys_os) +AC_MSG_RESULT($pike_cv_sys_os) dnl dnl This enables a mutex lock around accept() unfortunately dnl accept bangs out every 20000th time or so when linked dnl with libthreads. Solaris... dnl -dnl if test "$lpc_cv_sys_os" = "Solaris"; then +dnl if test "$pike_cv_sys_os" = "Solaris"; then dnl AC_DEFINE(SOLARIS) dnl LIBS="$LIBS -lthread" dnl fi dnl +############################################################################# + OLD_CFLAGS="$CFLAGS" OPTIMIZE=""; -AC_MSG_CHECKING(-O) -AC_CACHE_VAL(lpc_cv_option_opt, +AC_MSG_CHECKING(-fast) +AC_CACHE_VAL(pike_cv_option_fast, [ - CFLAGS="$OLD_CFLAGS -O" - AC_TRY_LINK([],[ exit(0); ],lpc_cv_option_opt=yes,lpc_cv_option_opt=no) + CFLAGS="$OLD_CFLAGS -fast" + AC_TRY_LINK([],[ exit(0); ],pike_cv_option_fast=yes,pike_cv_option_fast=no) ]) -if test "$lpc_cv_option_opt" = "yes" ; then - CFLAGS="$OLD_CFLAGS -O" - OPTIMIZE="$OPTIMIZE -O" - AC_MSG_RESULT(-O found) +CFLAGS="$OLD_CFLAGS" + +if test "$pike_cv_option_fast" = "yes" ; then + OPTIMIZE="$OPTIMIZE -fast" + AC_MSG_RESULT(-fast found) else - AC_MSG_RESULT(-O not found) + AC_MSG_RESULT(-fast not found) + + AC_MSG_CHECKING(-O) + AC_CACHE_VAL(pike_cv_option_opt, + [ + CFLAGS="$OLD_CFLAGS -O" + AC_TRY_LINK([],[ exit(0); ],pike_cv_option_opt=yes,pike_cv_option_opt=no) + ]) + + if test "$pike_cv_option_opt" = "yes" ; then + CFLAGS="$OLD_CFLAGS -O" + OPTIMIZE="$OPTIMIZE -O" + AC_MSG_RESULT(-O found) + else + AC_MSG_RESULT(-O not found) + fi + + CFLAGS="$OLD_CFLAGS" fi -CFLAGS="$OLD_CFLAGS" if test "$GCC" = "yes"; then - WARN="-g -W -Wunused -Wformat" + WARN="-g -W -Wformat" AC_MSG_CHECKING(-pipe) - AC_CACHE_VAL(lpc_cv_option_pipe, + AC_CACHE_VAL(pike_cv_option_pipe, [ CFLAGS="$OLD_CFLAGS -pipe" - AC_TRY_LINK([],[ exit(0); ],lpc_cv_option_pipe=yes,lpc_cv_option_pipe=no) + AC_TRY_LINK([],[ exit(0); ],pike_cv_option_pipe=yes,pike_cv_option_pipe=no) ]) - if test "$lpc_cv_option_pipe" = "yes" ; then + if test "$pike_cv_option_pipe" = "yes" ; then CFLAGS="$OLD_CFLAGS -pipe" OPTIMIZE="$OPTIMIZE -pipe" AC_MSG_RESULT(-pipe found) @@ -76,37 +98,122 @@ else # # Special hack for HP-UX stupid cc # - if test "$lpc_cv_sys_os" = "HP-UX"; then + if test "$pike_cv_sys_os" = "HP-UX"; then OLD_CC="${CC-cc}" CC="$CC -Aa -D_HPUX_SOURCE +Olibcalls" AC_TRY_LINK([int foo(int bar);],[ exit(0); ],[],[CC="$OLD_CC"]) fi fi +############################################################################# + AC_MSG_CHECKING(ansi prototype capability) -AC_CACHE_VAL(lpc_cv_sys_ansi_prototypes, +AC_CACHE_VAL(pike_cv_sys_ansi_prototypes, [ AC_TRY_LINK([int foo(int bar);],[ exit(0); ], - [lpc_cv_sys_ansi_prototypes=yes], - [lpc_cv_sys_ansi_prototypes=no]) + [pike_cv_sys_ansi_prototypes=yes], + [pike_cv_sys_ansi_prototypes=no]) ]) -if test "$lpc_cv_sys_ansi_prototypes" = "yes"; then +if test "$pike_cv_sys_ansi_prototypes" = "yes"; then AC_MSG_RESULT(yes) else AC_MSG_RESULT(no, giving up...) exit 1 fi +############################################################################# + AC_CONFIG_HEADER(machine.h) AC_PROG_INSTALL -AC_PROG_YACC AC_PROG_CPP AC_PROG_RANLIB AC_SET_MAKE +############################################################################# + +AC_MSG_CHECKING(for yacc clone that handles %pure_parser) +AC_CACHE_VAL(pike_cv_prog_working_yacc, +[ +for YACC in byacc "bison -y" yacc "echo Get bison if you want to make export" ; do + set dummy $YACC; ac_word=$2 + has_it=no + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + has_it="yes" + break + fi + done + IFS="$ac_save_ifs" + + if test "$has_it" = "yes"; then +cat >conftest.y<<\EOF +%pure_parser +%{ +void parse(); +void yyerror(char *); +%} +%% +all: foo bar +foo: 'f' 'o' 'o' { parse(); } ; +bar: 'b' 'a' 'r' ; +%% +int context; + +int yylex(YYSTYPE *yylval) +{ + switch(context++) + { + case 0: return 'f'; + case 1: return 'o'; + case 2: return 'o'; + case 3: return 'b'; + case 4: return 'a'; + case 5: return 'r'; + default: return 0; + } +} + +int depth=0; +void parse() +{ + int tmp; + if(depth++>5) return; + tmp=context; + context=0; + yyparse(); + context=tmp; +} +int errors=0; +void yyerror(char *fel) { errors++; } +int main() +{ + parse(); + exit(errors); +} +EOF + if $YACC -d conftest.y 1>&5 2>&5; then + AC_TRY_RUN([ +#include "y.tab.c" +],pure_parser_works=yes,pure_parser_works=no) + if test "$pure_parser_works" = "yes"; then + break + fi + fi + fi +done +pike_cv_prog_working_yacc="$YACC" +]) + +YACC="$pike_cv_prog_working_yacc" +AC_MSG_RESULT($YACC) + +############################################################################# + AC_MSG_CHECKING(first yacc define) -AC_CACHE_VAL(lpc_cv_yacc_first, +AC_CACHE_VAL(pike_cv_yacc_first, [ cat >conftest.y <<\EOF %token GURKA @@ -114,28 +221,31 @@ cat >conftest.y <<\EOF all: GURKA %% EOF -lpc_cv_yacc_first=257; -if $YACC -d conftest.y ; then +pike_cv_yacc_first=257; +if $YACC -d conftest.y 1>&5 2>&5; then if test -f y.tab.h; then - lpc_cv_yacc_first=`egrep GURKA y.tab.h | sed 's/^#[^0-9]*\([0-9]*\)[^0-9]*$/\1/'` - echo $lpc_cv_yacc_first >conftest.out + pike_cv_yacc_first=`egrep GURKA y.tab.h | sed 's/^#[^0-9]*\([0-9]*\)[^0-9]*$/\1/'` + echo $pike_cv_yacc_first >conftest.out if egrep '^(0|1|2|3|4|5|6|7|8|9)+$' conftest.out >/dev/null 2>&1; then echo >/dev/null else - lpc_cv_yacc_first=257 + pike_cv_yacc_first=257 fi fi fi ]) -AC_MSG_RESULT($lpc_cv_yacc_first) -AC_DEFINE_UNQUOTED(F_OFFSET,$lpc_cv_yacc_first) +AC_MSG_RESULT($pike_cv_yacc_first) +AC_DEFINE_UNQUOTED(F_OFFSET,$pike_cv_yacc_first) rm -rf conftest.y y.tab.c y.tab.h conftest.out -AC_HAVE_HEADERS(sys/rusage.h time.h sys/time.h unistd.h stdlib.h memory.h values.h \ - string.h fcntl.h sys/filio.h sys/sockio.h crypt.h locale.h sys/resource.h \ - sys/select.h netdb.h) -AC_STDC_HEADERS +############################################################################# + +AC_HEADER_TIME +AC_HEADER_STDC +AC_CHECK_HEADERS(sys/rusage.h time.h sys/time.h unistd.h stdlib.h memory.h \ +values.h string.h fcntl.h sys/filio.h sys/sockio.h crypt.h locale.h \ +sys/resource.h sys/select.h sys/mman.h setjmp.h) AC_SIZEOF_TYPE(char *) AC_SIZEOF_TYPE(long) @@ -144,24 +254,23 @@ AC_SIZEOF_TYPE(short) AC_SIZEOF_TYPE(float) AC_SIZEOF_TYPE(double) -AC_SIZE_T -AC_PID_T -AC_UID_T -AC_RETSIGTYPE +AC_TYPE_SIZE_T +AC_TYPE_PID_T +AC_TYPE_UID_T +AC_TYPE_SIGNAL AC_CHECK_TYPE(time_t,INT32) -AC_CHECK_LIB(PW, alloca) +dnl AC_CHECK_LIB(PW, alloca) + +dnl AC_CHECK_LIB(crypt, crypt) + AC_CHECK_LIB(m, floor) -if test "${ac_cv_lib_m}" = "no" -a "${lpc_cv_sys_os}" = "Linux"; then +if test "${ac_cv_lib_m}" = "no" -a "${pike_cv_sys_os}" = "Linux"; then AC_MSG_WARN(I will compensate for this by adding -lc -lm) LIBS="${LIBS} -lc -lm" fi -AC_CHECK_LIB(socket, socket) -AC_CHECK_LIB(crypt, crypt) -if test "$ac_cv_lib_socket" = yes -o "$ac_cv_lib_ucb"; then - AC_CHECK_LIB(nsl, main) -fi +AC_CHECK_LIB(crypt, crypt) OLD_LIBOBJS="${LIBOBJS}" @@ -173,19 +282,22 @@ fi LIBOBJS="${OLD_LIBOBJS}" -AC_HAVE_FUNCS( +AC_FUNC_STRCOLL +AC_FUNC_MMAP + +AC_CHECK_FUNCS( _crypt \ bcopy \ bzero \ clock \ crypt \ fchmod \ - getcwd \ getenv \ getrlimit \ getrusage \ - getwd \ + gettimeofday \ index \ + localtime \ memchr \ memcpy \ memset \ @@ -204,23 +316,116 @@ AC_HAVE_FUNCS( times \ vfprintf \ vsprintf \ + wait3 \ wait4 \ waitpid \ + munmap \ ) +AC_STRUCT_TM + +############################################################################# + +AC_MSG_CHECKING(extern int timezone) + +AC_CACHE_VAL(pike_cv_has_external_timezone,[ +AC_TRY_LINK([ +#include <time.h> +],[ + int _tz; + _tz=timezone; +],pike_cv_has_external_timezone=yes,pike_cv_has_external_timezone=no) +]) + +if test "$pike_cv_has_external_timezone" = "yes"; then + AC_DEFINE(HAVE_EXTERNAL_TIMEZONE) +fi + +AC_MSG_RESULT($pike_cv_has_external_timezone) + +############################################################################# + +# No test for this yet... +AC_DEFINE(HAVE_STRUCT_TIMEVAL) + +############################################################################# + +AC_MSG_CHECKING(if gettimeofday takes two arguments) +AC_CACHE_VAL(pike_cv_func_gettimeofday_has_two_args, +[ +AC_TRY_RUN([ +#if TIME_WITH_SYS_TIME +# include <sys/time.h> +# include <time.h> +#else +# if HAVE_SYS_TIME_H +# include <sys/time.h> +# else +# if HAVE_TIME_H +# include <time.h> +# endif +# endif +#endif + +#ifndef HAVE_STRUCT_TIMEVAL +struct timeval +{ + long tv_sec; + long tv_usec; +}; +#endif + +int main() { + struct timeval tv; + gettimeofday(&tv,(void *)0); + exit(0); +} +], +pike_cv_func_gettimeofday_has_two_args=yes, +pike_cv_func_gettimeofday_has_two_args=no)]) + +if test $pike_cv_func_gettimeofday_has_two_args = yes; then + AC_DEFINE(GETTIMEOFDAY_TAKES_TWO_ARGS) +fi + +AC_MSG_RESULT($pike_cv_func_gettimeofday_has_two_args) + +AC_MSG_CHECKING(if struct tm has tm_gmtoff) + +AC_CACHE_VAL(pike_cv_struct_tm_has_gmtoff,[ +AC_TRY_LINK([ +#ifdef TM_IN_SYS_TIME +#include <sys/time.h> +#endif +#include <time.h> +#else +],[ + int _tz; + struct tm foo; + _tz=foo->tm_gmtoff; +],pike_cv_struct_tm_has_gmtoff=yes,pike_cv_struct_tm_has_gmtoff=no) +]) + +if test "$pike_cv_struct_tm_has_gmtoff" = "yes"; then + AC_DEFINE(STRUCT_TM_HAS_GMTOFF) +fi + +AC_MSG_RESULT($pike_cv_struct_tm_has_gmtoff) + + define(MY_CHECK_HEADERS, [ AC_MSG_CHECKING(for $1 declaration) - AC_CACHE_VAL(lpc_cv_decl_$1, + AC_CACHE_VAL(pike_cv_decl_$1, [ - lpc_cv_decl_$1=nonexistant + pike_cv_decl_$1=nonexistant for a in $2 do - AC_HEADER_EGREP($1,$a,lpc_cv_decl_$1=existant; break) + AC_EGREP_HEADER($1,$a,pike_cv_decl_$1=existant; break) done ]) - AC_MSG_RESULT($lpc_cv_decl_$1) - if test "$lpc_cv_decl_$1" = nonexistant; then + AC_MSG_RESULT($pike_cv_decl_$1) + if test "$pike_cv_decl_$1" = nonexistant; then AC_DEFINE(translit($1,[a-z],[A-Z])[]_DECL_MISSING) fi ]) @@ -232,8 +437,9 @@ MY_CHECK_HEADERS(popen,stdio.h unistd.h) MY_CHECK_HEADERS(getenv,unistd.h stdlib.h) MY_CHECK_HEADERS(gethostname,unistd.h) + AC_MSG_CHECKING(return type of free) -AC_CACHE_VAL(lpc_cv_sys_free_return, +AC_CACHE_VAL(pike_cv_sys_free_return, [AC_TRY_LINK([ #ifdef HAVE_STDLIB_H #include <stdlib.h> @@ -251,12 +457,12 @@ void free(); ], [], - lpc_cv_sys_free_return='char *' + pike_cv_sys_free_return='char *' , - lpc_cv_sys_free_return='void' + pike_cv_sys_free_return='void' )]) -if test "$lpc_cv_sys_free_return" = void; then +if test "$pike_cv_sys_free_return" = void; then AC_DEFINE(FREE_RETURNS_VOID) AC_MSG_RESULT([void]); else @@ -264,7 +470,7 @@ else fi AC_MSG_CHECKING([void* or char* from malloc]) -AC_CACHE_VAL(lpc_cv_sys_malloc_return, +AC_CACHE_VAL(pike_cv_sys_malloc_return, [ AC_TRY_LINK([ #include <sys/types.h> @@ -292,19 +498,19 @@ int free(POINTER); ], [], - lpc_cv_sys_malloc_return="void *" + pike_cv_sys_malloc_return="void *" , - lpc_cv_sys_malloc_return="char *" + pike_cv_sys_malloc_return="char *" )]) -AC_MSG_RESULT($lpc_cv_sys_malloc_return) -AC_DEFINE_UNQUOTED(POINTER,$lpc_cv_sys_malloc_return) +AC_MSG_RESULT($pike_cv_sys_malloc_return) +AC_DEFINE_UNQUOTED(POINTER,$pike_cv_sys_malloc_return) AC_ALLOCA -AC_CONST -AC_INLINE +AC_C_CONST +AC_C_INLINE AC_REPLACE_FUNCS(ualarm) @@ -312,11 +518,28 @@ case "$LIBOBJS" in *ualarm.o*) ;; *) AC_DEFINE(HAVE_UALARM) + AC_MSG_CHECKING(no of arguments to ualarm) + AC_CACHE_VAL(pike_cv_ualarm_takes_two_args, + [ + AC_TRY_LINK([ + #include <unistd.h> + ],[ + int main() { ualarm(0,0); } + ],pike_cv_ualarm_takes_two_args=yes,pike_cv_ualarm_takes_two_args=no) + + if test "$pike_cv_ualarm_takes_two_args" = yes; then + AC_MSG_RESULT(2) + AC_DEFINE(UALARM_TAKES_TWO_ARGS) + else + AC_MSG_RESULT(1) + fi + + ]) ;; esac AC_MSG_CHECKING(byteorder) -AC_CACHE_VAL(lpc_cv_hardware_byteorder, +AC_CACHE_VAL(pike_cv_hardware_byteorder, [ AC_TRY_RUN([ #include <stdio.h> @@ -345,16 +568,16 @@ int main() return 0; }], -lpc_cv_hardware_byteorder=`cat conftest.out.2` +pike_cv_hardware_byteorder=`cat conftest.out.2` , -lpc_cv_hardware_byteorder=0 +pike_cv_hardware_byteorder=0 )]) -AC_MSG_RESULT($lpc_cv_hardware_byteorder) -AC_DEFINE_UNQUOTED(BYTEORDER,$lpc_cv_hardware_byteorder) +AC_MSG_RESULT($pike_cv_hardware_byteorder) +AC_DEFINE_UNQUOTED(BYTEORDER,$pike_cv_hardware_byteorder) AC_MSG_CHECKING(for working memmem) -AC_CACHE_VAL(lpc_cv_func_memmem, +AC_CACHE_VAL(pike_cv_func_memmem, [ AC_TRY_RUN([ #include <string.h> @@ -372,39 +595,17 @@ int main() exit(1); exit(0); } -],lpc_cv_func_memmem=yes,lpc_cv_func_memmem=no)]) +],pike_cv_func_memmem=yes,pike_cv_func_memmem=no)]) -if test "$lpc_cv_func_memmem" = yes; then +if test "$pike_cv_func_memmem" = yes; then AC_MSG_RESULT(yes) AC_DEFINE(HAVE_MEMMEM) else AC_MSG_RESULT(no) fi -AC_MSG_CHECKING(for working strcoll) -AC_CACHE_VAL(lpc_cv_func_strcoll, -[ -AC_TRY_RUN([ -#include <string.h> -int main() -{ - if(strcoll("a","b")< 0 && - strcoll("a","a")==0 && - strcoll("b","a")> 0) - exit(0); - exit(1); -} -],lpc_cv_func_strcoll=yes,lpc_cv_func_strcoll=no)]) - -if test "$lpc_cv_func_strcoll" = yes; then - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_STRCOLL) -else - AC_MSG_RESULT(no) -fi - AC_MSG_CHECKING(for working memmove) -AC_CACHE_VAL(lpc_cv_func_memmove, +AC_CACHE_VAL(pike_cv_func_memmove, [ AC_TRY_RUN([ #include <string.h> @@ -421,9 +622,9 @@ int main() if(strcmp(buf,"ooo bar gaznk elefantsnabel.")) exit(1); exit(0); } -],lpc_cv_func_memmove=yes,lpc_cv_func_memmove=no)]) +],pike_cv_func_memmove=yes,pike_cv_func_memmove=no)]) -if test "$lpc_cv_func_memmove" = yes; then +if test "$pike_cv_func_memmove" = yes; then AC_MSG_RESULT(yes) AC_DEFINE(HAVE_MEMMOVE) else @@ -431,7 +632,7 @@ else fi AC_MSG_CHECKING(how to extract an unsigned char) -AC_CACHE_VAL(lpc_cv_method_extract_uchar, +AC_CACHE_VAL(pike_cv_method_extract_uchar, [ AC_TRY_RUN([ int main() @@ -442,10 +643,10 @@ int main() if(*(unsigned char *)(p)!= 0x100 - 10) exit(1); exit(0); } -],lpc_cv_method_extract_uchar=by_cast, -lpc_cv_method_extract_uchar=not_by_cast)]) +],pike_cv_method_extract_uchar=by_cast, +pike_cv_method_extract_uchar=not_by_cast)]) -if test "$lpc_cv_method_extract_uchar" = by_cast; then +if test "$pike_cv_method_extract_uchar" = by_cast; then AC_MSG_RESULT(by cast) AC_DEFINE(EXTRACT_UCHAR_BY_CAST) else @@ -453,7 +654,7 @@ else fi AC_MSG_CHECKING(how to extract a signed char) -AC_CACHE_VAL(lpc_cv_method_extract_char, +AC_CACHE_VAL(pike_cv_method_extract_char, [ AC_TRY_RUN([ int main() @@ -464,10 +665,10 @@ int main() if(*(signed char *)(p)!= -10) exit(1); exit(0); } -],lpc_cv_method_extract_char=by_cast, -lpc_cv_method_extract_char=not_by_cast)]) +],pike_cv_method_extract_char=by_cast, +pike_cv_method_extract_char=not_by_cast)]) -if test "$lpc_cv_method_extract_char" = by_cast; then +if test "$pike_cv_method_extract_char" = by_cast; then AC_MSG_RESULT(by cast) AC_DEFINE(EXTRACT_CHAR_BY_CAST) else @@ -475,8 +676,8 @@ else fi -AC_MSG_CHECKING(if signals are oneshot or not) -AC_CACHE_VAL(lpc_cv_sys_signal_oneshot, +AC_MSG_CHECKING(if signal handlers reset automatically) +AC_CACHE_VAL(pike_cv_sys_signal_oneshot, [ AC_TRY_RUN([ #include <signal.h> @@ -521,9 +722,9 @@ int main() sigrun=0; exit(0); } -],lpc_cv_sys_signal_oneshot=no,lpc_cv_sys_signal_oneshot=yes)]) +],pike_cv_sys_signal_oneshot=no,pike_cv_sys_signal_oneshot=yes)]) -if test "$lpc_cv_sys_signal_oneshot" = yes; then +if test "$pike_cv_sys_signal_oneshot" = yes; then AC_MSG_RESULT(yes) AC_DEFINE(SIGNAL_ONESHOT) else @@ -533,7 +734,7 @@ fi AC_MSG_CHECKING(available file descriptors) -AC_CACHE_VAL(lpc_cv_max_open_fd, +AC_CACHE_VAL(pike_cv_max_open_fd, [ AC_TRY_RUN([ #include <stdio.h> @@ -583,16 +784,15 @@ int main() return 0; } ], -lpc_cv_max_open_fd=`cat conftest.out.2` +pike_cv_max_open_fd=`cat conftest.out.2` , -lpc_cv_max_open_fd=256 +pike_cv_max_open_fd=256 )]) -AC_MSG_RESULT($lpc_cv_max_open_fd) -AC_DEFINE_UNQUOTED(MAX_OPEN_FILEDESCRIPTORS,$lpc_cv_max_open_fd) +AC_MSG_RESULT($pike_cv_max_open_fd) +AC_DEFINE_UNQUOTED(MAX_OPEN_FILEDESCRIPTORS,$pike_cv_max_open_fd) -if test "$ac_cv_func_getrusage" = "yes"; then AC_MSG_CHECKING(full availability of struct rusage members) -AC_CACHE_VAL(lpc_cv_func_getrusage_full, +AC_CACHE_VAL(pike_cv_func_getrusage_full, [ AC_TRY_LINK([ #include <sys/time.h> @@ -622,22 +822,20 @@ AC_TRY_LINK([ *v++ = rus.ru_nvcsw; *v++ = rus.ru_nivcsw; ], - lpc_cv_func_getrusage_full=yes + pike_cv_func_getrusage_full=yes , - lpc_cv_func_getrusage_full=no + pike_cv_func_getrusage_full=no )]) -if test "$lpc_cv_func_getrusage_full" = yes; then +if test "$pike_cv_func_getrusage_full" = yes; then AC_MSG_RESULT(all there) else AC_MSG_RESULT(getrusage is restricted) AC_DEFINE(GETRUSAGE_RESTRICTED) fi -else - AC_MSG_CHECKING(getrusage() through procfs) -AC_CACHE_VAL(lpc_cv_getrusage_procfs, +AC_CACHE_VAL(pike_cv_getrusage_procfs, [ AC_TRY_LINK([ #include <sys/procfs.h> @@ -647,27 +845,28 @@ char proc_name[20]; ],[ sprintf(proc_name, "/proc/%05d", getpid()); proc_fd = open(proc_name, O_RDONLY); + ioctl(proc_fd, PIOCUSAGE, &pru); + ioctl(proc_fd, PIOCSTATUS, &prs); ], - lpc_cv_getrusage_procfs=yes + pike_cv_getrusage_procfs=yes , - lpc_cv_getrusage_procfs=no + pike_cv_getrusage_procfs=no )]) -if test "$lpc_cv_getrusage_procfs" = yes; then +if test "$pike_cv_getrusage_procfs" = yes; then AC_MSG_RESULT(yes) AC_DEFINE(GETRUSAGE_THROUGH_PROCFS) else AC_MSG_RESULT(no) fi -fi AC_MSG_CHECKING(checking for volatile) -AC_CACHE_VAL(lpc_cv_volatile, +AC_CACHE_VAL(pike_cv_volatile, [ - AC_TRY_LINK([],[ volatile int foo=1;], lpc_cv_volatile=yes,lpc_cv_volatile=no) + AC_TRY_LINK([],[ volatile int foo=1;], pike_cv_volatile=yes,pike_cv_volatile=no) ]) -if test "$lpc_cv_volatile" = yes; then +if test "$pike_cv_volatile" = yes; then AC_MSG_RESULT(yes) AC_DEFINE(VOLATILE,volatile) else @@ -676,7 +875,7 @@ else fi AC_MSG_CHECKING(for gcc function attributes) -AC_CACHE_VAL(lpc_cv_gcc_attributes, +AC_CACHE_VAL(pike_cv_gcc_attributes, [ AC_TRY_RUN([ #include <stdarg.h> @@ -695,71 +894,56 @@ void fatal(char *foo,...) } main() { exit(0); } -], lpc_cv_gcc_attributes=yes, lpc_cv_gcc_attributes=no)]) +], pike_cv_gcc_attributes=yes, pike_cv_gcc_attributes=no)]) -AC_MSG_RESULT($lpc_cv_gcc_attributes) -if test "$lpc_cv_gcc_attributes" = yes; then +AC_MSG_RESULT($pike_cv_gcc_attributes) +if test "$pike_cv_gcc_attributes" = yes; then AC_DEFINE(HAVE_FUNCTION_ATTRIBUTES) fi AC_MSG_CHECKING(how to set things nonblocking) -AC_CACHE_VAL(lpc_cv_sys_nonblock, +AC_CACHE_VAL(pike_cv_sys_nonblock, [ AC_TRY_RUN([ #define TESTING #define USE_FCNTL_FNDELAY #include "$srcdir/fd_control.c" -],lpc_cv_sys_nonblock=USE_FCNTL_FNDELAY, +],pike_cv_sys_nonblock=USE_FCNTL_FNDELAY, AC_TRY_RUN([ #define TESTING #define USE_FCNTL_O_NDELAY #include "$srcdir/fd_control.c" -],lpc_cv_sys_nonblock=USE_FCNTL_O_NDELAY, +],pike_cv_sys_nonblock=USE_FCNTL_O_NDELAY, AC_TRY_RUN([ #define TESTING #define USE_FCNTL_O_NONBLOCK #include "$srcdir/fd_control.c" -],lpc_cv_sys_nonblock=USE_FCNTL_O_NONBLOCK, +],pike_cv_sys_nonblock=USE_FCNTL_O_NONBLOCK, AC_TRY_RUN([ #define TESTING #define USE_IOCTL_FIONBIO #include "$srcdir/fd_control.c" -],lpc_cv_sys_nonblock=USE_IOCTL_FIONBIO, -unset lpc_cv_sys_nonblock +],pike_cv_sys_nonblock=USE_IOCTL_FIONBIO, +unset pike_cv_sys_nonblock ))))]) -if test "${lpc_cv_sys_nonblock}" = ""; then +if test "${pike_cv_sys_nonblock}" = ""; then AC_MSG_RESULT(none found) else - AC_MSG_RESULT($lpc_cv_sys_nonblock) - AC_DEFINE_UNQUOTED($lpc_cv_sys_nonblock) + AC_MSG_RESULT($pike_cv_sys_nonblock) + AC_DEFINE_UNQUOTED($pike_cv_sys_nonblock) fi rm -f core - -dirs= -MODULE_OBJS= -module_names= -for a in `(cd $srcdir/modules ; echo *)` -do - if test "$a" != "CVS" -a "$a" != "RCS" ; then - if test -d "$srcdir/modules/$a" ; then - dirs="$dirs modules/$a" - MODULE_OBJS="$MODULE_OBJS modules/$a/$a.a" - module_names="$module_names $a" - fi - fi -done - LIBDIR=`(cd $srcdir/../lib ; pwd)` BINDIR=`(cd $srcdir/../bin ; pwd)` DOCDIR=`(cd $srcdir/../doc ; pwd)` BUILDDIR=`pwd` -AC_CONFIG_SUBDIRS($dirs) +AC_CONFIG_SUBDIRS(modules) -AC_SUBST(MODULE_OBJS) +AC_SUBST(YACC) AC_SUBST(INSTALL) AC_SUBST(WARN) AC_SUBST(OPTIMIZE) @@ -770,36 +954,6 @@ AC_SUBST(BINDIR) AC_SUBST(BUILDDIR) AC_SUBST(DOCDIR) -AC_OUTPUT(Makefile, -[ -echo "FOO" >stamp-h -if test ! -d ./modules ; then - mkdir modules -fi - -AC_MSG_RESULT(creating modlist.h) -echo "void init_main_efuns(void);" >modlist.h -echo "void init_main_programs(void);" >>modlist.h -echo "void exit_main(void);" >>modlist.h - -for a in $dirs -do - echo "void init_"$a"_efuns(void);" >>modlist.h - echo "void init_"$a"_programs(void);" >>modlist.h - echo "void exit_"$a"(void);" >>modlist.h -done -echo "" >>modlist.h -echo "struct module module_list UGLY_WORKAROUND={" >>modlist.h - -echo " { \"main\", init_main_efuns, init_main_programs, exit_main, 0 }" >>modlist.h -for a in $dirs -do - echo " ,{ \"$a\", init_"$a"_efuns, init_"$a"_programs, exit_$a, 0 }" >>modlist.h -done -echo "};" >>modlist.h -] -, -dirs="$module_names" -) +AC_OUTPUT(Makefile,[echo foo >stamp-h]) diff --git a/src/add_efun.c b/src/constants.c similarity index 69% rename from src/add_efun.c rename to src/constants.c index 86ce35af757739e48f461dcab760586326207fef..7ab4d31501e51a6b6771dec762a23712f23d5d32 100644 --- a/src/add_efun.c +++ b/src/constants.c @@ -1,19 +1,19 @@ /*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ -#include "add_efun.h" +#include "constants.h" #include "macros.h" #include "program.h" -#include "lpc_types.h" +#include "pike_types.h" #include "stralloc.h" #include "memory.h" #include "interpret.h" static struct hash_table *efun_hash = 0; -struct efun *lookup_efun(struct lpc_string *name) +struct efun *lookup_efun(struct pike_string *name) { struct hash_entry *h; @@ -23,7 +23,7 @@ struct efun *lookup_efun(struct lpc_string *name) return BASEOF(h, efun, link); } -void low_add_efun(struct lpc_string *name, struct svalue *fun) +void low_add_efun(struct pike_string *name, struct svalue *fun) { struct efun *parent; @@ -53,7 +53,12 @@ void low_add_efun(struct lpc_string *name, struct svalue *fun) } -struct callable *make_callable(c_fun fun,char *name, char *type, INT16 flags) +struct callable *make_callable(c_fun fun, + char *name, + char *type, + INT16 flags, + optimize_fun optimize, + docode_fun docode) { struct callable *f; f=ALLOC_STRUCT(callable); @@ -62,6 +67,8 @@ struct callable *make_callable(c_fun fun,char *name, char *type, INT16 flags) f->name=make_shared_string(name); f->type=parse_type(type); f->flags=flags; + f->docode=docode; + f->optimize=optimize; return f; } @@ -72,27 +79,39 @@ void really_free_callable(struct callable *fun) free((char *)fun); } -void add_efun(char *name, c_fun fun, char *type, INT16 flags) +void add_efun2(char *name, + c_fun fun, + char *type, + INT16 flags, + optimize_fun optimize, + docode_fun docode) { struct svalue s; - struct lpc_string *n; + struct pike_string *n; n=make_shared_string(name); s.type=T_FUNCTION; s.subtype=-1; - s.u.efun=make_callable(fun, name, type, flags); + s.u.efun=make_callable(fun, name, type, flags, optimize, docode); low_add_efun(n, &s); free_svalue(&s); free_string(n); } +void add_efun(char *name, c_fun fun, char *type, INT16 flags) +{ + add_efun2(name,fun,type,flags,0,0); +} + static void push_efun_entry(struct hash_entry *h) { struct efun *f; + check_stack(1); f=BASEOF(h, efun, link); push_string(f->link.s); f->link.s->refs++; - copy_svalues_recursively_no_free(sp++,& f->function,1,0); + copy_svalues_recursively_no_free(sp,& f->function,1,0); + sp++; } void push_all_efuns_on_stack() diff --git a/src/constants.h b/src/constants.h new file mode 100644 index 0000000000000000000000000000000000000000..83a9c56ae93a1a4c66a0e437b0a6b06d9664d409 --- /dev/null +++ b/src/constants.h @@ -0,0 +1,55 @@ +/*\ +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) +||| See the files COPYING and DISCLAIMER for more information. +\*/ +#ifndef ADD_EFUN_H +#define ADD_EFUN_H + +#include "svalue.h" +#include "hashtable.h" +#include "las.h" /* For OPT_SIDE_EFFECT etc. */ + +struct efun +{ + struct svalue function; + struct hash_entry link; +}; + +typedef void (*c_fun)(INT32); +typedef int (*docode_fun)(node *n); +typedef node *(*optimize_fun)(node *n); + +struct callable +{ + INT32 refs; + c_fun function; + struct pike_string *type; + struct pike_string *name; + INT16 flags; + optimize_fun optimize; + docode_fun docode; +}; + +/* Prototypes begin here */ +struct efun *lookup_efun(struct pike_string *name); +void low_add_efun(struct pike_string *name, struct svalue *fun); +struct callable *make_callable(c_fun fun, + char *name, + char *type, + INT16 flags, + optimize_fun optimize, + docode_fun docode); +void really_free_callable(struct callable *fun); +void add_efun2(char *name, + c_fun fun, + char *type, + INT16 flags, + optimize_fun optimize, + docode_fun docode); +void add_efun(char *name, c_fun fun, char *type, INT16 flags); +void push_all_efuns_on_stack(); +void cleanup_added_efuns(); +/* Prototypes end here */ + +#endif diff --git a/src/debug.c b/src/debug.c deleted file mode 100644 index c11c55f0825eb9abfbd59a0f65b3a2d6595c0dff..0000000000000000000000000000000000000000 --- a/src/debug.c +++ /dev/null @@ -1,125 +0,0 @@ -/*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) -||| See the files COPYING and DISCLAIMER for more information. -\*/ -#include "global.h" -#include "types.h" -#include "memory.h" - -#define MARKER_CHUNK_SIZE 4096 -#define REHASH_LIMIT 16 -#define REHASH_FORMULA(X) ((X)*4-1) - -struct marker -{ - struct marker *next; - void *marked; - INT32 refs; -}; - -struct marker_chunk -{ - struct marker_chunk *next; - struct marker markers[MARKER_CHUNK_SIZE]; -}; - -static struct marker_chunk *chunk=0; -static int markers_left_in_chunk=0; - -static struct marker *new_marker() -{ - if(!markers_left_in_chunk) - { - struct marker_chunk *m; - m=(struct marker_chunk *)xalloc(sizeof(struct marker_chunk)); - m->next=chunk; - chunk=m; - markers_left_in_chunk=MARKER_CHUNK_SIZE; - } - markers_left_in_chunk--; - - return chunk->markers + markers_left_in_chunk; -} - -static struct marker **hash=0; -static int hashsize=0; -static int hashed=0; - -INT32 checked(void *a,INT32 delta) -{ - int hashval; - struct marker *m; - - if(!hash) return 0; - - hashval=((long)a)%hashsize; - - for(m=hash[hashval];m;m=m->next) - { - if(m->marked == a) - { - m->refs+=delta; - return m->refs; - } - } - if(!delta) return 0; - - m=new_marker(); - m->marked=a; - m->next=hash[hashval]; - m->refs=delta; - hash[hashval]=m; - - hashed++; - if(hashed / REHASH_LIMIT > hashsize) - { - struct marker **new_hash,*next; - int new_hashsize; - int e; - - new_hashsize=REHASH_FORMULA(hashsize); - new_hash=(struct marker **)xalloc(sizeof(struct marker **)*new_hashsize); - memset((char *)new_hash,0,sizeof(struct marker **)*new_hashsize); - - for(e=0;e<hashsize;e++) - { - for(m=hash[e];m;m=next) - { - next=m->next; - m->next=new_hash[((long)m->marked)%new_hashsize]; - new_hash[((long)m->marked)%new_hashsize]=m; - } - } - - free((char *)hash); - hash=new_hash; - hashsize=new_hashsize; - } - - return m->refs; -} - -void init_checked() -{ - /* init hash*/ - hashsize=4711; - hashed=0; - hash=(struct marker **)xalloc(sizeof(struct marker **)*hashsize); - memset((char *)hash,0,sizeof(struct marker **)*hashsize); - markers_left_in_chunk=0; -} - -void exit_checked() -{ - struct marker_chunk *m; - - if(!hash) return; - free((char *)hash); - while(m=chunk) - { - chunk=m->next; - free((char *)m); - } - hash=0; -} diff --git a/src/debug.h b/src/debug.h deleted file mode 100644 index 7e482708e773dec0d9c3dcfb7199bc07720e458c..0000000000000000000000000000000000000000 --- a/src/debug.h +++ /dev/null @@ -1,19 +0,0 @@ -/*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) -||| See the files COPYING and DISCLAIMER for more information. -\*/ -#ifndef DEBUG_H -#define DEBUG_H - -#include "types.h" - -/* Prototypes begin here */ -struct marker; -struct marker_chunk; -INT32 checked(void *a,INT32 delta); -void init_checked(); -void exit_checked(); -/* Prototypes end here */ - -#endif diff --git a/src/docode.c b/src/docode.c index 4421a16df0152421765eb630f62509ad121a7251..7827943fce4b8c49f0afe02354fcee176c8a6694 100644 --- a/src/docode.c +++ b/src/docode.c @@ -1,16 +1,16 @@ /*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ #include "global.h" #include "las.h" #include "program.h" #include "language.h" -#include "lpc_types.h" +#include "pike_types.h" #include "stralloc.h" #include "interpret.h" -#include "add_efun.h" +#include "constants.h" #include "array.h" #include "macros.h" #include "error.h" @@ -18,12 +18,12 @@ #include "svalue.h" #include "main.h" #include "lex.h" -#include "builtin_efuns.h" +#include "builtin_functions.h" +#include "peep.h" +#include "docode.h" -int *break_stack=0; -static int current_break,break_stack_size; -int *continue_stack=0; -static int current_continue,continue_stack_size; +INT32 current_break=-1; +INT32 current_continue=-1; static INT32 current_switch_case; static INT32 current_switch_default; @@ -45,131 +45,35 @@ void ins_short(INT16 l,int area) add_to_mem_block(area, (char *)&l, sizeof(INT16)); } -static void upd_short(int offset, INT16 l) -{ -#ifdef HANDLES_UNALIGNED_MEMORY_ACCESS - *((INT16 *)(areas[A_PROGRAM].s.str+offset))=l; -#else - MEMCPY(areas[A_PROGRAM].s.str+offset, (char *)&l,sizeof(l)); -#endif -} - -static void upd_int(int offset, INT32 tmp) -{ -#ifdef HANDLES_UNALIGNED_MEMORY_ACCESS - *((int *)(areas[A_PROGRAM].s.str+offset))=tmp; -#else - MEMCPY(areas[A_PROGRAM].s.str+offset, (char *)&tmp,sizeof(tmp)); -#endif -} - /* * Store an INT32. */ -void ins_long(INT32 l,int area) +void ins_int(INT32 l,int area) { add_to_mem_block(area, (char *)&l+0, sizeof(INT32)); } -int store_linenumbers=1; - -static void low_ins_f_byte(unsigned int b) -{ - if(store_linenumbers) store_linenumber(); - -#if defined(LASDEBUG) - if(lasdebug>1) - if(store_linenumbers) - fprintf(stderr,"Inserting f_byte %s (%d) at %ld\n", - get_instruction_name(b), b, - (long)PC); -#endif - b-=F_OFFSET; -#ifdef OPCPROF - if(store_linenumbers) add_compiled(b); -#endif - if(b>255) - { - switch(b >> 8) - { - case 1: low_ins_f_byte(F_ADD_256); break; - case 2: low_ins_f_byte(F_ADD_512); break; - case 3: low_ins_f_byte(F_ADD_768); break; - case 4: low_ins_f_byte(F_ADD_1024); break; - default: - low_ins_f_byte(F_ADD_256X); - ins_byte(b/256,A_PROGRAM); - } - b&=255; - } - ins_byte((unsigned char)b,A_PROGRAM); -} - -void ins_f_byte(unsigned int b) +void upd_int(int offset, INT32 tmp) { -#ifdef DEBUG - if(a_flag>2) - fprintf(stderr,">%6lx: %s\n",(long)PC,get_f_name(b)); +#ifdef HANDLES_UNALIGNED_MEMORY_ACCESS + *((int *)(areas[A_PROGRAM].s.str+offset))=tmp; +#else + MEMCPY(areas[A_PROGRAM].s.str+offset, (char *)&tmp,sizeof(tmp)); #endif - low_ins_f_byte(b); } -static void ins_f_byte_with_numerical_arg(unsigned int a,unsigned int b) +INT32 read_int(int offset) { - switch(b >> 8) - { - case 0 : break; - case 1 : low_ins_f_byte(F_PREFIX_256); break; - case 2 : low_ins_f_byte(F_PREFIX_512); break; - case 3 : low_ins_f_byte(F_PREFIX_768); break; - case 4 : low_ins_f_byte(F_PREFIX_1024); break; - default: - if( b < 256*256) - { - low_ins_f_byte(F_PREFIX_CHARX256); - ins_byte(b>>8, A_PROGRAM); - }else if(b < 256*256*256) { - low_ins_f_byte(F_PREFIX_WORDX256); - ins_byte(b >> 16, A_PROGRAM); - ins_byte(b >> 8, A_PROGRAM); - }else{ - low_ins_f_byte(F_PREFIX_24BITX256); - ins_byte(b >> 24, A_PROGRAM); - ins_byte(b >> 16, A_PROGRAM); - ins_byte(b >> 8, A_PROGRAM); - } - } - ins_f_byte(a); -#ifdef DEBUG - if(a_flag>2) - fprintf(stderr,">%6lx: argument = %u\n",(long)PC,b); + INT32 tmp; +#ifdef HANDLES_UNALIGNED_MEMORY_ACCESS + tmp=*((int *)(areas[A_PROGRAM].s.str+offset)); +#else + MEMCPY((char *)&tmp, areas[A_PROGRAM].s.str+offset,sizeof(tmp)); #endif - ins_byte(b, A_PROGRAM); + return tmp; } - -static void ins_int(int i) -{ - switch(i) - { - case 0: ins_f_byte(F_CONST0); break; - case 1: ins_f_byte(F_CONST1); break; - case -1: ins_f_byte(F_CONST_1); break; - default: - if(i<0) - { - ins_f_byte_with_numerical_arg(F_NEG_NUMBER,-i); - }else{ - ins_f_byte_with_numerical_arg(F_NUMBER,i); - } - } -} - -static void ins_float(FLOAT_TYPE f) -{ - ins_f_byte(F_FLOAT); - add_to_mem_block(A_PROGRAM,(char *)&f,sizeof(FLOAT_TYPE)); -} +int store_linenumbers=1; /* * A mechanism to remember addresses on a stack. The size of the stack is @@ -212,184 +116,34 @@ INT32 pop_address() return comp_stack[--comp_stackp]; } -static void do_pop(int nr) -{ - if(!nr) return; - if(nr==1) - { - ins_f_byte(F_POP_VALUE); - }else if(nr<256){ - ins_f_byte(F_POP_N_ELEMS); - ins_byte(nr,A_PROGRAM); - }else{ - ins_f_byte(F_POP_N_ELEMS); - ins_byte(255,A_PROGRAM); - do_pop(nr-255); - } -} - -/* routines to optimize jumps */ -#define JUMP_CONDITIONAL 1 -#define JUMP_UNSET 2 +static int label_no=0; -struct jump -{ - INT32 relative; - INT32 whereto; - INT32 wherefrom; - INT32 address; - unsigned char flags; - short token; -}; - -static int jump_ptr=0, max_jumps=0; -static struct jump jumps[256]; - -static void low_set_branch(INT32 address,INT32 whereto,INT32 relative) -{ - int j,e; - - if(address<0) return; - j=jump_ptr; - e=max_jumps; - while(e>=0) - { - if(jumps[j].address==address && (jumps[j].flags & JUMP_UNSET)) - break; - if(j) j--; else j=max_jumps; - e--; - } - if(e<0) j=-1; /* not found */ - - for(e=0;e<=max_jumps;e++) - { - if(jumps[e].flags & JUMP_UNSET) continue; - if(jumps[e].flags & JUMP_CONDITIONAL) continue; - if(jumps[e].wherefrom!=whereto) continue; -#if defined(LASDEBUG) - if(lasdebug>1) printf("Optimized Jump to a jump\n"); -#endif - whereto=jumps[e].whereto; - break; - } - - if(j>=0) - { - if(!(jumps[j].flags & JUMP_CONDITIONAL)) - { - for(e=0;e<=max_jumps;e++) - { - if(jumps[e].flags & JUMP_UNSET) continue; - if(jumps[e].whereto==jumps[j].wherefrom) - { - upd_int(jumps[e].address,whereto - jumps[e].relative); - jumps[e].whereto=whereto; -#if defined(LASDEBUG) - if(lasdebug>1) printf("Optimized Jump to a jump\n"); -#endif - } - } - } - jumps[j].relative=relative; - jumps[j].whereto=whereto; - jumps[j].flags&=~JUMP_UNSET; - } - upd_int(address,whereto - relative); -} +int alloc_label() { return ++label_no; } -static void set_branch(INT32 address,INT32 whereto) +int do_jump(int token,INT32 lbl) { - low_set_branch(address,whereto,address); + if(lbl==-1) lbl=alloc_label(); + emit(token, lbl); + return lbl; } -static INT32 do_jump(int token,INT32 whereto) -{ - jump_ptr=(jump_ptr+1)%NELEM(jumps); - if(jump_ptr>max_jumps) max_jumps=jump_ptr; - - jumps[jump_ptr].flags=JUMP_UNSET; - jumps[jump_ptr].whereto=-1; - jumps[jump_ptr].token=token; +static int do_docode2(node *n,int flags); - if(token!=F_BRANCH) - jumps[jump_ptr].flags|=JUMP_CONDITIONAL; +#define ins_label(L) do_jump(F_LABEL, L) - if(token>=0) +void do_pop(int x) +{ + switch(x) { - jumps[jump_ptr].wherefrom=PC; - ins_f_byte(token); - }else{ - jumps[jump_ptr].wherefrom=-1; + case 0: return; + case 1: emit2(F_POP_VALUE); break; + default: emit(F_POP_N_ELEMS,x); break; } - jumps[jump_ptr].relative=PC; - jumps[jump_ptr].address=PC; - ins_long(0, A_PROGRAM); - if(whereto!=-1) set_branch(jumps[jump_ptr].address, whereto); - return jumps[jump_ptr].address; -} - -static void clean_jumptable() { max_jumps=jump_ptr=-1; } - -struct jump_list -{ - int *stack; - int current; - int size; -}; - -static void push_break_stack(struct jump_list *x) -{ - x->stack=break_stack; - x->current=current_break; - x->size=break_stack_size; - break_stack_size=10; - break_stack=(int *)xalloc(sizeof(int)*break_stack_size); - current_break=0; -} - -static void pop_break_stack(struct jump_list *x,int jump) -{ - for(current_break--;current_break>=0;current_break--) - set_branch(break_stack[current_break],jump); - - free((char *)break_stack); - - break_stack_size=x->size; - current_break=x->current; - break_stack=x->stack; } - -static void push_continue_stack(struct jump_list *x) -{ - x->stack=continue_stack; - x->current=current_continue; - x->size=continue_stack_size; - continue_stack_size=10; - continue_stack=(int *)xalloc(sizeof(int)*continue_stack_size); - current_continue=0; -} - -static void pop_continue_stack(struct jump_list *x,int jump) -{ - for(current_continue--;current_continue>=0;current_continue--) - set_branch(continue_stack[current_continue],jump); - - free((char *)continue_stack); - continue_stack_size=x->size; - current_continue=x->current; - continue_stack=x->stack; -} - -static int do_docode2(node *n,int flags); - -#define DO_LVALUE 1 -#define DO_NOT_COPY 2 -#define DO_POP 4 - #define DO_CODE_BLOCK(N) do_pop(do_docode(N,DO_NOT_COPY | DO_POP)) -static int do_docode(node *n,INT16 flags) +int do_docode(node *n,INT16 flags) { int i; int save_current_line=current_line; @@ -402,50 +156,66 @@ static int do_docode(node *n,INT16 flags) } -int docode(node *n) -{ - clean_jumptable(); - return do_docode(n,0); -} +void do_jump_when_zero(node *n,int j); -static INT32 do_jump_when_zero(node *n,int j); - -static int do_jump_when_non_zero(node *n,int j) +void do_jump_when_non_zero(node *n,int j) { if(!node_is_tossable(n)) { if(node_is_true(n)) - return do_jump(F_BRANCH,j); + { + do_jump(F_BRANCH,j); + return; + } if(node_is_false(n)) - return -1; + return; } - if(n->token == F_NOT) - return do_jump_when_zero(CAR(n), j); + switch(n->token) + { + case F_NOT: + do_jump_when_zero(CAR(n), j); + return; + case F_OR: + do_jump_when_non_zero(CAR(n), j); + do_jump_when_non_zero(CDR(n), j); + return; + } if(do_docode(n, DO_NOT_COPY)!=1) fatal("Infernal compiler skiterror.\n"); - return do_jump(F_BRANCH_WHEN_NON_ZERO,j); + do_jump(F_BRANCH_WHEN_NON_ZERO,j); } -static INT32 do_jump_when_zero(node *n,int j) +void do_jump_when_zero(node *n,int j) { if(!node_is_tossable(n)) { if(node_is_true(n)) - return -1; + return; if(node_is_false(n)) - return do_jump(F_BRANCH,j); + { + do_jump(F_BRANCH,j); + return; + } } - if(n->token == F_NOT) - return do_jump_when_non_zero(CAR(n), j); + switch(n->token) + { + case F_NOT: + do_jump_when_non_zero(CAR(n), j); + return; + case F_AND: + do_jump_when_zero(CAR(n), j); + do_jump_when_zero(CDR(n), j); + return; + } if(do_docode(n, DO_NOT_COPY)!=1) fatal("Infernal compiler skiterror.\n"); - return do_jump(F_BRANCH_WHEN_ZERO,j); + do_jump(F_BRANCH_WHEN_ZERO,j); } static INT32 count_cases(node *n) @@ -488,7 +258,7 @@ static int do_docode2(node *n,int flags) { default: yyerror("Illegal lvalue."); - ins_int(0); + emit(F_NUMBER,0); return 1; case F_LVALUE_LIST: @@ -509,46 +279,55 @@ static int do_docode2(node *n,int flags) { fatal("Internal compiler error, Yikes!\n"); } - ins_f_byte(F_PUSH_ARRAY); + emit2(F_PUSH_ARRAY); return -0x7ffffff; case '?': { + int adroppings , bdroppings; + if(!CDDR(n)) { - tmp1=do_jump_when_zero(CAR(n), -1); + tmp1=alloc_label(); + do_jump_when_zero(CAR(n), tmp1); DO_CODE_BLOCK(CADR(n)); - set_branch(tmp1, PC); + emit(F_LABEL, tmp1); return 0; } if(!CADR(n)) { - tmp1=do_jump_when_non_zero(CAR(n), -1); + tmp1=alloc_label(); + do_jump_when_non_zero(CAR(n), tmp1); DO_CODE_BLOCK(CDDR(n)); - set_branch(tmp1, PC); + emit(F_LABEL,tmp1); return 0; } - tmp1=count_args(CDDR(n)); - tmp2=count_args(CADR(n)); + tmp1=alloc_label(); + do_jump_when_zero(CAR(n),tmp1); - if(tmp2 < tmp1) tmp1=tmp2; + adroppings=do_docode(CADR(n), flags); + tmp3=emit(F_POP_N_ELEMS,0); - tmp2=do_jump_when_zero(CAR(n),-1); + /* Else */ + tmp2=do_jump(F_BRANCH,-1); + emit(F_LABEL, tmp1); - tmp3=do_docode(CADR(n), flags); - if(tmp3 < tmp1) fatal("Count arguments was wrong.\n"); - do_pop(tmp3 - tmp1); + bdroppings=do_docode(CDDR(n), flags); + if(adroppings < bdroppings) + { + do_pop(bdroppings - adroppings); + } - tmp3=do_jump(F_BRANCH,-1); - set_branch(tmp2, PC); + if(adroppings > bdroppings) + { + update_arg(tmp3,adroppings-bdroppings); + adroppings=bdroppings; + } - tmp2=do_docode(CDDR(n), flags); - if(tmp2 < tmp1) fatal("Count arguments was wrong.\n"); - do_pop(tmp2 - tmp1); - set_branch(tmp3, PC); - return tmp1; + emit(F_LABEL, tmp2); + return adroppings; } case F_AND_EQ: @@ -571,9 +350,9 @@ static int do_docode2(node *n,int flags) { if(do_docode(CDR(n), 0)!=1) fatal("Internal compiler error, shit happens\n"); - ins_f_byte(F_LTOSVAL2); + emit2(F_LTOSVAL2); }else{ - ins_f_byte(F_LTOSVAL); + emit2(F_LTOSVAL); if(do_docode(CDR(n), 0)!=1) fatal("Internal compiler error, shit happens (again)\n"); } @@ -581,24 +360,24 @@ static int do_docode2(node *n,int flags) switch(n->token) { - case F_ADD_EQ: ins_f_byte(F_ADD); break; - case F_AND_EQ: ins_f_byte(F_AND); break; - case F_OR_EQ: ins_f_byte(F_OR); break; - case F_XOR_EQ: ins_f_byte(F_XOR); break; - case F_LSH_EQ: ins_f_byte(F_LSH); break; - case F_RSH_EQ: ins_f_byte(F_RSH); break; - case F_SUB_EQ: ins_f_byte(F_SUBTRACT); break; - case F_MULT_EQ:ins_f_byte(F_MULTIPLY);break; - case F_MOD_EQ: ins_f_byte(F_MOD); break; - case F_DIV_EQ: ins_f_byte(F_DIVIDE); break; + case F_ADD_EQ: emit2(F_ADD); break; + case F_AND_EQ: emit2(F_AND); break; + case F_OR_EQ: emit2(F_OR); break; + case F_XOR_EQ: emit2(F_XOR); break; + case F_LSH_EQ: emit2(F_LSH); break; + case F_RSH_EQ: emit2(F_RSH); break; + case F_SUB_EQ: emit2(F_SUBTRACT); break; + case F_MULT_EQ:emit2(F_MULTIPLY);break; + case F_MOD_EQ: emit2(F_MOD); break; + case F_DIV_EQ: emit2(F_DIVIDE); break; } if(flags & DO_POP) { - ins_f_byte(F_ASSIGN_AND_POP); + emit2(F_ASSIGN_AND_POP); return 0; }else{ - ins_f_byte(F_ASSIGN); + emit2(F_ASSIGN); return 1; } @@ -622,40 +401,43 @@ static int do_docode2(node *n,int flags) { if(do_docode(CDAR(n),DO_NOT_COPY)!=1) fatal("Infernal compiler error (dumpar core |ver hela mattan).\n"); - ins_f_byte(F_LTOSVAL2); + emit2(F_LTOSVAL2); }else{ - ins_f_byte(F_LTOSVAL); + emit2(F_LTOSVAL); if(do_docode(CDAR(n),DO_NOT_COPY)!=1) fatal("Infernal compiler error (dumpar core).\n"); } - ins_f_byte(CAR(n)->token); + emit2(CAR(n)->token); - ins_f_byte(n->token); + emit2(n->token); return n->token==F_ASSIGN; } default: - if(CDR(n)->token!=F_LOCAL && CDR(n)->token!=F_GLOBAL) - tmp1=do_docode(CDR(n),DO_LVALUE); - - if(do_docode(CAR(n),0)!=1) - yyerror("RHS is void!"); - switch(CDR(n)->token) { case F_LOCAL: - ins_f_byte(flags & DO_POP ? F_ASSIGN_LOCAL_AND_POP:F_ASSIGN_LOCAL); - ins_byte(CDR(n)->u.number,A_PROGRAM); + if(do_docode(CAR(n),0)!=1) yyerror("RHS is void!"); + emit(flags & DO_POP ? F_ASSIGN_LOCAL_AND_POP:F_ASSIGN_LOCAL, + CDR(n)->u.number ); break; - case F_GLOBAL: - ins_f_byte(flags & DO_POP ? F_ASSIGN_GLOBAL_AND_POP:F_ASSIGN_GLOBAL); - ins_byte(CDR(n)->u.number,A_PROGRAM); + case F_IDENTIFIER: + if(ID_FROM_INT(& fake_program, CDR(n)->u.number)->flags & IDENTIFIER_FUNCTION) + { + yyerror("Cannot assign functions.\n"); + }else{ + if(do_docode(CAR(n),0)!=1) yyerror("RHS is void!"); + emit(flags & DO_POP ? F_ASSIGN_GLOBAL_AND_POP:F_ASSIGN_GLOBAL, + CDR(n)->u.number); + } break; default: - ins_f_byte(flags & DO_POP ? F_ASSIGN_AND_POP:F_ASSIGN); + tmp1=do_docode(CDR(n),DO_LVALUE); + if(do_docode(CAR(n),0)!=1) yyerror("RHS is void!"); + emit2(flags & DO_POP ? F_ASSIGN_AND_POP:F_ASSIGN); break; } return flags & DO_POP ? 0 : 1; @@ -668,23 +450,11 @@ static int do_docode2(node *n,int flags) tmp1=do_jump(n->token,-1); if(do_docode(CDR(n),0)!=1) fatal("Compiler internal error.\n"); - set_branch(tmp1,PC); + emit(F_LABEL,tmp1); return 1; case F_EQ: case F_NE: - if(flags & DO_POP) - { - do_pop(do_docode(CAR(n),DO_NOT_COPY|DO_POP)+ - do_docode(CDR(n),DO_NOT_COPY|DO_POP)); - return 0; - } - tmp1=do_docode(CAR(n),0); - if(do_docode(CDR(n),0)!=1) - fatal("Compiler internal error (gnng!).\n"); - ins_f_byte(n->token); - return tmp1; - case F_ADD: case F_LT: case F_LE: @@ -699,23 +469,16 @@ static int do_docode2(node *n,int flags) case F_XOR: case F_OR: case F_AND: - if(flags & DO_POP) - { - do_pop(do_docode(CAR(n),DO_NOT_COPY|DO_POP)+ - do_docode(CDR(n),DO_NOT_COPY|DO_POP)); - return 0; - } - tmp1=do_docode(CAR(n),DO_NOT_COPY); - if(do_docode(CDR(n),DO_NOT_COPY)!=1) - fatal("Compiler internal error.\n"); - ins_f_byte(n->token); - return tmp1; + case F_NOT: + case F_COMPL: + case F_NEGATE: + fatal("Optimizer errror.\n"); case F_RANGE: tmp1=do_docode(CAR(n),DO_NOT_COPY); if(do_docode(CDR(n),DO_NOT_COPY)!=2) fatal("Compiler internal error.\n"); - ins_f_byte(n->token); + emit2(n->token); return tmp1; case F_INC: @@ -728,10 +491,10 @@ static int do_docode2(node *n,int flags) if(flags & DO_POP) { - ins_f_byte(F_INC_AND_POP); + emit2(F_INC_AND_POP); return 0; }else{ - ins_f_byte(n->token); + emit2(n->token); return 1; } @@ -744,48 +507,39 @@ static int do_docode2(node *n,int flags) #endif if(flags & DO_POP) { - ins_f_byte(F_DEC_AND_POP); + emit2(F_DEC_AND_POP); return 0; }else{ - ins_f_byte(n->token); + emit2(n->token); return 1; } - case F_NOT: - case F_COMPL: - case F_NEGATE: - tmp1=do_docode(CAR(n),DO_NOT_COPY | (flags & ~DO_LVALUE)); - if(flags & DO_POP) - { - do_pop(tmp1); - return 0; - } - ins_f_byte(n->token); - return tmp1; - case F_FOR: { - struct jump_list brk,cnt; INT32 *prev_switch_jumptable = current_switch_jumptable; + INT32 break_save = current_break; + INT32 continue_save = current_continue; + current_switch_jumptable=0; + current_break=alloc_label(); + current_continue=alloc_label(); - push_break_stack(&brk); - push_continue_stack(&cnt); if(CDR(n)) { - tmp1=do_jump(F_BRANCH,-1); - tmp2=PC; - if(CDR(n)) DO_CODE_BLOCK(CADR(n)); - pop_continue_stack(&cnt,PC); - if(CDR(n)) DO_CODE_BLOCK(CDDR(n)); - set_branch(tmp1,PC); + do_jump_when_zero(CAR(n),current_break); + tmp2=ins_label(-1); + DO_CODE_BLOCK(CADR(n)); + ins_label(current_continue); + DO_CODE_BLOCK(CDDR(n)); }else{ - tmp2=PC; + tmp2=ins_label(-1); } do_jump_when_non_zero(CAR(n),tmp2); - pop_break_stack(&brk,PC); + ins_label(current_break); current_switch_jumptable = prev_switch_jumptable; + current_break=break_save; + current_continue=continue_save; return 0; } @@ -794,23 +548,27 @@ static int do_docode2(node *n,int flags) case F_FOREACH: { - struct jump_list cnt,brk; INT32 *prev_switch_jumptable = current_switch_jumptable; + INT32 break_save = current_break; + INT32 continue_save = current_continue; + current_switch_jumptable=0; + current_break=alloc_label(); + current_continue=alloc_label(); tmp2=do_docode(CAR(n),DO_NOT_COPY); - ins_f_byte(F_CONST0); + emit2(F_CONST0); tmp3=do_jump(F_BRANCH,-1); - tmp1=PC; - push_break_stack(&brk); - push_continue_stack(&cnt); + tmp1=ins_label(-1); DO_CODE_BLOCK(CDR(n)); - pop_continue_stack(&cnt,PC); - set_branch(tmp3,PC); + ins_label(current_continue); + emit(F_LABEL,tmp3); do_jump(n->token,tmp1); - pop_break_stack(&brk,PC); + ins_label(current_break); current_switch_jumptable = prev_switch_jumptable; + current_break=break_save; + current_continue=continue_save; return 0; } @@ -819,40 +577,49 @@ static int do_docode2(node *n,int flags) case F_INC_LOOP: case F_DEC_LOOP: { - struct jump_list cnt,brk; INT32 *prev_switch_jumptable = current_switch_jumptable; + INT32 break_save = current_break; + INT32 continue_save = current_continue; + current_switch_jumptable=0; + current_break=alloc_label(); + current_continue=alloc_label(); tmp2=do_docode(CAR(n),0); tmp3=do_jump(F_BRANCH,-1); - tmp1=PC; - push_break_stack(&brk); - push_continue_stack(&cnt); + tmp1=ins_label(-1); + DO_CODE_BLOCK(CDR(n)); - pop_continue_stack(&cnt,PC); - set_branch(tmp3,PC); + ins_label(current_continue); + emit(F_LABEL,tmp3); do_jump(n->token,tmp1); - pop_break_stack(&brk,PC); + ins_label(current_break); current_switch_jumptable = prev_switch_jumptable; + current_break=break_save; + current_continue=continue_save; return 0; } case F_DO: { - struct jump_list cnt,brk; INT32 *prev_switch_jumptable = current_switch_jumptable; + INT32 break_save = current_break; + INT32 continue_save = current_continue; + current_switch_jumptable=0; + current_break=alloc_label(); + current_continue=alloc_label(); - tmp2=PC; - push_break_stack(&brk); - push_continue_stack(&cnt); + tmp2=ins_label(-1); DO_CODE_BLOCK(CAR(n)); - pop_continue_stack(&cnt,PC); + ins_label(current_continue); do_jump_when_non_zero(CDR(n),tmp2); - pop_break_stack(&brk,PC); + ins_label(current_break); current_switch_jumptable = prev_switch_jumptable; + current_break=break_save; + current_continue=continue_save; return 0; } @@ -864,44 +631,65 @@ static int do_docode2(node *n,int flags) } tmp1=do_docode(CAR(n),0); - if(!tmp1) { ins_f_byte(F_CONST0); tmp1=1; } + if(!tmp1) { emit2(F_CONST0); tmp1=1; } if(tmp1>1) do_pop(tmp1-1); tmp1=store_prog_string(n->type); - ins_f_byte_with_numerical_arg(F_STRING,tmp1); - ins_f_byte(F_CAST); + emit(F_STRING,tmp1); + emit2(F_CAST); return 1; case F_APPLY: - ins_f_byte(F_MARK); if(CAR(n)->token == F_CONSTANT) { - do_docode(CDR(n),0); - if(CAR(n)->u.sval.type == T_FUNCTION && - CAR(n)->u.sval.subtype != -1 && - CAR(n)->u.sval.u.object == &fake_object) + if(CAR(n)->u.sval.type == T_FUNCTION) { - ins_f_byte_with_numerical_arg(F_CALL_LFUN, CAR(n)->u.sval.subtype); - }else{ - tmp1=store_constant(& CAR(n)->u.sval, - !(CAR(n)->tree_info & OPT_EXTERNAL_DEPEND)); - ins_f_byte(F_MAX_OPCODE + tmp1); - if(n->type == void_type_string) return 0; + if(CAR(n)->u.sval.subtype == -1) /* driver fun? */ + { + if(!CAR(n)->u.sval.u.efun->docode || + !CAR(n)->u.sval.u.efun->docode(n)) + { + emit2(F_MARK); + do_docode(CDR(n),0); + tmp1=store_constant(& CAR(n)->u.sval, + !(CAR(n)->tree_info & OPT_EXTERNAL_DEPEND)); + emit(F_APPLY,tmp1); + } + if(n->type == void_type_string) return 0; + return 1; + }else{ + if(CAR(n)->u.sval.u.object == &fake_object) + { + emit2(F_MARK); + do_docode(CDR(n),0); + emit(F_CALL_LFUN, CAR(n)->u.sval.subtype); + return 1; + } + } } + + emit2(F_MARK); + do_docode(CDR(n),0); + tmp1=store_constant(& CAR(n)->u.sval, + !(CAR(n)->tree_info & OPT_EXTERNAL_DEPEND)); + emit(F_APPLY,tmp1); + return 1; } else if(CAR(n)->token == F_IDENTIFIER && ID_FROM_INT(& fake_program, CAR(n)->u.number)->flags & IDENTIFIER_FUNCTION) { + emit2(F_MARK); do_docode(CDR(n),0); - ins_f_byte_with_numerical_arg(F_CALL_LFUN, CAR(n)->u.number); + emit(F_CALL_LFUN, CAR(n)->u.number); return 1; } else { - struct lpc_string *tmp; + struct pike_string *tmp; struct efun *fun; + emit2(F_MARK); tmp=make_shared_string("call_function"); if(!tmp) yyerror("No call_function efun."); fun=lookup_efun(tmp); @@ -911,7 +699,7 @@ static int do_docode2(node *n,int flags) do_docode(CAR(n),0); do_docode(CDR(n),0); tmp1=store_constant(& fun->function, 1); - ins_f_byte(tmp1 + F_MAX_OPCODE); + emit(F_APPLY, tmp1); return 1; } @@ -936,27 +724,24 @@ static int do_docode2(node *n,int flags) case F_SWITCH: { - struct jump_list brk; INT32 e,cases,*order; INT32 *jumptable; INT32 prev_switch_values_on_stack = current_switch_values_on_stack; INT32 prev_switch_case = current_switch_case; INT32 prev_switch_default = current_switch_default; INT32 *prev_switch_jumptable = current_switch_jumptable; + INT32 break_save = current_break; if(do_docode(CAR(n),0)!=1) fatal("Internal compiler error, time to panic\n"); - push_break_stack(&brk); + current_break=alloc_label(); cases=count_cases(CDR(n)); - ins_f_byte(F_SWITCH); - tmp1=PC; - ins_short(0, A_PROGRAM); - while(PC != (unsigned INT32)MY_ALIGN(PC)) - ins_byte(0, A_PROGRAM); - tmp2=PC; + tmp1=emit(F_SWITCH,0); + emit(F_ALIGN,sizeof(INT32)); + current_switch_values_on_stack=0; current_switch_case=0; current_switch_default=-1; @@ -965,29 +750,30 @@ static int do_docode2(node *n,int flags) for(e=0; e<cases*2+1; e++) { - jumptable[e]=do_jump(-1,-1); + jumptable[e]=emit(F_POINTER, 0); current_switch_jumptable[e]=-1; } current_switch_jumptable[current_switch_case++]=-1; DO_CODE_BLOCK(CDR(n)); - + f_aggregate(cases); - sp[-1].u.array=compact_array(sp[-1].u.array); order=get_switch_order(sp[-1].u.array); - + + /* Check for cases inside a range */ for(e=0; e<cases-1; e++) { - if(current_switch_jumptable[order[e]*2+2] != -1) + if(current_switch_jumptable[ order[e]*2+2 ] != -1) { - if(current_switch_jumptable[order[e]*2+2] != - current_switch_jumptable[order[e+1]*2+1]) + if(current_switch_jumptable[ order[e]*2+2 ] != + current_switch_jumptable[ order[e+1]*2+1 ]) yyerror("Case inside range."); } } - if(current_switch_default < 0) current_switch_default = PC; + if(current_switch_default < 0) + current_switch_default = ins_label(-1); for(e=0;e<cases*2+1;e++) if(current_switch_jumptable[e]==-1) @@ -999,10 +785,9 @@ static int do_docode2(node *n,int flags) free((char *)order); for(e=0; e<cases*2+1; e++) - low_set_branch(jumptable[e], current_switch_jumptable[e],tmp2); + update_arg(jumptable[e], current_switch_jumptable[e]); - e=store_constant(sp-1,1); - upd_short(tmp1,e); + update_arg(tmp1, store_constant(sp-1,1)); pop_stack(); free((char *)jumptable); @@ -1013,8 +798,9 @@ static int do_docode2(node *n,int flags) current_switch_case = prev_switch_case; current_switch_values_on_stack = prev_switch_values_on_stack ; - pop_break_stack(&brk,PC); + emit(F_LABEL, current_break); + current_break=break_save; return 0; } @@ -1039,11 +825,17 @@ static int do_docode2(node *n,int flags) if(is_equal(sp-tmp1, sp-1)) yyerror("Duplicate case."); - current_switch_jumptable[current_switch_case++]=PC; + current_switch_jumptable[current_switch_case++]=ins_label(-1); if(CDR(n)) { - current_switch_jumptable[current_switch_case++]=PC; + if(!is_const(CDR(n))) + yyerror("Case label isn't constant."); + + current_switch_jumptable[current_switch_case+1]= + current_switch_jumptable[current_switch_case]= + current_switch_jumptable[current_switch_case-1]; + current_switch_case+=2; tmp1=eval_low(CDR(n)); if(tmp1<1) { @@ -1056,7 +848,6 @@ static int do_docode2(node *n,int flags) for(tmp1=current_switch_values_on_stack; tmp1 > 1; tmp1--) if(is_equal(sp-tmp1, sp-1)) yyerror("Duplicate case."); - current_switch_jumptable[current_switch_case++]=PC; } current_switch_jumptable[current_switch_case++]=-1; } @@ -1070,74 +861,58 @@ static int do_docode2(node *n,int flags) }else if(current_switch_default!=-1){ yyerror("Duplicate switch default."); }else{ - current_switch_default = PC; + current_switch_default = ins_label(-1); } return 0; case F_BREAK: - if(!break_stack) + if(current_break == -1) { yyerror("Break outside loop or switch."); }else{ - if(current_break>=break_stack_size) - { - break_stack_size*=2; - break_stack=(int *)realloc((char *)break_stack, - sizeof(int)*break_stack_size); - if(!break_stack) - fatal("Out of memory.\n"); - } - break_stack[current_break++]=do_jump(F_BRANCH,-1); + do_jump(F_BRANCH, current_break); } return 0; case F_CONTINUE: - if(!continue_stack) + if(current_continue == -1) { yyerror("continue outside loop or switch."); }else{ - if(current_continue>=continue_stack_size) - { - continue_stack_size*=2; - continue_stack=(int *)realloc((char *)continue_stack, - sizeof(int)*continue_stack_size); - } - continue_stack[current_continue++]=do_jump(F_BRANCH,-1); + do_jump(F_BRANCH, current_continue); } return 0; case F_RETURN: - if(!CAR(n) || - (CAR(n)->token == F_CONSTANT && IS_ZERO(&CAR(n)->u.sval)) || - do_docode(CAR(n),0)<0) - { - ins_f_byte(F_RETURN_0); - }else{ - ins_f_byte(F_RETURN); - } + do_docode(CAR(n),0); + emit2(F_RETURN); return 0; case F_SSCANF: tmp1=do_docode(CAR(n),DO_NOT_COPY); tmp2=do_docode(CDR(n),DO_NOT_COPY | DO_LVALUE); - ins_f_byte_with_numerical_arg(F_SSCANF,tmp1+tmp2); + emit(F_SSCANF,tmp1+tmp2); return 1; case F_CATCH: { - struct jump_list cnt,brk; + INT32 break_save = current_break; + INT32 continue_save = current_continue; INT32 *prev_switch_jumptable = current_switch_jumptable; + current_switch_jumptable=0; + current_break=alloc_label(); + current_continue=alloc_label(); tmp1=do_jump(F_CATCH,-1); - push_break_stack(&brk); - push_continue_stack(&cnt); DO_CODE_BLOCK(CAR(n)); - pop_continue_stack(&cnt,PC); - pop_break_stack(&brk,PC); - ins_f_byte(F_DUMB_RETURN); - set_branch(tmp1,PC); + ins_label(current_continue); + ins_label(current_break); + emit2(F_THROW_ZERO); + ins_label(tmp1); + current_break=break_save; + current_continue=continue_save; current_switch_jumptable = prev_switch_jumptable; return 1; } @@ -1156,12 +931,12 @@ static int do_docode2(node *n,int flags) tmp1=do_docode(CAR(n), DO_NOT_COPY); if(do_docode(CDR(n),DO_NOT_COPY) != 1) fatal("Internal compiler error, please report this (1)."); - ins_f_byte(F_INDEX); + emit2(F_INDEX); if(!(flags & DO_NOT_COPY)) { while(n && n->token==F_INDEX) n=CAR(n); if(n->token==F_CONSTANT && !(n->node_info & OPT_EXTERNAL_DEPEND)) - ins_f_byte(F_COPY_VALUE); + emit2(F_COPY_VALUE); } } return tmp1; @@ -1170,16 +945,12 @@ static int do_docode2(node *n,int flags) switch(n->u.sval.type) { case T_INT: - ins_int(n->u.sval.u.integer); - return 1; - - case T_FLOAT: - ins_float(n->u.sval.u.float_number); + emit(F_NUMBER,n->u.sval.u.integer); return 1; case T_STRING: tmp1=store_prog_string(n->u.sval.u.string); - ins_f_byte_with_numerical_arg(F_STRING,tmp1); + emit(F_STRING,tmp1); return 1; case T_FUNCTION: @@ -1187,25 +958,25 @@ static int do_docode2(node *n,int flags) { if(n->u.sval.u.object == &fake_object) { - ins_f_byte_with_numerical_arg(F_LFUN,n->u.sval.subtype); + emit(F_LFUN,n->u.sval.subtype); return 1; } } default: tmp1=store_constant(&(n->u.sval),!(n->tree_info & OPT_EXTERNAL_DEPEND)); - ins_f_byte_with_numerical_arg(F_CONSTANT,tmp1); + emit(F_CONSTANT,tmp1); return 1; case T_ARRAY: case T_MAPPING: - case T_LIST: + case T_MULTISET: tmp1=store_constant(&(n->u.sval),!(n->tree_info & OPT_EXTERNAL_DEPEND)); - ins_f_byte_with_numerical_arg(F_CONSTANT,tmp1); + emit(F_CONSTANT,tmp1); /* copy now or later ? */ if(!(flags & DO_NOT_COPY) && !(n->tree_info & OPT_EXTERNAL_DEPEND)) - ins_f_byte(F_COPY_VALUE); + emit2(F_COPY_VALUE); return 1; } @@ -1213,10 +984,10 @@ static int do_docode2(node *n,int flags) case F_LOCAL: if(flags & DO_LVALUE) { - ins_f_byte_with_numerical_arg(F_LOCAL_LVALUE,n->u.number); + emit(F_LOCAL_LVALUE,n->u.number); return 2; }else{ - ins_f_byte_with_numerical_arg(F_LOCAL,n->u.number); + emit(F_LOCAL,n->u.number); return 1; } @@ -1227,23 +998,19 @@ static int do_docode2(node *n,int flags) { yyerror("Cannot assign functions.\n"); }else{ - ins_f_byte_with_numerical_arg(F_LFUN,n->u.number); + emit(F_LFUN,n->u.number); } }else{ if(flags & DO_LVALUE) { - ins_f_byte_with_numerical_arg(F_GLOBAL_LVALUE,n->u.number); + emit(F_GLOBAL_LVALUE,n->u.number); return 2; }else{ - ins_f_byte_with_numerical_arg(F_GLOBAL,n->u.number); + emit(F_GLOBAL,n->u.number); } } return 1; - case F_EFUN: - ins_f_byte_with_numerical_arg(n->token,n->u.number); - return 1; - case F_VAL_LVAL: return do_docode(CAR(n),flags)+do_docode(CDR(n),flags | DO_LVALUE); @@ -1255,6 +1022,28 @@ static int do_docode2(node *n,int flags) void do_code_block(node *n) { - clean_jumptable(); + init_bytecode(); + label_no=0; DO_CODE_BLOCK(n); + asm_opt(); + assemble(); +} + +int docode(node *n) +{ + int tmp; + int label_no_save = label_no; + dynamic_buffer instrbuf_save = instrbuf; + + instrbuf.s.str=0; + label_no=0; + init_bytecode(); + + tmp=do_docode(n,0); + asm_opt(); + assemble(); + + instrbuf=instrbuf_save; + label_no = label_no_save; + return tmp; } diff --git a/src/docode.h b/src/docode.h index 78bf2f8230cc107c200ce8fb5e096f7fa476f7ba..564defc61252367f3b4b0be60c855961c29f1ed0 100644 --- a/src/docode.h +++ b/src/docode.h @@ -1,27 +1,35 @@ /*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ #ifndef DOCODE_H #define DOCODE_H +#define DO_LVALUE 1 +#define DO_NOT_COPY 2 +#define DO_POP 4 + extern int store_linenumbers; extern int comp_stackp; extern INT32 comp_stack[COMPILER_STACK_SIZE]; +#define emit(X,Y) insert_opcode((X),(Y),current_line, current_file) +#define emit2(X) insert_opcode2((X),current_line, current_file) + /* Prototypes begin here */ void ins_byte(unsigned char b,int area); void ins_signed_byte(char b,int area); void ins_short(INT16 l,int area); -void ins_long(long l,int area); -void ins_f_byte(unsigned int b); +void ins_int(INT32 l,int area); +void upd_int(int offset, INT32 tmp); +INT32 read_int(int offset); void push_address(); -void push_explicit(int address); -int pop_address(); -struct jump; -int docode(node *n); +void push_explicit(INT32 address); +INT32 pop_address(); +int do_docode(node *n,INT16 flags); void do_code_block(node *n); +int docode(node *n); /* Prototypes end here */ #endif diff --git a/src/dynamic_buffer.c b/src/dynamic_buffer.c index 4e5871699a02ebb1a4047b74f9e78f86ec1449cc..9dd46079b34fefb4fc9fee9a423c188d6170b4f5 100644 --- a/src/dynamic_buffer.c +++ b/src/dynamic_buffer.c @@ -1,6 +1,6 @@ /*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ #include "global.h" @@ -14,8 +14,14 @@ static dynamic_buffer buff; char *low_make_buf_space(INT32 space,dynamic_buffer *buf) { char *ret; +#ifdef DEBUG + if(!buf->s.str) fatal("ARRRRGH! Deadly Trap!\n"); +#endif + if(buf->s.len+space>=buf->bufsize) { + if(!buf->bufsize) buf->bufsize=1; + do{ buf->bufsize*=2; }while(buf->s.len+space>=buf->bufsize); @@ -92,9 +98,9 @@ char *simple_free_buf(void) return complex_free_buf().str; } -struct lpc_string *low_free_buf(dynamic_buffer *buf) +struct pike_string *low_free_buf(dynamic_buffer *buf) { - struct lpc_string *q; + struct pike_string *q; if(!buf->s.str) return 0; q=make_shared_binary_string(buf->s.str,buf->s.len); free(buf->s.str); @@ -103,7 +109,7 @@ struct lpc_string *low_free_buf(dynamic_buffer *buf) return q; } -struct lpc_string *free_buf(void) { return low_free_buf(&buff); } +struct pike_string *free_buf(void) { return low_free_buf(&buff); } char *make_buf_space(INT32 space) { return low_make_buf_space(space,&buff); } void my_putchar(char b) { low_my_putchar(b,&buff); } void my_binary_strcat(const char *b,INT32 l) { low_my_binary_strcat(b,l,&buff); } diff --git a/src/dynamic_buffer.h b/src/dynamic_buffer.h index 042670bfe447aa469b9422125b334c42594f6889..c021f9bf9341db8cb56b70602c389e3566eccab9 100644 --- a/src/dynamic_buffer.h +++ b/src/dynamic_buffer.h @@ -1,6 +1,6 @@ /*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ #ifndef DYNAMIC_BUFFER_H @@ -35,8 +35,8 @@ void low_init_buf_with_string(string s,dynamic_buffer *buf); string complex_free_buf(void); void toss_buffer(dynamic_buffer *buf); char *simple_free_buf(void); -struct lpc_string *low_free_buf(dynamic_buffer *buf); -struct lpc_string *free_buf(void); +struct pike_string *low_free_buf(dynamic_buffer *buf); +struct pike_string *free_buf(void); char *make_buf_space(INT32 space); void my_putchar(char b); void my_binary_strcat(const char *b,INT32 l); diff --git a/src/efun.h b/src/efun.h index 313617231f85fc600e748e91a8c9aea9764de87b..f7e0c60b397cd6adebdf9a6957fa93360c8d1d1c 100644 --- a/src/efun.h +++ b/src/efun.h @@ -1,6 +1,6 @@ /*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ #ifndef EFUN_H @@ -14,7 +14,7 @@ typdef void (*efun_t) (INT32); * a) one type that can point to a callable function. * (C function, or object->fun) * b) one type that once the object/program is known can point - * to the C/LPC function body. + * to the C/Pike function body. * c) A number of flags to send to 'add_simul_efun' to specify side effects * and such. * d) A type struct diff --git a/src/error.c b/src/error.c index e90c7c81c0123272d366a6440e0a4b5dadde4ba1..c09e5b30da3cc287823c90cdd52aed36637b60c5 100644 --- a/src/error.c +++ b/src/error.c @@ -1,6 +1,6 @@ /*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ #include "global.h" @@ -8,23 +8,23 @@ #include "error.h" #include "interpret.h" #include "stralloc.h" -#include "builtin_efuns.h" +#include "builtin_functions.h" #include "array.h" #include "object.h" -char *automatic_fatal; +char *automatic_fatal, *exit_on_error; JMP_BUF *recoveries=0; ONERROR *onerror_stack=0; -jmp_buf *init_recovery(JMP_BUF *r) +my_jmp_buf *init_recovery(JMP_BUF *r) { r->fp=fp; - r->sp=sp; - r->mark_sp=mark_sp; + r->sp=sp-evaluator_stack; + r->mark_sp=mark_sp - mark_stack; r->previous=recoveries; r->onerror=onerror_stack; recoveries=r; - return & r->recovery; + return & ( r->recovery ); } void throw() @@ -33,7 +33,7 @@ void throw() fatal("No error recovery context.\n"); #ifdef DEBUG - if(sp < recoveries->sp) + if(sp - evaluator_stack < recoveries->sp) fatal("Error in error.\n"); #endif @@ -49,8 +49,8 @@ void throw() fp = fp->parent_frame; } - pop_n_elems(sp - recoveries->sp); - mark_sp = recoveries->mark_sp; + pop_n_elems(sp - evaluator_stack - recoveries->sp); + mark_sp = mark_stack + recoveries->mark_sp; while(recoveries->onerror != onerror_stack) { @@ -82,16 +82,26 @@ void va_error(char *fmt, va_list args) VSPRINTF(buf, fmt, args); - if(!recoveries || automatic_fatal) + if(automatic_fatal) { - if(!automatic_fatal) - automatic_fatal="No error recovery context: "; - fprintf(stderr,"%s %s",automatic_fatal,buf); abort(); } - if(strlen(buf) >= sizeof(buf)) + if(exit_on_error && !recoveries) + { + if(!exit_on_error) + exit_on_error="No error recovery context: "; + +#ifdef DEBUG + dump_backlog(); +#endif + + fprintf(stderr,"%s %s",exit_on_error,buf); + exit(99); + } + + if((long)strlen(buf) >= (long)sizeof(buf)) fatal("Buffer overflow in error()\n"); push_string(make_shared_string(buf)); diff --git a/src/error.h b/src/error.h index 616925f0d72cc1c4a8311bed1363a8e0ab03c679..f3878b3c767841fa15fcd4fe87646f0e71b853ca 100644 --- a/src/error.h +++ b/src/error.h @@ -1,14 +1,20 @@ /*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ #ifndef ERROR_H #define ERROR_H +#include "machine.h" + +#ifdef HAVE_SETJMP_H #include <setjmp.h> +#undef HAVE_SETJMP_H +#endif + #include <stdarg.h> -#include "machine.h" + #include "svalue.h" @@ -23,20 +29,22 @@ typedef struct ONERROR void *arg; } ONERROR; +typedef jmp_buf my_jmp_buf; /* Maybe I'll get less warnings like this */ + typedef struct JMP_BUF { struct JMP_BUF *previous; - jmp_buf recovery; + my_jmp_buf recovery; struct frame *fp; - struct svalue *sp; - struct svalue **mark_sp; + INT32 sp; + INT32 mark_sp; ONERROR *onerror; } JMP_BUF; extern ONERROR *onerror_stack; extern JMP_BUF *recoveries; extern struct svalue throw_value; -extern char *automatic_fatal; +extern char *automatic_fatal, *exit_on_error; #define SETJMP(X) setjmp((init_recovery(&X)[0])) #define UNSETJMP(X) recoveries=X.previous; @@ -51,7 +59,7 @@ extern char *automatic_fatal; #define UNSET_ONERROR(X) onerror_stack=X.previous -jmp_buf *init_recovery(JMP_BUF *r); +my_jmp_buf *init_recovery(JMP_BUF *r); int fix_recovery(int i, JMP_BUF *r); void throw() ATTRIBUTE((noreturn)); void va_error(char *fmt, va_list args) ATTRIBUTE((noreturn)); diff --git a/src/fd_control.c b/src/fd_control.c index 833deb8dd771d4fc8f8d949dec3b363f6d8a8637..d24d56ee6fb7f79428e2a8e88862c142297cf73a 100644 --- a/src/fd_control.c +++ b/src/fd_control.c @@ -1,6 +1,6 @@ /*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ #include <sys/types.h> diff --git a/src/fd_control.h b/src/fd_control.h index 3d78eb3c5dc15c9a17b1adc01f31c41347ef32ce..ce8146a8d851ace8214e039e77e35d7e6082b7cb 100644 --- a/src/fd_control.h +++ b/src/fd_control.h @@ -1,6 +1,6 @@ /*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ #ifndef FD_CONTROL_H diff --git a/src/fsort.c b/src/fsort.c index 4924eea86f7d95450b30ffefb943d093429105c6..7cf6896a6c838eb8c768bb0eafc990c068cb3165 100644 --- a/src/fsort.c +++ b/src/fsort.c @@ -1,6 +1,6 @@ /*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ /* fsort- a smarter quicksort /Hubbe */ diff --git a/src/fsort.h b/src/fsort.h index a4e7db3f92ac921a88ed6397959c3be47b1dde07..eed81fe3367f1d71487b4436bfec782ac5642626 100644 --- a/src/fsort.h +++ b/src/fsort.h @@ -1,6 +1,6 @@ /*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ #ifndef FSORT_H diff --git a/src/gc.c b/src/gc.c new file mode 100644 index 0000000000000000000000000000000000000000..cfd11720aec2a6c1f3759cc99d72601290e425c6 --- /dev/null +++ b/src/gc.c @@ -0,0 +1,258 @@ +/*\ +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) +||| See the files COPYING and DISCLAIMER for more information. +\*/ + +#include "global.h" + +#ifdef GC2 + +#include "array.h" +#include "multiset.h" +#include "mapping.h" +#include "object.h" +#include "program.h" + +#include "gc.h" +#include "main.h" + +/* Run garbage collect approximate every time we have + * 20 percent of all arrays, objects and programs is + * garbage. + */ + +#define GC_CONST 20 +#define MIN_ALLOC_THRESHOLD 1000 +#define MAX_ALLOC_THRESHOLD 10000000 +#define MULTIPLIER 0.9 +#define MARKER_CHUNK_SIZE 1023 + +INT32 num_objects; +INT32 num_allocs; +INT32 alloc_threshold = MIN_ALLOC_THRESHOLD; + +static double objects_alloced; +static double objects_freed; + +#define GC_REFERENCED 1 + +struct marker +{ + struct marker *next; + void *marked; + INT32 refs; + INT32 flags; +}; + +struct marker_chunk +{ + struct marker_chunk *next; + struct marker markers[MARKER_CHUNK_SIZE]; +}; + +static struct marker_chunk *chunk=0; +static int markers_left_in_chunk=0; + +static struct marker *new_marker() +{ + if(!markers_left_in_chunk) + { + struct marker_chunk *m; + m=(struct marker_chunk *)xalloc(sizeof(struct marker_chunk)); + m->next=chunk; + chunk=m; + markers_left_in_chunk=MARKER_CHUNK_SIZE; + } + markers_left_in_chunk--; + + return chunk->markers + markers_left_in_chunk; +} + +static struct marker **hash=0; +static int hashsize=0; + +static struct marker *getmark(void *a) +{ + int hashval; + struct marker *m; + + hashval=((long)a)%hashsize; + + for(m=hash[hashval];m;m=m->next) + if(m->marked == a) + return m; + + m=new_marker(); + m->marked=a; + m->refs=0; + m->flags=0; + m->next=hash[hashval]; + hash[hashval]=m; + + return m; +} + +void gc_check(void *a) +{ + getmark(a)->refs++; +} + +int gc_is_referenced(void *a) +{ + struct marker *m; + m=getmark(a); +#ifdef DEBUG + if(m->refs > *(INT32 *)a) + fatal("Ref counts are totally wrong!!!\n"); +#endif + return m->refs < *(INT32 *)a; +} + +int gc_mark(void *a) +{ + struct marker *m; + m=getmark(a); + + if(m->flags & GC_REFERENCED) + { + return 0; + }else{ + m->flags |= GC_REFERENCED; + return 1; + } +} + +int gc_do_free(void *a) +{ + struct marker *m; + m=getmark(a); + return !(m->flags & GC_REFERENCED); +} + +/* Not all of these are primes, but they should be adequate */ +static INT32 hashprimes[] = +{ + 31, /* ~ 2^0 = 1 */ + 31, /* ~ 2^1 = 2 */ + 31, /* ~ 2^2 = 4 */ + 31, /* ~ 2^3 = 8 */ + 31, /* ~ 2^4 = 16 */ + 31, /* ~ 2^5 = 32 */ + 61, /* ~ 2^6 = 64 */ + 127, /* ~ 2^7 = 128 */ + 251, /* ~ 2^8 = 256 */ + 541, /* ~ 2^9 = 512 */ + 1151, /* ~ 2^10 = 1024 */ + 2111, /* ~ 2^11 = 2048 */ + 4327, /* ~ 2^12 = 4096 */ + 8803, /* ~ 2^13 = 8192 */ + 17903, /* ~ 2^14 = 16384 */ + 32321, /* ~ 2^15 = 32768 */ + 65599, /* ~ 2^16 = 65536 */ + 133153, /* ~ 2^17 = 131072 */ + 270001, /* ~ 2^18 = 264144 */ + 547453, /* ~ 2^19 = 524288 */ + 1109891, /* ~ 2^20 = 1048576 */ + 2000143, /* ~ 2^21 = 2097152 */ + 4561877, /* ~ 2^22 = 4194304 */ + 9248339, /* ~ 2^23 = 8388608 */ + 16777215, /* ~ 2^24 = 16777216 */ + 33554431, /* ~ 2^25 = 33554432 */ + 67108863, /* ~ 2^26 = 67108864 */ + 134217727, /* ~ 2^27 = 134217728 */ + 268435455, /* ~ 2^28 = 268435456 */ + 536870911, /* ~ 2^29 = 536870912 */ + 1073741823,/* ~ 2^30 = 1073741824 */ + 2147483647,/* ~ 2^31 = 2147483648 */ +}; + +void do_gc(void) +{ + double tmp; + INT32 tmp2; + struct marker_chunk *m; + + tmp2=num_objects; + +#ifdef DEBUG + if(t_flag) + fprintf(stderr,"Garbage collecting ... "); + if(num_objects < 0) + fatal("Panic, less than zero objects!\n"); +#endif + + objects_alloced*=MULTIPLIER; + objects_alloced += (double) num_allocs; + + objects_freed*=MULTIPLIER; + objects_freed += (double) num_objects; + + + /* init hash , hashsize will be a prime between num_objects/8 and + * num_objects/4, this will assure that no re-hashing is needed. + */ + hashsize=my_log2(num_objects); + hashsize-=2; + if(hashsize<0) hashsize=0; + hashsize=hashprimes[hashsize]; + hash=(struct marker **)xalloc(sizeof(struct marker **)*hashsize); + MEMSET((char *)hash,0,sizeof(struct marker **)*hashsize); + markers_left_in_chunk=0; + + gc_check_all_arrays(); + gc_check_all_multisets(); + gc_check_all_mappings(); + gc_check_all_programs(); + gc_check_all_objects(); + + gc_mark_all_arrays(); + gc_mark_all_multisets(); + gc_mark_all_mappings(); + gc_mark_all_programs(); + gc_mark_all_objects(); + + gc_free_all_unreferenced_arrays(); + gc_free_all_unreferenced_multisets(); + gc_free_all_unreferenced_mappings(); + gc_free_all_unreferenced_programs(); + gc_free_all_unreferenced_objects(); + + + /* Free hash table */ + free((char *)hash); + while(m=chunk) + { + chunk=m->next; + free((char *)m); + } + + destruct_objects_to_destruct(); + + objects_freed -= (double) num_objects; + + tmp=(double)num_objects; + tmp=tmp * GC_CONST/100.0 * (objects_alloced+1.0) / (objects_freed+1.0); + + if((int)tmp < alloc_threshold + num_allocs) + { + alloc_threshold=(int)tmp; + }else{ + alloc_threshold+=num_allocs; + } + + if(alloc_threshold < MIN_ALLOC_THRESHOLD) + alloc_threshold = MIN_ALLOC_THRESHOLD; + if(alloc_threshold > MAX_ALLOC_THRESHOLD) + alloc_threshold = MAX_ALLOC_THRESHOLD; + num_allocs=0; + +#ifdef DEBUG + if(t_flag) + fprintf(stderr,"done (freed %ld of %ld objects).\n", + (long)(tmp2-num_objects),(long)tmp2); +#endif +} + +#endif + diff --git a/src/gc.h b/src/gc.h new file mode 100644 index 0000000000000000000000000000000000000000..b53d47d6d2eeb03c3eef6b9a2ae020881a7939d6 --- /dev/null +++ b/src/gc.h @@ -0,0 +1,42 @@ +#ifndef GC_H +#define GC_H + +#ifdef GC2 + +#include "types.h" + +extern INT32 num_objects; +extern INT32 num_allocs; +extern INT32 alloc_threshold; + +#define GC_ALLOC() do{ num_objects++; num_allocs++; } while(0) +#ifdef DEBUG +#define GC_FREE() do { num_objects-- ; if(num_objects < 0) fatal("Panic!! less than zero objects!\n"); }while(0) +#else +#define GC_FREE() do { num_objects-- ; }while(0) +#endif + +#ifdef ALWAYS_GC +#define CHECK_FOR_GC(); do { do_gc(); } while(0) +#else +#define CHECK_FOR_GC(); do { if(num_allocs > alloc_threshold) do_gc(); } while(0) +#endif + +/* Prototypes begin here */ +struct marker; +struct marker_chunk; +void gc_check(void *a); +int gc_is_referenced(void *a); +int gc_mark(void *a); +int gc_do_free(void *a); +void do_gc(void); +/* Prototypes end here */ + +#else + +#define GC_ALLOC() +#define GC_FREE() +#define do_gc() + +#endif +#endif diff --git a/src/get_linker_options b/src/get_linker_options deleted file mode 100644 index 29960312c6b6010fb6006ef67d63050eab7e7709..0000000000000000000000000000000000000000 --- a/src/get_linker_options +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh -# -# Build a list of things to link from module subdirs -# Modules that need extra libraries should create a file -# 'linker_opts' in the build tree containing the required -# linker options -# - -fullnames=`cat $1` - -dirs= -for dir in $fullnames -do - dir="`echo $dir|sed 's,^.*/\([^/]*\)$,\1,'`" # Portable (?) basename - dirs="$dirs $dir" -done - -for dir in $fullnames -do - echo modules/$modname/$modname.a -done - -for dir in $fullnames -do - if [ -f modules/$modname/linker_opts ]; then - cat modules/$modname/linker_opts - fi -done - diff --git a/src/global.h b/src/global.h index 7eca62d6c8978880663061fcac16e0c861e35d8a..49a37515e7093ac163003aeab0059f5dc6b4e53c 100644 --- a/src/global.h +++ b/src/global.h @@ -1,6 +1,6 @@ /*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ #ifndef GLOBAL_H @@ -52,22 +52,22 @@ char *alloca (); #ifdef HAVE_STDLIB_H #include <stdlib.h> +#undef HAVE_STDLIB_H #endif #ifdef HAVE_UNISTD_H #include <unistd.h> +#undef HAVE_UNISTD_H #endif #ifdef HAVE_STRING_H #include <string.h> +#undef HAVE_STRING_H #endif #ifdef HAVE_MEMORY_H #include <memory.h> -#endif - -#ifdef DEBUG -#include "debug.h" +#undef HAVE_MEMORY_H #endif #if defined(__GNUC__) && !defined(DEBUG) && !defined(lint) diff --git a/src/hashtable.c b/src/hashtable.c index 572175fec16c233462974c02bf57a98c0d8d32ec..173ff92b420b661984368b699a98e45da3b8a5f1 100644 --- a/src/hashtable.c +++ b/src/hashtable.c @@ -1,6 +1,6 @@ /*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ #include "global.h" @@ -10,7 +10,7 @@ #include "stuff.h" #include "error.h" -static unsigned INT32 gobble(struct lpc_string *s) +static unsigned INT32 gobble(struct pike_string *s) { unsigned INT32 i; i=my_hash_string(s); @@ -23,7 +23,7 @@ static unsigned INT32 gobble(struct lpc_string *s) /* * Search hash for a specific string. */ -struct hash_entry *hash_lookup(struct hash_table *h, struct lpc_string *s) +struct hash_entry *hash_lookup(struct hash_table *h, struct pike_string *s) { struct hash_entry *e, **prev, **base; diff --git a/src/hashtable.h b/src/hashtable.h index caef3e0d901f3b6e76cc4bc2d3d3c2356f89e738..d8d0a7043666aa92b0c91dc844a757af69e33468 100644 --- a/src/hashtable.h +++ b/src/hashtable.h @@ -1,6 +1,6 @@ /*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ #ifndef HASHTABLE_H @@ -14,7 +14,7 @@ struct hash_entry { struct hash_entry *next; - struct lpc_string *s; + struct pike_string *s; }; struct hash_table @@ -25,7 +25,7 @@ struct hash_table }; /* Prototypes begin here */ -struct hash_entry *hash_lookup(struct hash_table *h, struct lpc_string *s); +struct hash_entry *hash_lookup(struct hash_table *h, struct pike_string *s); struct hash_table *create_hash_table(); struct hash_table *hash_rehash(struct hash_table *h,int size); struct hash_table *hash_insert(struct hash_table *h, struct hash_entry *s); diff --git a/src/install-sh b/src/install-sh old mode 100644 new mode 100755 diff --git a/src/interpret.c b/src/interpret.c index e85393ba6a27894c7233772d84b908da1c935c2a..a366ecc74b1b772b992dc4d2113620359f9093bb 100644 --- a/src/interpret.c +++ b/src/interpret.c @@ -1,6 +1,6 @@ /*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ #include "global.h" @@ -13,29 +13,97 @@ #include "error.h" #include "language.h" #include "stralloc.h" -#include "add_efun.h" +#include "constants.h" #include "macros.h" -#include "list.h" +#include "multiset.h" #include "backend.h" #include "operators.h" #include "opcodes.h" #include "main.h" #include "lex.h" -#include "builtin_efuns.h" -#include "lpc_signal.h" +#include "builtin_functions.h" +#include "signal_handler.h" +#include "gc.h" + +#ifdef HAVE_MMAP +#ifdef HAVE_SYS_TYPES_H +#include <sys/types.h> +#endif + +#ifdef HAVE_SYS_MMAN_H +#include <sys/mman.h> +#endif + +#ifdef MAP_NORESERVE +#define USE_MMAP_FOR_STACK +#endif +#endif + +#define TRACE_LEN (100 + t_flag * 10) -#define TRACE_LEN 256 -struct svalue evaluator_stack[EVALUATOR_STACK_SIZE]; -struct svalue *mark_stack[EVALUATOR_STACK_SIZE]; -struct frame *fp; /* frame pointer */ /* sp points to first unused value on stack * (much simpler than letting it point at the last used value.) */ -struct svalue *sp=evaluator_stack; +struct svalue *sp; /* Current position */ +struct svalue *evaluator_stack; /* Start of stack */ +int stack_size = EVALUATOR_STACK_SIZE; /* mark stack, used to store markers into the normal stack */ -struct svalue **mark_sp=mark_stack; +struct svalue **mark_sp; /* Current position */ +struct svalue **mark_stack; /* Start of stack */ + +struct frame *fp; /* frame pointer */ + +void init_interpreter() +{ +#ifdef USE_MMAP_FOR_STACK + int fd; + +#ifndef MAP_VARIABLE +#define MAP_VARIABLE 0 +#endif + +#ifndef MAP_PRIVATE +#define MAP_PRIVATE 0 +#endif + +#ifdef MAP_ANONYMOUS + fd=-1; +#else +#define MAP_ANONYMOUS 0 + fd=open("/dev/zero"); + if(fd < 0) fatal("Failed to open /dev/zero.\n"); +#endif + +#define MMALLOC(X,Y) (Y *)mmap(0,X*sizeof(Y),PROT_READ|PROT_WRITE, MAP_NORESERVE | MAP_PRIVATE | MAP_ANONYMOUS, fd, 0) + + evaluator_stack=MMALLOC(stack_size,struct svalue); + mark_stack=MMALLOC(stack_size, struct svalue *); + + if(fd != -1) close(fd); + + if(!evaluator_stack || !mark_stack) fatal("Failed to mmap() stack space.\n"); +#else + evaluator_stack=(struct svalue *)malloc(stack_size*sizeof(struct svalue)); + mark_stack=(struct svalue **)malloc(stack_size*sizeof(struct svalue *)); +#endif + sp=evaluator_stack; + mark_sp=mark_stack; +} + +void check_stack(INT32 size) +{ + if(sp - evaluator_stack + size >= stack_size) + error("Stack overflow.\n"); +} + +void check_mark_stack(INT32 size) +{ + if(mark_sp - mark_stack + size >= stack_size) + error("Stack overflow.\n"); +} + static void eval_instruction(unsigned char *pc); @@ -44,7 +112,8 @@ static void eval_instruction(unsigned char *pc); * lvalues are stored in two svalues in one of these formats: * array[index] : { array, index } * mapping[index] : { mapping, index } - * list[index] : { list, index } + * multiset[index] : { multiset, index } + * object[index] : { object, index } * local variable : { svalue_pointer, nothing } * global variable : { svalue_pointer/short_svalue_pointer, nothing } */ @@ -73,9 +142,9 @@ void lvalue_to_svalue_no_free(struct svalue *to,struct svalue *lval) mapping_index_no_free(to, lval->u.mapping, lval+1); break; - case T_LIST: + case T_MULTISET: to->type=T_INT; - if(list_member(lval->u.list,lval+1)) + if(multiset_member(lval->u.multiset,lval+1)) { to->u.integer=0; to->subtype=NUMBER_UNDEFINED; @@ -114,11 +183,11 @@ void assign_lvalue(struct svalue *lval,struct svalue *from) mapping_insert(lval->u.mapping, lval+1, from); break; - case T_LIST: + case T_MULTISET: if(IS_ZERO(from)) - list_delete(lval->u.list, lval+1); + multiset_delete(lval->u.multiset, lval+1); else - list_insert(lval->u.list, lval+1); + multiset_insert(lval->u.multiset, lval+1); break; default: @@ -147,7 +216,7 @@ union anything *get_pointer_if_this_type(struct svalue *lval, TYPE_T t) case T_MAPPING: return mapping_get_item_ptr(lval->u.mapping,lval+1,t); - case T_LIST: return 0; + case T_MULTISET: return 0; default: error("Indexing a basic type.\n"); @@ -184,20 +253,30 @@ void print_return_value() } } #else -#define print_return_type() +#define print_return_value() #endif void pop_n_elems(INT32 x) { #ifdef DEBUG - if(sp - &(evaluator_stack[0]) < x) + if(sp - evaluator_stack < x) fatal("Popping out of stack.\n"); if(x < 0) fatal("Popping negative number of args....\n"); #endif - free_svalues(sp-x,x); sp-=x; + free_svalues(sp,x,BIT_MIXED); +} + +/* This function is called 'every now and then'. (1-10000 / sec or so) + * It should do anything that needs to be done fairly often. + */ +void check_threads_etc() +{ + check_signals(); + if(objects_to_destruct) destruct_objects_to_destruct(); + CHECK_FOR_GC(); } #ifdef DEBUG @@ -215,6 +294,9 @@ static char trace_buffer[100]; #define CASE(X) case (X)-F_OFFSET: +#define DOJUMP() \ + do { int tmp; tmp=EXTRACT_INT(pc); pc+=tmp; if(tmp < 0) check_threads_etc(); }while(0) + #define COMPARISMENT(ID,EXPR) \ CASE(ID); \ instr=EXPR; \ @@ -256,7 +338,7 @@ CASE(ID) \ if( i->integer OP2 sp[-3].u.integer) \ { \ pc+=EXTRACT_INT(pc); \ - check_signals(); \ + check_threads_etc(); \ }else{ \ pc+=sizeof(INT32); \ pop_n_elems(3); \ @@ -264,6 +346,17 @@ CASE(ID) \ break; \ } +#define CJUMP(X,Y) \ +CASE(X); \ +if(Y(sp-2,sp-1)) { \ + DOJUMP(); \ +}else{ \ + pc+=sizeof(INT32); \ +} \ +pop_n_elems(2); \ +break + + /* * reset the stack machine. */ @@ -273,25 +366,6 @@ void reset_evaluator() pop_n_elems(sp - evaluator_stack); } -/* Put catch outside of eval_instruction, so - * the setjmp won't affect the optimization of - * eval_instruction - */ -void f_catch(unsigned char *pc) -{ - JMP_BUF tmp; - if(SETJMP(tmp)) - { - *sp=throw_value; - throw_value.type=T_INT; - sp++; - }else{ - eval_instruction(pc); - push_int(0); - } - UNSETJMP(tmp); -} - #ifdef DEBUG #define BACKLOG 512 struct backlog @@ -334,6 +408,8 @@ void dump_backlog(void) #endif +static int o_catch(unsigned char *pc); + static void eval_instruction(unsigned char *pc) { unsigned INT32 instr, prefix=0; @@ -350,15 +426,18 @@ static void eval_instruction(unsigned char *pc) sp[3].type=99; if(sp<evaluator_stack || mark_sp < mark_stack || fp->locals>sp) - fatal("Stack error.\n"); + fatal("Stack error (generic).\n"); + + if(sp > evaluator_stack+stack_size) + fatal("Stack error (overflow).\n"); if(fp->fun>=0 && fp->current_object->prog && fp->locals+fp->num_locals > sp) - fatal("Stack error.\n"); + fatal("Stack error (stupid!).\n"); if(d_flag) { - if(d_flag > 9) check_signals(); + if(d_flag > 9) check_threads_etc(); backlogp++; if(backlogp >= BACKLOG) backlogp=0; @@ -381,7 +460,7 @@ static void eval_instruction(unsigned char *pc) set_nonblocking(2,0); file=get_line(pc-1,fp->context.prog,&linep); - while((f=strchr(file,'/'))) file=f+1; + while((f=STRCHR(file,'/'))) file=f+1; fprintf(stderr,"- %s:%4ld:(%lx): %-25s %4ld %4ld\n", file,(long)linep, (long)(pc-fp->context.prog->program-1), @@ -392,7 +471,10 @@ static void eval_instruction(unsigned char *pc) set_nonblocking(2,1); } + if(instr + F_OFFSET < F_MAX_OPCODE) + ADD_RUNNED(instr + F_OFFSET); #endif + switch(instr) { /* Support for large instructions */ @@ -418,6 +500,7 @@ static void eval_instruction(unsigned char *pc) CASE(F_CONST0); sp->type=T_INT; sp->u.integer=0; sp++; break; CASE(F_CONST1); sp->type=T_INT; sp->u.integer=1; sp++; break; CASE(F_CONST_1);sp->type=T_INT; sp->u.integer=-1; sp++; break; + CASE(F_BIGNUM); sp->type=T_INT; sp->u.integer=0x7fffffff; sp++; break; CASE(F_NUMBER); sp->type=T_INT; sp->u.integer=GET_ARG(); sp++; break; CASE(F_NEG_NUMBER); sp->type=T_INT; @@ -493,6 +576,56 @@ static void eval_instruction(unsigned char *pc) sp+=2; break; + CASE(F_CLEAR_LOCAL); + instr=GET_ARG(); + free_svalue(fp->locals + instr); + fp->locals[instr].type=T_INT; + fp->locals[instr].subtype=0; + fp->locals[instr].u.integer=0; + break; + + + CASE(F_INC_LOCAL); + instr=GET_ARG(); + if(fp->locals[instr].type != T_INT) error("Bad argument to ++\n"); + fp->locals[instr].u.integer++; + assign_svalue_no_free(sp++,fp->locals+instr); + break; + + CASE(F_POST_INC_LOCAL); + instr=GET_ARG(); + if(fp->locals[instr].type != T_INT) error("Bad argument to ++\n"); + assign_svalue_no_free(sp++,fp->locals+instr); + fp->locals[instr].u.integer++; + break; + + CASE(F_INC_LOCAL_AND_POP); + instr=GET_ARG(); + if(fp->locals[instr].type != T_INT) error("Bad argument to ++\n"); + fp->locals[instr].u.integer++; + break; + + CASE(F_DEC_LOCAL); + instr=GET_ARG(); + if(fp->locals[instr].type != T_INT) error("Bad argument to --\n"); + fp->locals[instr].u.integer--; + assign_svalue_no_free(sp++,fp->locals+instr); + break; + + CASE(F_POST_DEC_LOCAL); + instr=GET_ARG(); + if(fp->locals[instr].type != T_INT) error("Bad argument to --\n"); + assign_svalue_no_free(sp++,fp->locals+instr); + fp->locals[instr].u.integer--; + break; + + CASE(F_DEC_LOCAL_AND_POP); + instr=GET_ARG(); + if(fp->locals[instr].type != T_INT) error("Bad argument to --\n"); + fp->locals[instr].u.integer--; + break; + + CASE(F_LTOSVAL); lvalue_to_svalue_no_free(sp,sp-2); sp++; @@ -505,10 +638,10 @@ static void eval_instruction(unsigned char *pc) /* this is so that foo+=bar (and similar things) will be faster, this * is done by freeing the old reference to foo after it has been pushed * on the stack. That way foo can have only 1 reference if we are lucky, - * and then the low array/list/mapping manipulation routines can be + * and then the low array/multiset/mapping manipulation routines can be * destructive if they like */ - if( (1 << sp[-1].type) & ( BIT_ARRAY | BIT_LIST | BIT_MAPPING )) + if( (1 << sp[-1].type) & ( BIT_ARRAY | BIT_MULTISET | BIT_MAPPING )) { struct svalue s; s.type=T_INT; @@ -618,84 +751,88 @@ static void eval_instruction(unsigned char *pc) /* Stack machine stuff */ CASE(F_POP_VALUE); pop_stack(); break; CASE(F_POP_N_ELEMS); pop_n_elems(GET_ARG()); break; + CASE(F_MARK2); *(mark_sp++)=sp; CASE(F_MARK); *(mark_sp++)=sp; break; /* Jumps */ CASE(F_BRANCH); - check_signals(); - pc+=EXTRACT_INT(pc); + DOJUMP(); break; CASE(F_BRANCH_WHEN_ZERO); - check_destructed(sp-1); if(!IS_ZERO(sp-1)) { pc+=sizeof(INT32); }else{ - check_signals(); - pc+=EXTRACT_INT(pc); + DOJUMP(); } pop_stack(); break; CASE(F_BRANCH_WHEN_NON_ZERO); - check_destructed(sp-1); if(IS_ZERO(sp-1)) { pc+=sizeof(INT32); }else{ - check_signals(); - pc+=EXTRACT_INT(pc); + DOJUMP(); } pop_stack(); break; + CJUMP(F_BRANCH_WHEN_EQ, is_eq); + CJUMP(F_BRANCH_WHEN_NE,!is_eq); + CJUMP(F_BRANCH_WHEN_LT, is_lt); + CJUMP(F_BRANCH_WHEN_LE,!is_gt); + CJUMP(F_BRANCH_WHEN_GT, is_gt); + CJUMP(F_BRANCH_WHEN_GE,!is_lt); + CASE(F_LAND); - check_destructed(sp-1); if(!IS_ZERO(sp-1)) { pc+=sizeof(INT32); pop_stack(); }else{ - check_signals(); - pc+=EXTRACT_INT(pc); + DOJUMP(); } break; CASE(F_LOR); - check_destructed(sp-1); if(IS_ZERO(sp-1)) { pc+=sizeof(INT32); pop_stack(); }else{ - check_signals(); - pc+=EXTRACT_INT(pc); + DOJUMP(); } break; CASE(F_CATCH); - f_catch(pc+sizeof(INT32)); - pc+=EXTRACT_INT(pc); + if(o_catch(pc+sizeof(INT32))) + return; /* There was a return inside the evaluated code */ + else + pc+=EXTRACT_INT(pc); + break; + + CASE(F_THROW_ZERO); + push_int(0); + f_throw(1); break; CASE(F_SWITCH) { INT32 tmp; tmp=switch_lookup(fp->context.prog-> - constants[EXTRACT_UWORD(pc)].u.array,sp-1); - pc+=sizeof(INT16); - pc=(unsigned char *)MY_ALIGN(pc); - if(tmp >= 0) - pc+=((INT32 *)pc)[1+tmp*2]; - else - pc+=((INT32 *)pc)[2*~tmp]; + constants[GET_ARG()].u.array,sp-1); + pc=(unsigned char *)DO_ALIGN(pc,sizeof(INT32)); + pc+=(tmp>=0 ? 1+tmp*2 : 2*~tmp) * sizeof(INT32); + if(*(INT32*)pc < 0) check_threads_etc(); + pc+=*(INT32*)pc; pop_stack(); break; } LOOP(F_INC_LOOP, ++, <); - LOOP(F_DEC_LOOP, --, <); + LOOP(F_DEC_LOOP, --, >); LOOP(F_INC_NEQ_LOOP, ++, !=); LOOP(F_DEC_NEQ_LOOP, --, !=); @@ -704,7 +841,7 @@ static void eval_instruction(unsigned char *pc) if(sp[-4].type != T_ARRAY) error("Bad argument 1 to foreach()\n"); if(sp[-1].u.integer < sp[-4].u.array->size) { - check_signals(); + check_threads_etc(); index_no_free(sp,sp-4,sp-1); sp++; assign_lvalue(sp-4, sp-1); @@ -721,7 +858,7 @@ static void eval_instruction(unsigned char *pc) CASE(F_RETURN_0); pop_n_elems(sp-fp->locals); - check_signals(); + check_threads_etc(); return; CASE(F_RETURN); @@ -733,7 +870,7 @@ static void eval_instruction(unsigned char *pc) /* fall through */ CASE(F_DUMB_RETURN); - check_signals(); + check_threads_etc(); return; CASE(F_NEGATE); @@ -744,14 +881,11 @@ static void eval_instruction(unsigned char *pc) { sp[-1].u.float_number =- sp[-1].u.float_number; }else{ - error("Bad argument to unary minus.\n"); + o_negate(); } break; - CASE(F_COMPL); - if(sp[-1].type != T_INT) error("Bad argument to ~.\n"); - sp[-1].u.integer = ~ sp[-1].u.integer; - break; + CASE(F_COMPL); o_compl(); break; CASE(F_NOT); switch(sp[-1].type) @@ -762,12 +896,15 @@ static void eval_instruction(unsigned char *pc) case T_FUNCTION: case T_OBJECT: - check_destructed(sp-1); - if(sp[-1].type == T_INT) + if(IS_ZERO(sp-1)) { - sp[-1].u.integer=1; - break; + pop_stack(); + push_int(1); + }else{ + pop_stack(); + push_int(0); } + break; default: free_svalue(sp-1); @@ -777,17 +914,25 @@ static void eval_instruction(unsigned char *pc) break; CASE(F_LSH); - if(sp[-2].type != T_INT) error("Bad argument 1 to <<\n"); - if(sp[-1].type != T_INT) error("Bad argument 2 to <<\n"); - sp--; - sp[-1].u.integer = sp[-1].u.integer << sp->u.integer; + if(sp[-2].type != T_INT) + { + o_lsh(); + }else{ + if(sp[-1].type != T_INT) error("Bad argument 2 to <<\n"); + sp--; + sp[-1].u.integer = sp[-1].u.integer << sp->u.integer; + } break; CASE(F_RSH); - if(sp[-2].type != T_INT) error("Bad argument 1 to >>\n"); - if(sp[-1].type != T_INT) error("Bad argument 2 to >>\n"); - sp--; - sp[-1].u.integer = sp[-1].u.integer >> sp->u.integer; + if(sp[-2].type != T_INT) + { + o_rsh(); + }else{ + if(sp[-1].type != T_INT) error("Bad argument 2 to >>\n"); + sp--; + sp[-1].u.integer = sp[-1].u.integer >> sp->u.integer; + } break; COMPARISMENT(F_EQ, is_eq(sp-2,sp-1)); @@ -797,14 +942,14 @@ static void eval_instruction(unsigned char *pc) COMPARISMENT(F_LT, is_lt(sp-2,sp-1)); COMPARISMENT(F_LE,!is_gt(sp-2,sp-1)); - CASE(F_ADD); f_sum(2); break; - CASE(F_SUBTRACT); f_subtract(); break; - CASE(F_AND); f_and(); break; - CASE(F_OR); f_or(); break; - CASE(F_XOR); f_xor(); break; - CASE(F_MULTIPLY); f_multiply(); break; - CASE(F_DIVIDE); f_divide(); break; - CASE(F_MOD); f_mod(); break; + CASE(F_ADD); f_add(2); break; + CASE(F_SUBTRACT); o_subtract(); break; + CASE(F_AND); o_and(); break; + CASE(F_OR); o_or(); break; + CASE(F_XOR); o_xor(); break; + CASE(F_MULTIPLY); o_multiply(); break; + CASE(F_DIVIDE); o_divide(); break; + CASE(F_MOD); o_mod(); break; CASE(F_PUSH_ARRAY); if(sp[-1].type!=T_ARRAY) error("Bad argument to @\n"); @@ -812,20 +957,54 @@ static void eval_instruction(unsigned char *pc) push_array_items(sp->u.array); break; + CASE(F_LOCAL_INDEX); + assign_svalue_no_free(sp++,fp->locals+GET_ARG()); + print_return_value(); + goto do_index; + + CASE(F_POS_INT_INDEX); + push_int(GET_ARG()); + print_return_value(); + goto do_index; + + CASE(F_NEG_INT_INDEX); + push_int(-GET_ARG()); + print_return_value(); + goto do_index; + + CASE(F_STRING_INDEX); + copy_shared_string(sp->u.string,fp->context.prog->strings[GET_ARG()]); + sp->type=T_STRING; + sp++; + print_return_value(); + /* Fall through */ + CASE(F_INDEX); + do_index: f_index(); print_return_value(); break; CASE(F_CAST); f_cast(); break; - CASE(F_RANGE); f_range(); break; + CASE(F_RANGE); o_range(); break; CASE(F_COPY_VALUE); - copy_svalues_recursively_no_free(sp,sp-1,1,0); - sp++; - free_svalue(sp-2); - sp[-2]=sp[-1]; - sp--; + { + struct svalue tmp; + copy_svalues_recursively_no_free(&tmp,sp-1,1,0); + free_svalue(sp-1); + sp[-1]=tmp; + } + break; + + CASE(F_SIZEOF); + instr=pike_sizeof(sp-1); + pop_stack(); + push_int(instr); + break; + + CASE(F_SIZEOF_LOCAL); + push_int(pike_sizeof(fp->locals+GET_ARG())); break; CASE(F_SSCANF); f_sscanf(GET_ARG()); break; @@ -836,12 +1015,19 @@ static void eval_instruction(unsigned char *pc) sp - *--mark_sp); break; + CASE(F_CALL_LFUN_AND_POP); + apply_low(fp->current_object, + GET_ARG()+fp->context.identifier_level, + sp - *--mark_sp); + pop_stack(); + break; + default: instr -= F_MAX_OPCODE - F_OFFSET; #ifdef DEBUG if(instr >= fp->context.prog->num_constants) { - instr += F_MAX_OPCODE; + instr += F_MAX_OPCODE - F_OFFSET; fatal("Strange instruction %ld\n",(long)instr); } #endif @@ -850,6 +1036,28 @@ static void eval_instruction(unsigned char *pc) } } +/* Put catch outside of eval_instruction, so + * the setjmp won't affect the optimization of + * eval_instruction + */ +static int o_catch(unsigned char *pc) +{ + JMP_BUF tmp; + if(SETJMP(tmp)) + { + *sp=throw_value; + throw_value.type=T_INT; + sp++; + UNSETJMP(tmp); + return 0; + }else{ + eval_instruction(pc); + UNSETJMP(tmp); + return 1; + } +} + + int apply_low_safe_and_stupid(struct object *o, INT32 offset) { JMP_BUF tmp; @@ -876,7 +1084,7 @@ int apply_low_safe_and_stupid(struct object *o, INT32 offset) eval_instruction(o->prog->program + offset); #ifdef DEBUG if(sp<evaluator_stack) - fatal("Stack error.\n"); + fatal("Stack error (simple).\n"); #endif ret=0; } @@ -896,7 +1104,6 @@ void apply_low(struct object *o, int fun, int args) struct frame new_frame; struct identifier *function; - check_signals(); if(fun<0) { pop_n_elems(args); @@ -904,8 +1111,9 @@ void apply_low(struct object *o, int fun, int args) return; } - if(evaluator_stack+EVALUATOR_STACK_SIZE-sp < 256) - error("Stack overflow.\n"); + check_threads_etc(); + check_stack(256); + check_mark_stack(256); p=o->prog; if(!p) @@ -949,7 +1157,7 @@ void apply_low(struct object *o, int fun, int args) if(fp && fp->pc) { file=get_line(fp->pc,fp->context.prog,&linep); - while((f=strchr(file,'/'))) file=f+1; + while((f=STRCHR(file,'/'))) file=f+1; }else{ linep=0; file="-"; @@ -989,11 +1197,10 @@ void apply_low(struct object *o, int fun, int args) if(function->flags & IDENTIFIER_C_FUNCTION) { -#if 0 - function->func.c_fun(args); -#else - (*function->func.c_fun)(args); +#ifdef DEBUG + if(d_flag) check_threads_etc(); #endif + (*function->func.c_fun)(args); }else{ int num_args; int num_locals; @@ -1035,7 +1242,7 @@ void apply_low(struct object *o, int fun, int args) eval_instruction(pc); #ifdef DEBUG if(sp<evaluator_stack) - fatal("Stack error.\n"); + fatal("Stack error (also simple).\n"); #endif } @@ -1104,13 +1311,12 @@ void safe_apply_low(struct object *o,int fun,int args) sp->type = T_INT; sp++; }else{ - struct svalue *expected_sp; - expected_sp=sp+1; + INT32 expected_stack = sp - evaluator_stack + 1; sp+=args; apply_low(o,fun,args); - if(sp > expected_sp) - pop_n_elems(sp-expected_sp); - if(sp < expected_sp) + if(sp - evaluator_stack > expected_stack) + pop_n_elems(sp - evaluator_stack - expected_stack); + if(sp - evaluator_stack < expected_stack) { sp->u.integer = 0; sp->subtype=NUMBER_NUMBER; @@ -1130,37 +1336,28 @@ void safe_apply(struct object *o, char *fun ,INT32 args) safe_apply_low(o, find_identifier(fun, o->prog), args); } +void apply_lfun(struct object *o, int fun, int args) +{ +#ifdef DEBUG + if(fun < 0 || fun >= NUM_LFUNS) + fatal("Apply lfun on illegal value!\n"); +#endif + if(!o->prog) + error("Apply on destructed object.\n"); + + apply_low(o, o->prog->lfuns[fun], args); +} + void apply_shared(struct object *o, - struct lpc_string *fun, + struct pike_string *fun, int args) { - int fun_number; - fun_number = find_shared_string_identifier(fun, o->prog); - if(fun_number < 0) - { - pop_n_elems(args); - sp++; - sp->u.integer=0; - sp->type=T_INT; - }else{ - apply_low(o, fun_number, args); - } + apply_low(o, find_shared_string_identifier(fun, o->prog), args); } void apply(struct object *o, char *fun, int args) { - int fun_number; - - fun_number = find_identifier(fun, o->prog); - if(fun_number < 0) - { - pop_n_elems(args); - sp->u.integer=0; - sp->type=T_INT; - sp++; - }else{ - apply_low(o, fun_number, args); - } + apply_low(o, find_identifier(fun, o->prog), args); } void strict_apply_svalue(struct svalue *s, INT32 args) @@ -1180,7 +1377,7 @@ void strict_apply_svalue(struct svalue *s, INT32 args) if(fp && fp->pc) { file=get_line(fp->pc,fp->context.prog,&linep); - while((f=strchr(file,'/'))) file=f+1; + while((f=STRCHR(file,'/'))) file=f+1; }else{ linep=0; file="-"; @@ -1265,18 +1462,20 @@ void apply_svalue(struct svalue *s, INT32 args) pop_n_elems(args); push_int(0); }else{ - struct svalue *expected_sp=sp-args+1; + INT32 expected_stack=sp-args+1 - evaluator_stack; + strict_apply_svalue(s,args); - if(sp > expected_sp) + if(sp > (expected_stack + evaluator_stack)) { - pop_n_elems(sp-expected_sp); + pop_n_elems(sp-(expected_stack + evaluator_stack)); } - else if(sp < expected_sp) + else if(sp < (expected_stack + evaluator_stack)) { push_int(0); } #ifdef DEBUG - if(sp < expected_sp) fatal("Stack underflow!\n"); + if(sp < (expected_stack + evaluator_stack)) + fatal("Stack underflow!\n"); #endif } } @@ -1287,15 +1486,15 @@ void slow_check_stack() struct svalue *s,**m; struct frame *f; - check_stack(); + debug_check_stack(); - if(sp > &(evaluator_stack[EVALUATOR_STACK_SIZE])) + if(sp > &(evaluator_stack[stack_size])) fatal("Stack overflow\n"); - if(mark_sp < mark_stack) - fatal("Mark stack underflow.\n"); + if(mark_sp > &(mark_stack[stack_size])) + fatal("Mark stack overflow.\n"); - if(mark_sp > &(mark_stack[EVALUATOR_STACK_SIZE])) + if(mark_sp < mark_stack) fatal("Mark stack underflow.\n"); for(s=evaluator_stack;s<sp;s++) check_svalue(s); @@ -1309,17 +1508,20 @@ void slow_check_stack() s=*m; } - if(s > &(evaluator_stack[EVALUATOR_STACK_SIZE])) + if(s > &(evaluator_stack[stack_size])) fatal("Mark stack exceeds svalue stack\n"); for(f=fp;f;f=f->parent_frame) { - if(f->locals < evaluator_stack || - f->locals > &(evaluator_stack[EVALUATOR_STACK_SIZE])) + if(f->locals) + { + if(f->locals < evaluator_stack || + f->locals > &(evaluator_stack[stack_size])) fatal("Local variable pointer points to Finsp�ng.\n"); - if(f->args < 0 || f->args > EVALUATOR_STACK_SIZE) - fatal("FEL FEL FEL! HELP!! (corrupted frame)\n"); + if(f->args < 0 || f->args > stack_size) + fatal("FEL FEL FEL! HELP!! (corrupted frame)\n"); + } } } #endif @@ -1349,4 +1551,13 @@ void cleanup_interpret() } #endif reset_evaluator(); + +#ifdef USE_MMAP_FOR_STACK + munmap((char *)evaluator_stack, stack_size*sizeof(struct svalue)); + munmap((char *)mark_stack, stack_size*sizeof(struct svalue *)); +#else + free((char *)evaluator_stack); + free((char *)mark_stack); +#endif + } diff --git a/src/interpret.h b/src/interpret.h index 358ecdb218a87af9b998db4ab6e533c5ed2eb592..12d9b7ea8300d422ca47d90df98f7ebcc994bda5 100644 --- a/src/interpret.h +++ b/src/interpret.h @@ -1,6 +1,6 @@ /*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ #ifndef INTERPRET_H @@ -26,20 +26,22 @@ struct frame }; #ifdef DEBUG -#define check_stack() do{if(sp<evaluator_stack)fatal("Stack error.\n");}while(0) +#define debug_check_stack() do{if(sp<evaluator_stack)fatal("Stack error.\n");}while(0) #else -#define check_stack() +#define debug_check_stack() #endif -#define pop_stack() do{ free_svalue(--sp); check_stack(); }while(0) + +#define pop_stack() do{ free_svalue(--sp); debug_check_stack(); }while(0) #define push_program(P) sp->u.program=(P),sp++->type=T_PROGRAM #define push_int(I) sp->u.integer=(I),sp->type=T_INT,sp++->subtype=NUMBER_NUMBER #define push_mapping(M) sp->u.mapping=(M),sp++->type=T_MAPPING #define push_array(A) sp->u.array=(A),sp++->type=T_ARRAY -#define push_list(L) sp->u.list=(L),sp++->type=T_LIST +#define push_multiset(L) sp->u.multiset=(L),sp++->type=T_MULTISET #define push_string(S) sp->u.string=(S),sp++->type=T_STRING #define push_object(O) sp->u.object=(O),sp++->type=T_OBJECT #define push_float(F) sp->u.float_number=(F),sp++->type=T_FLOAT #define push_text(T) sp->u.string=make_shared_string(T),sp++->type=T_STRING +#define push_svalue(S) (assign_svalue_no_free(sp,(S)),sp++) #define APPLY_MASTER(FUN,ARGS) \ do{ \ @@ -66,20 +68,25 @@ do{ \ }while(0) /* Prototypes begin here */ +void init_interpreter(); +void check_stack(INT32 size); +void check_mark_stack(INT32 size); void lvalue_to_svalue_no_free(struct svalue *to,struct svalue *lval); void assign_lvalue(struct svalue *lval,struct svalue *from); union anything *get_pointer_if_this_type(struct svalue *lval, TYPE_T t); +void print_return_value(); void pop_n_elems(INT32 x); +void check_threads_etc(); void reset_evaluator(); -void f_catch(unsigned char *pc); struct backlog; void dump_backlog(void); int apply_low_safe_and_stupid(struct object *o, INT32 offset); void apply_low(struct object *o, int fun, int args); void safe_apply_low(struct object *o,int fun,int args); void safe_apply(struct object *o, char *fun ,INT32 args); +void apply_lfun(struct object *o, int fun, int args); void apply_shared(struct object *o, - struct lpc_string *fun, + struct pike_string *fun, int args); void apply(struct object *o, char *fun, int args); void strict_apply_svalue(struct svalue *s, INT32 args); @@ -90,7 +97,9 @@ void cleanup_interpret(); extern struct svalue *sp; extern struct svalue **mark_sp; -extern struct svalue evaluator_stack[EVALUATOR_STACK_SIZE]; +extern struct svalue *evaluator_stack; +extern struct svalue **mark_stack; extern struct frame *fp; /* frame pointer */ +extern int stack_size; #endif diff --git a/src/language.c b/src/language.c deleted file mode 100644 index fa76c0d52f2203fbbb9b7f0e62771f5d5feba5ad..0000000000000000000000000000000000000000 --- a/src/language.c +++ /dev/null @@ -1,2812 +0,0 @@ - -/* A Bison parser, made from ./language.y with Bison version GNU Bison version 1.24 - */ - -#define YYBISON 1 /* Identify Bison output. */ - -#define F_ADD_256 258 -#define F_ADD_512 259 -#define F_ADD_768 260 -#define F_ADD_1024 261 -#define F_ADD_256X 262 -#define F_PREFIX_256 263 -#define F_PREFIX_512 264 -#define F_PREFIX_768 265 -#define F_PREFIX_1024 266 -#define F_PREFIX_CHARX256 267 -#define F_PREFIX_WORDX256 268 -#define F_PREFIX_24BITX256 269 -#define F_POP_VALUE 270 -#define F_POP_N_ELEMS 271 -#define F_MARK 272 -#define F_CALL_LFUN 273 -#define F_BRANCH 274 -#define F_BRANCH_WHEN_ZERO 275 -#define F_BRANCH_WHEN_NON_ZERO 276 -#define F_INC_LOOP 277 -#define F_DEC_LOOP 278 -#define F_INC_NEQ_LOOP 279 -#define F_DEC_NEQ_LOOP 280 -#define F_INDEX 281 -#define F_INDIRECT 282 -#define F_LTOSVAL 283 -#define F_LTOSVAL2 284 -#define F_PUSH_ARRAY 285 -#define F_RANGE 286 -#define F_COPY_VALUE 287 -#define F_LFUN 288 -#define F_GLOBAL 289 -#define F_LOCAL 290 -#define F_GLOBAL_LVALUE 291 -#define F_LOCAL_LVALUE 292 -#define F_CONSTANT 293 -#define F_FLOAT 294 -#define F_STRING 295 -#define F_NUMBER 296 -#define F_NEG_NUMBER 297 -#define F_CONST_1 298 -#define F_CONST0 299 -#define F_CONST1 300 -#define F_INC 301 -#define F_DEC 302 -#define F_POST_INC 303 -#define F_POST_DEC 304 -#define F_INC_AND_POP 305 -#define F_DEC_AND_POP 306 -#define F_RETURN 307 -#define F_DUMB_RETURN 308 -#define F_RETURN_0 309 -#define F_ASSIGN 310 -#define F_ASSIGN_AND_POP 311 -#define F_ASSIGN_LOCAL 312 -#define F_ASSIGN_LOCAL_AND_POP 313 -#define F_ASSIGN_GLOBAL 314 -#define F_ASSIGN_GLOBAL_AND_POP 315 -#define F_ADD 316 -#define F_SUBTRACT 317 -#define F_MULTIPLY 318 -#define F_DIVIDE 319 -#define F_MOD 320 -#define F_LT 321 -#define F_GT 322 -#define F_EQ 323 -#define F_GE 324 -#define F_LE 325 -#define F_NE 326 -#define F_NEGATE 327 -#define F_NOT 328 -#define F_COMPL 329 -#define F_AND 330 -#define F_OR 331 -#define F_XOR 332 -#define F_LSH 333 -#define F_RSH 334 -#define F_LAND 335 -#define F_LOR 336 -#define F_SWITCH 337 -#define F_SSCANF 338 -#define F_CATCH 339 -#define F_CAST 340 -#define F_FOREACH 341 -#define F_MAX_OPCODE 342 -#define F_ADD_EQ 343 -#define F_AND_EQ 344 -#define F_APPLY 345 -#define F_ARG_LIST 346 -#define F_ARRAY_ID 347 -#define F_ARROW 348 -#define F_BREAK 349 -#define F_CASE 350 -#define F_CLASS 351 -#define F_COLON_COLON 352 -#define F_COMMA 353 -#define F_CONTINUE 354 -#define F_DEFAULT 355 -#define F_DIV_EQ 356 -#define F_DO 357 -#define F_DOT_DOT 358 -#define F_DOT_DOT_DOT 359 -#define F_EFUN 360 -#define F_EFUN_CALL 361 -#define F_ELSE 362 -#define F_FLOAT_ID 363 -#define F_FOR 364 -#define F_FUNCTION_ID 365 -#define F_GAUGE 366 -#define F_IDENTIFIER 367 -#define F_IF 368 -#define F_INHERIT 369 -#define F_INLINE 370 -#define F_INT_ID 371 -#define F_LAMBDA 372 -#define F_LIST_ID 373 -#define F_LIST_END 374 -#define F_LIST_START 375 -#define F_LSH_EQ 376 -#define F_LVALUE_LIST 377 -#define F_MAPPING_ID 378 -#define F_MIXED_ID 379 -#define F_MOD_EQ 380 -#define F_MULT_EQ 381 -#define F_NO_MASK 382 -#define F_OBJECT_ID 383 -#define F_OR_EQ 384 -#define F_PRIVATE 385 -#define F_PROGRAM_ID 386 -#define F_PROTECTED 387 -#define F_PUBLIC 388 -#define F_RSH_EQ 389 -#define F_STATIC 390 -#define F_STATUS 391 -#define F_STRING_ID 392 -#define F_SUBSCRIPT 393 -#define F_SUB_EQ 394 -#define F_VAL_LVAL 395 -#define F_VARARGS 396 -#define F_VOID_ID 397 -#define F_WHILE 398 -#define F_XOR_EQ 399 -#define F_MAX_INSTR 400 - -#line 140 "./language.y" - -/* This is the grammar definition of LPC. */ - -#include "global.h" -#ifdef HAVE_MEMORY_H -#include <memory.h> -#endif - -#include <setjmp.h> -#include "interpret.h" -#include "array.h" -#include "object.h" -#include "stralloc.h" -#include "las.h" -#include "interpret.h" -#include "lex.h" -#include "program.h" -#include "lpc_types.h" -#include "add_efun.h" -#include "macros.h" -#include "error.h" -#include "docode.h" - -#define YYMAXDEPTH 600 - -static void push_locals(); -static void pop_locals(); -void free_all_local_names(); -void add_local_name(struct lpc_string *,struct lpc_string *); - -/* - * The names and types of arguments and auto variables. - */ -struct locals *local_variables; - -static int varargs; -static INT32 current_modifiers; - -void fix_comp_stack(int sp) -{ - if(comp_stackp>sp) - { - yyerror("Compiler stack fixed."); - comp_stackp=sp; - }else if(comp_stackp<sp){ - fatal("Compiler stack frame underflow."); - } -} - - -#line 190 "./language.y" -typedef union -{ - int number; - FLOAT_TYPE fnum; - unsigned int address; /* Address of an instruction */ - struct lpc_string *string; - char *str; - unsigned short type; - struct node_s *n; - struct efun *efun; -} YYSTYPE; - -#ifndef YYLTYPE -typedef - struct yyltype - { - int timestamp; - int first_line; - int first_column; - int last_line; - int last_column; - char *text; - } - yyltype; - -#define YYLTYPE yyltype -#endif - -#include <stdio.h> - -#ifndef __cplusplus -#ifndef __STDC__ -#define const -#endif -#endif - - - -#define YYFINAL 376 -#define YYFLAG -32768 -#define YYNTBASE 169 - -#define YYTRANSLATE(x) ((unsigned)(x) <= 400 ? yytranslate[x] : 255) - -static const short yytranslate[] = { 0, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 156, 150, 2, 161, - 162, 155, 153, 163, 154, 2, 157, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 160, 159, 152, - 146, 151, 147, 166, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 167, 2, 168, 149, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 164, 148, 165, 158, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 1, 2, 3, 4, 5, - 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, - 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, - 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, - 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, - 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, - 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, - 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, - 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, - 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, - 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, - 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, - 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, - 136, 137, 138, 139, 140, 141, 142, 143, 144, 145 -}; - -#if YYDEBUG != 0 -static const short yyprhs[] = { 0, - 0, 2, 6, 7, 8, 10, 12, 16, 19, 20, - 26, 28, 30, 32, 33, 34, 44, 49, 51, 53, - 55, 56, 58, 59, 63, 65, 68, 70, 74, 76, - 78, 80, 82, 84, 86, 88, 90, 91, 94, 97, - 98, 102, 105, 107, 109, 113, 115, 117, 119, 121, - 123, 125, 127, 129, 132, 135, 138, 141, 142, 143, - 152, 153, 155, 158, 160, 161, 166, 170, 171, 172, - 173, 174, 183, 184, 186, 190, 193, 194, 200, 203, - 208, 209, 214, 216, 220, 221, 224, 227, 228, 233, - 235, 237, 239, 241, 243, 245, 247, 250, 252, 254, - 256, 258, 261, 263, 265, 268, 270, 271, 278, 279, - 285, 292, 293, 296, 304, 312, 322, 328, 329, 331, - 337, 341, 347, 349, 352, 353, 355, 357, 359, 363, - 365, 368, 370, 374, 378, 382, 384, 390, 392, 394, - 396, 398, 400, 402, 404, 406, 408, 410, 411, 413, - 414, 417, 419, 423, 424, 427, 429, 433, 437, 439, - 443, 447, 451, 455, 459, 463, 467, 471, 475, 479, - 483, 487, 491, 495, 499, 503, 507, 511, 513, 516, - 519, 522, 525, 528, 531, 533, 536, 539, 541, 543, - 545, 547, 549, 551, 553, 555, 557, 561, 566, 571, - 578, 582, 588, 594, 598, 602, 606, 609, 614, 618, - 620, 623, 631, 632, 636, 638, 641 -}; - -static const short yyrhs[] = { 170, - 0, 170, 177, 171, 0, 0, 0, 159, 0, 253, - 0, 172, 153, 253, 0, 160, 112, 0, 0, 185, - 114, 172, 173, 159, 0, 208, 0, 159, 0, 190, - 0, 0, 0, 185, 176, 187, 112, 161, 182, 162, - 178, 175, 0, 185, 176, 204, 159, 0, 174, 0, - 1, 0, 104, 0, 0, 112, 0, 0, 189, 179, - 180, 0, 238, 0, 183, 238, 0, 181, 0, 183, - 163, 181, 0, 127, 0, 135, 0, 130, 0, 133, - 0, 141, 0, 132, 0, 115, 0, 186, 0, 0, - 184, 186, 0, 187, 155, 0, 0, 161, 189, 162, - 0, 189, 155, 0, 191, 0, 191, 0, 191, 148, - 192, 0, 192, 0, 116, 0, 108, 0, 137, 0, - 128, 0, 131, 0, 142, 0, 124, 0, 123, 200, - 0, 92, 199, 0, 118, 199, 0, 110, 193, 0, - 0, 0, 161, 194, 196, 179, 160, 195, 189, 162, - 0, 0, 238, 0, 197, 238, 0, 189, 0, 0, - 197, 163, 198, 189, 0, 161, 189, 162, 0, 0, - 0, 0, 0, 161, 201, 189, 160, 202, 189, 203, - 162, 0, 0, 205, 0, 204, 163, 205, 0, 187, - 112, 0, 0, 187, 112, 146, 206, 235, 0, 187, - 112, 0, 187, 112, 146, 235, 0, 0, 164, 209, - 211, 165, 0, 207, 0, 210, 163, 207, 0, 0, - 211, 212, 0, 232, 159, 0, 0, 190, 213, 210, - 159, 0, 221, 0, 226, 0, 224, 0, 225, 0, - 228, 0, 229, 0, 215, 0, 230, 159, 0, 208, - 0, 223, 0, 214, 0, 216, 0, 1, 159, 0, - 159, 0, 94, 0, 100, 160, 0, 99, 0, 0, - 117, 218, 161, 182, 162, 208, 0, 0, 96, 164, - 220, 170, 165, 0, 113, 161, 233, 162, 212, 222, - 0, 0, 107, 212, 0, 86, 161, 235, 163, 247, - 162, 212, 0, 102, 212, 143, 161, 233, 162, 159, - 0, 109, 161, 231, 159, 227, 159, 231, 162, 212, - 0, 143, 161, 233, 162, 212, 0, 0, 233, 0, - 82, 161, 233, 162, 212, 0, 95, 233, 160, 0, - 95, 233, 103, 233, 160, 0, 52, 0, 52, 233, - 0, 0, 232, 0, 233, 0, 235, 0, 232, 163, - 235, 0, 235, 0, 166, 235, 0, 236, 0, 247, - 146, 235, 0, 247, 237, 235, 0, 1, 237, 236, - 0, 244, 0, 244, 147, 236, 160, 236, 0, 89, - 0, 129, 0, 144, 0, 121, 0, 134, 0, 88, - 0, 139, 0, 126, 0, 125, 0, 101, 0, 0, - 163, 0, 0, 240, 238, 0, 234, 0, 240, 163, - 234, 0, 0, 242, 238, 0, 243, 0, 242, 163, - 243, 0, 235, 160, 244, 0, 245, 0, 244, 81, - 244, 0, 244, 80, 244, 0, 244, 148, 244, 0, - 244, 149, 244, 0, 244, 150, 244, 0, 244, 68, - 244, 0, 244, 71, 244, 0, 244, 151, 244, 0, - 244, 69, 244, 0, 244, 152, 244, 0, 244, 70, - 244, 0, 244, 78, 244, 0, 244, 79, 244, 0, - 244, 153, 244, 0, 244, 154, 244, 0, 244, 155, - 244, 0, 244, 156, 244, 0, 244, 157, 244, 0, - 246, 0, 188, 245, 0, 46, 247, 0, 47, 247, - 0, 73, 245, 0, 158, 245, 0, 154, 245, 0, - 247, 0, 247, 46, 0, 247, 47, 0, 254, 0, - 41, 0, 39, 0, 250, 0, 248, 0, 251, 0, - 217, 0, 219, 0, 112, 0, 105, 97, 112, 0, - 247, 161, 239, 162, 0, 247, 167, 235, 168, 0, - 247, 167, 233, 103, 233, 168, 0, 161, 233, 162, - 0, 161, 164, 239, 165, 162, 0, 161, 167, 241, - 168, 162, 0, 120, 239, 119, 0, 247, 93, 112, - 0, 112, 97, 112, 0, 97, 112, 0, 111, 161, - 231, 162, 0, 161, 231, 162, 0, 208, 0, 84, - 249, 0, 83, 161, 235, 163, 235, 252, 162, 0, - 0, 163, 247, 252, 0, 40, 0, 253, 40, 0, - 253, 0 -}; - -#endif - -#if YYDEBUG != 0 -static const short yyrline[] = { 0, - 229, 231, 232, 234, 235, 237, 238, 246, 247, 250, - 255, 256, 260, 265, 273, 316, 359, 360, 361, 368, - 369, 372, 373, 377, 393, 394, 397, 398, 401, 402, - 403, 404, 405, 406, 407, 410, 412, 413, 419, 420, - 423, 425, 426, 429, 431, 432, 435, 436, 437, 438, - 439, 440, 441, 442, 443, 444, 445, 448, 454, 468, - 473, 479, 480, 483, 484, 490, 492, 493, 496, 501, - 507, 512, 512, 520, 521, 523, 533, 543, 550, 559, - 571, 576, 588, 589, 595, 596, 602, 603, 607, 608, - 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, - 619, 620, 621, 625, 626, 627, 629, 638, 696, 701, - 718, 729, 730, 733, 740, 747, 757, 766, 767, 769, - 776, 780, 786, 795, 800, 801, 804, 810, 811, 817, - 818, 823, 824, 828, 832, 837, 838, 843, 844, 845, - 846, 847, 848, 849, 850, 851, 852, 855, 855, 857, - 858, 862, 863, 866, 867, 870, 871, 874, 879, 880, - 881, 882, 883, 884, 885, 886, 887, 888, 889, 890, - 891, 892, 893, 894, 895, 896, 897, 900, 901, 906, - 907, 908, 909, 910, 913, 914, 915, 918, 919, 920, - 921, 922, 923, 924, 925, 926, 943, 956, 957, 958, - 962, 963, 965, 967, 969, 974, 993, 1021, 1033, 1034, - 1037, 1042, 1048, 1049, 1054, 1055, 1063 -}; - -static const char * const yytname[] = { "$","error","$undefined.","F_ADD_256", -"F_ADD_512","F_ADD_768","F_ADD_1024","F_ADD_256X","F_PREFIX_256","F_PREFIX_512", -"F_PREFIX_768","F_PREFIX_1024","F_PREFIX_CHARX256","F_PREFIX_WORDX256","F_PREFIX_24BITX256", -"F_POP_VALUE","F_POP_N_ELEMS","F_MARK","F_CALL_LFUN","F_BRANCH","F_BRANCH_WHEN_ZERO", -"F_BRANCH_WHEN_NON_ZERO","F_INC_LOOP","F_DEC_LOOP","F_INC_NEQ_LOOP","F_DEC_NEQ_LOOP", -"F_INDEX","F_INDIRECT","F_LTOSVAL","F_LTOSVAL2","F_PUSH_ARRAY","F_RANGE","F_COPY_VALUE", -"F_LFUN","F_GLOBAL","F_LOCAL","F_GLOBAL_LVALUE","F_LOCAL_LVALUE","F_CONSTANT", -"F_FLOAT","F_STRING","F_NUMBER","F_NEG_NUMBER","F_CONST_1","F_CONST0","F_CONST1", -"F_INC","F_DEC","F_POST_INC","F_POST_DEC","F_INC_AND_POP","F_DEC_AND_POP","F_RETURN", -"F_DUMB_RETURN","F_RETURN_0","F_ASSIGN","F_ASSIGN_AND_POP","F_ASSIGN_LOCAL", -"F_ASSIGN_LOCAL_AND_POP","F_ASSIGN_GLOBAL","F_ASSIGN_GLOBAL_AND_POP","F_ADD", -"F_SUBTRACT","F_MULTIPLY","F_DIVIDE","F_MOD","F_LT","F_GT","F_EQ","F_GE","F_LE", -"F_NE","F_NEGATE","F_NOT","F_COMPL","F_AND","F_OR","F_XOR","F_LSH","F_RSH","F_LAND", -"F_LOR","F_SWITCH","F_SSCANF","F_CATCH","F_CAST","F_FOREACH","F_MAX_OPCODE", -"F_ADD_EQ","F_AND_EQ","F_APPLY","F_ARG_LIST","F_ARRAY_ID","F_ARROW","F_BREAK", -"F_CASE","F_CLASS","F_COLON_COLON","F_COMMA","F_CONTINUE","F_DEFAULT","F_DIV_EQ", -"F_DO","F_DOT_DOT","F_DOT_DOT_DOT","F_EFUN","F_EFUN_CALL","F_ELSE","F_FLOAT_ID", -"F_FOR","F_FUNCTION_ID","F_GAUGE","F_IDENTIFIER","F_IF","F_INHERIT","F_INLINE", -"F_INT_ID","F_LAMBDA","F_LIST_ID","F_LIST_END","F_LIST_START","F_LSH_EQ","F_LVALUE_LIST", -"F_MAPPING_ID","F_MIXED_ID","F_MOD_EQ","F_MULT_EQ","F_NO_MASK","F_OBJECT_ID", -"F_OR_EQ","F_PRIVATE","F_PROGRAM_ID","F_PROTECTED","F_PUBLIC","F_RSH_EQ","F_STATIC", -"F_STATUS","F_STRING_ID","F_SUBSCRIPT","F_SUB_EQ","F_VAL_LVAL","F_VARARGS","F_VOID_ID", -"F_WHILE","F_XOR_EQ","F_MAX_INSTR","'='","'?'","'|'","'^'","'&'","'>'","'<'", -"'+'","'-'","'*'","'%'","'/'","'~'","';'","':'","'('","')'","','","'{'","'}'", -"'@'","'['","']'","all","program","optional_semi_colon","string_constant","optional_rename_inherit", -"inheritance","block_or_semi","type_or_error","def","@1","optional_dot_dot_dot", -"optional_identifier","new_arg_name","arguments","arguments2","modifier","modifiers", -"modifier_list","optional_stars","cast","type","simple_type","type2","type3", -"opt_function_type","@2","@3","function_type_list","function_type_list2","@4", -"opt_array_type","opt_mapping_type","@5","@6","@7","name_list","new_name","@8", -"new_local_name","block","@9","local_name_list","statements","statement","@10", -"break","default","continue","lambda","@11","class","@12","cond","optional_else_part", -"foreach","do","for","while","for_expr","switch","case","return","unused","unused2", -"comma_expr","expr00","expr0","expr01","assign","optional_comma","expr_list", -"expr_list2","m_expr_list","m_expr_list2","assoc_pair","expr1","expr2","expr3", -"expr4","gauge","catch_arg","catch","sscanf","lvalue_list","low_string","string", -"" -}; -#endif - -static const short yyr1[] = { 0, - 169, 170, 170, 171, 171, 172, 172, 173, 173, 174, - 175, 175, 176, 176, 178, 177, 177, 177, 177, 179, - 179, 180, 180, 181, 182, 182, 183, 183, 184, 184, - 184, 184, 184, 184, 184, 185, 186, 186, 187, 187, - 188, 189, 189, 190, 191, 191, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 194, 195, 193, - 193, 196, 196, 197, 198, 197, 199, 199, 201, 202, - 203, 200, 200, 204, 204, 205, 206, 205, 207, 207, - 209, 208, 210, 210, 211, 211, 212, 213, 212, 212, - 212, 212, 212, 212, 212, 212, 212, 212, 212, 212, - 212, 212, 212, 214, 215, 216, 218, 217, 220, 219, - 221, 222, 222, 223, 224, 225, 226, 227, 227, 228, - 229, 229, 230, 230, 231, 231, 232, 233, 233, 234, - 234, 235, 235, 235, 235, 236, 236, 237, 237, 237, - 237, 237, 237, 237, 237, 237, 237, 238, 238, 239, - 239, 240, 240, 241, 241, 242, 242, 243, 244, 244, - 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, - 244, 244, 244, 244, 244, 244, 244, 245, 245, 245, - 245, 245, 245, 245, 246, 246, 246, 247, 247, 247, - 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, - 247, 247, 247, 247, 247, 247, 247, 248, 249, 249, - 250, 251, 252, 252, 253, 253, 254 -}; - -static const short yyr2[] = { 0, - 1, 3, 0, 0, 1, 1, 3, 2, 0, 5, - 1, 1, 1, 0, 0, 9, 4, 1, 1, 1, - 0, 1, 0, 3, 1, 2, 1, 3, 1, 1, - 1, 1, 1, 1, 1, 1, 0, 2, 2, 0, - 3, 2, 1, 1, 3, 1, 1, 1, 1, 1, - 1, 1, 1, 2, 2, 2, 2, 0, 0, 8, - 0, 1, 2, 1, 0, 4, 3, 0, 0, 0, - 0, 8, 0, 1, 3, 2, 0, 5, 2, 4, - 0, 4, 1, 3, 0, 2, 2, 0, 4, 1, - 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, - 1, 2, 1, 1, 2, 1, 0, 6, 0, 5, - 6, 0, 2, 7, 7, 9, 5, 0, 1, 5, - 3, 5, 1, 2, 0, 1, 1, 1, 3, 1, - 2, 1, 3, 3, 3, 1, 5, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, - 2, 1, 3, 0, 2, 1, 3, 3, 1, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 1, 2, 2, - 2, 2, 2, 2, 1, 2, 2, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 3, 4, 4, 6, - 3, 5, 5, 3, 3, 3, 2, 4, 3, 1, - 2, 7, 0, 3, 1, 2, 1 -}; - -static const short yydefact[] = { 3, - 0, 19, 35, 29, 31, 34, 32, 30, 33, 18, - 4, 37, 14, 36, 5, 2, 38, 68, 48, 61, - 0, 47, 68, 73, 53, 50, 51, 49, 52, 40, - 13, 44, 46, 0, 55, 58, 57, 215, 9, 6, - 56, 69, 54, 0, 0, 74, 0, 0, 43, 148, - 0, 0, 0, 216, 0, 76, 39, 17, 40, 45, - 42, 67, 149, 64, 21, 148, 62, 7, 8, 10, - 0, 77, 148, 0, 75, 20, 0, 65, 63, 70, - 0, 27, 0, 148, 21, 25, 76, 59, 0, 0, - 0, 190, 189, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 196, 107, 0, 0, 0, 0, 0, 194, - 195, 78, 132, 136, 159, 178, 185, 192, 191, 193, - 217, 188, 15, 149, 26, 23, 0, 66, 71, 143, - 138, 147, 141, 146, 145, 139, 142, 144, 140, 0, - 0, 180, 181, 182, 185, 0, 0, 81, 210, 211, - 109, 207, 0, 0, 0, 0, 0, 152, 130, 0, - 148, 184, 183, 0, 0, 0, 0, 127, 128, 179, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 186, - 187, 0, 0, 0, 0, 0, 0, 28, 22, 24, - 0, 0, 135, 0, 0, 126, 127, 85, 3, 197, - 0, 206, 148, 131, 204, 0, 151, 0, 0, 0, - 148, 156, 41, 0, 201, 165, 168, 170, 166, 171, - 172, 161, 160, 0, 162, 163, 164, 167, 169, 173, - 174, 175, 176, 177, 205, 133, 0, 127, 128, 134, - 12, 16, 11, 60, 72, 0, 209, 0, 0, 208, - 0, 153, 0, 0, 0, 0, 155, 129, 0, 198, - 0, 199, 213, 0, 0, 0, 0, 104, 0, 106, - 0, 0, 0, 0, 0, 103, 82, 88, 98, 86, - 100, 96, 101, 90, 99, 92, 93, 91, 94, 95, - 0, 0, 110, 0, 202, 158, 203, 157, 137, 127, - 0, 0, 102, 124, 0, 0, 127, 105, 0, 0, - 0, 0, 40, 97, 87, 108, 200, 213, 212, 127, - 0, 0, 121, 0, 0, 127, 127, 0, 83, 0, - 214, 0, 0, 127, 0, 0, 0, 0, 79, 89, - 40, 120, 0, 122, 127, 0, 119, 112, 117, 0, - 84, 0, 0, 0, 0, 111, 80, 114, 115, 0, - 113, 0, 116, 0, 0, 0 -}; - -static const short yydefgoto[] = { 374, - 1, 16, 39, 53, 10, 252, 30, 11, 197, 77, - 200, 82, 83, 84, 12, 13, 14, 338, 109, 85, - 288, 49, 33, 37, 50, 127, 65, 66, 89, 35, - 43, 55, 90, 202, 45, 46, 81, 339, 289, 208, - 340, 258, 290, 323, 291, 292, 293, 110, 156, 111, - 209, 294, 366, 295, 296, 297, 298, 356, 299, 300, - 301, 205, 167, 207, 158, 169, 113, 140, 86, 160, - 161, 220, 221, 222, 114, 115, 116, 117, 118, 150, - 119, 120, 312, 121, 122 -}; - -static const short yypact[] = {-32768, - 1062,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, - -114, 292, 1307,-32768,-32768,-32768,-32768, -92,-32768, -42, - 22,-32768, -92, -26,-32768,-32768,-32768,-32768,-32768,-32768, --32768, -78,-32768, 1324,-32768,-32768,-32768,-32768, -121, 23, --32768,-32768,-32768, -99, -115,-32768, 1324, -126, -78, 529, - 22, 28, -18,-32768, 1324, -120,-32768,-32768,-32768,-32768, --32768,-32768,-32768, -12, 46, -8,-32768, 23,-32768,-32768, - -96,-32768, 529, -98,-32768,-32768, -4, -84,-32768,-32768, - 1051,-32768, -3, 0, -88,-32768, 14,-32768, 1324, 1324, - 1269,-32768,-32768, 166, 166, 999, 3, -93, 2, 55, - 72, 16, 81,-32768, 431, 999, 999, 259, 999,-32768, --32768,-32768,-32768, 1169,-32768,-32768, 36,-32768,-32768,-32768, - 23,-32768,-32768, 1324,-32768, 75, 1324, -12, -12,-32768, --32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 999, - 345, -89, -89,-32768, -41, 1051, 864,-32768,-32768,-32768, --32768,-32768, 78, 864, 79, 32, 1051,-32768,-32768, 80, - 31,-32768,-32768, 448, 34, -112, 35, 38,-32768,-32768, - 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, - 999, 999, 999, 999, 999, 999, 999, 999, 999,-32768, --32768, 89, 1051, 515, 1051, 1051, -31,-32768,-32768,-32768, - -101, 42,-32768, 45, 52, 35,-32768,-32768,-32768,-32768, - 53,-32768, 529,-32768,-32768, 364,-32768, 54, 60, 59, - 58,-32768,-32768, 1051,-32768, 989, -45, -45, 989, 160, - 160, 679, 422, 62, 1197, 1209, 1221, -45, -45, 17, - 17,-32768,-32768,-32768,-32768,-32768, 66, 127, 65,-32768, --32768,-32768,-32768,-32768,-32768, 1051,-32768, 602, 660,-32768, - 73,-32768, 77, 999, 82, 170,-32768,-32768, 999,-32768, - 1051,-32768, 71, 1267, 895, 76, 85,-32768, 1051,-32768, - 87, 764, 90, 96, 98,-32768,-32768,-32768,-32768,-32768, --32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, - 102, -21,-32768, 100,-32768, 1183,-32768,-32768,-32768, 97, - 166, 108,-32768, 109, 1051, 1051, -95,-32768, 131, 912, - 1051, 1051,-32768,-32768,-32768,-32768,-32768, -14,-32768, 114, - 116, 1051,-32768, 123, 126, 129, 130, -97,-32768, -11, --32768, 764, 166, 128, 1051, 964, 764, 764, 147,-32768, --32768,-32768, -40,-32768, 134, 138, 109, 194,-32768, 1051, --32768, 764, 143, 864, 764,-32768,-32768,-32768,-32768, 141, --32768, 764,-32768, 304, 310,-32768 -}; - -static const short yypgoto[] = {-32768, - 111,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 226, --32768, 197, 105,-32768,-32768,-32768, 311, 1,-32768, 218, - 309, -13, 278,-32768,-32768,-32768,-32768,-32768,-32768, 307, --32768,-32768,-32768,-32768,-32768, 274,-32768, -15, -91,-32768, --32768,-32768, -53,-32768,-32768,-32768,-32768,-32768,-32768,-32768, --32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, --32768, -152, -124, -90, 121, -80, -137, 222, -38, -147, --32768,-32768,-32768, 74, 1047, -69,-32768, -85,-32768,-32768, --32768,-32768, 13, -2,-32768 -}; - - -#define YYLAST 1466 - - -static const short yytable[] = { 32, - 112, 211, 203, 192, 190, 191, 149, 332, 142, 143, - 145, 67, 56, 87, 349, 76, 218, 168, 40, -149, - 145, 145, 206, 145, 159, 72, 144, 79, 61, 206, - 44, 51, 175, 176, 91, 62, 162, 163, 52, 170, - 73, 234, 61, 58, 15, 125, 247, 59, 68, 223, - 168, 192, 192, 61, 145, 57, 57, 57, 61, 74, - 254, 38, 54, 80, 333, 204, 61, 147, 34, 47, - 148, 194, 92, 38, 93, -149, 214, 195, 192, 94, - 95, 190, 191, 159, 219, 145, 145, 145, 145, 145, - 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, - 145, 145, 145, 145, 248, 253, 96, 185, 186, 187, - 188, 189, 246, 159, 249, 250, 97, 98, 36, 194, - 194, 362, 217, 130, 131, 195, 195, 251, 192, 99, - 100, 309, 148, 302, 42, 159, 132, 325, 101, 69, - 70, 224, 61, 268, 102, 103, 194, 350, 311, 76, - 104, 351, 195, 105, 78, 88, 133, 302, 123, 72, - 134, 135, 124, 146, 136, 151, 152, 335, 153, 137, - 91, 187, 188, 189, 138, 273, 154, 155, 145, 139, - 310, 193, 267, 145, 314, 219, 199, 106, 317, 210, - 212, 107, 213, 216, 108, 206, 194, 224, 215, 225, - 245, -154, 195, 255, 92, 38, 93, 256, 92, 38, - 93, 370, 326, 257, 260, 94, 95, 302, 263, 264, - 266, 269, 302, 302, 330, 328, 265, 270, 319, 271, - 336, 337, 272, 311, 304, 331, 315, 302, 305, 206, - 302, 344, 96, 307, 32, 316, 318, 302, 97, 98, - 320, 48, 97, 98, 355, 357, 321, 353, 322, 91, - 324, 99, 100, 148, 327, 99, 100, 64, 32, 329, - 101, -127, 71, 334, 101, 342, 102, 103, 343, 367, - 102, 103, 104, 345, 346, 105, 104, 354, 352, 105, - 347, 348, 360, 358, 359, 363, 364, 92, 38, 93, - 365, 369, 372, 375, 94, 95, 128, 129, 368, 376, - 126, 371, 185, 186, 187, 188, 189, 261, 373, 259, - 198, 31, 17, 106, 60, 166, 141, 107, 32, 41, - 108, 96, 75, 32, 32, 361, 262, -149, 196, 308, - 341, 97, 98, 0, 201, 91, 0, 0, 32, 0, - 18, 32, 0, 0, 99, 100, 0, 0, 32, 0, - 0, 0, 0, 101, 91, 0, 19, 0, 20, 102, - 103, 0, 0, 0, 22, 104, 23, 0, 105, 0, - 0, 24, 25, 92, 38, 93, 26, 0, 0, 27, - 94, 95, 0, 0, 0, 28, 0, 0, 0, 0, - 29, 0, 92, 38, 93, 0, 3, 0, 0, 94, - 95, 0, 106, 0, 0, 0, 107, 96, 4, 108, - 0, 5, 164, 6, 7, 165, 8, 97, 98, 0, - 0, 91, 9, 0, 0, 0, 96, 0, 0, 0, - 99, 100, 0, 0, 0, 0, 97, 98, 91, 101, - 0, 0, 0, 0, 0, 102, 103, 0, 0, 99, - 100, 104, 0, 0, 105, 0, 0, 0, 101, 92, - 38, 93, 0, 0, 102, 103, 94, 95, 0, 0, - 104, 0, -149, 105, 0, 0, 92, 38, 93, 171, - 172, 173, 174, 94, 95, 0, 0, 0, 106, 175, - 176, 177, 107, 96, 0, 108, 0, 0, 164, 0, - 0, 165, 0, 97, 98, 91, 0, 106, 0, 0, - 96, 107, 0, 0, 108, -149, 99, 100, -149, 157, - 97, 98, 0, 0, 0, 101, 0, 0, 0, 0, - 0, 102, 103, 99, 100, 0, 0, 104, 0, -150, - 105, 0, 101, 92, 38, 93, 0, 0, 102, 103, - 94, 95, 0, 0, 104, 0, 0, 105, 0, 180, - 181, 182, 183, 184, 185, 186, 187, 188, 189, 0, - 0, 0, 0, 0, 106, 0, 0, 96, 107, 0, - 0, 108, 0, 0, 0, 0, 157, 97, 98, 0, - 0, 106, 274, 0, 0, 107, 0, 0, 108, 0, - 99, 100, -150, 157, 0, 0, 0, 0, 0, 101, - 18, 0, 0, 0, 0, 102, 103, 0, 0, 0, - 0, 104, 0, 0, 105, 0, 19, 0, 20, 0, - 92, 38, 93, 0, 22, 0, 23, 94, 95, 0, - 0, 24, 25, 275, 0, 0, 26, 0, 0, 27, - 2, 0, 0, 0, 0, 28, 0, 0, 106, 0, - 29, 0, 107, 0, 96, 108, -150, 0, 0, 0, - 157, 0, 0, 276, 97, 98, 0, 277, 0, 0, - 0, 63, 0, 18, 0, 278, 279, 99, 100, 0, - 280, 281, 0, 282, 0, 0, 101, 0, 0, 19, - 283, 20, 102, 103, 284, 0, 0, 22, 104, 23, - 0, 105, 0, 0, 24, 25, 0, 0, 0, 26, - 0, 0, 27, 0, 0, 0, 0, 0, 28, 0, - 0, 0, 0, 29, 285, 0, 171, 172, 173, 174, - 0, -37, 0, 0, 0, 106, 175, 176, 0, 107, - 286, 0, 108, 0, 274, 148, 287, -37, 0, -37, - 0, -37, 0, -37, 3, -37, 0, -37, 0, 0, - 0, 0, -37, -37, 0, 0, 4, -37, 0, 5, - -37, 6, 7, 0, 8, 0, -37, 0, 0, 0, - 9, -37, 92, 38, 93, 0, 0, 0, 0, 94, - 95, 0, 0, 0, -37, 275, 0, 0, 0, 0, - 0, 0, 0, 0, 303, 0, 180, 181, 182, 183, - 184, 185, 186, 187, 188, 189, 96, 0, 0, 0, - 0, 0, 0, 0, 0, 276, 97, 98, 0, 277, - 0, 0, 0, 0, 0, 18, 0, 278, 279, 99, - 100, 0, 280, 281, 91, 282, 0, 0, 101, 0, - 0, 19, 283, 20, 102, 103, 284, 0, 0, 22, - 104, 23, 0, 105, 0, 0, 24, 25, 0, 0, - 0, 26, 0, 0, 27, 91, 0, 0, 0, 0, - 28, 0, 92, 38, 93, 29, 285, 0, 0, 94, - 95, 0, 91, 0, 0, 0, 0, 106, 0, 0, - 0, 107, 286, 0, 108, 0, 0, 148, 0, 0, - 0, 0, 0, 92, 38, 93, 96, 0, 0, 0, - 94, 95, 0, 0, 0, 0, 97, 98, 0, 0, - 92, 38, 93, 0, 0, 0, 0, 94, 95, 99, - 100, 0, 0, 0, 91, 0, 0, 96, 101, 0, - 0, 0, 0, 0, 102, 103, 0, 97, 98, 0, - 104, 0, 0, 105, 96, 0, 0, 0, 0, 0, - 99, 100, 0, 0, 97, 98, 0, 0, 0, 101, - 0, 0, 92, 38, 93, 102, 103, 99, 100, 94, - 95, 104, 0, 0, 105, 0, 101, 106, 0, 0, - 0, 107, 102, 103, 108, -125, 0, 0, 104, 0, - 0, 105, 0, 0, 0, 0, 96, 92, 38, 93, - 0, 0, 0, 0, 94, 95, 97, 98, 106, 0, - 0, 91, 107, -123, 0, 108, 0, 172, 173, 99, - 100, -1, 2, 0, 0, 106, 175, 176, 101, 107, - -125, 96, 108, 0, 102, 103, 0, 0, 0, 0, - 104, 97, 98, 105, 0, 0, 0, 0, 0, 92, - 38, 93, 0, 0, 99, 100, 94, 95, 0, 0, - 0, 0, 0, 101, 0, 0, 0, 0, 0, 102, - 103, 0, 0, 0, 0, 104, 0, 106, 105, 0, - 0, 107, -118, 96, 108, 0, 0, 0, 0, 0, - 0, 0, 0, 97, 98, 0, 0, 0, 0, 183, - 184, 185, 186, 187, 188, 189, 99, 100, 0, 0, - 0, 0, 106, -37, 0, 101, 107, 0, 0, 108, - 0, 102, 103, 0, 0, 0, 0, 104, 0, -37, - 105, -37, 0, -37, 0, -37, 3, -37, 0, -37, - 0, 0, 0, 0, -37, -37, 0, 0, 4, -37, - 0, 5, -37, 6, 7, 0, 8, 0, -37, 0, - 0, 0, 9, -37, 106, 0, 0, 0, 107, 0, - 0, 108, 0, 0, 0, 0, -37, 226, 227, 228, - 229, 230, 231, 232, 233, 0, 235, 236, 237, 238, - 239, 240, 241, 242, 243, 244, 171, 172, 173, 174, - 0, 0, 0, 0, 0, 0, 175, 176, 177, 178, - 171, 172, 173, 174, 0, 0, 0, 0, 0, 0, - 175, 176, 177, 178, 171, 172, 173, 174, 0, 0, - 0, 0, 0, 0, 175, 176, 171, 172, 173, 174, - 0, 0, 0, 0, 0, 0, 175, 176, 171, 172, - 173, 174, 0, 0, 0, 0, 0, 0, 175, 176, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 306, 0, 0, 0, 0, 179, 180, 181, 182, 183, - 184, 185, 186, 187, 188, 189, 0, 0, 0, 0, - 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, - 0, 0, 0, 0, 0, 181, 182, 183, 184, 185, - 186, 187, 188, 189, 130, 131, 130, 131, 182, 183, - 184, 185, 186, 187, 188, 189, 0, 132, 0, 132, - 0, 183, 184, 185, 186, 187, 188, 189, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 133, 0, 133, - 0, 134, 135, 134, 135, 136, 0, 136, 18, 0, - 137, 0, 137, 0, 0, 138, 0, 138, 0, 0, - 139, 0, 139, 0, 19, 18, 20, 0, 0, 0, - 21, 0, 22, 0, 23, 313, 0, 0, 0, 24, - 25, 19, 0, 20, 26, 0, 0, 27, 0, 22, - 0, 23, 0, 28, 0, 0, 24, 25, 29, 0, - 0, 26, 0, 0, 27, 0, 0, 0, 0, 0, - 28, 0, 0, 0, 0, 29 -}; - -static const short yycheck[] = { 13, - 81, 154, 140, 93, 46, 47, 98, 103, 94, 95, - 96, 50, 112, 112, 112, 104, 164, 108, 21, 104, - 106, 107, 147, 109, 105, 146, 96, 66, 155, 154, - 30, 153, 78, 79, 1, 162, 106, 107, 160, 109, - 161, 179, 155, 159, 159, 84, 194, 163, 51, 162, - 141, 93, 93, 155, 140, 155, 155, 155, 155, 59, - 162, 40, 40, 160, 160, 146, 155, 161, 161, 148, - 164, 161, 39, 40, 41, 160, 157, 167, 93, 46, - 47, 46, 47, 164, 165, 171, 172, 173, 174, 175, - 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, - 186, 187, 188, 189, 195, 197, 73, 153, 154, 155, - 156, 157, 193, 194, 195, 196, 83, 84, 161, 161, - 161, 162, 161, 88, 89, 167, 167, 159, 93, 96, - 97, 269, 164, 258, 161, 216, 101, 159, 105, 112, - 159, 163, 155, 224, 111, 112, 161, 159, 163, 104, - 117, 163, 167, 120, 163, 160, 121, 282, 162, 146, - 125, 126, 163, 161, 129, 164, 112, 320, 97, 134, - 1, 155, 156, 157, 139, 256, 161, 97, 264, 144, - 271, 146, 221, 269, 275, 266, 112, 154, 279, 112, - 112, 158, 161, 163, 161, 320, 161, 163, 119, 162, - 112, 168, 167, 162, 39, 40, 41, 163, 39, 40, - 41, 364, 304, 162, 162, 46, 47, 342, 165, 160, - 163, 160, 347, 348, 315, 311, 168, 162, 282, 103, - 321, 322, 168, 163, 162, 316, 161, 362, 162, 364, - 365, 332, 73, 162, 258, 161, 160, 372, 83, 84, - 161, 34, 83, 84, 345, 346, 161, 343, 161, 1, - 159, 96, 97, 164, 168, 96, 97, 50, 282, 162, - 105, 163, 55, 143, 105, 162, 111, 112, 163, 360, - 111, 112, 117, 161, 159, 120, 117, 160, 342, 120, - 162, 162, 146, 347, 348, 162, 159, 39, 40, 41, - 107, 159, 162, 0, 46, 47, 89, 90, 362, 0, - 85, 365, 153, 154, 155, 156, 157, 213, 372, 209, - 124, 13, 12, 154, 47, 108, 161, 158, 342, 23, - 161, 73, 59, 347, 348, 351, 216, 168, 117, 266, - 328, 83, 84, -1, 127, 1, -1, -1, 362, -1, - 92, 365, -1, -1, 96, 97, -1, -1, 372, -1, - -1, -1, -1, 105, 1, -1, 108, -1, 110, 111, - 112, -1, -1, -1, 116, 117, 118, -1, 120, -1, - -1, 123, 124, 39, 40, 41, 128, -1, -1, 131, - 46, 47, -1, -1, -1, 137, -1, -1, -1, -1, - 142, -1, 39, 40, 41, -1, 115, -1, -1, 46, - 47, -1, 154, -1, -1, -1, 158, 73, 127, 161, - -1, 130, 164, 132, 133, 167, 135, 83, 84, -1, - -1, 1, 141, -1, -1, -1, 73, -1, -1, -1, - 96, 97, -1, -1, -1, -1, 83, 84, 1, 105, - -1, -1, -1, -1, -1, 111, 112, -1, -1, 96, - 97, 117, -1, -1, 120, -1, -1, -1, 105, 39, - 40, 41, -1, -1, 111, 112, 46, 47, -1, -1, - 117, -1, 119, 120, -1, -1, 39, 40, 41, 68, - 69, 70, 71, 46, 47, -1, -1, -1, 154, 78, - 79, 80, 158, 73, -1, 161, -1, -1, 164, -1, - -1, 167, -1, 83, 84, 1, -1, 154, -1, -1, - 73, 158, -1, -1, 161, 162, 96, 97, 165, 166, - 83, 84, -1, -1, -1, 105, -1, -1, -1, -1, - -1, 111, 112, 96, 97, -1, -1, 117, -1, 119, - 120, -1, 105, 39, 40, 41, -1, -1, 111, 112, - 46, 47, -1, -1, 117, -1, -1, 120, -1, 148, - 149, 150, 151, 152, 153, 154, 155, 156, 157, -1, - -1, -1, -1, -1, 154, -1, -1, 73, 158, -1, - -1, 161, -1, -1, -1, -1, 166, 83, 84, -1, - -1, 154, 1, -1, -1, 158, -1, -1, 161, -1, - 96, 97, 165, 166, -1, -1, -1, -1, -1, 105, - 92, -1, -1, -1, -1, 111, 112, -1, -1, -1, - -1, 117, -1, -1, 120, -1, 108, -1, 110, -1, - 39, 40, 41, -1, 116, -1, 118, 46, 47, -1, - -1, 123, 124, 52, -1, -1, 128, -1, -1, 131, - 1, -1, -1, -1, -1, 137, -1, -1, 154, -1, - 142, -1, 158, -1, 73, 161, 162, -1, -1, -1, - 166, -1, -1, 82, 83, 84, -1, 86, -1, -1, - -1, 163, -1, 92, -1, 94, 95, 96, 97, -1, - 99, 100, -1, 102, -1, -1, 105, -1, -1, 108, - 109, 110, 111, 112, 113, -1, -1, 116, 117, 118, - -1, 120, -1, -1, 123, 124, -1, -1, -1, 128, - -1, -1, 131, -1, -1, -1, -1, -1, 137, -1, - -1, -1, -1, 142, 143, -1, 68, 69, 70, 71, - -1, 92, -1, -1, -1, 154, 78, 79, -1, 158, - 159, -1, 161, -1, 1, 164, 165, 108, -1, 110, - -1, 112, -1, 114, 115, 116, -1, 118, -1, -1, - -1, -1, 123, 124, -1, -1, 127, 128, -1, 130, - 131, 132, 133, -1, 135, -1, 137, -1, -1, -1, - 141, 142, 39, 40, 41, -1, -1, -1, -1, 46, - 47, -1, -1, -1, 155, 52, -1, -1, -1, -1, - -1, -1, -1, -1, 165, -1, 148, 149, 150, 151, - 152, 153, 154, 155, 156, 157, 73, -1, -1, -1, - -1, -1, -1, -1, -1, 82, 83, 84, -1, 86, - -1, -1, -1, -1, -1, 92, -1, 94, 95, 96, - 97, -1, 99, 100, 1, 102, -1, -1, 105, -1, - -1, 108, 109, 110, 111, 112, 113, -1, -1, 116, - 117, 118, -1, 120, -1, -1, 123, 124, -1, -1, - -1, 128, -1, -1, 131, 1, -1, -1, -1, -1, - 137, -1, 39, 40, 41, 142, 143, -1, -1, 46, - 47, -1, 1, -1, -1, -1, -1, 154, -1, -1, - -1, 158, 159, -1, 161, -1, -1, 164, -1, -1, - -1, -1, -1, 39, 40, 41, 73, -1, -1, -1, - 46, 47, -1, -1, -1, -1, 83, 84, -1, -1, - 39, 40, 41, -1, -1, -1, -1, 46, 47, 96, - 97, -1, -1, -1, 1, -1, -1, 73, 105, -1, - -1, -1, -1, -1, 111, 112, -1, 83, 84, -1, - 117, -1, -1, 120, 73, -1, -1, -1, -1, -1, - 96, 97, -1, -1, 83, 84, -1, -1, -1, 105, - -1, -1, 39, 40, 41, 111, 112, 96, 97, 46, - 47, 117, -1, -1, 120, -1, 105, 154, -1, -1, - -1, 158, 111, 112, 161, 162, -1, -1, 117, -1, - -1, 120, -1, -1, -1, -1, 73, 39, 40, 41, - -1, -1, -1, -1, 46, 47, 83, 84, 154, -1, - -1, 1, 158, 159, -1, 161, -1, 69, 70, 96, - 97, 0, 1, -1, -1, 154, 78, 79, 105, 158, - 159, 73, 161, -1, 111, 112, -1, -1, -1, -1, - 117, 83, 84, 120, -1, -1, -1, -1, -1, 39, - 40, 41, -1, -1, 96, 97, 46, 47, -1, -1, - -1, -1, -1, 105, -1, -1, -1, -1, -1, 111, - 112, -1, -1, -1, -1, 117, -1, 154, 120, -1, - -1, 158, 159, 73, 161, -1, -1, -1, -1, -1, - -1, -1, -1, 83, 84, -1, -1, -1, -1, 151, - 152, 153, 154, 155, 156, 157, 96, 97, -1, -1, - -1, -1, 154, 92, -1, 105, 158, -1, -1, 161, - -1, 111, 112, -1, -1, -1, -1, 117, -1, 108, - 120, 110, -1, 112, -1, 114, 115, 116, -1, 118, - -1, -1, -1, -1, 123, 124, -1, -1, 127, 128, - -1, 130, 131, 132, 133, -1, 135, -1, 137, -1, - -1, -1, 141, 142, 154, -1, -1, -1, 158, -1, - -1, 161, -1, -1, -1, -1, 155, 171, 172, 173, - 174, 175, 176, 177, 178, -1, 180, 181, 182, 183, - 184, 185, 186, 187, 188, 189, 68, 69, 70, 71, - -1, -1, -1, -1, -1, -1, 78, 79, 80, 81, - 68, 69, 70, 71, -1, -1, -1, -1, -1, -1, - 78, 79, 80, 81, 68, 69, 70, 71, -1, -1, - -1, -1, -1, -1, 78, 79, 68, 69, 70, 71, - -1, -1, -1, -1, -1, -1, 78, 79, 68, 69, - 70, 71, -1, -1, -1, -1, -1, -1, 78, 79, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 264, -1, -1, -1, -1, 147, 148, 149, 150, 151, - 152, 153, 154, 155, 156, 157, -1, -1, -1, -1, - 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, - -1, -1, -1, -1, -1, 149, 150, 151, 152, 153, - 154, 155, 156, 157, 88, 89, 88, 89, 150, 151, - 152, 153, 154, 155, 156, 157, -1, 101, -1, 101, - -1, 151, 152, 153, 154, 155, 156, 157, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 121, -1, 121, - -1, 125, 126, 125, 126, 129, -1, 129, 92, -1, - 134, -1, 134, -1, -1, 139, -1, 139, -1, -1, - 144, -1, 144, -1, 108, 92, 110, -1, -1, -1, - 114, -1, 116, -1, 118, 159, -1, -1, -1, 123, - 124, 108, -1, 110, 128, -1, -1, 131, -1, 116, - -1, 118, -1, 137, -1, -1, 123, 124, 142, -1, - -1, 128, -1, -1, 131, -1, -1, -1, -1, -1, - 137, -1, -1, -1, -1, 142 -}; -#define YYPURE 1 - -/* -*-C-*- Note some compilers choke on comments on `#line' lines. */ -#line 3 "/opt/gnu//share/bison.simple" - -/* Skeleton output parser for bison, - Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ - -/* As a special exception, when this file is copied by Bison into a - Bison output file, you may use that output file without restriction. - This special exception was added by the Free Software Foundation - in version 1.24 of Bison. */ - -#ifndef alloca -#ifdef __GNUC__ -#define alloca __builtin_alloca -#else /* not GNU C. */ -#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) -#include <alloca.h> -#else /* not sparc */ -#if defined (MSDOS) && !defined (__TURBOC__) -#include <malloc.h> -#else /* not MSDOS, or __TURBOC__ */ -#if defined(_AIX) -#include <malloc.h> - #pragma alloca -#else /* not MSDOS, __TURBOC__, or _AIX */ -#ifdef __hpux -#ifdef __cplusplus -extern "C" { -void *alloca (unsigned int); -}; -#else /* not __cplusplus */ -void *alloca (); -#endif /* not __cplusplus */ -#endif /* __hpux */ -#endif /* not _AIX */ -#endif /* not MSDOS, or __TURBOC__ */ -#endif /* not sparc. */ -#endif /* not GNU C. */ -#endif /* alloca not defined. */ - -/* This is the parser code that is written into each bison parser - when the %semantic_parser declaration is not specified in the grammar. - It was written by Richard Stallman by simplifying the hairy parser - used when %semantic_parser is specified. */ - -/* Note: there must be only one dollar sign in this file. - It is replaced by the list of actions, each action - as one case of the switch. */ - -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) -#define YYEMPTY -2 -#define YYEOF 0 -#define YYACCEPT return(0) -#define YYABORT return(1) -#define YYERROR goto yyerrlab1 -/* Like YYERROR except do call yyerror. - This remains here temporarily to ease the - transition to the new meaning of YYERROR, for GCC. - Once GCC version 2 has supplanted version 1, this can go. */ -#define YYFAIL goto yyerrlab -#define YYRECOVERING() (!!yyerrstatus) -#define YYBACKUP(token, value) \ -do \ - if (yychar == YYEMPTY && yylen == 1) \ - { yychar = (token), yylval = (value); \ - yychar1 = YYTRANSLATE (yychar); \ - YYPOPSTACK; \ - goto yybackup; \ - } \ - else \ - { yyerror ("syntax error: cannot back up"); YYERROR; } \ -while (0) - -#define YYTERROR 1 -#define YYERRCODE 256 - -#ifndef YYPURE -#define YYLEX yylex() -#endif - -#ifdef YYPURE -#ifdef YYLSP_NEEDED -#ifdef YYLEX_PARAM -#define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM) -#else -#define YYLEX yylex(&yylval, &yylloc) -#endif -#else /* not YYLSP_NEEDED */ -#ifdef YYLEX_PARAM -#define YYLEX yylex(&yylval, YYLEX_PARAM) -#else -#define YYLEX yylex(&yylval) -#endif -#endif /* not YYLSP_NEEDED */ -#endif - -/* If nonreentrant, generate the variables here */ - -#ifndef YYPURE - -int yychar; /* the lookahead symbol */ -YYSTYPE yylval; /* the semantic value of the */ - /* lookahead symbol */ - -#ifdef YYLSP_NEEDED -YYLTYPE yylloc; /* location data for the lookahead */ - /* symbol */ -#endif - -int yynerrs; /* number of parse errors so far */ -#endif /* not YYPURE */ - -#if YYDEBUG != 0 -int yydebug; /* nonzero means print parse trace */ -/* Since this is uninitialized, it does not stop multiple parsers - from coexisting. */ -#endif - -/* YYINITDEPTH indicates the initial size of the parser's stacks */ - -#ifndef YYINITDEPTH -#define YYINITDEPTH 200 -#endif - -/* YYMAXDEPTH is the maximum size the stacks can grow to - (effective only if the built-in stack extension method is used). */ - -#if YYMAXDEPTH == 0 -#undef YYMAXDEPTH -#endif - -#ifndef YYMAXDEPTH -#define YYMAXDEPTH 10000 -#endif - -/* Prevent warning if -Wstrict-prototypes. */ -#ifdef __GNUC__ -int yyparse (void); -#endif - -#if __GNUC__ > 1 /* GNU C and GNU C++ define this. */ -#define __yy_memcpy(FROM,TO,COUNT) __builtin_memcpy(TO,FROM,COUNT) -#else /* not GNU C or C++ */ -#ifndef __cplusplus - -/* This is the most reliable way to avoid incompatibilities - in available built-in functions on various systems. */ -static void -__yy_memcpy (from, to, count) - char *from; - char *to; - int count; -{ - register char *f = from; - register char *t = to; - register int i = count; - - while (i-- > 0) - *t++ = *f++; -} - -#else /* __cplusplus */ - -/* This is the most reliable way to avoid incompatibilities - in available built-in functions on various systems. */ -static void -__yy_memcpy (char *from, char *to, int count) -{ - register char *f = from; - register char *t = to; - register int i = count; - - while (i-- > 0) - *t++ = *f++; -} - -#endif -#endif - -#line 192 "/opt/gnu//share/bison.simple" - -/* The user can define YYPARSE_PARAM as the name of an argument to be passed - into yyparse. The argument should have type void *. - It should actually point to an object. - Grammar actions can access the variable by casting it - to the proper pointer type. */ - -#ifdef YYPARSE_PARAM -#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM; -#else -#define YYPARSE_PARAM -#define YYPARSE_PARAM_DECL -#endif - -int -yyparse(YYPARSE_PARAM) - YYPARSE_PARAM_DECL -{ - register int yystate; - register int yyn; - register short *yyssp; - register YYSTYPE *yyvsp; - int yyerrstatus; /* number of tokens to shift before error messages enabled */ - int yychar1 = 0; /* lookahead token as an internal (translated) token number */ - - short yyssa[YYINITDEPTH]; /* the state stack */ - YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */ - - short *yyss = yyssa; /* refer to the stacks thru separate pointers */ - YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */ - -#ifdef YYLSP_NEEDED - YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */ - YYLTYPE *yyls = yylsa; - YYLTYPE *yylsp; - -#define YYPOPSTACK (yyvsp--, yyssp--, yylsp--) -#else -#define YYPOPSTACK (yyvsp--, yyssp--) -#endif - - int yystacksize = YYINITDEPTH; - -#ifdef YYPURE - int yychar; - YYSTYPE yylval; - int yynerrs; -#ifdef YYLSP_NEEDED - YYLTYPE yylloc; -#endif -#endif - - YYSTYPE yyval; /* the variable used to return */ - /* semantic values from the action */ - /* routines */ - - int yylen; - -#if YYDEBUG != 0 - if (yydebug) - fprintf(stderr, "Starting parse\n"); -#endif - - yystate = 0; - yyerrstatus = 0; - yynerrs = 0; - yychar = YYEMPTY; /* Cause a token to be read. */ - - /* Initialize stack pointers. - Waste one element of value and location stack - so that they stay on the same level as the state stack. - The wasted elements are never initialized. */ - - yyssp = yyss - 1; - yyvsp = yyvs; -#ifdef YYLSP_NEEDED - yylsp = yyls; -#endif - -/* Push a new state, which is found in yystate . */ -/* In all cases, when you get here, the value and location stacks - have just been pushed. so pushing a state here evens the stacks. */ -yynewstate: - - *++yyssp = yystate; - - if (yyssp >= yyss + yystacksize - 1) - { - /* Give user a chance to reallocate the stack */ - /* Use copies of these so that the &'s don't force the real ones into memory. */ - YYSTYPE *yyvs1 = yyvs; - short *yyss1 = yyss; -#ifdef YYLSP_NEEDED - YYLTYPE *yyls1 = yyls; -#endif - - /* Get the current used size of the three stacks, in elements. */ - int size = yyssp - yyss + 1; - -#ifdef yyoverflow - /* Each stack pointer address is followed by the size of - the data in use in that stack, in bytes. */ -#ifdef YYLSP_NEEDED - /* This used to be a conditional around just the two extra args, - but that might be undefined if yyoverflow is a macro. */ - yyoverflow("parser stack overflow", - &yyss1, size * sizeof (*yyssp), - &yyvs1, size * sizeof (*yyvsp), - &yyls1, size * sizeof (*yylsp), - &yystacksize); -#else - yyoverflow("parser stack overflow", - &yyss1, size * sizeof (*yyssp), - &yyvs1, size * sizeof (*yyvsp), - &yystacksize); -#endif - - yyss = yyss1; yyvs = yyvs1; -#ifdef YYLSP_NEEDED - yyls = yyls1; -#endif -#else /* no yyoverflow */ - /* Extend the stack our own way. */ - if (yystacksize >= YYMAXDEPTH) - { - yyerror("parser stack overflow"); - return 2; - } - yystacksize *= 2; - if (yystacksize > YYMAXDEPTH) - yystacksize = YYMAXDEPTH; - yyss = (short *) alloca (yystacksize * sizeof (*yyssp)); - __yy_memcpy ((char *)yyss1, (char *)yyss, size * sizeof (*yyssp)); - yyvs = (YYSTYPE *) alloca (yystacksize * sizeof (*yyvsp)); - __yy_memcpy ((char *)yyvs1, (char *)yyvs, size * sizeof (*yyvsp)); -#ifdef YYLSP_NEEDED - yyls = (YYLTYPE *) alloca (yystacksize * sizeof (*yylsp)); - __yy_memcpy ((char *)yyls1, (char *)yyls, size * sizeof (*yylsp)); -#endif -#endif /* no yyoverflow */ - - yyssp = yyss + size - 1; - yyvsp = yyvs + size - 1; -#ifdef YYLSP_NEEDED - yylsp = yyls + size - 1; -#endif - -#if YYDEBUG != 0 - if (yydebug) - fprintf(stderr, "Stack size increased to %d\n", yystacksize); -#endif - - if (yyssp >= yyss + yystacksize - 1) - YYABORT; - } - -#if YYDEBUG != 0 - if (yydebug) - fprintf(stderr, "Entering state %d\n", yystate); -#endif - - goto yybackup; - yybackup: - -/* Do appropriate processing given the current state. */ -/* Read a lookahead token if we need one and don't already have one. */ -/* yyresume: */ - - /* First try to decide what to do without reference to lookahead token. */ - - yyn = yypact[yystate]; - if (yyn == YYFLAG) - goto yydefault; - - /* Not known => get a lookahead token if don't already have one. */ - - /* yychar is either YYEMPTY or YYEOF - or a valid token in external form. */ - - if (yychar == YYEMPTY) - { -#if YYDEBUG != 0 - if (yydebug) - fprintf(stderr, "Reading a token: "); -#endif - yychar = YYLEX; - } - - /* Convert token to internal form (in yychar1) for indexing tables with */ - - if (yychar <= 0) /* This means end of input. */ - { - yychar1 = 0; - yychar = YYEOF; /* Don't call YYLEX any more */ - -#if YYDEBUG != 0 - if (yydebug) - fprintf(stderr, "Now at end of input.\n"); -#endif - } - else - { - yychar1 = YYTRANSLATE(yychar); - -#if YYDEBUG != 0 - if (yydebug) - { - fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]); - /* Give the individual parser a way to print the precise meaning - of a token, for further debugging info. */ -#ifdef YYPRINT - YYPRINT (stderr, yychar, yylval); -#endif - fprintf (stderr, ")\n"); - } -#endif - } - - yyn += yychar1; - if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1) - goto yydefault; - - yyn = yytable[yyn]; - - /* yyn is what to do for this token type in this state. - Negative => reduce, -yyn is rule number. - Positive => shift, yyn is new state. - New state is final state => don't bother to shift, - just return success. - 0, or most negative number => error. */ - - if (yyn < 0) - { - if (yyn == YYFLAG) - goto yyerrlab; - yyn = -yyn; - goto yyreduce; - } - else if (yyn == 0) - goto yyerrlab; - - if (yyn == YYFINAL) - YYACCEPT; - - /* Shift the lookahead token. */ - -#if YYDEBUG != 0 - if (yydebug) - fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]); -#endif - - /* Discard the token being shifted unless it is eof. */ - if (yychar != YYEOF) - yychar = YYEMPTY; - - *++yyvsp = yylval; -#ifdef YYLSP_NEEDED - *++yylsp = yylloc; -#endif - - /* count tokens shifted since error; after three, turn off error status. */ - if (yyerrstatus) yyerrstatus--; - - yystate = yyn; - goto yynewstate; - -/* Do the default action for the current state. */ -yydefault: - - yyn = yydefact[yystate]; - if (yyn == 0) - goto yyerrlab; - -/* Do a reduction. yyn is the number of a rule to reduce with. */ -yyreduce: - yylen = yyr2[yyn]; - if (yylen > 0) - yyval = yyvsp[1-yylen]; /* implement default value of the action */ - -#if YYDEBUG != 0 - if (yydebug) - { - int i; - - fprintf (stderr, "Reducing via rule %d (line %d), ", - yyn, yyrline[yyn]); - - /* Print the symbols being reduced, and their result. */ - for (i = yyprhs[yyn]; yyrhs[i] > 0; i++) - fprintf (stderr, "%s ", yytname[yyrhs[i]]); - fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]); - } -#endif - - - switch (yyn) { - -case 5: -#line 235 "./language.y" -{ yyerror("Extra ';'. Ignored."); ; - break;} -case 7: -#line 239 "./language.y" -{ - yyval.string=add_shared_strings(yyvsp[-2].string,yyvsp[0].string); - free_string(yyvsp[-2].string); - free_string(yyvsp[0].string); - ; - break;} -case 8: -#line 246 "./language.y" -{ yyval.string=yyvsp[0].string ; - break;} -case 9: -#line 247 "./language.y" -{ yyval.string=0; ; - break;} -case 10: -#line 251 "./language.y" -{ - simple_do_inherit(yyvsp[-2].string,yyvsp[-4].number,yyvsp[-1].string); - ; - break;} -case 11: -#line 255 "./language.y" -{ yyval.n = mknode(F_ARG_LIST,yyvsp[0].n,mknode(F_RETURN,mkintnode(0),0)); ; - break;} -case 12: -#line 256 "./language.y" -{ yyval.n = NULL;; - break;} -case 13: -#line 261 "./language.y" -{ - if(local_variables->current_type) free_string(local_variables->current_type); - local_variables->current_type=yyvsp[0].string; - ; - break;} -case 14: -#line 266 "./language.y" -{ - yyerror("Missing type."); - copy_shared_string(local_variables->current_type, - mixed_type_string); - ; - break;} -case 15: -#line 274 "./language.y" -{ - int e; - /* construct the function type */ - push_finished_type(local_variables->current_type); - while(yyvsp[-4].number--) push_type(T_ARRAY); - - if(local_variables->current_return_type) - free_string(local_variables->current_return_type); - local_variables->current_return_type=pop_type(); - - push_finished_type(local_variables->current_return_type); - - e=yyvsp[-1].number-1; - if(varargs) - { - push_finished_type(local_variables->variable[e].type); - e--; - varargs=0; - pop_type_stack(); - }else{ - push_type(T_VOID); - } - push_type(T_MANY); - for(; e>=0; e--) - { - push_finished_type(local_variables->variable[e].type); - if(yyvsp[-6].number & ID_VARARGS) - { - push_type(T_VOID); - push_type(T_OR); - } - } - push_type(T_FUNCTION); - - yyval.string=pop_type(); - define_function(yyvsp[-3].string, - yyval.string, - yyvsp[-6].number, - IDENTIFIER_LPC_FUNCTION, - 0); - ; - break;} -case 16: -#line 316 "./language.y" -{ - int e; - if(yyvsp[0].n) - { - union idptr tmp; - int args, vargs; - for(e=0; e<yyvsp[-3].number; e++) - { - if(!local_variables->variable[e].name || - !local_variables->variable[e].name->len) - { - my_yyerror("Missing name for argument %d",e); - } - } - - tmp.offset=PC; - args=count_arguments(yyvsp[-1].string); - if(args < 0) - { - args=~args; - vargs=IDENTIFIER_VARARGS; - }else{ - vargs=0; - } - ins_byte(local_variables->max_number_of_locals, A_PROGRAM); - ins_byte(args, A_PROGRAM); - dooptcode(yyvsp[-5].string, yyvsp[0].n, yyvsp[-3].number); - - define_function(yyvsp[-5].string, - yyvsp[-1].string, - yyvsp[-8].number, - IDENTIFIER_LPC_FUNCTION | vargs, - &tmp); - } - if(local_variables->current_return_type) - { - free_string(local_variables->current_return_type); - local_variables->current_return_type=0; - } - free_all_local_names(); - free_string(yyvsp[-5].string); - free_string(yyvsp[-1].string); - ; - break;} -case 17: -#line 359 "./language.y" -{; - break;} -case 18: -#line 360 "./language.y" -{; - break;} -case 19: -#line 362 "./language.y" -{ - reset_type_stack(); - if(num_parse_error>5) YYACCEPT; - ; - break;} -case 20: -#line 368 "./language.y" -{ yyval.number=1; ; - break;} -case 21: -#line 369 "./language.y" -{ yyval.number=0; ; - break;} -case 23: -#line 373 "./language.y" -{ yyval.string=make_shared_string(""); ; - break;} -case 24: -#line 378 "./language.y" -{ - if(varargs) yyerror("Can't define more arguments after ..."); - - if(yyvsp[-1].number) - { - push_type(T_ARRAY); - varargs=1; - } - if(islocal(yyvsp[0].string) >= 0) - my_yyerror("Variable '%s' appear twice in argument list.", - yyvsp[0].string->str); - - add_local_name(yyvsp[0].string, pop_type()); - ; - break;} -case 25: -#line 393 "./language.y" -{ yyval.number=0; ; - break;} -case 26: -#line 394 "./language.y" -{ yyval.number=yyvsp[-1].number; ; - break;} -case 27: -#line 397 "./language.y" -{ yyval.number = 1; ; - break;} -case 28: -#line 398 "./language.y" -{ yyval.number = yyvsp[-2].number + 1; ; - break;} -case 29: -#line 401 "./language.y" -{ yyval.number = ID_NOMASK; ; - break;} -case 30: -#line 402 "./language.y" -{ yyval.number = ID_STATIC; ; - break;} -case 31: -#line 403 "./language.y" -{ yyval.number = ID_PRIVATE; ; - break;} -case 32: -#line 404 "./language.y" -{ yyval.number = ID_PUBLIC; ; - break;} -case 33: -#line 405 "./language.y" -{ yyval.number = ID_VARARGS; ; - break;} -case 34: -#line 406 "./language.y" -{ yyval.number = ID_PROTECTED; ; - break;} -case 35: -#line 407 "./language.y" -{ yyval.number = ID_INLINE; ; - break;} -case 36: -#line 410 "./language.y" -{ yyval.number=current_modifiers=yyvsp[0].number; ; - break;} -case 37: -#line 412 "./language.y" -{ yyval.number = 0; ; - break;} -case 38: -#line 414 "./language.y" -{ - yyval.number = yyvsp[-1].number | yyvsp[0].number; - ; - break;} -case 39: -#line 419 "./language.y" -{ yyval.number=yyvsp[-1].number + 1; ; - break;} -case 40: -#line 420 "./language.y" -{ yyval.number=0; ; - break;} -case 41: -#line 423 "./language.y" -{ yyval.string=pop_type(); ; - break;} -case 42: -#line 425 "./language.y" -{ push_type(T_ARRAY); ; - break;} -case 44: -#line 429 "./language.y" -{ yyval.string=pop_type(); ; - break;} -case 45: -#line 431 "./language.y" -{ push_type(T_OR); ; - break;} -case 47: -#line 435 "./language.y" -{ push_type(T_INT); ; - break;} -case 48: -#line 436 "./language.y" -{ push_type(T_FLOAT); ; - break;} -case 49: -#line 437 "./language.y" -{ push_type(T_STRING); ; - break;} -case 50: -#line 438 "./language.y" -{ push_type(T_OBJECT); ; - break;} -case 51: -#line 439 "./language.y" -{ push_type(T_PROGRAM); ; - break;} -case 52: -#line 440 "./language.y" -{ push_type(T_VOID); ; - break;} -case 53: -#line 441 "./language.y" -{ push_type(T_MIXED); ; - break;} -case 54: -#line 442 "./language.y" -{ push_type(T_MAPPING); ; - break;} -case 55: -#line 443 "./language.y" -{ push_type(T_ARRAY); ; - break;} -case 56: -#line 444 "./language.y" -{ push_type(T_LIST); ; - break;} -case 57: -#line 445 "./language.y" -{ push_type(T_FUNCTION); ; - break;} -case 58: -#line 449 "./language.y" -{ - type_stack_mark(); - type_stack_mark(); - ; - break;} -case 59: -#line 456 "./language.y" -{ - if (yyvsp[-1].number) - { - push_type(T_MANY); - type_stack_reverse(); - }else{ - type_stack_reverse(); - push_type(T_MANY); - push_type(T_VOID); - } - type_stack_mark(); - ; - break;} -case 60: -#line 469 "./language.y" -{ - type_stack_reverse(); - type_stack_reverse(); - ; - break;} -case 61: -#line 473 "./language.y" -{ - push_type(T_MIXED); - push_type(T_MIXED); - push_type(T_MANY); - ; - break;} -case 65: -#line 485 "./language.y" -{ - type_stack_reverse(); - type_stack_mark(); - ; - break;} -case 68: -#line 493 "./language.y" -{ push_type(T_MIXED); ; - break;} -case 69: -#line 497 "./language.y" -{ - type_stack_mark(); - type_stack_mark(); - ; - break;} -case 70: -#line 502 "./language.y" -{ - type_stack_reverse(); - type_stack_mark(); - ; - break;} -case 71: -#line 507 "./language.y" -{ - type_stack_reverse(); - type_stack_reverse(); - ; - break;} -case 73: -#line 512 "./language.y" -{ - push_type(T_MIXED); - push_type(T_MIXED); - ; - break;} -case 76: -#line 524 "./language.y" -{ - struct lpc_string *type; - push_finished_type(local_variables->current_type); - while(yyvsp[-1].number--) push_type(T_ARRAY); - type=pop_type(); - define_variable(yyvsp[0].string, type, current_modifiers); - free_string(type); - free_string(yyvsp[0].string); - ; - break;} -case 77: -#line 534 "./language.y" -{ - struct lpc_string *type; - push_finished_type(local_variables->current_type); - while(yyvsp[-2].number--) push_type(T_ARRAY); - type=pop_type(); - yyval.number=define_variable(yyvsp[-1].string, type, current_modifiers); - free_string(type); - ; - break;} -case 78: -#line 543 "./language.y" -{ - init_node=mknode(F_ARG_LIST,init_node, - mkcastnode(void_type_string, mknode(F_ASSIGN,yyvsp[0].n,mkidentifiernode(yyvsp[-1].number)))); - free_string(yyvsp[-3].string); - ; - break;} -case 79: -#line 551 "./language.y" -{ - push_finished_type(local_variables->current_type); - while(yyvsp[-1].number--) push_type(T_ARRAY); - add_local_name(yyvsp[0].string, pop_type()); - yyval.n=mkcastnode(void_type_string, - mknode(F_ASSIGN,mkintnode(0), - mklocalnode(islocal(yyvsp[0].string)))); - ; - break;} -case 80: -#line 560 "./language.y" -{ - push_finished_type(local_variables->current_type); - while(yyvsp[-3].number--) push_type(T_ARRAY); - add_local_name(yyvsp[-2].string, pop_type()); - yyval.n=mkcastnode(void_type_string, - mknode(F_ASSIGN,yyvsp[0].n, - mklocalnode(islocal(yyvsp[-2].string)))); - - ; - break;} -case 81: -#line 572 "./language.y" -{ - yyval.number=local_variables->current_number_of_locals; - ; - break;} -case 82: -#line 577 "./language.y" -{ - while(local_variables->current_number_of_locals > yyvsp[-2].number) - { - int e; - e=--(local_variables->current_number_of_locals); - free_string(local_variables->variable[e].name); - free_string(local_variables->variable[e].type); - } - yyval.n=yyvsp[-1].n; - ; - break;} -case 84: -#line 590 "./language.y" -{ - yyval.n=mknode(F_ARG_LIST,yyvsp[-2].n,yyvsp[0].n); - ; - break;} -case 85: -#line 595 "./language.y" -{ yyval.n=0; ; - break;} -case 86: -#line 597 "./language.y" -{ - yyval.n=mknode(F_ARG_LIST,yyvsp[-1].n,mkcastnode(void_type_string,yyvsp[0].n)); - ; - break;} -case 87: -#line 602 "./language.y" -{ yyval.n=yyvsp[-1].n; ; - break;} -case 88: -#line 604 "./language.y" -{ - if(local_variables->current_type) free_string(local_variables->current_type); - local_variables->current_type=yyvsp[0].string; - ; - break;} -case 89: -#line 607 "./language.y" -{ yyval.n=yyvsp[-1].n; ; - break;} -case 98: -#line 616 "./language.y" -{; - break;} -case 102: -#line 620 "./language.y" -{ yyval.n=0; ; - break;} -case 103: -#line 621 "./language.y" -{ yyval.n=0; ; - break;} -case 104: -#line 625 "./language.y" -{ yyval.n=mknode(F_BREAK,0,0); ; - break;} -case 105: -#line 626 "./language.y" -{ yyval.n=mknode(F_DEFAULT,0,0); ; - break;} -case 106: -#line 627 "./language.y" -{ yyval.n=mknode(F_CONTINUE,0,0); ; - break;} -case 107: -#line 630 "./language.y" -{ - push_locals(); - yyval.number=comp_stackp; - - if(local_variables->current_return_type) - free_string(local_variables->current_return_type); - copy_shared_string(local_variables->current_return_type,any_type_string); - ; - break;} -case 108: -#line 639 "./language.y" -{ - struct lpc_string *type; - char buf[40]; - int f,e,args,vargs; - union idptr func; - struct lpc_string *name; - - setup_fake_program(); - fix_comp_stack(yyvsp[-4].number); - - push_type(T_MIXED); - - e=yyvsp[-2].number-1; - if(varargs) - { - push_finished_type(local_variables->variable[e].type); - e--; - varargs=0; - pop_type_stack(); - }else{ - push_type(T_VOID); - } - push_type(T_MANY); - for(; e>=0; e--) - push_finished_type(local_variables->variable[e].type); - - push_type(T_FUNCTION); - - type=pop_type(); - func.offset=PC; - - args=count_arguments(type); - if(args < 0) - { - args=~args; - vargs=IDENTIFIER_VARARGS; - }else{ - vargs=0; - } - ins_byte(local_variables->max_number_of_locals, A_PROGRAM); - ins_byte(args, A_PROGRAM); - - sprintf(buf,"__lambda_%ld", - (long)fake_program.num_identifier_references); - name=make_shared_string(buf); - dooptcode(name,mknode(F_ARG_LIST,yyvsp[0].n,mknode(F_RETURN,mkintnode(0),0)),yyvsp[-2].number); - f=define_function(name, - type, - 0, - IDENTIFIER_LPC_FUNCTION | vargs, - &func); - free_string(name); - free_string(type); - pop_locals(); - yyval.n=mkidentifiernode(f); - ; - break;} -case 109: -#line 697 "./language.y" -{ - start_new_program(); - ; - break;} -case 110: -#line 702 "./language.y" -{ - struct svalue s; - s.u.program=end_program(); - if(!s.u.program) - { - yyerror("Class definition failed."); - s.type=T_INT; - s.subtype=0; - } else { - s.type=T_PROGRAM; - s.subtype=0; - } - yyval.n=mksvaluenode(&s); - free_svalue(&s); - ; - break;} -case 111: -#line 721 "./language.y" -{ - yyval.n=mknode('?',yyvsp[-3].n,mknode(':',yyvsp[-1].n,yyvsp[0].n)); - yyval.n->line_number=yyvsp[-5].number; - yyval.n=mkcastnode(void_type_string,yyval.n); - yyval.n->line_number=yyvsp[-5].number; - ; - break;} -case 112: -#line 729 "./language.y" -{ yyval.n=0; ; - break;} -case 113: -#line 730 "./language.y" -{ yyval.n=yyvsp[0].n; ; - break;} -case 114: -#line 735 "./language.y" -{ - yyval.n=mknode(F_FOREACH,mknode(F_VAL_LVAL,yyvsp[-4].n,yyvsp[-2].n),yyvsp[0].n); - yyval.n->line_number=yyvsp[-6].number; - ; - break;} -case 115: -#line 741 "./language.y" -{ - yyval.n=mknode(F_DO,yyvsp[-5].n,yyvsp[-2].n); - yyval.n->line_number=yyvsp[-6].number; - ; - break;} -case 116: -#line 749 "./language.y" -{ - int i=current_line; - current_line=yyvsp[-8].number; - yyval.n=mknode(F_ARG_LIST,mkcastnode(void_type_string,yyvsp[-6].n),mknode(F_FOR,yyvsp[-4].n,mknode(':',yyvsp[0].n,yyvsp[-2].n))); - current_line=i; - ; - break;} -case 117: -#line 759 "./language.y" -{ - int i=current_line; - current_line=yyvsp[-4].number; - yyval.n=mknode(F_FOR,yyvsp[-2].n,mknode(':',yyvsp[0].n,NULL)); - current_line=i; - ; - break;} -case 118: -#line 766 "./language.y" -{ yyval.n=mkintnode(1); ; - break;} -case 120: -#line 771 "./language.y" -{ - yyval.n=mknode(F_SWITCH,yyvsp[-2].n,yyvsp[0].n); - yyval.n->line_number=yyvsp[-4].number; - ; - break;} -case 121: -#line 777 "./language.y" -{ - yyval.n=mknode(F_CASE,yyvsp[-1].n,0); - ; - break;} -case 122: -#line 781 "./language.y" -{ - yyval.n=mknode(F_CASE,yyvsp[-3].n,yyvsp[-1].n); - ; - break;} -case 123: -#line 787 "./language.y" -{ - if(!match_types(local_variables->current_return_type, - void_type_string)) - { - yyerror("Must return a value for a non-void function."); - } - yyval.n=mknode(F_RETURN,mkintnode(0),0); - ; - break;} -case 124: -#line 796 "./language.y" -{ - yyval.n=mknode(F_RETURN,yyvsp[0].n,0); - ; - break;} -case 125: -#line 800 "./language.y" -{ yyval.n=0; ; - break;} -case 127: -#line 805 "./language.y" -{ - yyval.n=mkcastnode(void_type_string,yyvsp[0].n); - ; - break;} -case 129: -#line 812 "./language.y" -{ - yyval.n = mknode(F_ARG_LIST,mkcastnode(void_type_string,yyvsp[-2].n),yyvsp[0].n); - ; - break;} -case 131: -#line 819 "./language.y" -{ - yyval.n=mknode(F_PUSH_ARRAY,yyvsp[0].n,0); - ; - break;} -case 133: -#line 825 "./language.y" -{ - yyval.n=mknode(F_ASSIGN,yyvsp[0].n,yyvsp[-2].n); - ; - break;} -case 134: -#line 829 "./language.y" -{ - yyval.n=mknode(yyvsp[-1].number,yyvsp[-2].n,yyvsp[0].n); - ; - break;} -case 135: -#line 833 "./language.y" -{ - yyval.n=0; - ; - break;} -case 136: -#line 837 "./language.y" -{ yyval.n = yyvsp[0].n; ; - break;} -case 137: -#line 839 "./language.y" -{ - yyval.n=mknode('?',yyvsp[-4].n,mknode(':',yyvsp[-2].n,yyvsp[0].n)); - ; - break;} -case 138: -#line 843 "./language.y" -{ yyval.number=F_AND_EQ; ; - break;} -case 139: -#line 844 "./language.y" -{ yyval.number=F_OR_EQ; ; - break;} -case 140: -#line 845 "./language.y" -{ yyval.number=F_XOR_EQ; ; - break;} -case 141: -#line 846 "./language.y" -{ yyval.number=F_LSH_EQ; ; - break;} -case 142: -#line 847 "./language.y" -{ yyval.number=F_RSH_EQ; ; - break;} -case 143: -#line 848 "./language.y" -{ yyval.number=F_ADD_EQ; ; - break;} -case 144: -#line 849 "./language.y" -{ yyval.number=F_SUB_EQ; ; - break;} -case 145: -#line 850 "./language.y" -{ yyval.number=F_MULT_EQ; ; - break;} -case 146: -#line 851 "./language.y" -{ yyval.number=F_MOD_EQ; ; - break;} -case 147: -#line 852 "./language.y" -{ yyval.number=F_DIV_EQ; ; - break;} -case 150: -#line 857 "./language.y" -{ yyval.n=0; ; - break;} -case 151: -#line 858 "./language.y" -{ yyval.n=yyvsp[-1].n; ; - break;} -case 153: -#line 863 "./language.y" -{ yyval.n=mknode(F_ARG_LIST,yyvsp[-2].n,yyvsp[0].n); ; - break;} -case 154: -#line 866 "./language.y" -{ yyval.n=0; ; - break;} -case 155: -#line 867 "./language.y" -{ yyval.n=yyvsp[-1].n; ; - break;} -case 157: -#line 871 "./language.y" -{ yyval.n=mknode(F_ARG_LIST,yyvsp[-2].n,yyvsp[0].n); ; - break;} -case 158: -#line 875 "./language.y" -{ - yyval.n=mknode(F_ARG_LIST,yyvsp[-2].n,yyvsp[0].n); - ; - break;} -case 160: -#line 880 "./language.y" -{ yyval.n=mknode(F_LOR,yyvsp[-2].n,yyvsp[0].n); ; - break;} -case 161: -#line 881 "./language.y" -{ yyval.n=mknode(F_LAND,yyvsp[-2].n,yyvsp[0].n); ; - break;} -case 162: -#line 882 "./language.y" -{ yyval.n=mknode(F_OR,yyvsp[-2].n,yyvsp[0].n); ; - break;} -case 163: -#line 883 "./language.y" -{ yyval.n=mknode(F_XOR,yyvsp[-2].n,yyvsp[0].n); ; - break;} -case 164: -#line 884 "./language.y" -{ yyval.n=mknode(F_AND,yyvsp[-2].n,yyvsp[0].n); ; - break;} -case 165: -#line 885 "./language.y" -{ yyval.n=mknode(F_EQ,yyvsp[-2].n,yyvsp[0].n); ; - break;} -case 166: -#line 886 "./language.y" -{ yyval.n=mknode(F_NE,yyvsp[-2].n,yyvsp[0].n); ; - break;} -case 167: -#line 887 "./language.y" -{ yyval.n=mknode(F_GT,yyvsp[-2].n,yyvsp[0].n); ; - break;} -case 168: -#line 888 "./language.y" -{ yyval.n=mknode(F_GE,yyvsp[-2].n,yyvsp[0].n); ; - break;} -case 169: -#line 889 "./language.y" -{ yyval.n=mknode(F_LT,yyvsp[-2].n,yyvsp[0].n); ; - break;} -case 170: -#line 890 "./language.y" -{ yyval.n=mknode(F_LE,yyvsp[-2].n,yyvsp[0].n); ; - break;} -case 171: -#line 891 "./language.y" -{ yyval.n=mknode(F_LSH,yyvsp[-2].n,yyvsp[0].n); ; - break;} -case 172: -#line 892 "./language.y" -{ yyval.n=mknode(F_RSH,yyvsp[-2].n,yyvsp[0].n); ; - break;} -case 173: -#line 893 "./language.y" -{ yyval.n=mknode(F_ADD,yyvsp[-2].n,yyvsp[0].n); ; - break;} -case 174: -#line 894 "./language.y" -{ yyval.n=mknode(F_SUBTRACT,yyvsp[-2].n,yyvsp[0].n); ; - break;} -case 175: -#line 895 "./language.y" -{ yyval.n=mknode(F_MULTIPLY,yyvsp[-2].n,yyvsp[0].n); ; - break;} -case 176: -#line 896 "./language.y" -{ yyval.n=mknode(F_MOD,yyvsp[-2].n,yyvsp[0].n); ; - break;} -case 177: -#line 897 "./language.y" -{ yyval.n=mknode(F_DIVIDE,yyvsp[-2].n,yyvsp[0].n); ; - break;} -case 179: -#line 902 "./language.y" -{ - yyval.n=mkcastnode(yyvsp[-1].string,yyvsp[0].n); - free_string(yyvsp[-1].string); - ; - break;} -case 180: -#line 906 "./language.y" -{ yyval.n=mknode(F_INC,yyvsp[0].n,0); ; - break;} -case 181: -#line 907 "./language.y" -{ yyval.n=mknode(F_DEC,yyvsp[0].n,0); ; - break;} -case 182: -#line 908 "./language.y" -{ yyval.n=mknode(F_NOT,yyvsp[0].n,0); ; - break;} -case 183: -#line 909 "./language.y" -{ yyval.n=mknode(F_COMPL,yyvsp[0].n,0); ; - break;} -case 184: -#line 910 "./language.y" -{ yyval.n=mknode(F_NEGATE,yyvsp[0].n,0); ; - break;} -case 186: -#line 914 "./language.y" -{ yyval.n=mknode(F_POST_INC,yyvsp[-1].n,0); ; - break;} -case 187: -#line 915 "./language.y" -{ yyval.n=mknode(F_POST_DEC,yyvsp[-1].n,0); ; - break;} -case 189: -#line 919 "./language.y" -{ yyval.n=mkintnode(yyvsp[0].number); ; - break;} -case 190: -#line 920 "./language.y" -{ yyval.n=mkfloatnode(yyvsp[0].fnum); ; - break;} -case 196: -#line 927 "./language.y" -{ - int i; - struct efun *f; - if((i=islocal(yyvsp[0].string))>=0) - { - yyval.n=mklocalnode(i); - }else if((i=isidentifier(yyvsp[0].string))>=0){ - yyval.n=mkidentifiernode(i); - }else if((f=lookup_efun(yyvsp[0].string))){ - yyval.n=mkconstantsvaluenode(&f->function); - }else{ - my_yyerror("'%s' undefined.",yyvsp[0].string->str); - yyval.n=0; - } - free_string(yyvsp[0].string); - ; - break;} -case 197: -#line 944 "./language.y" -{ - struct efun *f; - f=lookup_efun(yyvsp[0].string); - if(!f) - { - my_yyerror("Unknown efun: %s.",yyvsp[0].string->str); - yyval.n=mkintnode(0); - }else{ - yyval.n=mksvaluenode(&f->function); - } - free_string(yyvsp[0].string); - ; - break;} -case 198: -#line 956 "./language.y" -{ yyval.n=mkapplynode(yyvsp[-3].n,yyvsp[-1].n); ; - break;} -case 199: -#line 957 "./language.y" -{ yyval.n=mknode(F_INDEX,yyvsp[-3].n,yyvsp[-1].n); ; - break;} -case 200: -#line 959 "./language.y" -{ - yyval.n=mknode(F_RANGE,yyvsp[-5].n,mknode(F_ARG_LIST,yyvsp[-3].n,yyvsp[-1].n)); - ; - break;} -case 201: -#line 962 "./language.y" -{ yyval.n=yyvsp[-1].n; ; - break;} -case 202: -#line 964 "./language.y" -{ yyval.n=mkefuncallnode("aggregate",yyvsp[-2].n); ; - break;} -case 203: -#line 966 "./language.y" -{ yyval.n=mkefuncallnode("aggregate_mapping",yyvsp[-2].n); ; - break;} -case 204: -#line 968 "./language.y" -{ yyval.n=mkefuncallnode("aggregate_list",yyvsp[-1].n); ; - break;} -case 205: -#line 970 "./language.y" -{ - yyval.n=mknode(F_INDEX,yyvsp[-2].n,mkstrnode(yyvsp[0].string)); - free_string(yyvsp[0].string); - ; - break;} -case 206: -#line 975 "./language.y" -{ - int f; - struct reference *idp; - - setup_fake_program(); - f=reference_inherited_identifier(yyvsp[-2].string,yyvsp[0].string); - idp=fake_program.identifier_references+f; - if (f<0 || ID_FROM_PTR(&fake_program,idp)->func.offset == -1) - { - my_yyerror("Undefined identifier %s::%s", yyvsp[-2].string->str,yyvsp[0].string->str); - yyval.n=mkintnode(0); - } else { - yyval.n=mkidentifiernode(f); - } - - free_string(yyvsp[-2].string); - free_string(yyvsp[0].string); - ; - break;} -case 207: -#line 994 "./language.y" -{ - int e,i; - - yyval.n=0; - setup_fake_program(); - for(e=1;e<(int)fake_program.num_inherits;e++) - { - if(fake_program.inherits[e].inherit_level!=1) continue; - i=low_reference_inherited_identifier(e,yyvsp[0].string); - if(i==-1) continue; - if(yyval.n) - { - yyval.n=mknode(F_ARG_LIST,yyval.n,mkidentifiernode(i)); - }else{ - yyval.n=mkidentifiernode(i); - } - } - if(!yyval.n) - { - yyval.n=mkintnode(0); - }else{ - if(yyval.n->token==F_ARG_LIST) yyval.n=mkefuncallnode("aggregate",yyval.n); - } - free_string(yyvsp[0].string); - ; - break;} -case 208: -#line 1022 "./language.y" -{ - yyval.n=mknode(F_NEGATE, - mknode(F_SUBTRACT, - mknode(F_INDEX,mkefuncallnode("rusage",0), - mkintnode(GAUGE_RUSAGE_INDEX)), - mknode(F_ARG_LIST,yyvsp[-1].n, - mknode(F_INDEX,mkefuncallnode("rusage",0), - mkintnode(GAUGE_RUSAGE_INDEX)))),0); - ; - break;} -case 209: -#line 1033 "./language.y" -{ yyval.n=yyvsp[-1].n; ; - break;} -case 211: -#line 1038 "./language.y" -{ - yyval.n=mknode(F_CATCH,yyvsp[0].n,NULL); - ; - break;} -case 212: -#line 1043 "./language.y" -{ - yyval.n=mknode(F_SSCANF,mknode(F_ARG_LIST,yyvsp[-4].n,yyvsp[-2].n),yyvsp[-1].n); - ; - break;} -case 213: -#line 1048 "./language.y" -{ yyval.n = 0; ; - break;} -case 214: -#line 1050 "./language.y" -{ - yyval.n = mknode(F_LVALUE_LIST,yyvsp[-1].n,yyvsp[0].n); - ; - break;} -case 216: -#line 1056 "./language.y" -{ - yyval.string=add_shared_strings(yyvsp[-1].string,yyvsp[0].string); - free_string(yyvsp[-1].string); - free_string(yyvsp[0].string); - ; - break;} -case 217: -#line 1064 "./language.y" -{ - yyval.n=mkstrnode(yyvsp[0].string); - free_string(yyvsp[0].string); - ; - break;} -} - /* the action file gets copied in in place of this dollarsign */ -#line 487 "/opt/gnu//share/bison.simple" - - yyvsp -= yylen; - yyssp -= yylen; -#ifdef YYLSP_NEEDED - yylsp -= yylen; -#endif - -#if YYDEBUG != 0 - if (yydebug) - { - short *ssp1 = yyss - 1; - fprintf (stderr, "state stack now"); - while (ssp1 != yyssp) - fprintf (stderr, " %d", *++ssp1); - fprintf (stderr, "\n"); - } -#endif - - *++yyvsp = yyval; - -#ifdef YYLSP_NEEDED - yylsp++; - if (yylen == 0) - { - yylsp->first_line = yylloc.first_line; - yylsp->first_column = yylloc.first_column; - yylsp->last_line = (yylsp-1)->last_line; - yylsp->last_column = (yylsp-1)->last_column; - yylsp->text = 0; - } - else - { - yylsp->last_line = (yylsp+yylen-1)->last_line; - yylsp->last_column = (yylsp+yylen-1)->last_column; - } -#endif - - /* Now "shift" the result of the reduction. - Determine what state that goes to, - based on the state we popped back to - and the rule number reduced by. */ - - yyn = yyr1[yyn]; - - yystate = yypgoto[yyn - YYNTBASE] + *yyssp; - if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp) - yystate = yytable[yystate]; - else - yystate = yydefgoto[yyn - YYNTBASE]; - - goto yynewstate; - -yyerrlab: /* here on detecting error */ - - if (! yyerrstatus) - /* If not already recovering from an error, report this error. */ - { - ++yynerrs; - -#ifdef YYERROR_VERBOSE - yyn = yypact[yystate]; - - if (yyn > YYFLAG && yyn < YYLAST) - { - int size = 0; - char *msg; - int x, count; - - count = 0; - /* Start X at -yyn if nec to avoid negative indexes in yycheck. */ - for (x = (yyn < 0 ? -yyn : 0); - x < (sizeof(yytname) / sizeof(char *)); x++) - if (yycheck[x + yyn] == x) - size += strlen(yytname[x]) + 15, count++; - msg = (char *) malloc(size + 15); - if (msg != 0) - { - strcpy(msg, "parse error"); - - if (count < 5) - { - count = 0; - for (x = (yyn < 0 ? -yyn : 0); - x < (sizeof(yytname) / sizeof(char *)); x++) - if (yycheck[x + yyn] == x) - { - strcat(msg, count == 0 ? ", expecting `" : " or `"); - strcat(msg, yytname[x]); - strcat(msg, "'"); - count++; - } - } - yyerror(msg); - free(msg); - } - else - yyerror ("parse error; also virtual memory exceeded"); - } - else -#endif /* YYERROR_VERBOSE */ - yyerror("parse error"); - } - - goto yyerrlab1; -yyerrlab1: /* here on error raised explicitly by an action */ - - if (yyerrstatus == 3) - { - /* if just tried and failed to reuse lookahead token after an error, discard it. */ - - /* return failure if at end of input */ - if (yychar == YYEOF) - YYABORT; - -#if YYDEBUG != 0 - if (yydebug) - fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]); -#endif - - yychar = YYEMPTY; - } - - /* Else will try to reuse lookahead token - after shifting the error token. */ - - yyerrstatus = 3; /* Each real token shifted decrements this */ - - goto yyerrhandle; - -yyerrdefault: /* current state does not do anything special for the error token. */ - -#if 0 - /* This is wrong; only states that explicitly want error tokens - should shift them. */ - yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/ - if (yyn) goto yydefault; -#endif - -yyerrpop: /* pop the current state because it cannot handle the error token */ - - if (yyssp == yyss) YYABORT; - yyvsp--; - yystate = *--yyssp; -#ifdef YYLSP_NEEDED - yylsp--; -#endif - -#if YYDEBUG != 0 - if (yydebug) - { - short *ssp1 = yyss - 1; - fprintf (stderr, "Error: state stack now"); - while (ssp1 != yyssp) - fprintf (stderr, " %d", *++ssp1); - fprintf (stderr, "\n"); - } -#endif - -yyerrhandle: - - yyn = yypact[yystate]; - if (yyn == YYFLAG) - goto yyerrdefault; - - yyn += YYTERROR; - if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR) - goto yyerrdefault; - - yyn = yytable[yyn]; - if (yyn < 0) - { - if (yyn == YYFLAG) - goto yyerrpop; - yyn = -yyn; - goto yyreduce; - } - else if (yyn == 0) - goto yyerrpop; - - if (yyn == YYFINAL) - YYACCEPT; - -#if YYDEBUG != 0 - if (yydebug) - fprintf(stderr, "Shifting error token, "); -#endif - - *++yyvsp = yylval; -#ifdef YYLSP_NEEDED - *++yylsp = yylloc; -#endif - - yystate = yyn; - goto yynewstate; -} -#line 1070 "./language.y" - - -void yyerror(char *str) -{ - extern int num_parse_error; - - if (num_parse_error > 5) return; - num_parse_error++; - - if ( get_master() ) - { - sp->type = T_STRING; - copy_shared_string(sp->u.string, current_file); - sp++; - sp->type = T_INT; - sp->u.integer = current_line; - sp++; - sp->type = T_STRING; - sp->u.string = make_shared_string(str); - sp++; - SAFE_APPLY_MASTER("compile_error",3); - pop_stack(); - }else{ - (void)fprintf(stderr, "%s:%ld: %s\n", - current_file->str, - (long)current_line, - str); - fflush(stderr); - } -} - -/* argument must be a shared string (no need to free it) */ -void add_local_name(struct lpc_string *str, - struct lpc_string *type) -{ - if (local_variables->current_number_of_locals == MAX_LOCAL) - { - yyerror("Too many local variables"); - }else { - local_variables->variable[local_variables->current_number_of_locals].type = type; - local_variables->variable[local_variables->current_number_of_locals].name = str; - local_variables->current_number_of_locals++; - if(local_variables->current_number_of_locals > - local_variables->max_number_of_locals) - { - local_variables->max_number_of_locals= - local_variables->current_number_of_locals; - } - } -} - -/* argument must be a shared string */ -int islocal(struct lpc_string *str) -{ - int e; - for(e=local_variables->current_number_of_locals-1;e>=0;e--) - if(local_variables->variable[e].name==str) - return e; - return -1; -} - -void free_all_local_names() -{ - int e; - - for (e=0; e<local_variables->current_number_of_locals; e++) - { - if(local_variables->variable[e].name) - { - free_string(local_variables->variable[e].name); - free_string(local_variables->variable[e].type); - } - local_variables->variable[e].name=0; - local_variables->variable[e].type=0; - } - local_variables->current_number_of_locals = 0; - local_variables->max_number_of_locals = 0; -} - -static void push_locals() -{ - struct locals *l; - l=ALLOC_STRUCT(locals); - l->current_type=0; - l->current_return_type=0; - l->next=local_variables; - l->current_number_of_locals=0; - l->max_number_of_locals=0; - local_variables=l; -} - -static void pop_locals() -{ - struct locals *l; - free_all_local_names(); - l=local_variables->next; - if(local_variables->current_type) - free_string(local_variables->current_type); - if(local_variables->current_return_type) - free_string(local_variables->current_return_type); - free((char *)local_variables); - - local_variables=l; - /* insert check if ( local->next == parent locals ) here */ -} diff --git a/src/language.h b/src/language.h deleted file mode 100644 index bd390d5b50830478fc34268291a6b6fbcda12da5..0000000000000000000000000000000000000000 --- a/src/language.h +++ /dev/null @@ -1,155 +0,0 @@ -typedef union -{ - int number; - FLOAT_TYPE fnum; - unsigned int address; /* Address of an instruction */ - struct lpc_string *string; - char *str; - unsigned short type; - struct node_s *n; - struct efun *efun; -} YYSTYPE; -#define F_ADD_256 258 -#define F_ADD_512 259 -#define F_ADD_768 260 -#define F_ADD_1024 261 -#define F_ADD_256X 262 -#define F_PREFIX_256 263 -#define F_PREFIX_512 264 -#define F_PREFIX_768 265 -#define F_PREFIX_1024 266 -#define F_PREFIX_CHARX256 267 -#define F_PREFIX_WORDX256 268 -#define F_PREFIX_24BITX256 269 -#define F_POP_VALUE 270 -#define F_POP_N_ELEMS 271 -#define F_MARK 272 -#define F_CALL_LFUN 273 -#define F_BRANCH 274 -#define F_BRANCH_WHEN_ZERO 275 -#define F_BRANCH_WHEN_NON_ZERO 276 -#define F_INC_LOOP 277 -#define F_DEC_LOOP 278 -#define F_INC_NEQ_LOOP 279 -#define F_DEC_NEQ_LOOP 280 -#define F_INDEX 281 -#define F_INDIRECT 282 -#define F_LTOSVAL 283 -#define F_LTOSVAL2 284 -#define F_PUSH_ARRAY 285 -#define F_RANGE 286 -#define F_COPY_VALUE 287 -#define F_LFUN 288 -#define F_GLOBAL 289 -#define F_LOCAL 290 -#define F_GLOBAL_LVALUE 291 -#define F_LOCAL_LVALUE 292 -#define F_CONSTANT 293 -#define F_FLOAT 294 -#define F_STRING 295 -#define F_NUMBER 296 -#define F_NEG_NUMBER 297 -#define F_CONST_1 298 -#define F_CONST0 299 -#define F_CONST1 300 -#define F_INC 301 -#define F_DEC 302 -#define F_POST_INC 303 -#define F_POST_DEC 304 -#define F_INC_AND_POP 305 -#define F_DEC_AND_POP 306 -#define F_RETURN 307 -#define F_DUMB_RETURN 308 -#define F_RETURN_0 309 -#define F_ASSIGN 310 -#define F_ASSIGN_AND_POP 311 -#define F_ASSIGN_LOCAL 312 -#define F_ASSIGN_LOCAL_AND_POP 313 -#define F_ASSIGN_GLOBAL 314 -#define F_ASSIGN_GLOBAL_AND_POP 315 -#define F_ADD 316 -#define F_SUBTRACT 317 -#define F_MULTIPLY 318 -#define F_DIVIDE 319 -#define F_MOD 320 -#define F_LT 321 -#define F_GT 322 -#define F_EQ 323 -#define F_GE 324 -#define F_LE 325 -#define F_NE 326 -#define F_NEGATE 327 -#define F_NOT 328 -#define F_COMPL 329 -#define F_AND 330 -#define F_OR 331 -#define F_XOR 332 -#define F_LSH 333 -#define F_RSH 334 -#define F_LAND 335 -#define F_LOR 336 -#define F_SWITCH 337 -#define F_SSCANF 338 -#define F_CATCH 339 -#define F_CAST 340 -#define F_FOREACH 341 -#define F_MAX_OPCODE 342 -#define F_ADD_EQ 343 -#define F_AND_EQ 344 -#define F_APPLY 345 -#define F_ARG_LIST 346 -#define F_ARRAY_ID 347 -#define F_ARROW 348 -#define F_BREAK 349 -#define F_CASE 350 -#define F_CLASS 351 -#define F_COLON_COLON 352 -#define F_COMMA 353 -#define F_CONTINUE 354 -#define F_DEFAULT 355 -#define F_DIV_EQ 356 -#define F_DO 357 -#define F_DOT_DOT 358 -#define F_DOT_DOT_DOT 359 -#define F_EFUN 360 -#define F_EFUN_CALL 361 -#define F_ELSE 362 -#define F_FLOAT_ID 363 -#define F_FOR 364 -#define F_FUNCTION_ID 365 -#define F_GAUGE 366 -#define F_IDENTIFIER 367 -#define F_IF 368 -#define F_INHERIT 369 -#define F_INLINE 370 -#define F_INT_ID 371 -#define F_LAMBDA 372 -#define F_LIST_ID 373 -#define F_LIST_END 374 -#define F_LIST_START 375 -#define F_LSH_EQ 376 -#define F_LVALUE_LIST 377 -#define F_MAPPING_ID 378 -#define F_MIXED_ID 379 -#define F_MOD_EQ 380 -#define F_MULT_EQ 381 -#define F_NO_MASK 382 -#define F_OBJECT_ID 383 -#define F_OR_EQ 384 -#define F_PRIVATE 385 -#define F_PROGRAM_ID 386 -#define F_PROTECTED 387 -#define F_PUBLIC 388 -#define F_RSH_EQ 389 -#define F_STATIC 390 -#define F_STATUS 391 -#define F_STRING_ID 392 -#define F_SUBSCRIPT 393 -#define F_SUB_EQ 394 -#define F_VAL_LVAL 395 -#define F_VARARGS 396 -#define F_VOID_ID 397 -#define F_WHILE 398 -#define F_XOR_EQ 399 -#define F_MAX_INSTR 400 - diff --git a/src/language.y b/src/language.y index 460a06cdb83e53498912f7b1f03fe37ed5c7924f..c473d5bc0d47e3968e124212fbdf0c02e6147bc1 100644 --- a/src/language.y +++ b/src/language.y @@ -1,24 +1,29 @@ /*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ %pure_parser /* * These values are used by the stack machine, and can not be directly - * called from LPC. + * called from Pike. */ %token F_ADD_256 F_ADD_512 F_ADD_768 F_ADD_1024 F_ADD_256X %token F_PREFIX_256 F_PREFIX_512 F_PREFIX_768 F_PREFIX_1024 %token F_PREFIX_CHARX256 F_PREFIX_WORDX256 F_PREFIX_24BITX256 -%token F_POP_VALUE F_POP_N_ELEMS F_MARK F_CALL_LFUN +%token F_POP_VALUE F_POP_N_ELEMS F_MARK F_MARK2 +%token F_CALL_LFUN F_CALL_LFUN_AND_POP %token F_BRANCH F_BRANCH_WHEN_ZERO F_BRANCH_WHEN_NON_ZERO +%token F_BRANCH_WHEN_LT F_BRANCH_WHEN_GT +%token F_BRANCH_WHEN_LE F_BRANCH_WHEN_GE +%token F_BRANCH_WHEN_EQ F_BRANCH_WHEN_NE %token F_INC_LOOP F_DEC_LOOP %token F_INC_NEQ_LOOP F_DEC_NEQ_LOOP -%token F_INDEX F_INDIRECT +%token F_INDEX F_INDIRECT F_STRING_INDEX F_LOCAL_INDEX +%token F_POS_INT_INDEX F_NEG_INT_INDEX %token F_LTOSVAL F_LTOSVAL2 %token F_PUSH_ARRAY %token F_RANGE F_COPY_VALUE @@ -28,15 +33,17 @@ */ %token F_LFUN F_GLOBAL F_LOCAL %token F_GLOBAL_LVALUE F_LOCAL_LVALUE +%token F_CLEAR_LOCAL %token F_CONSTANT F_FLOAT F_STRING -%token F_NUMBER F_NEG_NUMBER F_CONST_1 F_CONST0 F_CONST1 - +%token F_NUMBER F_NEG_NUMBER F_CONST_1 F_CONST0 F_CONST1 F_BIGNUM /* - * These are the predefined functions that can be accessed from LPC. + * These are the predefined functions that can be accessed from Pike. */ %token F_INC F_DEC F_POST_INC F_POST_DEC F_INC_AND_POP F_DEC_AND_POP -%token F_RETURN F_DUMB_RETURN F_RETURN_0 +%token F_INC_LOCAL F_INC_LOCAL_AND_POP F_POST_INC_LOCAL +%token F_DEC_LOCAL F_DEC_LOCAL_AND_POP F_POST_DEC_LOCAL +%token F_RETURN F_DUMB_RETURN F_RETURN_0 F_THROW_ZERO %token F_ASSIGN F_ASSIGN_AND_POP %token F_ASSIGN_LOCAL F_ASSIGN_LOCAL_AND_POP @@ -54,6 +61,8 @@ %token F_CAST %token F_FOREACH +%token F_SIZEOF F_SIZEOF_LOCAL + /* * These are token values that needn't have an associated code for the * compiled file @@ -77,7 +86,7 @@ %token F_DO %token F_DOT_DOT %token F_DOT_DOT_DOT -%token F_EFUN +%token F_PREDEF %token F_EFUN_CALL %token F_ELSE %token F_FLOAT_ID @@ -90,9 +99,9 @@ %token F_INLINE %token F_INT_ID %token F_LAMBDA -%token F_LIST_ID -%token F_LIST_END -%token F_LIST_START +%token F_MULTISET_ID +%token F_MULTISET_END +%token F_MULTISET_START %token F_LOCAL %token F_LSH_EQ %token F_LVALUE_LIST @@ -113,12 +122,17 @@ %token F_STRING_ID %token F_SUBSCRIPT %token F_SUB_EQ +%token F_TYPEOF %token F_VAL_LVAL %token F_VARARGS %token F_VOID_ID %token F_WHILE %token F_XOR_EQ +%token F_ALIGN +%token F_POINTER +%token F_LABEL + %token F_MAX_INSTR %right '=' @@ -138,14 +152,13 @@ %{ -/* This is the grammar definition of LPC. */ +/* This is the grammar definition of Pike. */ #include "global.h" #ifdef HAVE_MEMORY_H #include <memory.h> #endif -#include <setjmp.h> #include "interpret.h" #include "array.h" #include "object.h" @@ -154,8 +167,8 @@ #include "interpret.h" #include "lex.h" #include "program.h" -#include "lpc_types.h" -#include "add_efun.h" +#include "pike_types.h" +#include "constants.h" #include "macros.h" #include "error.h" #include "docode.h" @@ -165,7 +178,7 @@ static void push_locals(); static void pop_locals(); void free_all_local_names(); -void add_local_name(struct lpc_string *,struct lpc_string *); +void add_local_name(struct pike_string *,struct pike_string *); /* * The names and types of arguments and auto variables. @@ -192,7 +205,7 @@ void fix_comp_stack(int sp) int number; FLOAT_TYPE fnum; unsigned int address; /* Address of an instruction */ - struct lpc_string *string; + struct pike_string *string; char *str; unsigned short type; struct node_s *n; @@ -208,22 +221,22 @@ void fix_comp_stack(int sp) %type <string> optional_rename_inherit %type <number> F_ARRAY_ID F_BREAK F_CASE F_CATCH F_CONTINUE F_DEFAULT F_DO -%type <number> F_EFUN F_ELSE F_FLOAT_ID F_FOR F_FOREACH F_FUNCTION_ID F_GAUGE -%type <number> F_IF F_INHERIT F_INLINE F_INT_ID F_LAMBDA F_LIST_ID F_MAPPING_ID +%type <number> F_PREDEF F_ELSE F_FLOAT_ID F_FOR F_FOREACH F_FUNCTION_ID F_GAUGE +%type <number> F_IF F_INHERIT F_INLINE F_INT_ID F_LAMBDA F_MULTISET_ID F_MAPPING_ID %type <number> F_MIXED_ID F_NO_MASK F_OBJECT_ID F_PRIVATE F_PROGRAM_ID %type <number> F_PROTECTED F_PUBLIC F_RETURN F_SSCANF F_STATIC %type <number> F_STRING_ID F_SWITCH F_VARARGS F_VOID_ID F_WHILE /* The following symbos return type information */ -%type <n> string expr01 expr00 comma_expr +%type <n> string expr01 expr00 comma_expr comma_expr_or_zero %type <n> expr2 expr1 expr3 expr0 expr4 catch lvalue_list %type <n> lambda for_expr block assoc_pair new_local_name %type <n> expr_list2 m_expr_list m_expr_list2 statement gauge sscanf %type <n> for do cond optional_else_part while statements -%type <n> local_name_list class catch_arg +%type <n> local_name_list class catch_arg comma_expr_or_maxint %type <n> unused2 foreach unused switch case return expr_list default -%type <n> continue break block_or_semi +%type <n> continue break block_or_semi typeof %% all: program; @@ -243,7 +256,7 @@ string_constant: low_string } ; -optional_rename_inherit: ':' F_IDENTIFIER { $$=$2 } +optional_rename_inherit: ':' F_IDENTIFIER { $$=$2; } | { $$=0; } ; @@ -309,7 +322,7 @@ def: modifiers type_or_error optional_stars F_IDENTIFIER '(' arguments ')' define_function($4, $<string>$, $1, - IDENTIFIER_LPC_FUNCTION, + IDENTIFIER_PIKE_FUNCTION, 0); } block_or_semi @@ -344,7 +357,7 @@ def: modifiers type_or_error optional_stars F_IDENTIFIER '(' arguments ')' define_function($4, $<string>8, $1, - IDENTIFIER_LPC_FUNCTION | vargs, + IDENTIFIER_PIKE_FUNCTION | vargs, &tmp); } if(local_variables->current_return_type) @@ -404,7 +417,7 @@ modifier: F_NO_MASK { $$ = ID_NOMASK; } | F_PUBLIC { $$ = ID_PUBLIC; } | F_VARARGS { $$ = ID_VARARGS; } | F_PROTECTED { $$ = ID_PROTECTED; } - | F_INLINE { $$ = ID_INLINE; } + | F_INLINE { $$ = ID_INLINE | ID_NOMASK; } ; modifiers: modifier_list { $$=current_modifiers=$1; } @@ -441,7 +454,7 @@ type3: F_INT_ID { push_type(T_INT); } | F_MIXED_ID { push_type(T_MIXED); } | F_MAPPING_ID opt_mapping_type { push_type(T_MAPPING); } | F_ARRAY_ID opt_array_type { push_type(T_ARRAY); } - | F_LIST_ID opt_array_type { push_type(T_LIST); } + | F_MULTISET_ID opt_array_type { push_type(T_MULTISET); } | F_FUNCTION_ID opt_function_type { push_type(T_FUNCTION); } ; @@ -522,7 +535,7 @@ name_list: new_name new_name: optional_stars F_IDENTIFIER { - struct lpc_string *type; + struct pike_string *type; push_finished_type(local_variables->current_type); while($1--) push_type(T_ARRAY); type=pop_type(); @@ -532,7 +545,7 @@ new_name: optional_stars F_IDENTIFIER } | optional_stars F_IDENTIFIER '=' { - struct lpc_string *type; + struct pike_string *type; push_finished_type(local_variables->current_type); while($1--) push_type(T_ARRAY); type=pop_type(); @@ -615,8 +628,8 @@ statement: unused2 ';' { $$=$1; } | return ';' | block {} | foreach - | break - | continue + | break ';' + | continue ';' | error ';' { $$=0; } | ';' { $$=0; } ; @@ -637,11 +650,11 @@ lambda: F_LAMBDA } '(' arguments ')' block { - struct lpc_string *type; + struct pike_string *type; char buf[40]; int f,e,args,vargs; union idptr func; - struct lpc_string *name; + struct pike_string *name; setup_fake_program(); fix_comp_stack($<number>2); @@ -685,7 +698,7 @@ lambda: F_LAMBDA f=define_function(name, type, 0, - IDENTIFIER_LPC_FUNCTION | vargs, + IDENTIFIER_PIKE_FUNCTION | vargs, &func); free_string(name); free_string(type); @@ -879,22 +892,22 @@ assoc_pair: expr0 ':' expr1 expr1: expr2 | expr1 F_LOR expr1 { $$=mknode(F_LOR,$1,$3); } | expr1 F_LAND expr1 { $$=mknode(F_LAND,$1,$3); } - | expr1 '|' expr1 { $$=mknode(F_OR,$1,$3); } - | expr1 '^' expr1 { $$=mknode(F_XOR,$1,$3); } - | expr1 '&' expr1 { $$=mknode(F_AND,$1,$3); } - | expr1 F_EQ expr1 { $$=mknode(F_EQ,$1,$3); } - | expr1 F_NE expr1 { $$=mknode(F_NE,$1,$3); } - | expr1 '>' expr1 { $$=mknode(F_GT,$1,$3); } - | expr1 F_GE expr1 { $$=mknode(F_GE,$1,$3); } - | expr1 '<' expr1 { $$=mknode(F_LT,$1,$3); } - | expr1 F_LE expr1 { $$=mknode(F_LE,$1,$3); } - | expr1 F_LSH expr1 { $$=mknode(F_LSH,$1,$3); } - | expr1 F_RSH expr1 { $$=mknode(F_RSH,$1,$3); } - | expr1 '+' expr1 { $$=mknode(F_ADD,$1,$3); } - | expr1 '-' expr1 { $$=mknode(F_SUBTRACT,$1,$3); } - | expr1 '*' expr1 { $$=mknode(F_MULTIPLY,$1,$3); } - | expr1 '%' expr1 { $$=mknode(F_MOD,$1,$3); } - | expr1 '/' expr1 { $$=mknode(F_DIVIDE,$1,$3); } + | expr1 '|' expr1 { $$=mkopernode("`|",$1,$3); } + | expr1 '^' expr1 { $$=mkopernode("`^",$1,$3); } + | expr1 '&' expr1 { $$=mkopernode("`&",$1,$3); } + | expr1 F_EQ expr1 { $$=mkopernode("`==",$1,$3); } + | expr1 F_NE expr1 { $$=mkopernode("`!=",$1,$3); } + | expr1 '>' expr1 { $$=mkopernode("`>",$1,$3); } + | expr1 F_GE expr1 { $$=mkopernode("`>=",$1,$3); } + | expr1 '<' expr1 { $$=mkopernode("`<",$1,$3); } + | expr1 F_LE expr1 { $$=mkopernode("`<=",$1,$3); } + | expr1 F_LSH expr1 { $$=mkopernode("`<<",$1,$3); } + | expr1 F_RSH expr1 { $$=mkopernode("`>>",$1,$3); } + | expr1 '+' expr1 { $$=mkopernode("`+",$1,$3); } + | expr1 '-' expr1 { $$=mkopernode("`-",$1,$3); } + | expr1 '*' expr1 { $$=mkopernode("`*",$1,$3); } + | expr1 '%' expr1 { $$=mkopernode("`%",$1,$3); } + | expr1 '/' expr1 { $$=mkopernode("`/",$1,$3); } ; expr2: expr3 @@ -905,9 +918,9 @@ expr2: expr3 } | F_INC expr4 { $$=mknode(F_INC,$2,0); } | F_DEC expr4 { $$=mknode(F_DEC,$2,0); } - | F_NOT expr2 { $$=mknode(F_NOT,$2,0); } - | '~' expr2 { $$=mknode(F_COMPL,$2,0); } - | '-' expr2 { $$=mknode(F_NEGATE,$2,0); } + | F_NOT expr2 { $$=mkopernode("`!",$2,0); } + | '~' expr2 { $$=mkopernode("`~",$2,0); } + | '-' expr2 { $$=mkopernode("`-",$2,0); } ; expr3: expr4 @@ -920,6 +933,7 @@ expr4: string | F_FLOAT { $$=mkfloatnode($1); } | catch | gauge + | typeof | sscanf | lambda | class @@ -940,7 +954,7 @@ expr4: string } free_string($1); } - | F_EFUN F_COLON_COLON F_IDENTIFIER + | F_PREDEF F_COLON_COLON F_IDENTIFIER { struct efun *f; f=lookup_efun($3); @@ -955,7 +969,7 @@ expr4: string } | expr4 '(' expr_list ')' { $$=mkapplynode($1,$3); } | expr4 '[' expr0 ']' { $$=mknode(F_INDEX,$1,$3); } - | expr4 '[' comma_expr F_DOT_DOT comma_expr ']' + | expr4 '[' comma_expr_or_zero F_DOT_DOT comma_expr_or_maxint ']' { $$=mknode(F_RANGE,$1,mknode(F_ARG_LIST,$3,$5)); } @@ -964,8 +978,8 @@ expr4: string { $$=mkefuncallnode("aggregate",$3); } | '(' '[' m_expr_list ']' ')' { $$=mkefuncallnode("aggregate_mapping",$3); }; - | F_LIST_START expr_list F_LIST_END - { $$=mkefuncallnode("aggregate_list",$2); } + | F_MULTISET_START expr_list F_MULTISET_END + { $$=mkefuncallnode("aggregate_multiset",$2); } | expr4 F_ARROW F_IDENTIFIER { $$=mknode(F_INDEX,$1,mkstrnode($3)); @@ -1017,20 +1031,35 @@ expr4: string free_string($2); } ; - -gauge: F_GAUGE '(' unused ')' + +comma_expr_or_zero: /* empty */ { $$=mkintnode(0); } + | comma_expr + ; + +comma_expr_or_maxint: /* empty */ { $$=mkintnode(0x7fffffff); } + | comma_expr + ; + +gauge: F_GAUGE catch_arg { - $$=mknode(F_NEGATE, - mknode(F_SUBTRACT, - mknode(F_INDEX,mkefuncallnode("rusage",0), - mkintnode(GAUGE_RUSAGE_INDEX)), - mknode(F_ARG_LIST,$3, - mknode(F_INDEX,mkefuncallnode("rusage",0), - mkintnode(GAUGE_RUSAGE_INDEX)))),0); + $$=mkopernode("`-", + mkopernode("`-", + mknode(F_INDEX,mkefuncallnode("rusage",0), + mkintnode(GAUGE_RUSAGE_INDEX)), + mknode(F_ARG_LIST,$2, + mknode(F_INDEX,mkefuncallnode("rusage",0), + mkintnode(GAUGE_RUSAGE_INDEX)))),0); } ; +typeof: F_TYPEOF '(' expr0 ')' + { + node *tmp; + tmp=mknode(F_ARG_LIST,$3,0); + $$=mkstrnode(describe_type($3->type)); + free_node(tmp); + } ; -catch_arg: '(' unused ')' { $$=$2; } +catch_arg: '(' comma_expr ')' { $$=$2; } | block ; @@ -1099,8 +1128,8 @@ void yyerror(char *str) } /* argument must be a shared string (no need to free it) */ -void add_local_name(struct lpc_string *str, - struct lpc_string *type) +void add_local_name(struct pike_string *str, + struct pike_string *type) { if (local_variables->current_number_of_locals == MAX_LOCAL) { @@ -1119,7 +1148,7 @@ void add_local_name(struct lpc_string *str, } /* argument must be a shared string */ -int islocal(struct lpc_string *str) +int islocal(struct pike_string *str) { int e; for(e=local_variables->current_number_of_locals-1;e>=0;e--) diff --git a/src/las.c b/src/las.c index 333ce0f661105f528e404f4b87ad2d5b9dddc071..03125a85f0a4659a84c6e852ba1901b184fe9632 100644 --- a/src/las.c +++ b/src/las.c @@ -1,9 +1,8 @@ /*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ -#include <setjmp.h> #include "global.h" #include "language.h" #include "interpret.h" @@ -13,14 +12,15 @@ #include "stralloc.h" #include "dynamic_buffer.h" #include "lex.h" -#include "lpc_types.h" -#include "add_efun.h" +#include "pike_types.h" +#include "constants.h" #include "mapping.h" -#include "list.h" +#include "multiset.h" #include "error.h" #include "docode.h" #include "main.h" #include "memory.h" +#include "operators.h" #define LASDEBUG @@ -67,12 +67,17 @@ int cdr_is_node(node *n) INT32 count_args(node *n) { + int a,b; if(!n) return 0; switch(n->token) { case F_VAL_LVAL: case F_ARG_LIST: - return count_args(CAR(n)) + count_args(CDR(n)); + a=count_args(CAR(n)); + if(a==-1) return -1; + b=count_args(CDR(n)); + if(b==-1) return -1; + return a+b; case F_CAST: if(n->type == void_type_string) @@ -96,12 +101,16 @@ INT32 count_args(node *n) case '?': { int tmp1,tmp2; - tmp1=count_args(CDAR(n)); - tmp2=count_args(CDAR(n)); + tmp1=count_args(CADR(n)); + tmp2=count_args(CDDR(n)); + if(tmp1==-1 || tmp2==-2) return -1; if(tmp1 < tmp2) return tmp1; return tmp2; } + case F_PUSH_ARRAY: + return -1; + default: if(n->type == void_type_string) return 0; return 1; @@ -155,7 +164,14 @@ node *mknode(short token,node *a,node *b) break; case F_APPLY: - res->node_info |= OPT_SIDE_EFFECT | OPT_EXTERNAL_DEPEND; /* for now */ + if(a && a->token == F_CONSTANT && + a->u.sval.type == T_FUNCTION && + a->u.sval.subtype == -1) + { + res->node_info |= a->u.sval.u.efun->flags; + }else{ + res->node_info |= OPT_SIDE_EFFECT | OPT_EXTERNAL_DEPEND; /* for now */ + } break; case F_RETURN: @@ -200,7 +216,7 @@ node *mknode(short token,node *a,node *b) return res; } -node *mkstrnode(struct lpc_string *str) +node *mkstrnode(struct pike_string *str) { node *res = mkemptynode(); res->token = F_CONSTANT; @@ -250,7 +266,7 @@ node *mkapplynode(node *func,node *args) node *mkefuncallnode(char *function, node *args) { struct efun *fun; - struct lpc_string *name; + struct pike_string *name; name = findstring(function); if(!name) { @@ -267,6 +283,14 @@ node *mkefuncallnode(char *function, node *args) return mkapplynode(mksvaluenode(&fun->function), args); } +node *mkopernode(char *oper_id, node *arg1, node *arg2) +{ + if(arg1 && arg2) + arg1=mknode(F_ARG_LIST,arg1,arg2); + + return mkefuncallnode(oper_id, arg1); +} + node *mklocalnode(int var) { node *res = mkemptynode(); @@ -297,7 +321,7 @@ node *mkidentifiernode(int i) return res; } -node *mkcastnode(struct lpc_string *type,node *n) +node *mkcastnode(struct pike_string *type,node *n) { node *res; if(!n) return 0; @@ -327,6 +351,7 @@ int node_is_eq(node *a,node *b) switch(a->token) { case F_LOCAL: + case F_IDENTIFIER: return a->u.number == b->u.number; case F_CAST: @@ -371,8 +396,8 @@ node *mksvaluenode(struct svalue *s) case T_ARRAY: return make_node_from_array(s->u.array); - case T_LIST: - return make_node_from_list(s->u.list); + case T_MULTISET: + return make_node_from_multiset(s->u.multiset); case T_MAPPING: return make_node_from_mapping(s->u.mapping); @@ -414,7 +439,7 @@ node *copy_node(node *n) switch(n->token) { case F_LOCAL: - case F_EFUN: + case F_IDENTIFIER: b=mkintnode(0); *b=*n; copy_shared_string(b->type, n->type); @@ -504,7 +529,7 @@ int node_is_false(node *n) } } -static node **last_cmd(node **a) +node **last_cmd(node **a) { node **n; if(!a || !*a) return (node **)NULL; @@ -548,7 +573,7 @@ static node **low_get_arg(node **a,int *nr) return 0; } -/* static node **my_get_arg(node **a,int n) { return low_get_arg(a,&n); } */ +node **my_get_arg(node **a,int n) { return low_get_arg(a,&n); } /* static node **first_arg(node **a) { return my_get_arg(a,0); } */ static void low_print_tree(node *foo,int needlval) @@ -914,7 +939,7 @@ static void low_build_function_type(node *n) void fix_type_field(node *n) { - struct lpc_string *type_a,*type_b; + struct pike_string *type_a,*type_b; if(n->type) return; /* assume it is correct */ @@ -936,6 +961,13 @@ void fix_type_field(node *n) } break; + case F_ASSIGN: + if(CAR(n) && CDR(n) && + !match_types(CDR(n)->type,CAR(n)->type)) + my_yyerror("Bad type in assignment.\n"); + copy_shared_string(n->type, CDR(n)->type); + break; + case F_INDEX: type_a=CAR(n)->type; type_b=CDR(n)->type; @@ -946,7 +978,7 @@ void fix_type_field(node *n) case F_APPLY: { - struct lpc_string *s; + struct pike_string *s; push_type(T_MIXED); /* match any return type, even void */ push_type(T_VOID); /* not varargs */ push_type(T_MANY); @@ -1032,22 +1064,6 @@ void fix_type_field(node *n) n->type = get_type_of_svalue(& n->u.sval); break; - /* Not yet checked, but we know what they should return */ - case F_NOT: - case F_LT: - case F_LE: - case F_EQ: - case F_NE: - case F_GT: - case F_GE: - case F_MOD: - case F_XOR: - case F_LSH: - case F_RSH: - case F_COMPL: - copy_shared_string(n->type,int_type_string); - break; - case F_ARG_LIST: if(!CAR(n) || CAR(n)->type==void_type_string) { @@ -1148,6 +1164,17 @@ static void optimize(node *n) switch(n->token) { + case F_APPLY: + if(CAR(n)->token == F_CONSTANT && + CAR(n)->u.sval.type == T_FUNCTION && + CAR(n)->u.sval.subtype == -1 && /* driver fun? */ + CAR(n)->u.sval.u.efun->optimize) + { + if(tmp1=CAR(n)->u.sval.u.efun->optimize(n)) + goto use_tmp1; + } + break; + case F_ARG_LIST: case F_LVALUE_LIST: if(!CAR(n)) goto use_cdr; @@ -1269,7 +1296,8 @@ static void optimize(node *n) } /* - * if X and Y are free from 'continue' || X is null + * if X and Y are free from 'continue' or X is null, + * then the following optimizations can be done: * for(;++e; X) Y; -> ++ne_loop(e, -1) { Y ; X } * for(;e++; X) Y; -> ++ne_loop(e, 0) { Y; X } * for(;--e; X) Y; -> --ne_loop(e, 1) { Y; X } @@ -1283,6 +1311,7 @@ static void optimize(node *n) (!CDDR(n) || !(CDDR(n)->tree_info & OPT_CONTINUE)) && (!CADR(n) || !(CADR(n)->tree_info & OPT_CONTINUE)) ) { + /* Check which of the above cases.. */ switch(CAR(n)->token) { case F_POST_DEC: token=F_DEC_NEQ_LOOP; inc=-1; break; @@ -1291,7 +1320,8 @@ static void optimize(node *n) case F_INC: token=F_INC_NEQ_LOOP; inc=0; break; default: fatal("Impossible error\n"); return; } - + + /* Build new tree */ tmp1=mknode(token, mknode(F_VAL_LVAL, mkintnode(inc), @@ -1303,76 +1333,118 @@ static void optimize(node *n) goto use_tmp1; } + /* Last is a pointer to the place where the incrementor is in the + * tree. This is needed so we can nullify this pointer later and + * free the rest of the tree + */ last=&(CDDR(n)); - tmp1=last?*last:(node *)NULL; + tmp1=*last; + + /* We're not interested in casts to void */ + while(tmp1 && + tmp1->token == F_CAST && + tmp1->type == void_type_string) + { + last=&CAR(tmp1); + tmp1=*last; + } + + /* If there is an incrementor, and it is one of x++, ++x, x-- or ++x */ if(tmp1 && (tmp1->token==F_INC || tmp1->token==F_POST_INC || tmp1->token==F_DEC || tmp1->token==F_POST_DEC)) { + node *opnode, **arg1, **arg2; + int oper; + /* does it increment or decrement ? */ if(tmp1->token==F_INC || tmp1->token==F_POST_INC) inc=1; else inc=0; - /* for(; x op y; z ++) p; */ + /* for(; arg1 oper arg2; z ++) p; */ - if(CAR(n)->token!=F_GT && - CAR(n)->token!=F_GE && - CAR(n)->token!=F_LE && - CAR(n)->token!=F_LT && - CAR(n)->token!=F_NE) + opnode=CAR(n); + + if(opnode->token == F_APPLY && + CAR(opnode) && + CAR(opnode)->token == F_CONSTANT && + CAR(opnode)->u.sval.type == T_FUNCTION && + CAR(opnode)->u.sval.subtype == -1) + { + if(CAR(opnode)->u.sval.u.efun->function == f_gt) + oper=F_GT; + else if(CAR(opnode)->u.sval.u.efun->function == f_ge) + oper=F_GE; + else if(CAR(opnode)->u.sval.u.efun->function == f_lt) + oper=F_LT; + else if(CAR(opnode)->u.sval.u.efun->function == f_le) + oper=F_LE; + else if(CAR(opnode)->u.sval.u.efun->function == f_ne) + oper=F_NE; + else + break; + }else{ break; + } - if(!node_is_eq(CAAR(n),CAR(tmp1)) || /* x == z */ - depend_p(CDAR(n),CDAR(n)) || /* does y depend on y? */ - depend_p(CDAR(n),CAAR(n)) || /* does y depend on x? */ - depend_p(CDAR(n),CADR(n))) /* does y depend on p? */ + if(count_args(CDR(opnode)) != 2) break; + arg1=my_get_arg(&CDR(opnode), 0); + arg2=my_get_arg(&CDR(opnode), 1); + + /* it was not on the form for(; x op y; z++) p; */ + if(!node_is_eq(*arg1,CAR(tmp1)) || /* x == z */ + depend_p(*arg2,*arg2) || /* does y depend on y? */ + depend_p(*arg2,*arg1) || /* does y depend on x? */ + depend_p(*arg2,CADR(n))) /* does y depend on p? */ { /* it was not on the form for(; x op y; x++) p; */ - if(!node_is_eq(CADR(n),CAR(tmp1)) || /* y == z */ - depend_p(CAAR(n),CDAR(n)) || /* does x depend on y? */ - depend_p(CAAR(n),CAAR(n)) || /* does x depend on x? */ - depend_p(CAAR(n),CADR(n)) /* does x depend on p? */ + if(!node_is_eq(*arg2,CAR(tmp1)) || /* y == z */ + depend_p(*arg1,*arg2) || /* does x depend on y? */ + depend_p(*arg1,*arg1) || /* does x depend on x? */ + depend_p(*arg1,CADR(n)) /* does x depend on p? */ ) { /* it was not on the form for(; x op y; y++) p; */ break; }else{ + node **tmparg; /* for(; x op y; y++) p; -> for(; y op^-1 x; y++) p; */ - switch(CAR(n)->token) + switch(oper) { - case F_LT: CAR(n)->token=F_GT; break; - case F_LE: CAR(n)->token=F_GE; break; - case F_GT: CAR(n)->token=F_LT; break; - case F_GE: CAR(n)->token=F_LE; break; + case F_LT: oper=F_GT; break; + case F_LE: oper=F_GE; break; + case F_GT: oper=F_LT; break; + case F_GE: oper=F_LE; break; } - tmp2=CAAR(n); - CAAR(n)=CDAR(n); - CDAR(n)=tmp2; + + tmparg=arg1; + arg1=arg2; + arg2=tmparg; } } if(inc) { - if(CAR(n)->token==F_LE) - tmp3=mknode(F_ADD,CDAR(n),mkintnode(1)); - else if(CAR(n)->token==F_LT) - tmp3=CDAR(n); + if(oper==F_LE) + tmp3=mkopernode("`+",*arg2,mkintnode(1)); + else if(oper==F_LT) + tmp3=*arg2; else break; }else{ - if(CAR(n)->token==F_GE) - tmp3=mknode(F_SUBTRACT,CDAR(n),mkintnode(1)); - else if(CAR(n)->token==F_GT) - tmp3=CDAR(n); + if(oper==F_GE) + tmp3=mkopernode("`-",*arg2,mkintnode(1)); + else if(oper==F_GT) + tmp3=*arg2; else break; } *last=0; - if(CAR(n)->token==F_NE) + if(oper==F_NE) { if(inc) token=F_INC_NEQ_LOOP; @@ -1384,8 +1456,8 @@ static void optimize(node *n) else token=F_DEC_LOOP; } - tmp2=mknode(token,mknode(F_VAL_LVAL,tmp3,CAAR(n)),CADR(n)); - CAAR(n) = CADR(n) = CDAR(n) = CDDR(n)=0; + tmp2=mknode(token,mknode(F_VAL_LVAL,tmp3,*arg1),CADR(n)); + *arg1 = *arg2 = CADR(n) =0; if(inc) { @@ -1393,6 +1465,7 @@ static void optimize(node *n) }else{ tmp1->token=F_INC; } + tmp1=mknode(F_ARG_LIST,mkcastnode(void_type_string,tmp1),tmp2); goto use_tmp1; } @@ -1483,7 +1556,7 @@ int eval_low(node *n) { fake_program.num_strings--; free_string(fake_program.strings[fake_program.num_strings]); - areas[A_STRINGS].s.len-=sizeof(struct lpc_string *); + areas[A_STRINGS].s.len-=sizeof(struct pike_string *); } while(fake_program.num_constants > num_constants) @@ -1537,11 +1610,11 @@ static node *eval(node *n) INT32 last_function_opt_info; -void dooptcode(struct lpc_string *name,node *n, int args) +void dooptcode(struct pike_string *name,node *n, int args) { #ifdef DEBUG if(a_flag > 1) - fprintf(stderr,"Doing function: %s\n",name->str); + fprintf(stderr,"Doing function '%s' at %x\n",name->str,PC); #endif last_function_opt_info=OPT_SIDE_EFFECT; n=mknode(F_ARG_LIST,n,0); diff --git a/src/las.h b/src/las.h index 2b73993e158ab69f76b0cae22ba855e86c95633c..62caadd02b651ab5f3b607a2335d6493dba09305 100644 --- a/src/las.h +++ b/src/las.h @@ -1,6 +1,6 @@ /*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ #ifndef LAS_H @@ -16,23 +16,23 @@ struct local_variable { - struct lpc_string *name; - struct lpc_string *type; + struct pike_string *name; + struct pike_string *type; }; struct locals { struct locals *next; - struct lpc_string *current_type; - struct lpc_string *current_return_type; + struct pike_string *current_type; + struct pike_string *current_return_type; int current_number_of_locals; int max_number_of_locals; struct local_variable variable[MAX_LOCAL]; }; void yyerror(char *s); -int islocal(struct lpc_string *str); -int verify_declared(struct lpc_string *str); +int islocal(struct pike_string *str); +int verify_declared(struct pike_string *str); struct node_s { @@ -40,7 +40,7 @@ struct node_s INT16 line_number; INT16 node_info; INT16 tree_info; - struct lpc_string *type; + struct pike_string *type; struct node_s *parent; union { @@ -80,14 +80,15 @@ int cdr_is_node(node *n); INT32 count_args(node *n); void free_node(node *n); node *mknode(short token,node *a,node *b); -node *mkstrnode(struct lpc_string *str); +node *mkstrnode(struct pike_string *str); node *mkintnode(int nr); node *mkfloatnode(FLOAT_TYPE foo); node *mkapplynode(node *func,node *args); node *mkefuncallnode(char *function, node *args); +node *mkopernode(char *oper_id, node *arg1, node *arg2); node *mklocalnode(int var); node *mkidentifiernode(int i); -node *mkcastnode(struct lpc_string *type,node *n); +node *mkcastnode(struct pike_string *type,node *n); int node_is_eq(node *a,node *b); node *mkconstantsvaluenode(struct svalue *s); node *mkliteralsvaluenode(struct svalue *s); @@ -97,11 +98,13 @@ int is_const(node *n); int node_is_tossable(node *n); int node_is_true(node *n); int node_is_false(node *n); +node **last_cmd(node **a); +node **my_get_arg(node **a,int n); void print_tree(node *n); struct used_vars; void fix_type_field(node *n); int eval_low(node *n); -void dooptcode(struct lpc_string *name,node *n, int args); +void dooptcode(struct pike_string *name,node *n, int args); INT32 get_opt_info(); /* Prototypes end here */ diff --git a/src/lex.c b/src/lex.c index 16f024b5782e8a82218bed1e2f792c8fe9cbfa81..901a03d3513b42c28086129e25b9660c09868a22 100644 --- a/src/lex.c +++ b/src/lex.c @@ -1,6 +1,6 @@ /*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ #include "global.h" @@ -9,7 +9,7 @@ #include "lex.h" #include "stralloc.h" #include "dynamic_buffer.h" -#include "add_efun.h" +#include "constants.h" #include "hashtable.h" #include "stuff.h" #include "memory.h" @@ -19,7 +19,8 @@ #include "las.h" #include "operators.h" #include "opcodes.h" -#include "builtin_efuns.h" +#include "builtin_functions.h" +#include "main.h" #include "macros.h" #include <sys/param.h> @@ -27,14 +28,12 @@ #include <math.h> #include <fcntl.h> #include <errno.h> -#ifdef HAVE_TIME_H -#include <time.h> -#endif +#include "time_stuff.h" #define LEXDEBUG 0 -#define EXPANDMAX 50000 +#define EXPANDMAX 500000 -struct lpc_string *current_file; +struct pike_string *current_file; INT32 current_line; INT32 old_line; @@ -42,20 +41,36 @@ INT32 total_lines; INT32 nexpands; int pragma_all_inline; /* inline all possible inlines */ -struct lpc_predef_s +struct pike_predef_s { char *name; char *value; - struct lpc_predef_s *next; + struct pike_predef_s *next; }; -struct lpc_predef_s *lpc_predefs=0; +struct pike_predef_s *pike_predefs=0; static int calc(); static void calc1(); void exit_lex() { +#ifdef DEBUG + if(p_flag > 2) + { + int e; + fprintf(stderr,"Opcode usage: (opcode, runned, compiled)\n"); + for(e=0;e<F_MAX_OPCODE-F_OFFSET;e++) + { + fprintf(stderr,":: %-20s %8ld %8ld\n", + low_get_f_name(e+F_OFFSET,0), + (long)instrs[e].runs, + (long)instrs[e].compiles); + } + } +#endif + + while(local_variables) { int e; @@ -88,7 +103,7 @@ struct keyword reserved_words[] = { "continue", F_CONTINUE, }, { "default", F_DEFAULT, }, { "do", F_DO, }, -{ "efun", F_EFUN, }, +{ "predef", F_PREDEF, }, { "else", F_ELSE, }, { "float", F_FLOAT_ID, }, { "for", F_FOR, }, @@ -100,7 +115,7 @@ struct keyword reserved_words[] = { "inline", F_INLINE, }, { "int", F_INT_ID, }, { "lambda", F_LAMBDA, }, -{ "list", F_LIST_ID, }, +{ "multiset", F_MULTISET_ID, }, { "mapping", F_MAPPING_ID, }, { "mixed", F_MIXED_ID, }, { "nomask", F_NO_MASK, }, @@ -114,6 +129,7 @@ struct keyword reserved_words[] = { "static", F_STATIC, }, { "string", F_STRING_ID, }, { "switch", F_SWITCH, }, +{ "typeof", F_TYPEOF, }, { "varargs", F_VARARGS, }, { "void", F_VOID_ID, }, { "while", F_WHILE, }, @@ -196,18 +212,21 @@ struct keyword instr_names[]= { "indirect", F_INDIRECT }, { "jump", F_BRANCH }, { "local function call",F_CALL_LFUN }, +{ "local function call and pop",F_CALL_LFUN_AND_POP }, { "local function", F_LFUN }, { "local", F_LOCAL }, { "ltosval2", F_LTOSVAL2 }, { "lvalue to svalue", F_LTOSVAL }, { "lvalue_list", F_LVALUE_LIST }, { "mark", F_MARK }, +{ "mark mark", F_MARK2 }, { "negative number", F_NEG_NUMBER }, { "number", F_NUMBER }, { "pop", F_POP_VALUE }, { "pop_n_elems", F_POP_N_ELEMS }, { "push 0", F_CONST0 }, { "push 1", F_CONST1 }, +{ "push 0x7fffffff", F_BIGNUM }, { "range", F_RANGE }, { "return", F_RETURN }, { "return 0", F_RETURN_0 }, @@ -224,6 +243,30 @@ struct keyword instr_names[]= { "|=", F_OR_EQ }, { "||", F_LOR }, { "~", F_COMPL }, +{ "label", F_LABEL }, +{ "data", F_POINTER }, +{ "align", F_ALIGN }, +{ "call", F_APPLY }, +{ "clear local", F_CLEAR_LOCAL }, +{ "++local", F_INC_LOCAL }, +{ "++local and pop", F_INC_LOCAL_AND_POP }, +{ "local++", F_POST_INC_LOCAL }, +{ "--local", F_DEC_LOCAL }, +{ "--local and pop", F_DEC_LOCAL_AND_POP }, +{ "local--", F_POST_DEC_LOCAL }, +{ "branch if <", F_BRANCH_WHEN_LT }, +{ "branch if >", F_BRANCH_WHEN_GT }, +{ "branch if <=", F_BRANCH_WHEN_LE }, +{ "branch if >=", F_BRANCH_WHEN_GE }, +{ "branch if ==", F_BRANCH_WHEN_EQ }, +{ "branch if !=", F_BRANCH_WHEN_NE }, +{ "sizeof", F_SIZEOF }, +{ "sizeof local", F_SIZEOF_LOCAL }, +{ "throw(0)", F_THROW_ZERO }, +{ "string index", F_STRING_INDEX }, +{ "local index", F_LOCAL_INDEX }, +{ "int index", F_POS_INT_INDEX }, +{ "-int index", F_NEG_INT_INDEX }, }; struct instr instrs[F_MAX_INSTR - F_OFFSET]; @@ -327,7 +370,7 @@ char *get_token_name(int n) } /* foo must be a shared string */ -static int lookup_resword(struct lpc_string *s) +static int lookup_resword(struct pike_string *s) { struct hash_entry *h; h=hash_lookup(reswords, s); @@ -666,7 +709,7 @@ struct hash_table *defines = 0; #define find_define(N) (defines?BASEOF(hash_lookup(defines, N), define, link):0) /* argument must be shared string */ -static void undefine(struct lpc_string *name) +static void undefine(struct pike_string *name) { struct define *d; @@ -681,7 +724,7 @@ static void undefine(struct lpc_string *name) } /* name and as are supposed to be SHARED strings */ -static void add_define(struct lpc_string *name, +static void add_define(struct pike_string *name, int args, int parts_on_stack, void (*magic)()) @@ -723,10 +766,10 @@ static void simple_add_define(char *name,char *as,void (*magic)()) { if(magic) { - add_define(make_shared_string(name),0,0,magic); + add_define(make_shared_string(name),-1,0,magic); }else{ push_string(make_shared_string(as)); - add_define(make_shared_string(name),0,1,magic); + add_define(make_shared_string(name),-1,1,magic); } } @@ -749,7 +792,8 @@ static void do_define() { int c,e,t,argc; struct svalue *save_sp=sp; - struct lpc_string *s, *s2; + struct svalue *args_sp; + struct pike_string *s, *s2; SKIPWHITE(); READBUF(isidchar(C)); @@ -780,9 +824,11 @@ static void do_define() if(!GOBBLE(')')) yyerror("Missing ')'"); }else{ - argc=0; + argc=-1; } + args_sp=sp; + init_buf(); t=0; sp->type=T_STRING; @@ -791,29 +837,33 @@ static void do_define() while(1) { + int tmp; + c=GETC(); if(c=='\\') if(GOBBLE('\n')) continue; if( (t!=!!isidchar(c) && argc>0) || c=='\n' || c==MY_EOF) { s2=free_buf(); + tmp=0; for(e=0;e<argc;e++) { if(save_sp[e].u.string==s2) { free_string(s2); push_int(e); + tmp=1; break; } } - if(e==argc) + if(!tmp) { push_string(s2); - if(sp[-2].type==T_STRING) f_add(); + if(sp[-2].type==T_STRING) f_add(2); } if(c=='\n' || c==MY_EOF) { push_string(make_shared_string(" ")); - if(sp[-2].type==T_STRING) f_add(); + if(sp[-2].type==T_STRING) f_add(2); break; } t=!!isidchar(c); @@ -822,12 +872,12 @@ static void do_define() my_putchar(c); } UNGETC(c); - add_define(s,argc,sp-save_sp-argc,0); + add_define(s,argc,sp-args_sp,0); while(sp>save_sp) pop_stack(); } /* s is a shared string */ -static int expand_define(struct lpc_string *s, int save_newline) +static int expand_define(struct pike_string *s, int save_newline) { struct svalue *save_sp=sp; struct define *d; @@ -847,57 +897,62 @@ static int expand_define(struct lpc_string *s, int save_newline) return 1; } - if(!save_newline) - { - SKIPWHITE(); - }else{ - do { e=GETC(); }while(isspace(e) && e!='\n'); - UNGETC(e); - } - - if(GOBBLE('(')) + if(d->args >= 0) { - int parlvl,quote; - int c; - args=0; + if(!save_newline) + { + SKIPWHITE(); + }else{ + do { e=GETC(); }while(isspace(e) && e!='\n'); + UNGETC(e); + } - SKIPWHITE(); - init_buf(); - parlvl=1; - quote=0; - while(parlvl) + if(GOBBLE('(')) { - switch(c=GETC()) + int parlvl,quote; + int c; + args=0; + + SKIPWHITE(); + init_buf(); + parlvl=1; + quote=0; + while(parlvl) { - case MY_EOF: - yyerror("Unexpected end of file."); - while(sp>save_sp) pop_stack(); - return 0; - case '"': if(!(quote&2)) quote^=1; break; - case '\'': if(!(quote&1)) quote^=2; break; - case '(': if(!quote) parlvl++; break; - case ')': if(!quote) parlvl--; break; - case '\\': my_putchar(c); c=GETC(); break; - case ',': - if(!quote && parlvl==1) + switch(c=GETC()) { - push_string(free_buf()); - init_buf(); - args++; - continue; + case MY_EOF: + yyerror("Unexpected end of file."); + while(sp>save_sp) pop_stack(); + return 0; + case '"': if(!(quote&2)) quote^=1; break; + case '\'': if(!(quote&1)) quote^=2; break; + case '(': if(!quote) parlvl++; break; + case ')': if(!quote) parlvl--; break; + case '\\': my_putchar(c); c=GETC(); break; + case ',': + if(!quote && parlvl==1) + { + push_string(free_buf()); + init_buf(); + args++; + continue; + } } + if(parlvl) my_putchar(c); + } + push_string(free_buf()); + if(args==0 && !d->args && !sp[-1].u.string->len) + { + pop_stack(); + }else{ + args++; } - if(parlvl) my_putchar(c); - } - push_string(free_buf()); - if(args==0 && !d->args && !sp[-1].u.string->len) - { - pop_stack(); }else{ - args++; + args=0; } - }else{ - args=0; + } else { + args=-1; } if(args>d->args) @@ -939,22 +994,27 @@ static int expand_define(struct lpc_string *s, int save_newline) /*** Handle include ****/ -static void handle_include(char *name) +static void handle_include(char *name, int local_include) { int fd; char buf[400]; + struct pike_string *s; - push_string(make_shared_string(name)); + s=make_shared_string(name); + push_string(s); + reference_shared_string(s); push_string(current_file); reference_shared_string(current_file); - - SAFE_APPLY_MASTER("handle_include",2); - + push_int(local_include); + + SAFE_APPLY_MASTER("handle_include",3); + if(sp[-1].type != T_STRING) { - my_yyerror("Couldn't include file '%s'.",name); + my_yyerror("Couldn't include file '%s'.",s->str); return; } + free_string(s); retry: fd=open(sp[-1].u.string->str,O_RDONLY); @@ -1214,7 +1274,7 @@ static int do_lex2(int literal, YYSTYPE *yylval) continue; } } - handle_include(buf); + handle_include(buf, c==F_STRING); break; } @@ -1226,7 +1286,7 @@ static int do_lex2(int literal, YYSTYPE *yylval) if(!strcmp("ifdef",buf)) { - struct lpc_string *s; + struct pike_string *s; SKIPWHITE(); READBUF(isidchar(C)); s=findstring(buf); @@ -1236,7 +1296,7 @@ static int do_lex2(int literal, YYSTYPE *yylval) if(!strcmp("ifndef",buf)) { - struct lpc_string *s; + struct pike_string *s; SKIPWHITE(); READBUF(isidchar(C)); s=findstring(buf); @@ -1271,7 +1331,7 @@ static int do_lex2(int literal, YYSTYPE *yylval) case 'u': if(!strcmp("undef",buf)) { - struct lpc_string *s; + struct pike_string *s; SKIPWHITE(); READBUF(isidchar(C)); if((s=findstring(buf))) undefine(s); @@ -1480,7 +1540,7 @@ static int do_lex2(int literal, YYSTYPE *yylval) return '<'; case '>': - if(GOBBLE(')')) return F_LIST_END; + if(GOBBLE(')')) return F_MULTISET_END; if(GOBBLE('=')) return F_GE; if(GOBBLE('>')) { @@ -1494,7 +1554,7 @@ static int do_lex2(int literal, YYSTYPE *yylval) return F_NOT; case '(': - if(GOBBLE('<')) return F_LIST_START; + if(GOBBLE('<')) return F_MULTISET_START; return '('; case '?': @@ -1507,11 +1567,71 @@ static int do_lex2(int literal, YYSTYPE *yylval) case '{': case ';': case '}': return c; + + case '`': + { + char *tmp; + switch(GETC()) + { + case '+': tmp="`+"; break; + case '-': tmp="`-"; break; + case '/': tmp="`/"; break; + case '%': tmp="`%"; break; + case '*': tmp="`*"; break; + case '&': tmp="`&"; break; + case '|': tmp="`|"; break; + case '^': tmp="`^"; break; + case '~': tmp="`~"; break; + case '[': + if(GOBBLE(']')) + { + tmp="`[]"; + if(GOBBLE('=')) tmp="`[]="; + break; + } + + default: + yyerror("Illegal ` identifier."); + tmp=""; + break; + + case '<': + if(GOBBLE('<')) { tmp="`<<"; break; } + if(GOBBLE('=')) { tmp="`<="; break; } + tmp="`<"; + break; + + case '>': + if(GOBBLE('>')) { tmp="`>>"; break; } + if(GOBBLE('=')) { tmp="`>="; break; } + tmp="`>"; + break; + + case '!': + if(GOBBLE('=')) { tmp="`!="; break; } + tmp="`!"; + break; + + case '=': + if(GOBBLE('=')) { tmp="`=="; break; } + tmp="`="; + break; + } + + if(literal) + { + yylval->str=buf; + }else{ + yylval->string=make_shared_string(tmp); + } + return F_IDENTIFIER; + } + default: if(isidchar(c)) { - struct lpc_string *s; + struct pike_string *s; UNGETC(c); READBUF(isidchar(C)); @@ -1570,7 +1690,7 @@ static void low_lex() { while(1) { - struct lpc_string *s; + struct pike_string *s; lookahead=do_lex(1, &my_yylval); if(lookahead == F_IDENTIFIER) @@ -1599,18 +1719,18 @@ static void low_lex() continue; } - if(!strcmp("efun",my_yylval.str)) + if(!strcmp("efun",my_yylval.str) || !strcmp("constant",my_yylval.str)) { SKIPWHITE(); if(!GOBBLE('(')) { - yyerror("Missing '(' in #if efun().\n"); + yyerror("Missing '(' in #if constant().\n"); return; } READBUF(isidchar(C)); if(!GOBBLE(')')) { - yyerror("Missing ')' in #if efun().\n"); + yyerror("Missing ')' in #if constant().\n"); return; } s=findstring(buf); @@ -1679,9 +1799,9 @@ static void calcB() { switch(lookahead) { - case '-': low_lex(); calcB(); f_negate(); break; - case F_NOT: low_lex(); calcB(); f_not(); break; - case '~': low_lex(); calcB(); f_compl(); break; + case '-': low_lex(); calcB(); o_negate(); break; + case F_NOT: low_lex(); calcB(); o_not(); break; + case '~': low_lex(); calcB(); o_compl(); break; default: calcC(); } } @@ -1693,9 +1813,9 @@ static void calcA() { switch(lookahead) { - case '/': low_lex(); calcB(); f_divide(); continue; - case '*': low_lex(); calcB(); f_multiply(); continue; - case '%': low_lex(); calcB(); f_mod(); continue; + case '/': low_lex(); calcB(); o_divide(); continue; + case '*': low_lex(); calcB(); o_multiply(); continue; + case '%': low_lex(); calcB(); o_mod(); continue; } break; } @@ -1709,8 +1829,8 @@ static void calc9() { switch(lookahead) { - case '+': low_lex(); calcA(); f_add(); continue; - case '-': low_lex(); calcA(); f_subtract(); continue; + case '+': low_lex(); calcA(); f_add(2); continue; + case '-': low_lex(); calcA(); o_subtract(); continue; } break; } @@ -1724,8 +1844,8 @@ static void calc8() { switch(lookahead) { - case F_LSH: low_lex(); calc9(); f_lsh(); continue; - case F_RSH: low_lex(); calc9(); f_rsh(); continue; + case F_LSH: low_lex(); calc9(); o_lsh(); continue; + case F_RSH: low_lex(); calc9(); o_rsh(); continue; } break; } @@ -1739,10 +1859,10 @@ static void calc7b() { switch(lookahead) { - case '<': low_lex(); calc8(); f_lt(); continue; - case '>': low_lex(); calc8(); f_gt(); continue; - case F_GE: low_lex(); calc8(); f_ge(); continue; - case F_LE: low_lex(); calc8(); f_le(); continue; + case '<': low_lex(); calc8(); f_lt(2); continue; + case '>': low_lex(); calc8(); f_gt(2); continue; + case F_GE: low_lex(); calc8(); f_ge(2); continue; + case F_LE: low_lex(); calc8(); f_le(2); continue; } break; } @@ -1756,8 +1876,8 @@ static void calc7() { switch(lookahead) { - case F_EQ: low_lex(); calc7b(); f_eq(); continue; - case F_NE: low_lex(); calc7b(); f_ne(); continue; + case F_EQ: low_lex(); calc7b(); f_eq(2); continue; + case F_NE: low_lex(); calc7b(); f_ne(2); continue; } break; } @@ -1771,7 +1891,7 @@ static void calc6() { low_lex(); calc7(); - f_and(); + o_and(); } } @@ -1783,7 +1903,7 @@ static void calc5() { low_lex(); calc6(); - f_xor(); + o_xor(); } } @@ -1795,7 +1915,7 @@ static void calc4() { low_lex(); calc5(); - f_or(); + o_or(); } } @@ -1942,13 +2062,13 @@ void insert_current_date_as_string() static void start_new() { - struct lpc_predef_s *tmpf; + struct pike_predef_s *tmpf; free_all_defines(); - simple_add_define("__uLPC__", "1",0); + simple_add_define("__PIKE__", "1",0); - for (tmpf=lpc_predefs; tmpf; tmpf=tmpf->next) + for (tmpf=pike_predefs; tmpf; tmpf=tmpf->next) simple_add_define(tmpf->name, tmpf->value,0); simple_add_define("__LINE__",0,insert_current_line); @@ -1966,7 +2086,7 @@ static void start_new() current_file=0; } -void start_new_file(int fd,struct lpc_string *filename) +void start_new_file(int fd,struct pike_string *filename) { start_new(); copy_shared_string(current_file,filename); @@ -1975,7 +2095,7 @@ void start_new_file(int fd,struct lpc_string *filename) UNGETSTR("\n",1); } -void start_new_string(char *s,INT32 len,struct lpc_string *name) +void start_new_string(char *s,INT32 len,struct pike_string *name) { start_new(); copy_shared_string(current_file,name); @@ -2001,7 +2121,7 @@ void end_new_file() void add_predefine(char *s) { char buffer1[100],buffer2[10000]; - struct lpc_predef_s *tmp; + struct pike_predef_s *tmp; if(sscanf(s,"%[^=]=%[ -~=]",buffer1,buffer2) ==2) { @@ -2010,11 +2130,11 @@ void add_predefine(char *s) buffer2[0]='1'; buffer2[1]=0; } - tmp=ALLOC_STRUCT(lpc_predef_s); + tmp=ALLOC_STRUCT(pike_predef_s); tmp->name=(char *)xalloc(strlen(s)+1); strcpy(tmp->name,s); tmp->value=(char *)xalloc(strlen(buffer2)+1); strcpy(tmp->value,buffer2); - tmp->next=lpc_predefs; - lpc_predefs=tmp; + tmp->next=pike_predefs; + pike_predefs=tmp; } diff --git a/src/lex.h b/src/lex.h index ee6990038bc544e8c0822e6402dd30e4eaf681dd..41d4ba9f72d73191f8335c00f963cb0be8510bf6 100644 --- a/src/lex.h +++ b/src/lex.h @@ -1,6 +1,6 @@ /*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ #ifndef LEX_H @@ -16,15 +16,28 @@ struct keyword struct instr { +#ifdef DEBUG + long runs; + long compiles; +#endif char *name; }; +#ifdef DEBUG +#define ADD_COMPILED(X) instrs[(X)-F_OFFSET].compiles++ +#define ADD_RUNNED(X) instrs[(X)-F_OFFSET].runs++ +#else +#define ADD_COMPILED(X) +#define ADD_RUNNED(X) +#endif + struct hash_entry; struct inputstate; struct hash_table; +extern struct instr instrs[]; extern struct hash_table *defines; -extern struct lpc_string *current_file; +extern struct pike_string *current_file; extern INT32 current_line; extern INT32 old_line; extern INT32 total_lines; @@ -32,10 +45,10 @@ extern INT32 nexpands; extern int pragma_all_inline; /* inline all possible inlines */ extern struct inputstate *istate; -extern struct lpc_predef_s * lpc_predefs; +extern struct pike_predef_s * pike_predefs; /* Prototypes begin here */ -struct lpc_predef_s; +struct pike_predef_s; void exit_lex(); struct reserved; void init_lex(); @@ -50,8 +63,8 @@ void insert_current_line(); void insert_current_file_as_string(); void insert_current_time_as_string(); void insert_current_date_as_string(); -void start_new_file(int fd,struct lpc_string *filename); -void start_new_string(char *s,INT32 len,struct lpc_string *name); +void start_new_file(int fd,struct pike_string *filename); +void start_new_string(char *s,INT32 len,struct pike_string *name); void end_new_file(); void add_predefine(char *s); /* Prototypes end here */ diff --git a/src/list.c b/src/list.c deleted file mode 100644 index 439b89c0c1ec435ce7d93ea3902ec040c5f74ee6..0000000000000000000000000000000000000000 --- a/src/list.c +++ /dev/null @@ -1,258 +0,0 @@ -/*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) -||| See the files COPYING and DISCLAIMER for more information. -\*/ -#include "global.h" -#include "array.h" -#include "types.h" -#include "list.h" -#include "svalue.h" -#include "macros.h" -#include "memory.h" -#include "error.h" -#include "dynamic_buffer.h" -#include "interpret.h" -#include "builtin_efuns.h" - -struct list *first_list; - -int list_member(struct list *l, struct svalue *ind) -{ - return set_lookup(l->ind, ind) >= 0; -} - -/* - * allocate and init a new list - */ -static struct list *allocate_list(struct array *ind) -{ - struct list *l; - l=ALLOC_STRUCT(list); - l->next = first_list; - l->prev = 0; - l->refs = 1; - l->ind=ind; - if(first_list) first_list->prev = l; - first_list=l; - - return l; -} - -/* - * free a list - */ -void really_free_list(struct list *l) -{ -#ifdef DEBUG - if(l->refs) - fatal("really free list on list with nonzero refs.\n"); -#endif - - free_array(l->ind); - - if(l->prev) l->prev->next = l->next; - if(l->next) l->next->prev = l->prev; - if(first_list == l) first_list = 0; - - free((char *)l); -} - -static void order_list(struct list *l) -{ - INT32 *order; - order = get_set_order(l->ind); - l->ind = order_array(l->ind, order); - free((char *)order); -} - -struct list *mklist(struct array *ind) -{ - struct list *l; - l=allocate_list(copy_array(ind)); - order_list(l); - return l; -} - -void list_insert(struct list *l, - struct svalue *ind) -{ - INT32 i; - i=set_lookup(l->ind, ind); - if(i < 0) - { - l->ind=array_insert(l->ind, ind, ~i); - } -} - -#if 0 -struct array *list_indices(struct list *l) -{ - return l->ind; -} -#endif - -void list_delete(struct list *l,struct svalue *ind) -{ - INT32 i; - i=set_lookup(l->ind, ind); - - if(i >= 0) l->ind=array_remove(l->ind, i); -} - -void check_list_for_destruct(struct list *l) -{ -/* Horrifiying worst case!!!!! */ - INT32 i; - while( (i=array_find_destructed_object(l->ind)) >= 0) - l->ind=array_remove(l->ind, i); -} - -struct list *copy_list(struct list *tmp) -{ - check_list_for_destruct(tmp); - return allocate_list(copy_array(tmp->ind)); -} - -struct list *merge_lists(struct list *a, - struct list *b, - INT32 operator) -{ - struct list *ret; - INT32 *zipper; - - check_list_for_destruct(a); - check_list_for_destruct(b); - - zipper=merge(a->ind,b->ind,operator); - ret=allocate_list(array_zip(a->ind,b->ind,zipper)); - free((char *)zipper); - return ret; -} - -struct list *add_lists(struct svalue *argp,INT32 args) -{ - struct list *ret,*a,*b; - switch(args) - { - case 0: - ret=allocate_list(allocate_array_no_init(0,0,T_MIXED)); - break; - - case 1: - ret=copy_list(argp->u.list); - break; - - case 2: - ret=merge_lists(argp[0].u.list,argp[1].u.list,OP_ADD); - break; - - case 3: - a=merge_lists(argp[0].u.list, argp[1].u.list, OP_ADD); - ret=merge_lists(a, argp[2].u.list, OP_ADD); - free_list(a); - break; - - default: - a=add_lists(argp,args/2); - b=add_lists(argp+args/2,args-args/2); - ret=merge_lists(a,b,OP_ADD); - free_list(a); - free_list(b); - break; - } - - return ret; -} - -int list_equal_p(struct list *a, struct list *b, struct processing *p) -{ - if(a == b) return 1; - check_list_for_destruct(a); - - return array_equal_p(a->ind, b->ind, p); -} - -void describe_list(struct list *l,struct processing *p,int indent) -{ - struct processing doing; - int e; - char buf[40]; - if(!l->ind->size) - { - my_strcat("(< >)"); - return; - } - - doing.next=p; - doing.pointer_a=(void *)l; - for(e=0;p;e++,p=p->next) - { - if(p->pointer_a == (void *)l) - { - sprintf(buf,"@%d",e); - my_strcat(buf); - return; - } - } - - sprintf(buf,"(< /* %ld elements */\n",(long)l->ind->size); - my_strcat(buf); - describe_array_low(l->ind,&doing,indent); - my_putchar('\n'); - for(e=2; e<indent; e++) my_putchar(' '); - my_strcat(">)"); -} - -node * make_node_from_list(struct list *l) -{ - if(check_that_array_is_constant(l->ind)) - { - struct svalue s; - s.type=T_LIST; - s.subtype=0; - s.u.list=l; - return mkconstantsvaluenode(&s); - }else{ - return mkefuncallnode("mklist",make_node_from_array(l->ind)); - } -} - -void f_aggregate_list(INT32 args) -{ - struct list *l; - f_aggregate(args); - l=allocate_list(sp[-1].u.array); - order_list(l); - sp[-1].type=T_LIST; - sp[-1].u.list=l; -} - - -struct list *copy_list_recursively(struct list *l, - struct processing *p) -{ - struct processing doing; - struct list *ret; - - doing.next=p; - doing.pointer_a=(void *)l; - for(;p;p=p->next) - { - if(p->pointer_a == (void *)l) - { - ret=(struct list *)p->pointer_b; - ret->refs++; - return ret; - } - } - - ret=allocate_list(0); - doing.pointer_b=(void *)ret; - - ret->ind=copy_array_recursively(l->ind,&doing); - - order_list(ret); - - return ret; -} diff --git a/src/list.h b/src/list.h deleted file mode 100644 index da66aaee93295d90456dfbf9e9d79755cc97908e..0000000000000000000000000000000000000000 --- a/src/list.h +++ /dev/null @@ -1,42 +0,0 @@ -/*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) -||| See the files COPYING and DISCLAIMER for more information. -\*/ -#ifndef LIST_H -#define LIST_H - -#include "las.h" - -struct list -{ - INT32 refs; - struct list *next,*prev; - struct array *ind; -}; - -#define free_list(L) do{ struct list *l_=(L); if(!--l_->refs) really_free_list(l_); }while(0) - -/* Prototypes begin here */ -int list_member(struct list *l, struct svalue *ind); -void really_free_list(struct list *l); -struct list *mklist(struct array *ind); -void list_insert(struct list *l, - struct svalue *ind); -struct array *list_indices(struct list *l); -void list_delete(struct list *l,struct svalue *ind); -void check_list_for_destruct(struct list *l); -struct list *copy_list(struct list *tmp); -struct list *merge_lists(struct list *a, - struct list *b, - INT32 operator); -struct list *add_lists(struct svalue *argp,INT32 args); -int list_equal_p(struct list *a, struct list *b, struct processing *p); -void describe_list(struct list *l,struct processing *p,int indent); -node * make_node_from_list(struct list *l); -void f_aggregate_list(INT32 args); -struct list *copy_list_recursively(struct list *l, - struct processing *p); -/* Prototypes end here */ - -#endif diff --git a/src/lpc_types.h b/src/lpc_types.h deleted file mode 100644 index 01ef1497344b7dba569e2d9435d7a4eb53a86ed1..0000000000000000000000000000000000000000 --- a/src/lpc_types.h +++ /dev/null @@ -1,50 +0,0 @@ -/*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) -||| See the files COPYING and DISCLAIMER for more information. -\*/ -#ifndef LPC_TYPES_H -#define LPC_TYPES_H - -extern struct lpc_string *string_type_string; -extern struct lpc_string *int_type_string; -extern struct lpc_string *float_type_string; -extern struct lpc_string *object_type_string; -extern struct lpc_string *function_type_string; -extern struct lpc_string *program_type_string; -extern struct lpc_string *array_type_string; -extern struct lpc_string *list_type_string; -extern struct lpc_string *mapping_type_string; -extern struct lpc_string *mixed_type_string; -extern struct lpc_string *void_type_string; -extern struct lpc_string *any_type_string; - -/* Prototypes begin here */ -void init_types(); -struct lpc_string *parse_type(char *s); -void stupid_describe_type(char *a,INT32 len); -char *low_describe_type(char *t); -TYPE_T compile_type_to_runtime_type(struct lpc_string *s); -int match_types(struct lpc_string *a,struct lpc_string *b); -void reset_type_stack(); -void type_stack_mark(); -void pop_stack_mark(); -void pop_type_stack(); -void type_stack_reverse(); -void push_type(unsigned char tmp); -void push_unfinished_type(char *s); -void push_finished_type(struct lpc_string *type); -struct lpc_string *pop_type(); -struct lpc_string *index_type(struct lpc_string *type); -int check_indexing(struct lpc_string *type, - struct lpc_string *index_type); -int count_arguments(struct lpc_string *s); -struct lpc_string *check_call(struct lpc_string *args, - struct lpc_string *type); -void check_array_type(struct array *a); -struct lpc_string *get_type_of_svalue(struct svalue *s); -char *get_name_of_type(int t); -void cleanup_lpc_types(); -/* Prototypes end here */ - -#endif diff --git a/src/machine.h.in b/src/machine.h.in index dd9b5214208713c41f798893e487183d537d7e3a..4ac151d2ab988022156d565021a418f901038102 100644 --- a/src/machine.h.in +++ b/src/machine.h.in @@ -22,6 +22,9 @@ /* Define if you have the <memory.h> header file. */ #undef HAVE_MEMORY_H +/* Define if you have the <sys/mman.h> header file. */ +#undef HAVE_SYS_MMAN_H + /* Define if you have the <crypt.h> header file. */ #undef HAVE_CRYPT_H @@ -40,6 +43,9 @@ /* Define if you have the <time.h> header file. */ #undef HAVE_TIME_H +/* Define if we may include both time.h and sys/time.h */ +#undef TIME_WITH_SYS_TIME + /* Define if you have the <sys/select.h> header file. */ #undef HAVE_SYS_SELECT_H @@ -49,8 +55,8 @@ /* Define if you have the <unistd.h> header file. */ #undef HAVE_UNISTD_H -/* Define if you have the <netdb.h> header file. */ -#undef HAVE_NETDB_H +/* Define if you have the <setjmp.h> header file. */ +#undef HAVE_SETJMP_H /* more header files */ #undef HAVE_FCNTL_H @@ -114,7 +120,7 @@ #undef USE_IOCTL_FIONBIO #undef USE_FCNTL_O_NDELAY #undef USE_FCNTL_FNDELAY -#undef USE_FCNTL_NONBLOCK +#undef USE_FCNTL_O_NONBLOCK /* Define if you have index */ #undef HAVE_STRTOL @@ -152,18 +158,21 @@ /* Define if you have ualarm (else put ualarm.o in the makefile). */ #undef HAVE_UALARM +/* Define if your ualarm takes two args.. */ +#undef UALARM_TAKES_TWO_ARGS + /* Define if you have fchmod. */ #undef HAVE_FCHMOD -/* Define if you have getwd. */ -#undef HAVE_GETWD - -/* Define if you have getcwd. */ -#undef HAVE_GETCWD - /* Define if you have getenv. */ #undef HAVE_GETENV +/* Define if you have gettimeofday. */ +#undef HAVE_GETTIMEOFDAY + +/* Define if gettimeofday takes to arguments */ +#undef GETTIMEOFDAY_TAKES_TWO_ARGS + /* Does your unix have a putenv function? */ #undef HAVE_PUTENV @@ -187,6 +196,12 @@ /* Define if you have memset. */ #undef HAVE_MEMSET +/* Define if you have mmap() */ +#undef HAVE_MMAP + +/* Define if you have munmap() */ +#undef HAVE_MUNMAP + /* Define if you have strcspn. */ #undef HAVE_STRCSPN @@ -217,6 +232,9 @@ /* Define if you have getrlimit */ #undef HAVE_GETRLIMIT +/* define if you have localtime */ +#undef HAVE_LOCALTIME + /* Define if you have waitpid */ #undef HAVE_WAITPID @@ -286,4 +304,16 @@ /* Value of first constant defined by byacc/bison/yacc or whatever you use. */ #define F_OFFSET 257 +/* Define this if struct tm is included in <sys/time.h> as opposed to <time.h> */ +#define TM_IN_SYS_TIME + +/* define this if #include <time.h> provides an external int timezone */ +#undef HAVE_EXTERNAL_TIMEZONE + +/* define this if your struct tm has a tm_gmtoff */ +#undef STRUCT_TM_HAS_GMTOFF + +/* Define if you have struct timeval */ +#define HAVE_STRUCT_TIMEVAL + #endif /* MACHINE_H */ diff --git a/src/macros.h b/src/macros.h index 1b2538aa680270fe607a2955a87ff1199ff645bd..e14120bf8f5e372c7cd5a5b9001a2bab24d0c97a 100644 --- a/src/macros.h +++ b/src/macros.h @@ -1,6 +1,6 @@ /*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ #ifndef MACROS_H @@ -21,6 +21,7 @@ #define isidchar(X) (isalnum(X) || (X)=='_') #define ALIGN_BOUND sizeof(char *) -#define MY_ALIGN(X) (((long)(X)+(ALIGN_BOUND-1)) & ~(ALIGN_BOUND-1)) +#define DO_ALIGN(X,Y) (((long)(X)+(Y-1)) & -(Y)) +#define MY_ALIGN(X) DO_ALIGN(X,ALIGN_BOUND) #endif diff --git a/src/main.c b/src/main.c index 3afa0c7152e4715a7d5d79216ff670e9a1bba89e..fbe2092c9fbc496567a520563e9196e12e35ff9f 100644 --- a/src/main.c +++ b/src/main.c @@ -1,6 +1,6 @@ /*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ #include "global.h" @@ -9,22 +9,22 @@ #include "module.h" #include "object.h" #include "lex.h" -#include "lpc_types.h" -#include "builtin_efuns.h" +#include "pike_types.h" +#include "builtin_functions.h" #include "array.h" #include "stralloc.h" #include "interpret.h" #include "error.h" #include "macros.h" #include "callback.h" -#include "lpc_signal.h" +#include "signal_handler.h" #ifdef HAVE_LOCALE_H #include <locale.h> #endif -#ifdef HAVE_SYS_TIME_H -#include <sys/time.h> -#endif + +#include "time_stuff.h" + #ifdef HAVE_SYS_RESOURCE_H #include <sys/resource.h> #endif @@ -36,12 +36,15 @@ int c_flag=0; int t_flag=0; int a_flag=0; int l_flag=0; +int p_flag=0; -static struct callback_list *post_master_callbacks =0; +static struct callback *post_master_callbacks =0; -struct callback_list *add_post_master_callback(struct array *a) +struct callback *add_post_master_callback(callback_func call, + void *arg, + callback_func free_func) { - return add_to_callback_list(&post_master_callbacks, a); + return add_to_callback(&post_master_callbacks, call, arg, free_func); } @@ -53,12 +56,16 @@ void main(int argc, char **argv, char **env) struct array *a; #ifdef HAVE_SETLOCALE - setlocale(LC_ALL, ""); + setlocale(LC_NUMERIC, "C"); + setlocale(LC_CTYPE, ""); + setlocale(LC_TIME, "C"); + setlocale(LC_COLLATE, ""); + setlocale(LC_MESSAGES, ""); #endif init_backend(); master_file = 0; #ifdef HAVE_GETENV - master_file = getenv("LPC_MASTER"); + master_file = getenv("PIKE_MASTER"); #endif if(!master_file) master_file = DEFAULT_MASTER; @@ -92,6 +99,27 @@ void main(int argc, char **argv, char **env) } break; + case 's': + if(!p[1]) + { + e++; + if(e >= argc) + { + fprintf(stderr,"Missing argument to -s\n"); + exit(1); + } + p=argv[e]; + } + stack_size=STRTOL(p+1,&p,0); + p+=strlen(p); + + if(stack_size < 256) + { + fprintf(stderr,"Stack size must at least be 256.\n"); + exit(1); + } + break; + case 'd': if(p[1]>='0' && p[1]<='9') d_flag+=STRTOL(p+1,&p,10); @@ -113,6 +141,13 @@ void main(int argc, char **argv, char **env) t_flag++,p++; break; + case 'p': + if(p[1]>='0' && p[1]<='9') + p_flag+=STRTOL(p+1,&p,10); + else + p_flag++,p++; + break; + case 'l': if(p[1]>='0' && p[1]<='9') l_flag+=STRTOL(p+1,&p,10); @@ -151,28 +186,37 @@ void main(int argc, char **argv, char **env) } #endif - current_time = get_current_time(); + GETTIMEOFDAY(¤t_time); init_modules_efuns(); master(); - call_and_free_callback_list(& post_master_callbacks); + call_callback(& post_master_callbacks, 0); + free_callback(& post_master_callbacks); init_modules_programs(); - a=allocate_array_no_init(argc-e,0,T_STRING); + a=allocate_array_no_init(argc-e,0); for(num=0;e<argc;e++) - SHORT_ITEM(a)[num++].string=make_shared_string(argv[e]); + { + ITEM(a)[num].u.string=make_shared_string(argv[e]); + ITEM(a)[num].type=T_STRING; + num++; + } push_array(a); for(num=0;env[num];num++); - a=allocate_array_no_init(num,0,T_STRING); + a=allocate_array_no_init(num,0); for(num=0;env[num];num++) - SHORT_ITEM(a)[num].string=make_shared_string(env[num]); + { + ITEM(a)[num].u.string=make_shared_string(env[num]); + ITEM(a)[num].type=T_STRING; + } push_array(a); if(SETJMP(back)) { - automatic_fatal="Error in handle_error, previous error (in _main): "; - assign_svalue_no_free(sp++, & throw_value); + exit_on_error="Error in handle_error, previous error (in _main): "; + assign_svalue_no_free(sp, & throw_value); + sp++; APPLY_MASTER("handle_error", 1); pop_stack(); exit(10); @@ -192,6 +236,7 @@ void main(int argc, char **argv, char **env) void init_main_efuns() { + init_interpreter(); init_lex(); init_types(); init_builtin_efuns(); @@ -206,19 +251,25 @@ void init_main_programs() void exit_main() { void cleanup_added_efuns(); - void free_all_call_outs(); - void cleanup_lpc_types(); + void cleanup_pike_types(); void cleanup_program(); - automatic_fatal="uLPC is exiting: "; + exit_on_error="Pike is exiting: "; + cleanup_objects(); exit_signals(); exit_lex(); - cleanup_objects(); cleanup_interpret(); cleanup_added_efuns(); - free_all_call_outs(); - cleanup_lpc_types(); - cleanup_shared_string_table(); + cleanup_pike_types(); cleanup_program(); + cleanup_callbacks(); + +#ifdef GC2 + do_gc(); +#endif + + zap_all_arrays(); + + cleanup_shared_string_table(); } diff --git a/src/main.h b/src/main.h index 8b4e74e1490c50e184e85aa2f564930cff9f483f..244caf342888c8243d1ce7e1d17c22abb757473e 100644 --- a/src/main.h +++ b/src/main.h @@ -1,14 +1,19 @@ /*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ #ifndef MAIN_H #define MAIN_H -extern int d_flag, t_flag, a_flag, l_flag, c_flag; +#include "callback.h" + +extern int d_flag, t_flag, a_flag, l_flag, c_flag, p_flag; /* Prototypes begin here */ +struct callback *add_post_master_callback(callback_func call, + void *arg, + callback_func free_func); void main(int argc, char **argv, char **env); void init_main_efuns(); void init_main_programs(); diff --git a/src/make_modules b/src/make_modules deleted file mode 100755 index 3df9692092b206c3cb7afb52037f8691bac1c073..0000000000000000000000000000000000000000 --- a/src/make_modules +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh -# -# Call make in the modules subdirs -# - -fullnames=`cat $1` - -shift - -# -# This is more likely to be portable than using "$@" I think -# Less generic, but I don't need to quote anything but spaces -# at the moment -# -args= -for arg -do - args="$args \"$arg\"" -done - -for dir in $fullnames -do - ( cd $dir ; eval $args ) -done - diff --git a/src/mapping.c b/src/mapping.c index f41b731ae1fbc141c4f37089d6ab03d1ea04e0fc..181ade5a54c1653c8c86db33736e623c97563c06 100644 --- a/src/mapping.c +++ b/src/mapping.c @@ -1,10 +1,12 @@ /*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ #include "global.h" +#include "main.h" #include "types.h" +#include "object.h" #include "mapping.h" #include "svalue.h" #include "array.h" @@ -14,258 +16,668 @@ #include "memory.h" #include "dynamic_buffer.h" #include "interpret.h" +#include "las.h" +#include "gc.h" + + +#define AVG_LINK_LENGTH 4 +#define MIN_LINK_LENGTH 1 +#define MAP_SLOTS(X) ((X)+((X)>>4)+8) +#define LOOP(m) for(e=0;e<m->hashsize;e++) for(k=m->hash[e];k;k=k->next) + +struct keypair +{ + struct keypair *next; + struct svalue ind, val; +}; struct mapping *first_mapping; -/* - * This function puts looks up an index in a mapping and assigns - * the value to dest. It does not free dest first though + +#ifdef DEBUG +/* This function checks that the type field isn't lacking any bits. + * It is used for debugging purposes only. */ -void mapping_index_no_free(struct svalue *dest, - struct mapping *m, - struct svalue *ind) +static void check_mapping_type_fields(struct mapping *m) { - INT32 i; - i=set_lookup(m->ind, ind); - if(i < 0) + INT32 e; + struct keypair *k,**prev; + TYPE_FIELD ind_types, val_types; + + ind_types=val_types=0; + + for(e=0;e<m->hashsize;e++) { - dest->type=T_INT; - dest->subtype=NUMBER_UNDEFINED; - dest->u.integer=0; - }else{ - array_index_no_free(dest, m->val, i); + for(k=m->hash[e];k;k=k->next) + { + val_types |= 1 << k->val.type; + ind_types |= 1 << k->ind.type; + } } + + if(val_types & ~(m->val_types)) + fatal("Mapping value types out of order!\n"); + + if(ind_types & ~(m->ind_types)) + fatal("Mapping indices types out of order!\n"); } +#endif -#if 0 -/* - * This funciton does the same thing as the one above, but - * frees dest first. + +/* This function allocates the hash table and svalue space for a mapping + * struct. The size is the max number of indices that can fit in the + * allocated space. */ -void mapping_index(struct svalue *dest, - struct mapping *m, - struct svalue *ind) -{ - INT32 i; - m->refs++; - i=set_lookup(m->ind, ind); - if(i < 0) - { - dest->type=T_INT; - dest->subtype=NUMBER_UNDEFINED; - dest->u.integer=0; - }else{ - array_index(dest, m->val, i); - } - free_mapping(m); -} +static void init_mapping(struct mapping *m, INT32 size) +{ + char *tmp; + INT32 e; + INT32 hashsize,hashspace; + +#ifdef DEBUG + if(size < 0) fatal("init_mapping with negative value.\n"); #endif -/* - * allocate and init a new mapping + hashsize=size / AVG_LINK_LENGTH + 1; + if(!(hashsize & 1)) hashsize++; + hashspace=hashsize+1; + e=sizeof(struct keypair)*size+ sizeof(struct keypair *)*hashspace; + tmp=(char *)xalloc(e); + + m->hash=(struct keypair **) tmp; + m->hashsize=hashsize; + + tmp+=sizeof(struct keypair *)*hashspace; + m->free_list=(struct keypair *) tmp; + + MEMSET((char *)m->hash, 0, sizeof(struct keypair *) * m->hashsize); + + for(e=1;e<size;e++) + m->free_list[e-1].next = m->free_list + e; + m->free_list[e-1].next=0; + + m->ind_types = 0; + m->val_types = 0; + m->size = 0; +} + +/* This function allocates an empty mapping with room for 'size' values */ -static struct mapping *allocate_mapping(struct array *ind, struct array *val) +static struct mapping *allocate_mapping(int size) { struct mapping *m; + + GC_ALLOC(); + m=ALLOC_STRUCT(mapping); + + init_mapping(m,size); + m->next = first_mapping; m->prev = 0; m->refs = 1; - m->ind=ind; - m->val=val; + if(first_mapping) first_mapping->prev = m; first_mapping=m; return m; } -/* - * free a mapping +/* This function should only be called by the free_mapping() macro. + * It frees the storate used by the mapping. */ void really_free_mapping(struct mapping *m) { + INT32 e; + struct keypair *k; #ifdef DEBUG if(m->refs) fatal("really free mapping on mapping with nonzero refs.\n"); #endif - free_array(m->ind); - free_array(m->val); + LOOP(m) + { + free_svalue(& k->val); + free_svalue(& k->ind); + } + + if(m->prev) + m->prev->next = m->next; + else + first_mapping = m->next; - if(m->prev) m->prev->next = m->next; if(m->next) m->next->prev = m->prev; - if(first_mapping == m) first_mapping = 0; + free((char *)m->hash); free((char *)m); + + GC_FREE(); } -static void order_mapping(struct mapping *m) +/* This function is used to rehash a mapping without loosing the internal + * order in each hash chain. This is to prevent mappings from becoming + * very inefficient just after being rehashed. + */ +static void mapping_rehash_backwards(struct mapping *m, struct keypair *p) { - INT32 *order; - order = get_set_order(m->ind); - if(!order) return; - m->ind = order_array(m->ind, order); - m->val = order_array(m->val, order); - free((char *)order); + unsigned INT32 h; + struct keypair *tmp; + + if(!p) return; + mapping_rehash_backwards(m,p->next); + h=hash_svalue(& p->ind) % m->hashsize; + tmp=m->free_list; + m->free_list=tmp->next; + tmp->next=m->hash[h]; + m->hash[h]=tmp; + tmp->ind=p->ind; + tmp->val=p->val; + m->size++; + m->ind_types |= 1 << p->ind.type; + m->val_types |= 1 << p->val.type; } -struct mapping *mkmapping(struct array *ind, struct array *val) +/* This function re-allocates a mapping. It adjusts the max no. of + * values can be fitted into the mapping. It takes a bit of time to + * run, but is used seldom enough not to degrade preformance significantly. + */ +static struct mapping *rehash(struct mapping *m, int new_size) { - struct mapping *m; - m=allocate_mapping(copy_array(ind), copy_array(val)); - order_mapping(m); +#ifdef DEBUG + INT32 tmp=m->size; +#endif + INT32 e,hashsize; + struct keypair *k,**hash; + + hashsize=m->hashsize; + hash=m->hash; + + init_mapping(m, new_size); + + for(e=0;e<hashsize;e++) + mapping_rehash_backwards(m, hash[e]); + +#ifdef DEBUG + if(m->size != tmp) + fatal("Rehash failed, size not same any more.\n"); +#endif + + free((char *)hash); + +#ifdef DEBUG + if(d_flag > 1) check_mapping_type_fields(m); +#endif + return m; } -void mapping_insert(struct mapping *m, - struct svalue *ind, - struct svalue *from) +/* This function brings the type fields in the mapping up to speed. + * I only use it when the type fields MUST be correct, which is not + * very often. + */ +void mapping_fix_type_field(struct mapping *m) { - INT32 i; - i=set_lookup(m->ind, ind); + INT32 e; + struct keypair *k; + TYPE_FIELD ind_types, val_types; + + val_types = ind_types = 0; - if(i < 0) + for(e=0;e<m->hashsize;e++) { - i = ~i; - m->ind=array_insert(m->ind, ind, i); - m->val=array_insert(m->val, from, i); - }else{ - array_set_index(m->ind, i, ind); - array_set_index(m->val, i, from); + for(k=m->hash[e];k;k=k->next) + { + val_types |= 1 << k->val.type; + ind_types |= 1 << k->ind.type; + } } + +#ifdef DEBUG + if(val_types & ~(m->val_types)) + fatal("Mapping value types out of order!\n"); + + if(ind_types & ~(m->ind_types)) + fatal("Mapping indices types out of order!\n"); +#endif + m->val_types = val_types; + m->ind_types = ind_types; } -#if 0 -struct array *mapping_indices(struct mapping *m) +/* This function inserts key:val into the mapping m. + * Same as doing m[key]=val; in pike. + */ +void mapping_insert(struct mapping *m, + struct svalue *key, + struct svalue *val) { - return m->ind; + unsigned INT32 h; + struct keypair *k, **prev; + + h=hash_svalue(key) % m->hashsize; + +#ifdef DEBUG + if(d_flag > 1) check_mapping_type_fields(m); +#endif + if(m->ind_types & (1 << key->type)) + { + for(prev= m->hash + h;k=*prev;prev=&k->next) + { + if(is_eq(& k->ind, key)) + { + *prev=k->next; + k->next=m->hash[h]; + m->hash[h]=k; + + m->val_types |= 1 << val->type; + assign_svalue(& k->val, val); + +#ifdef DEBUG + if(d_flag > 1) check_mapping_type_fields(m); +#endif + return; + } + } + } + + if(!(k=m->free_list)) + { + rehash(m, m->size * 2 + 1); + h=hash_svalue(key) % m->hashsize; + k=m->free_list; + } + + m->free_list=k->next; + k->next=m->hash[h]; + m->hash[h]=k; + m->ind_types |= 1 << key->type; + m->val_types |= 1 << val->type; + assign_svalue_no_free(& k->ind, key); + assign_svalue_no_free(& k->val, val); + m->size++; + +#ifdef DEBUG + if(d_flag > 1) check_mapping_type_fields(m); +#endif } -struct array *mapping_values(struct mapping *m) +union anything *mapping_get_item_ptr(struct mapping *m, + struct svalue *key, + TYPE_T t) { - return m->val; -} + unsigned INT32 h; + struct keypair *k, **prev; + + h=hash_svalue(key) % m->hashsize; + +#ifdef DEBUG + if(d_flag > 1) check_mapping_type_fields(m); #endif + + for(prev= m->hash + h;k=*prev;prev=&k->next) + { + if(is_eq(& k->ind, key)) + { + *prev=k->next; + k->next=m->hash[h]; + m->hash[h]=k; -void map_delete(struct mapping *m,struct svalue *ind) + if(k->val.type == t) return & ( k->val.u ); + +#ifdef DEBUG + if(d_flag > 1) check_mapping_type_fields(m); +#endif + + return 0; + } + } + + if(!(k=m->free_list)) + { + rehash(m, m->size * 2 + 1); + h=hash_svalue(key) % m->hashsize; + k=m->free_list; + } + + m->free_list=k->next; + k->next=m->hash[h]; + m->hash[h]=k; + assign_svalue_no_free(& k->ind, key); + k->val.type=T_INT; + k->val.subtype=NUMBER_NUMBER; + k->val.u.integer=0; + m->ind_types |= 1 << key->type; + m->val_types |= BIT_INT; + m->size++; + + if(t != T_INT) return 0; + +#ifdef DEBUG + if(d_flag > 1) check_mapping_type_fields(m); +#endif + + return & ( k->val.u ); +} + +void map_delete(struct mapping *m, + struct svalue *key) { - INT32 i; - i=set_lookup(m->ind, ind); + unsigned INT32 h; + struct keypair *k, **prev; - if(i >= 0) + h=hash_svalue(key) % m->hashsize; + + for(prev= m->hash + h;k=*prev;prev=&k->next) { - m->ind=array_remove(m->ind, i); - m->val=array_remove(m->val, i); + if(is_eq(& k->ind, key)) + { + *prev=k->next; + free_svalue(& k->ind); + free_svalue(& k->val); + k->next=m->free_list; + m->free_list=k; + m->size--; + + if(m->size < (m->hashsize + 1) * MIN_LINK_LENGTH) + rehash(m, MAP_SLOTS(m->size)); + +#ifdef DEBUG + if(d_flag > 1) check_mapping_type_fields(m); +#endif + return; + } } } void check_mapping_for_destruct(struct mapping *m) { - INT32 i; - check_array_for_destruct(m->val); - while( (i=array_find_destructed_object(m->ind)) >= 0) + INT32 e; + struct keypair *k, **prev; + TYPE_FIELD ind_types, val_types; + +#ifdef DEBUG + if(d_flag > 1) check_mapping_type_fields(m); +#endif + + if((m->ind_types | m->val_types) & BIT_OBJECT) { - m->ind=array_remove(m->ind, i); - m->val=array_remove(m->val, i); + val_types = ind_types = 0; + m->val_types |= BIT_INT; + for(e=0;e<m->hashsize;e++) + { + for(prev= m->hash + e;k=*prev;prev=&k->next) + { + check_destructed(& k->val); + + if(k->ind.type == T_OBJECT && !k->ind.u.object->prog) + { + *prev=k->next; + free_svalue(& k->ind); + free_svalue(& k->val); + k->next=m->free_list; + m->free_list=k; + m->size--; + }else{ + val_types |= 1 << k->val.type; + ind_types |= 1 << k->ind.type; + } + } + } + if(MAP_SLOTS(m->size) < m->hashsize * MIN_LINK_LENGTH) + rehash(m, MAP_SLOTS(m->size)); + + m->val_types = val_types; + m->ind_types = ind_types; +#ifdef DEBUG + if(d_flag > 1) check_mapping_type_fields(m); +#endif } } -union anything *mapping_get_item_ptr(struct mapping *m, - struct svalue *ind, - TYPE_T t) +struct svalue *low_mapping_lookup(struct mapping *m, + struct svalue *key) { - INT32 i; - i=set_lookup(m->ind, ind); - if(i < 0) + unsigned INT32 h; + struct keypair *k, **prev; + +#ifdef DEBUG + if(d_flag > 1) check_mapping_type_fields(m); +#endif + + if((1 << key->type) & m->ind_types) { - struct svalue from; - from.type=T_INT; - from.subtype=NUMBER_NUMBER; - from.u.integer=0; - i = ~i; - m->ind=array_insert(m->ind, ind, i); - m->val=array_insert(m->val, &from, i); + h=hash_svalue(key) % m->hashsize; + + for(prev= m->hash + h;k=*prev;prev=&k->next) + { + if(is_eq(& k->ind, key)) + { + *prev=k->next; + k->next=m->hash[h]; + m->hash[h]=k; + + return &k->val; + } + } } - return low_array_get_item_ptr(m->val, i, t); + + return 0; } -struct mapping *copy_mapping(struct mapping *tmp) +void mapping_index_no_free(struct svalue *dest, + struct mapping *m, + struct svalue *key) { - check_mapping_for_destruct(tmp); - return allocate_mapping(copy_array(tmp->ind),copy_array(tmp->val)); + struct svalue *p; + + if(p=low_mapping_lookup(m,key)) + { + if(p->type==T_INT) + p->subtype=NUMBER_NUMBER; + + assign_svalue_no_free(dest, p); + }else{ + dest->type=T_INT; + dest->u.integer=0; + dest->subtype=NUMBER_UNDEFINED; + } } -struct mapping *merge_mappings(struct mapping *a, - struct mapping *b, - INT32 operator) +struct array *mapping_indices(struct mapping *m) { - struct mapping *ret; + INT32 e; + struct array *a; + struct svalue *s; + struct keypair *k; + + a=allocate_array(m->size); + s=ITEM(a); + + LOOP(m) assign_svalue(s++, & k->ind); + + a->type_field = m->ind_types; + +#ifdef DEBUG + if(d_flag > 1) check_mapping_type_fields(m); +#endif + + return a; +} + +struct array *mapping_values(struct mapping *m) +{ + INT32 e; + struct keypair *k; + struct array *a; + struct svalue *s; + + a=allocate_array(m->size); + s=ITEM(a); + + LOOP(m) assign_svalue(s++, & k->val); + + a->type_field = m->val_types; + +#ifdef DEBUG + if(d_flag > 1) check_mapping_type_fields(m); +#endif + + return a; +} + +void mapping_replace(struct mapping *m,struct svalue *from, struct svalue *to) +{ + INT32 e; + struct keypair *k; + + LOOP(m) + if(is_eq(& k->val, from)) + assign_svalue(& k->val, to); + + m->val_types |= 1 << to->type; + +#ifdef DEBUG + if(d_flag > 1) check_mapping_type_fields(m); +#endif + +} + +struct mapping *mkmapping(struct array *ind, struct array *val) +{ + struct mapping *m; + struct svalue *i,*v; + INT32 e; + +#ifdef DEBUG + if(ind->size != val->size) + fatal("mkmapping on different sized arrays.\n"); +#endif + + m=allocate_mapping(MAP_SLOTS(ind->size)); + i=ITEM(ind); + v=ITEM(val); + for(e=0;e<ind->size;e++) mapping_insert(m, i++, v++); + + return m; +} + +struct mapping *copy_mapping(struct mapping *m) +{ + INT32 e; + struct mapping *n; + struct keypair *k; + + n=allocate_mapping(MAP_SLOTS(m->size)); + + LOOP(m) mapping_insert(n, &k->ind, &k->val); + + return m; +} + +struct mapping *merge_mappings(struct mapping *a, struct mapping *b, INT32 op) +{ + struct array *ai, *av; + struct array *bi, *bv; + struct array *ci, *cv; INT32 *zipper; + struct mapping *m; - check_mapping_for_destruct(a); - check_mapping_for_destruct(b); + ai=mapping_indices(a); + av=mapping_values(a); + zipper=get_set_order(ai); + order_array(ai, zipper); + order_array(av, zipper); + free((char *)zipper); + + bi=mapping_indices(b); + bv=mapping_values(b); + zipper=get_set_order(bi); + order_array(bi, zipper); + order_array(bv, zipper); + free((char *)zipper); + + zipper=merge(ai,bi,op); - zipper=merge(a->ind,b->ind,operator); - ret=allocate_mapping(array_zip(a->ind,b->ind,zipper), - array_zip(a->val,b->val,zipper)); + ci=array_zip(ai,bi,zipper); + free_array(ai); + free_array(bi); + cv=array_zip(av,bv,zipper); + free_array(av); + free_array(bv); + free((char *)zipper); - return ret; + + m=mkmapping(ci, cv); + free_array(ci); + free_array(cv); + + return m; } -struct mapping *add_mappings(struct svalue *argp,INT32 args) +struct mapping *add_mappings(struct svalue *argp, INT32 args) { struct mapping *ret,*a,*b; switch(args) { - case 0: - ret=allocate_mapping(allocate_array_no_init(0,0,T_MIXED), - allocate_array_no_init(0,0,T_MIXED)); - break; - - case 1: - ret=copy_mapping(argp->u.mapping); - break; - - case 2: - ret=merge_mappings(argp[0].u.mapping,argp[1].u.mapping,OP_ADD); - break; - + case 0: return allocate_mapping(0); + case 1: return copy_mapping(argp->u.mapping); + case 2: return merge_mappings(argp[0].u.mapping, argp[1].u.mapping, OP_ADD); case 3: a=merge_mappings(argp[0].u.mapping,argp[1].u.mapping,OP_ADD); ret=merge_mappings(a,argp[2].u.mapping,OP_ADD); free_mapping(a); - break; - + return ret; default: a=add_mappings(argp,args/2); b=add_mappings(argp+args/2,args-args/2); ret=merge_mappings(a,b,OP_ADD); free_mapping(a); free_mapping(b); - break; + return ret; } - - return ret; } int mapping_equal_p(struct mapping *a, struct mapping *b, struct processing *p) { - if(a == b) return 1; + struct processing curr; + struct keypair *k; + INT32 e; + + if(a==b) return 1; + if(a->size != b->size) return 0; + + curr.pointer_a = a; + curr.pointer_b = b; + curr.next = p; + + for( ;p ;p=p->next) + if(p->pointer_a == (void *)a && p->pointer_b == (void *)b) + return 1; + check_mapping_for_destruct(a); check_mapping_for_destruct(b); - return array_equal_p(a->ind, b->ind, p) - && array_equal_p(a->val, b->val, p); + LOOP(a) + { + struct svalue *s; + if(s=low_mapping_lookup(b, & k->ind)) + { + if(!low_is_equal(s, &k->val, &curr)) return 0; + }else{ + return 0; + } + } + return 1; } void describe_mapping(struct mapping *m,struct processing *p,int indent) { struct processing doing; INT32 e,d; + struct keypair *k; char buf[40]; - if(! m->ind->size) + if(! m->size) { my_strcat("([ ])"); return; @@ -283,16 +695,24 @@ void describe_mapping(struct mapping *m,struct processing *p,int indent) } } - sprintf(buf,"([ /* %ld elements */\n",(long) m->ind->size); + sprintf(buf,"([ /* %ld elements */\n",(long) m->size); my_strcat(buf); - for(e=0;e<m->ind->size;e++) + + d=0; + + LOOP(m) { - if(e) my_strcat(",\n"); + if(!d) + { + my_strcat(",\n"); + d=1; + } for(d=0; d<indent; d++) my_putchar(' '); - describe_index(m->ind, e, &doing, indent+2); + describe_svalue(& k->ind, indent+2, p); my_putchar(':'); - describe_index(m->val, e, &doing, indent+2); + describe_svalue(& k->val, indent+2, p); } + my_putchar('\n'); for(e=2; e<indent; e++) my_putchar(' '); my_strcat("])"); @@ -300,16 +720,27 @@ void describe_mapping(struct mapping *m,struct processing *p,int indent) node * make_node_from_mapping(struct mapping *m) { - if(check_that_array_is_constant(m->ind) && - check_that_array_is_constant(m->val)) + struct keypair *k; + INT32 e; + + mapping_fix_type_field(m); + + if((m->ind_types | m->val_types) & (BIT_FUNCTION | BIT_OBJECT)) { + struct array *ind, *val; + node *n; + ind=mapping_indices(m); + val=mapping_indices(m); + n=mkefuncallnode("mkmapping",mknode(F_ARG_LIST,make_node_from_array(ind),make_node_from_array(val))); + free_array(ind); + free_array(val); + return n; + }else{ struct svalue s; s.type=T_MAPPING; s.subtype=0; s.u.mapping=m; return mkconstantsvaluenode(&s); - }else{ - return mkefuncallnode("mkmapping",mknode(F_ARG_LIST,make_node_from_array(m->ind),make_node_from_array(m->val))); } } @@ -327,28 +758,17 @@ void f_m_delete(INT32 args) void f_aggregate_mapping(INT32 args) { INT32 e; - struct array *ind,*val; - struct svalue *s; + struct keypair *k; struct mapping *m; if(args & 1) error("Uneven number of arguments to aggregage_mapping.\n"); - ind=allocate_array_no_init(args/2,0,T_MIXED); - val=allocate_array_no_init(args/2,0,T_MIXED); + m=allocate_mapping(MAP_SLOTS(args / 2)); - s=sp-args; - for(e=0;e<args/2;e++) - { - ITEM(ind)[e]=*(s++); - ITEM(val)[e]=*(s++); - } - sp-=args; - m=allocate_mapping(ind,val); - order_mapping(m); - sp->u.mapping=m; - sp->type=T_MAPPING; - sp++; + for(e=-args;e<0;e+=2) mapping_insert(m, sp+e, sp+e+1); + pop_n_elems(args); + push_mapping(m); } struct mapping *copy_mapping_recursively(struct mapping *m, @@ -356,6 +776,8 @@ struct mapping *copy_mapping_recursively(struct mapping *m, { struct processing doing; struct mapping *ret; + INT32 e; + struct keypair *k; doing.next=p; doing.pointer_a=(void *)m; @@ -369,57 +791,77 @@ struct mapping *copy_mapping_recursively(struct mapping *m, } } - ret=allocate_mapping(0,0); - doing.pointer_b=(void *)ret; + ret=allocate_mapping(MAP_SLOTS(m->size)); + doing.pointer_b=ret; - ret->ind=copy_array_recursively(m->ind,&doing); - ret->val=copy_array_recursively(m->val,&doing); + check_stack(2); - order_mapping(ret); + LOOP(m) + { + copy_svalues_recursively_no_free(sp,&k->ind, 1, p); + sp++; + copy_svalues_recursively_no_free(sp,&k->val, 1, p); + sp++; + + mapping_insert(ret, sp-2, sp-1); + pop_n_elems(2); + } return ret; } + void mapping_search_no_free(struct svalue *to, struct mapping *m, struct svalue *look_for, struct svalue *start) { - INT32 start_pos; - start_pos=0; + unsigned INT32 h; + struct keypair *k; + + h=0; + k=m->hash[h]; if(start) { - start_pos=set_lookup(m->ind, start); - if(start_pos < 0) + h=hash_svalue(start) % m->hashsize; + for(k=m->hash[h];k;k=k->next) + if(is_eq(&k->ind, start)) + break; + + if(!k) { to->type=T_INT; to->subtype=NUMBER_UNDEFINED; to->u.integer=0; return; } + k=k->next; } - start_pos=array_search(m->val,look_for,start_pos); - if(start_pos < 0) + + while(h < (unsigned INT32)m->hashsize) { - to->type=T_INT; - to->subtype=NUMBER_UNDEFINED; - to->u.integer=0; - return; + while(k) + { + if(is_eq(look_for, &k->val)) + { + assign_svalue_no_free(to,&k->ind); + return; + } + k=k->next; + } + k=m->hash[++h]; } - array_index_no_free(to,m->ind,start_pos); + + to->type=T_INT; + to->subtype=NUMBER_UNDEFINED; + to->u.integer=0; } + #ifdef DEBUG -void check_mapping(struct mapping *m,int pass) +void check_mapping(struct mapping *m) { - if(pass) - { - if(checked((void *)m,0) != m->refs) - fatal("Mapping has wrong number of refs.\n"); - return; - } - if(m->refs <=0) fatal("Mapping has zero refs.\n"); @@ -434,17 +876,157 @@ void check_mapping(struct mapping *m,int pass) if(first_mapping != m) fatal("Mapping ->prev == 0 but first_mapping != mapping.\n"); } - checked((void *)m->ind,1); - checked((void *)m->val,1); + + if(m->hashsize < 0) + fatal("Assert: I don't think he's going to make it Jim.\n"); + + if(m->size < 0) + fatal("Core breach, evacuate ship!\n"); + + if(m->size > (m->hashsize + 3) * AVG_LINK_LENGTH) + fatal("Pretty mean hashtable there buster!.\n"); + + if(m->size < (m->hashsize - 3) * MIN_LINK_LENGTH) + fatal("Hashsize is too small for mapping.\n"); + + if(m->size > 0 && (!m->ind_types || !m->val_types)) + fatal("Mapping type fields are... wrong.\n"); + + if(!m->hash) + fatal("Hey! where did my hashtable go??\n"); + } -void check_all_mappings(int pass) +void check_all_mappings() { struct mapping *m; for(m=first_mapping;m;m=m->next) - check_mapping(m,pass); + check_mapping(m); +} +#endif - if(!pass) - checked((void *)first_mapping,1); + +#ifdef GC2 + +void gc_mark_mapping_as_referenced(struct mapping *m) +{ + INT32 e; + struct keypair *k; + + if(gc_mark(m)) + { + if((m->ind_types | m->val_types) & BIT_COMPLEX) + { + LOOP(m) + { + gc_mark_svalues(&k->ind, 1); + gc_mark_svalues(&k->val, 1); + } + } + } } + +void gc_check_all_mappings() +{ + INT32 e; + struct keypair *k; + struct mapping *m; + + for(m=first_mapping;m;m=m->next) + { + if((m->ind_types | m->val_types) & BIT_COMPLEX) + { + check_mapping_for_destruct(m); + LOOP(m) + { + gc_check_svalues(&k->ind, 1); + gc_check_svalues(&k->val, 1); + } + +#ifdef DEBUG + if(d_flag > 1) check_mapping_type_fields(m); #endif + + } + } +} + +void gc_mark_all_mappings() +{ + struct mapping *m; + for(m=first_mapping;m;m=m->next) + if(gc_is_referenced(m)) + gc_mark_mapping_as_referenced(m); +} + +void gc_free_all_unreferenced_mappings() +{ + INT32 e; + struct keypair *k; + struct mapping *m,*next; + + for(m=first_mapping;m;m=next) + { + if(gc_do_free(m)) + { + m->refs++; + + for(e=0;e<m->hashsize;e++) + { + k=m->hash[e]; + while(k) + { + free_svalue(&k->ind); + free_svalue(&k->val); + + if(k->next) + { + k = k->next; + } else { + k->next=m->free_list; + m->free_list=m->hash[e]; + m->hash[e]=0; + break; + } + } + } + m->size=0; + + next=m->next; + + free_mapping(m); + }else{ + next=m->next; + } + } +} + +#endif /* GC2 */ + +void zap_all_mappings() +{ + INT32 e; + struct keypair *k; + struct mapping *m,*next; + + for(m=first_mapping;m;m=next) + { + m->refs++; + + for(e=0;e<m->hashsize;e++) + { + for(k=m->hash[e];k;k=k->next) + { + free_svalue(&k->ind); + free_svalue(&k->val); + } + k->next=m->free_list; + m->hash[e]=0; + } + m->size=0; + + next=m->next; + + free_mapping(m); + } +} diff --git a/src/mapping.h b/src/mapping.h index 9a9132cb14296fa3db368201d0111f2edc5c11a0..55f1d04597ef0ac1b5def0bd02fb2af47fc2ea95 100644 --- a/src/mapping.h +++ b/src/mapping.h @@ -1,6 +1,6 @@ /*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ #ifndef MAPPING_H @@ -10,38 +10,44 @@ struct mapping { - INT32 refs; - struct mapping *next,*prev; - struct array *ind; - struct array *val; + INT32 refs, size, hashsize; + TYPE_FIELD ind_types, val_types; + struct mapping *next, *prev; + struct keypair **hash; + struct keypair *free_list; }; +#define m_sizeof(m) ((m)->size) +#define m_ind_types(m) ((m)->ind_types) +#define m_val_types(m) ((m)->val_types) + #define free_mapping(M) do{ struct mapping *m_=(M); if(!--m_->refs) really_free_mapping(m_); }while(0) /* Prototypes begin here */ -void mapping_index_no_free(struct svalue *dest, - struct mapping *m, - struct svalue *ind); -void mapping_index(struct svalue *dest, - struct mapping *m, - struct svalue *ind); +struct keypair; void really_free_mapping(struct mapping *m); -struct mapping *mkmapping(struct array *ind, struct array *val); +void mapping_fix_type_field(struct mapping *m); void mapping_insert(struct mapping *m, - struct svalue *ind, - struct svalue *from); -struct array *mapping_indices(struct mapping *m); -struct array *mapping_values(struct mapping *m); -void map_delete(struct mapping *m,struct svalue *ind); -void check_mapping_for_destruct(struct mapping *m); + struct svalue *key, + struct svalue *val); union anything *mapping_get_item_ptr(struct mapping *m, - struct svalue *ind, + struct svalue *key, TYPE_T t); -struct mapping *copy_mapping(struct mapping *tmp); -struct mapping *merge_mappings(struct mapping *a, - struct mapping *b, - INT32 operator); -struct mapping *add_mappings(struct svalue *argp,INT32 args); +void map_delete(struct mapping *m, + struct svalue *key); +void check_mapping_for_destruct(struct mapping *m); +struct svalue *low_mapping_lookup(struct mapping *m, + struct svalue *key); +void mapping_index_no_free(struct svalue *dest, + struct mapping *m, + struct svalue *key); +struct array *mapping_indices(struct mapping *m); +struct array *mapping_values(struct mapping *m); +void mapping_replace(struct mapping *m,struct svalue *from, struct svalue *to); +struct mapping *mkmapping(struct array *ind, struct array *val); +struct mapping *copy_mapping(struct mapping *m); +struct mapping *merge_mappings(struct mapping *a, struct mapping *b, INT32 op); +struct mapping *add_mappings(struct svalue *argp, INT32 args); int mapping_equal_p(struct mapping *a, struct mapping *b, struct processing *p); void describe_mapping(struct mapping *m,struct processing *p,int indent); node * make_node_from_mapping(struct mapping *m); @@ -53,5 +59,11 @@ void mapping_search_no_free(struct svalue *to, struct mapping *m, struct svalue *look_for, struct svalue *start); +void check_mapping(struct mapping *m); +void check_all_mappings(); +void gc_mark_mapping_as_referenced(struct mapping *m); +void gc_check_all_mappings(); +void gc_mark_all_mappings(); +void gc_free_all_unreferenced_mappings(); /* Prototypes end here */ #endif diff --git a/src/memory.c b/src/memory.c index b02eb73c2fc9799e6cc5c2bff8431a71f36b45a6..512eeb0f7ae27ae0d7cca7194e73c072063f5bf6 100644 --- a/src/memory.c +++ b/src/memory.c @@ -1,11 +1,12 @@ /*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ #include "global.h" #include "memory.h" #include "error.h" +#include "macros.h" char *xalloc(SIZE_T size) { @@ -75,7 +76,9 @@ void reorder(char *memory,INT32 nitems,INT32 size,INT32 *order) } } -#else +#endif + +#if 0 /* * This function may NOT change 'order' * This function is probably too slow, but it does not use @@ -259,7 +262,45 @@ void reorder(char *memory, INT32 nitems, INT32 size,INT32 *order) } } } +#endif + +#if 1 +/* + * This function may NOT change 'order' + * This function is hopefully fast enough... + */ +void reorder(char *memory, INT32 nitems, INT32 size,INT32 *order) +{ + INT32 e; + char *tmp; + tmp=xalloc(size * nitems); + +#define DOSIZE(X,Y) \ + case X: \ + { \ + struct Y { char tt[X]; }; \ + struct Y *from=(struct Y *) memory; \ + struct Y *to=(struct Y *) tmp; \ + for(e=0;e<nitems;e++) to[e]=from[order[e]]; \ + break; \ + } + + + switch(size) + { + DOSIZE(1,TMP1) + DOSIZE(2,TMP2) + DOSIZE(4,TMP4) + DOSIZE(8,TMP8) + DOSIZE(16,TMP16) + + default: + for(e=0;e<nitems;e++) MEMCPY(tmp+e*size, memory+order[e]*size, size); + } + MEMCPY(memory, tmp, size * nitems); + free(tmp); +} #endif unsigned INT32 hashmem(const unsigned char *a,INT32 len,INT32 mlen) @@ -315,3 +356,172 @@ unsigned INT32 hashstr(const unsigned char *str,INT32 maxn) return ret; } + + +/* + * a quick memory search function. + * Written by Fredrik Hubinette (hubbe@lysator.liu.se) + */ +void init_memsearch(struct mem_searcher *s, + char *needle, + SIZE_T needlelen, + SIZE_T max_haystacklen) +{ + s->needle=needle; + s->needlelen=needlelen; + + switch(needlelen) + { + case 0: s->method=no_search; break; + case 1: s->method=use_memchr; break; + case 2: + case 3: + case 4: + case 5: + case 6: s->method=memchr_and_memcmp; break; + default: + if(max_haystacklen <= needlelen + 64) + { + s->method=memchr_and_memcmp; + }else{ + INT32 tmp, h; + unsigned INT32 hsize, e, max; + unsigned char *q; + struct link *ptr; + + hsize=52+(max_haystacklen >> 7) - (needlelen >> 8); + max =13+(max_haystacklen >> 4) - (needlelen >> 5); + + if(hsize > NELEM(s->set)) + { + hsize=NELEM(s->set); + }else{ + for(e=8;e<hsize;e+=e); + hsize=e; + } + + for(e=0;e<hsize;e++) s->set[e]=0; + hsize--; + + if(max > needlelen) max=needlelen; + max=(max-sizeof(INT32)+1) & -sizeof(INT32); + if(max > MEMSEARCH_LINKS) max=MEMSEARCH_LINKS; + + ptr=& s->links[0]; + + q=(unsigned char *)needle; + +#if BYTEORDER == 4321 + for(tmp=e=0;e<sizeof(INT32)-1;e++) + { + tmp<<=8; + tmp|=*(q++); + } +#endif + + for(e=0;e<max;e++) + { +#if BYTEORDER == 4321 + tmp<<=8; + tmp|=*(q++); +#else + tmp=EXTRACT_INT(q); + q++; +#endif + h=tmp; + h+=h>>7; + h+=h>>17; + h&=hsize; + + ptr->offset=e; + ptr->key=tmp; + ptr->next=s->set[h]; + s->set[h]=ptr; + ptr++; + } + s->hsize=hsize; + s->max=max; + s->method=hubbe_search; + } + } +} + + +char *memory_search(struct mem_searcher *s, + char *haystack, + SIZE_T haystacklen) +{ + if(s->needlelen > haystacklen) return 0; + + switch(s->method) + { + case no_search: + return haystack; + + case use_memchr: + return MEMCHR(haystack,s->needle[0],haystacklen); + + case memchr_and_memcmp: + { + char *end,c,*needle; + SIZE_T needlelen; + + needle=s->needle; + needlelen=s->needlelen; + + end=haystack + haystacklen - needlelen+1; + c=needle[0]; + needle++; + needlelen--; + while((haystack=MEMCHR(haystack,c,end-haystack))) + if(!MEMCMP(++haystack,needle,needlelen)) + return haystack-1; + + return 0; + } + + case hubbe_search: + { + INT32 tmp, h; + char *q, *end; + register struct link *ptr; + + end=haystack+haystacklen+1; + q=haystack + s->max - sizeof(INT32); + q=(char *)( ((long)q) & -sizeof(INT32)); + for(;q<end-sizeof(INT32)+1;q+=s->max) + { + h=tmp=*(INT32 *)q; + + h+=h>>7; + h+=h>>17; + h&=s->hsize; + + for(ptr=s->set[h];ptr;ptr=ptr->next) + { + char *where; + + if(ptr->key != tmp) continue; + + where=q-ptr->offset; + if(where<haystack) continue; + if(where+s->needlelen>end) return 0; + + if(!MEMCMP(where,s->needle,s->needlelen)) + return where; + } + } + } + } + return 0; +} + +char *my_memmem(char *needle, + SIZE_T needlelen, + char *haystack, + SIZE_T haystacklen) +{ + struct mem_searcher tmp; + init_memsearch(&tmp, needle, needlelen, haystacklen); + return memory_search(&tmp, haystack, haystacklen); +} diff --git a/src/memory.h b/src/memory.h index b93106c27fcde7d6b1d3083f75a760eade4087fc..bc7a358f62190880614af8bca082329a6587bd8d 100644 --- a/src/memory.h +++ b/src/memory.h @@ -1,6 +1,6 @@ /*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ #ifndef MEMORY_H @@ -8,11 +8,48 @@ #include "types.h" +#define MEMSEARCH_LINKS 512 + +struct link +{ + struct link *next; + INT32 key, offset; +}; + +enum methods { + no_search, + use_memchr, + memchr_and_memcmp, + hubbe_search +}; + +struct mem_searcher +{ + enum methods method; + char *needle; + SIZE_T needlelen; + unsigned INT32 hsize, max; + struct link links[MEMSEARCH_LINKS]; + struct link *set[MEMSEARCH_LINKS]; +}; + /* Prototypes begin here */ char *xalloc(SIZE_T size); void reorder(char *memory,INT32 nitems,INT32 size,INT32 *order); +void reorder(char *memory, INT32 nitems, INT32 size,INT32 *order); unsigned INT32 hashmem(const unsigned char *a,INT32 len,INT32 mlen); unsigned INT32 hashstr(const unsigned char *str,INT32 maxn); +void init_memsearch(struct mem_searcher *s, + char *needle, + SIZE_T needlelen, + SIZE_T max_haystacklen); +char *memory_search(struct mem_searcher *s, + char *haystack, + SIZE_T haystacklen); +char *my_memmem(char *needle, + SIZE_T needlelen, + char *haystack, + SIZE_T haystacklen); /* Prototypes end here */ #endif diff --git a/src/modlist.h b/src/modlist.h deleted file mode 100644 index 34e2773f8e22247c7dcaf7cae92b289140804d03..0000000000000000000000000000000000000000 --- a/src/modlist.h +++ /dev/null @@ -1,31 +0,0 @@ -void init_main_efuns(void); -void init_main_programs(void); -void exit_main(void); -void init_files_efuns(void); -void init_files_programs(void); -void exit_files(void); -void init_math_efuns(void); -void init_math_programs(void); -void exit_math(void); -void init_pipe_efuns(void); -void init_pipe_programs(void); -void exit_pipe(void); -void init_regexp_efuns(void); -void init_regexp_programs(void); -void exit_regexp(void); -void init_spider_efuns(void); -void init_spider_programs(void); -void exit_spider(void); -void init_sprintf_efuns(void); -void init_sprintf_programs(void); -void exit_sprintf(void); - -struct module module_list UGLY_WORKAROUND={ - { "main", init_main_efuns, init_main_programs, exit_main, 0 } - ,{ "files", init_files_efuns, init_files_programs, exit_files, 0 } - ,{ "math", init_math_efuns, init_math_programs, exit_math, 0 } - ,{ "pipe", init_pipe_efuns, init_pipe_programs, exit_pipe, 0 } - ,{ "regexp", init_regexp_efuns, init_regexp_programs, exit_regexp, 0 } - ,{ "spider", init_spider_efuns, init_spider_programs, exit_spider, 0 } - ,{ "sprintf", init_sprintf_efuns, init_sprintf_programs, exit_sprintf, 0 } -}; diff --git a/src/module.c b/src/module.c index b784acd9fcbe7babc9710ecae7342076acae6a6f..fb71fa99c0685e562cf87bb478a208ae53273d18 100644 --- a/src/module.c +++ b/src/module.c @@ -1,6 +1,6 @@ /*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ #include "module.h" diff --git a/src/module.h b/src/module.h index 2ee8a0a6909f69358f6b710d928463abceef95e9..21c0bd76d4674b365940f8f4dea2eaf803dd51fd 100644 --- a/src/module.h +++ b/src/module.h @@ -1,6 +1,6 @@ /*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ #ifndef MODULE_H diff --git a/src/modules/.cvsignore b/src/modules/.cvsignore new file mode 100644 index 0000000000000000000000000000000000000000..64200ddc24cb90d8f410a6a9e2b0b79c4cd30d58 --- /dev/null +++ b/src/modules/.cvsignore @@ -0,0 +1,2 @@ +Makefile.in +configure diff --git a/src/modules/.gitignore b/src/modules/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..addfc0376f648196d317f7f7299705f23cb23c21 --- /dev/null +++ b/src/modules/.gitignore @@ -0,0 +1,2 @@ +/Makefile.in +/configure diff --git a/src/modules/Makefile.src b/src/modules/Makefile.src new file mode 100644 index 0000000000000000000000000000000000000000..b4a98b0efa06202234bac87df02d64b2cdf54507 --- /dev/null +++ b/src/modules/Makefile.src @@ -0,0 +1,24 @@ +@SET_MAKE@ + +MODULES=@subdirs@ +MODULE_OBJS=@MODULE_OBJS@ + +MAKE_FLAGS = "prefix=$(prefix)" "exex_prefix=$(exex_prefix)" "CC=$(CC)" "OTHERFLAGS=$(OTHERFLAGS)" "FIXDEP=$(FIXDEP)" "DEBUGDEF=$(DEBUGDEF)" + +all: modules + +modules: + for a in $(MODULES) ; do ( cd $$a ; $(MAKE) $(MAKE_FLAGS) ) ; done + $(MAKE) linker_options + +linker_options: $(MODULE_OBJS) + ( for a in $(MODULES) ; do echo modules/$$a/$$a.a ; \ + if test -f $$a/linker_options ; then cat $$a/linker_options ; fi ; \ + done ; ) >linker_options + +depend: + gcc -MM $(PREFLAGS) $(SRCDIR)/*.c | $(FIXDEP) $(SRCDIR) + for a in $(MODULES) ; do ( cd $$a ; ${MAKE} $(MAKE_FLAGS) depend ) ; done + +clean: + for a in $(MODULES) ; do ( cd $$a ; ${MAKE} $(MAKE_FLAGS) clean ) ; done diff --git a/src/modules/call_out/.cvsignore b/src/modules/call_out/.cvsignore new file mode 100644 index 0000000000000000000000000000000000000000..76e8a85506890a9ad4125ab962e5b80341ffecdc --- /dev/null +++ b/src/modules/call_out/.cvsignore @@ -0,0 +1,2 @@ +configure +Makefile.in diff --git a/src/modules/call_out/.gitignore b/src/modules/call_out/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..1f3e111bcb9a733de582cbc47266cc26dd1ec797 --- /dev/null +++ b/src/modules/call_out/.gitignore @@ -0,0 +1,2 @@ +/configure +/Makefile.in diff --git a/src/modules/call_out/Makefile.src b/src/modules/call_out/Makefile.src new file mode 100644 index 0000000000000000000000000000000000000000..0de1983c20ea991e4703f07109ad3f8a690806ba --- /dev/null +++ b/src/modules/call_out/Makefile.src @@ -0,0 +1,17 @@ +SRCDIR=@srcdir@ +VPATH=@srcdir@:@srcdir@/../..:../.. +PREFLAGS=-I$(SRCDIR) -I$(SRCDIR)/../.. -I../.. +CFLAGS=$(PREFLAGS) $(OTHERFLAGS) + +FILES=call_out.o + +call_out.a: $(FILES) + -rm -f call_out.a + ar cq call_out.a $(FILES) + -@RANLIB@ call_out.a + +clean: + -rm -f *.o *.a + +depend: + gcc -MM $(PREFLAGS) $(SRCDIR)/*.c | $(FIXDEP) $(SRCDIR) diff --git a/src/call_out.c b/src/modules/call_out/call_out.c similarity index 58% rename from src/call_out.c rename to src/modules/call_out/call_out.c index da5c6fd47ffa4170e3794984b446ecb822c19d80..20d88df7ddc12f76069da6769b71634597b37aed 100644 --- a/src/call_out.c +++ b/src/modules/call_out/call_out.c @@ -1,26 +1,39 @@ /*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ #include "global.h" #include "array.h" -#include "call_out.h" #include "dynamic_buffer.h" #include "object.h" #include "interpret.h" #include "error.h" -#include "builtin_efuns.h" +#include "builtin_functions.h" #include "memory.h" #include "main.h" +#include "backend.h" +#include "time_stuff.h" +#include "constants.h" + +#include "callback.h" + +#include <math.h> + +struct call_out_s +{ + struct timeval tv; + struct object *caller; + struct array *args; +}; + +typedef struct call_out_s call_out; call_out **pending_calls=0; /* pointer to first busy pointer */ int num_pending_calls; /* no of busy pointers in buffer */ static call_out **call_buffer=0; /* pointer to buffer */ static int call_buffer_size; /* no of pointers in buffer */ -extern time_t current_time; - static void verify_call_outs() { #ifdef DEBUG @@ -40,15 +53,15 @@ static void verify_call_outs() { if(e) { - if(pending_calls[e-1]->time>pending_calls[e]->time) + if(my_timercmp(&pending_calls[e-1]->tv,>,&pending_calls[e]->tv)) fatal("Error in call out order.\n"); } if(!(v=pending_calls[e]->args)) fatal("No arguments to call\n"); - if(v->refs!=1) - fatal("Array should exactly have one reference.\n"); + if(v->refs < 1) + fatal("Array should have at least one reference.\n"); if(v->malloced_size<v->size) fatal("Impossible array.\n"); @@ -58,7 +71,7 @@ static void verify_call_outs() /* start a new call out, return 1 for success */ -static int new_call_out(int num_arg,struct svalue *argp) +static struct array * new_call_out(int num_arg,struct svalue *argp) { int e,c; call_out *new,**p,**pos; @@ -96,9 +109,24 @@ static int new_call_out(int num_arg,struct svalue *argp) new=(call_out *)xalloc(sizeof(call_out)); if(!new) return 0; + + if(argp[0].type==T_INT) + { + new->tv.tv_sec=argp[0].u.integer; + new->tv.tv_usec=0; + } + else if(argp[0].type == T_FLOAT) + { + FLOAT_TYPE tmp=argp[0].u.float_number; + new->tv.tv_sec=floor(tmp); + new->tv.tv_usec=(long)(1000000.0 * (tmp - floor(tmp))); + } + else + { + fatal("Bad timeout to new_call_out!\n"); + } - new->time=current_time+argp[0].u.integer; - if(new->time <= current_time) new->time=current_time+1; + my_add_timeval(& new->tv, ¤t_time); if(fp && fp->current_object) { @@ -118,7 +146,7 @@ static int new_call_out(int num_arg,struct svalue *argp) while(e>0) { c=e/2; - if(new->time>pos[c]->time) + if(my_timercmp(& new->tv,>,& pos[c]->tv)) { pos+=c+1; e-=c+1; @@ -133,62 +161,109 @@ static int new_call_out(int num_arg,struct svalue *argp) num_pending_calls++; verify_call_outs(); - return 1; + + return new->args; } +static struct callback *call_out_backend_callback=0; +void do_call_outs(struct callback *ignored, void *ignored_too, void *arg); + void f_call_out(INT32 args) { struct svalue tmp; + struct array *v; if(args<2) error("Too few arguments to call_out.\n"); + if(sp[1-args].type != T_INT && sp[1-args].type!=T_FLOAT) + error("Bad argument 2 to call_out.\n"); + /* Swap, for compatibility */ tmp=sp[-args]; sp[-args]=sp[1-args]; sp[1-args]=tmp; - new_call_out(args,sp-args); + v=new_call_out(args,sp-args); + v->refs++; + push_array(v); + + /* We do not add this callback until we actually have + * call outs to take care of. + */ + if(!call_out_backend_callback) + call_out_backend_callback=add_backend_callback(do_call_outs,0,0); } -void do_call_outs() +void do_call_outs(struct callback *ignored, void *ignored_too, void *arg) { call_out *c; int args; + time_t tmp; verify_call_outs(); - while(num_pending_calls && - pending_calls[0]->time<=current_time && - current_time==get_current_time()) - { - /* unlink call out */ - c=pending_calls[0]; - pending_calls++; - num_pending_calls--; - - if(c->caller) free_object(c->caller); - args=c->args->size; - push_array_items(c->args); - free((char *)c); - check_destructed(sp-args); - if(sp[-args].type!=T_INT) + if(arg) + { + tmp=(time_t)TIME(0); + while(num_pending_calls && + my_timercmp(&pending_calls[0]->tv,<=,¤t_time)) + { + /* unlink call out */ + c=pending_calls[0]; + pending_calls++; + num_pending_calls--; + + if(c->caller) free_object(c->caller); + + args=c->args->size; + push_array_items(c->args); + free((char *)c); + check_destructed(sp-args); + if(sp[-args].type!=T_INT) + { + f_call_function(args); + pop_stack(); + }else{ + pop_n_elems(args); + } + verify_call_outs(); + + if(tmp != (time_t) TIME(0)) break; + } + } + else /* if(arg) */ + { + if(num_pending_calls) { - f_call_function(args); - pop_stack(); + if(my_timercmp(& pending_calls[0]->tv, < , &next_timeout)) + { + next_timeout = pending_calls[0]->tv; + } }else{ - pop_n_elems(args); + if(call_out_backend_callback) + { + /* There are no call outs queued, let's remove + * the taxing backend callback... + */ + remove_callback(call_out_backend_callback); + call_out_backend_callback=0; + } } - verify_call_outs(); } } static int find_call_out(struct svalue *fun) { int e; + + if(fun->type == T_ARRAY) + for(e=0;e<num_pending_calls;e++) + if(pending_calls[e]->args == fun->u.array) + return e; + for(e=0;e<num_pending_calls;e++) - { if(is_eq(fun, ITEM(pending_calls[e]->args))) return e; - } + return -1; } @@ -205,7 +280,7 @@ void f_find_call_out(INT32 args) sp->u.integer=-1; sp++; }else{ - push_int(pending_calls[e]->time-current_time); + push_int(pending_calls[e]->tv.tv_sec - current_time.tv_sec); } verify_call_outs(); } @@ -218,7 +293,7 @@ void f_remove_call_out(INT32 args) if(e!=-1) { pop_n_elems(args); - push_int(pending_calls[e]->time-current_time); + push_int(pending_calls[e]->tv.tv_sec - current_time.tv_sec); free_array(pending_calls[e]->args); if(pending_calls[e]->caller) free_object(pending_calls[e]->caller); @@ -246,14 +321,14 @@ struct array *get_all_call_outs() struct array *ret; verify_call_outs(); - ret=allocate_array_no_init(num_pending_calls,0,T_ARRAY); + ret=allocate_array_no_init(num_pending_calls,0); for(e=0;e<num_pending_calls;e++) { struct array *v; - v=allocate_array_no_init(pending_calls[e]->args->size+2, 0, T_MIXED); + v=allocate_array_no_init(pending_calls[e]->args->size+2, 0); ITEM(v)[0].type=T_INT; ITEM(v)[0].subtype=NUMBER_NUMBER; - ITEM(v)[0].u.integer=pending_calls[e]->time-current_time; + ITEM(v)[0].u.integer=pending_calls[e]->tv.tv_sec - current_time.tv_sec; if(pending_calls[e]->caller) { @@ -265,9 +340,10 @@ struct array *get_all_call_outs() ITEM(v)[1].u.integer=0; } - assign_svalues_no_free(ITEM(v)+2,ITEM(pending_calls[e]->args),pending_calls[e]->args->size); + assign_svalues_no_free(ITEM(v)+2,ITEM(pending_calls[e]->args),pending_calls[e]->args->size,BIT_MIXED); - SHORT_ITEM(ret)[e].array=v; + ITEM(ret)[e].type=T_ARRAY; + ITEM(ret)[e].u.array=v; } return ret; } @@ -294,25 +370,24 @@ void free_all_call_outs() pending_calls=NULL; } -time_t get_next_call_out() -{ - if(num_pending_calls) - { - return pending_calls[0]->time; - }else{ - return 0; - } -} - #ifdef DEBUG void verify_all_call_outs() { - int e; verify_call_outs(); - for(e=0;e<num_pending_calls;e++) - { - checked((void *)pending_calls[e]->caller,1); - checked((void *)pending_calls[e]->args,1); - } } #endif + +void init_call_out_efuns(void) +{ + add_efun("call_out",f_call_out,"function(function,float|int,mixed...:mixed)",OPT_SIDE_EFFECT); + add_efun("call_out_info",f_call_out_info,"function(:array*)",OPT_EXTERNAL_DEPEND); + add_efun("find_call_out",f_find_call_out,"function(mixed:int)",OPT_EXTERNAL_DEPEND); + add_efun("remove_call_out",f_remove_call_out,"function(mixed:int)",OPT_SIDE_EFFECT); +} + +void init_call_out_programs(void) {} + +void exit_call_out(void) +{ + free_all_call_outs(); +} diff --git a/src/modules/call_out/configure.in b/src/modules/call_out/configure.in new file mode 100644 index 0000000000000000000000000000000000000000..ae228dce800c86dd4524a5b715255fe3a7eb943d --- /dev/null +++ b/src/modules/call_out/configure.in @@ -0,0 +1,9 @@ +AC_INIT(call_out.c) + +AC_PROG_CC +AC_PROG_RANLIB +AC_SUBST(RANLIB) + +AC_OUTPUT(Makefile,echo FOO >stamp-h ) + + diff --git a/src/modules/call_out/doc/call_out b/src/modules/call_out/doc/call_out new file mode 100644 index 0000000000000000000000000000000000000000..33d3446c86e32d0d83dec1cd2201cce7a9b433bd --- /dev/null +++ b/src/modules/call_out/doc/call_out @@ -0,0 +1,14 @@ +NAME + call_out - make a delayed call to a function + +SYNTAX + mixed call_out(function f, int delay, mixed ... args); + +DESCRIPTION + Call_out places a call to the function f with the argument args + in a queue to be called in about delay seconds. The return value + identifies this call out. The return value can be sent to + find_call_out or remove_call_out to remove the call out again. + +SEE ALSO + remove_call_out, find_call_out, call_out_info diff --git a/doc/builtin/call_out_info b/src/modules/call_out/doc/call_out_info similarity index 58% rename from doc/builtin/call_out_info rename to src/modules/call_out/doc/call_out_info index c3399fe8aefdaf7a1de5d12c02bed1d9c8c46857..1b20ed39627716e8aebe55bc65cbafca6458929e 100644 --- a/doc/builtin/call_out_info +++ b/src/modules/call_out/doc/call_out_info @@ -10,12 +10,12 @@ DESCRIPTION contains an array that looks like this: ({ - time_left, /* an int */ - caller, /* the object that made the call out */ - function, /* the function to be called */ - arg1, /* the first argument, if any */ - arg2, /* the second argument, if any */ - ... /* and so on... */ + time_left, /* an int */ + caller, /* the object that made the call out */ + function, /* the function to be called */ + arg1, /* the first argument, if any */ + arg2, /* the second argument, if any */ + ... /* and so on... */ }) SEE ALSO diff --git a/src/modules/call_out/doc/find_call_out b/src/modules/call_out/doc/find_call_out new file mode 100644 index 0000000000000000000000000000000000000000..019ea4d2fe7e9f46433958f31c77d85a716e8179 --- /dev/null +++ b/src/modules/call_out/doc/find_call_out @@ -0,0 +1,19 @@ +NAME + find_call_out - find a call out in the queue + +SYNTAX + int find_call_out(function f); + or + int find_call_out(mixed id); + +DESCRIPTION + This function searches the call out queue. If given a function as + argument, it looks for the first call out scheduled to that function. + The argument can also be a call out id as returned by call_out, in + which case that call_out will be found. (Unless it has already been + called.) find_call_out will then return how many seconds remains + before that call will be executed. If no call is found, + zero_type(find_call_out(f)) will return 1. + +SEE ALSO + call_out, remove_call_out, call_out_info diff --git a/doc/builtin/remove_call_out b/src/modules/call_out/doc/remove_call_out similarity index 74% rename from doc/builtin/remove_call_out rename to src/modules/call_out/doc/remove_call_out index 277cc9eb0a2bd30f93927a221591ca394f776116..b730c6ed7df15bcf0ed39fe0c766b799d8cf53f0 100644 --- a/doc/builtin/remove_call_out +++ b/src/modules/call_out/doc/remove_call_out @@ -3,12 +3,15 @@ NAME SYNTAX int remove_call_out(function f); + or + int remove_call_out(function id); DESCRIPTION This function finds the first call to the function f in the call out queue and removes it. The time left to that call out will be returned. If no call out was found, zero_type(remove_call_out(f)) - will return 1. + will return 1. You can also give a call out id as argument. (as + returned by call_out) SEE ALSO call_out_info, call_out, find_call_out diff --git a/src/modules/configure.in b/src/modules/configure.in new file mode 100644 index 0000000000000000000000000000000000000000..9c8f79d139dc93ada177b729bf21ac81e3e044d8 --- /dev/null +++ b/src/modules/configure.in @@ -0,0 +1,50 @@ +AC_INIT(module_dir_marker) + +AC_SET_MAKE + +dirs= +MODULE_OBJS= +module_names= +for a in `(cd $srcdir ; echo *)` +do + if test "$a" != "CVS" -a "$a" != "RCS" ; then + if test -d "$srcdir/$a" ; then + dirs="$dirs $a" + MODULE_OBJS="$MODULE_OBJS $a/$a.a" + module_names="$module_names $a" + fi + fi +done + +AC_SUBST(MODULE_OBJS) +AC_CONFIG_SUBDIRS($dirs) + +AC_OUTPUT(Makefile, +[ +echo creating modlist.h +( +echo "void init_main_efuns(void);" +echo "void init_main_programs(void);" +echo "void exit_main(void);" + +for a in $dirs +do + echo "void init_"$a"_efuns(void);" + echo "void init_"$a"_programs(void);" + echo "void exit_"$a"(void);" +done +echo "" +echo "struct module module_list UGLY_WORKAROUND={" + +echo " { \"main\", init_main_efuns, init_main_programs, exit_main, 0 }" +for a in $dirs +do + echo " ,{ \"$a\", init_"$a"_efuns, init_"$a"_programs, exit_"$a", 0 }" +done +echo "};" +) > ../modlist.h +] +, +dirs="$module_names" +) + diff --git a/src/modules/files/.cvsignore b/src/modules/files/.cvsignore new file mode 100644 index 0000000000000000000000000000000000000000..76e8a85506890a9ad4125ab962e5b80341ffecdc --- /dev/null +++ b/src/modules/files/.cvsignore @@ -0,0 +1,2 @@ +configure +Makefile.in diff --git a/src/modules/files/.gitignore b/src/modules/files/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..1f3e111bcb9a733de582cbc47266cc26dd1ec797 --- /dev/null +++ b/src/modules/files/.gitignore @@ -0,0 +1,2 @@ +/configure +/Makefile.in diff --git a/src/modules/files/Makefile b/src/modules/files/Makefile deleted file mode 100644 index 04947d5c9d6debc90a2d1816801508da6517efa7..0000000000000000000000000000000000000000 --- a/src/modules/files/Makefile +++ /dev/null @@ -1,74 +0,0 @@ -# Generated automatically from Makefile.in by configure. -SRCDIR=. -VPATH=.:./../..:../.. -PREFLAGS=-I. -I$(SRCDIR) -I$(SRCDIR)/../.. -I../.. -CFLAGS=$(PREFLAGS) $(OTHERFLAGS) - -FILES=file.o efuns.o socket.o - -files.a: $(FILES) - -rm -f files.a - ar cq files.a $(FILES) - -ranlib files.a - -clean: - -rm -f *.o *.a - -depend: - gcc -MM $(PREFLAGS) $(SRCDIR)/*.c | $(FIXDEP) $(SRCDIR)/Makefile.in - - - -#Dependencies begin here, DO NOT REMOVE THIS LINE!!!! -datagram.o: datagram.c -efuns.o: efuns.c \ - global.h machine.h \ - config.h \ - debug.h \ - port.h \ - interpret.h \ - program.h \ - svalue.h \ - stralloc.h \ - array.h \ - las.h \ - dynamic_buffer.h \ - mapping.h \ - macros.h \ - fd_control.h file_machine.h -file.o: file.c \ - global.h machine.h \ - config.h \ - debug.h \ - port.h \ - interpret.h \ - program.h \ - svalue.h \ - stralloc.h \ - array.h \ - las.h \ - dynamic_buffer.h \ - object.h \ - macros.h \ - backend.h \ - fd_control.h file_machine.h \ - file.h \ - error.h \ - lpc_signal.h -socket.o: socket.c \ - global.h machine.h \ - config.h \ - debug.h \ - port.h \ - interpret.h \ - program.h \ - svalue.h \ - stralloc.h \ - array.h \ - las.h \ - dynamic_buffer.h \ - object.h \ - macros.h \ - backend.h \ - fd_control.h file_machine.h \ - file.h diff --git a/src/modules/files/Makefile.in b/src/modules/files/Makefile.in deleted file mode 100644 index cee0d455844eda7ca83bcf4f1dcf078221572501..0000000000000000000000000000000000000000 --- a/src/modules/files/Makefile.in +++ /dev/null @@ -1,73 +0,0 @@ -SRCDIR=@srcdir@ -VPATH=@srcdir@:@srcdir@/../..:../.. -PREFLAGS=-I. -I$(SRCDIR) -I$(SRCDIR)/../.. -I../.. -CFLAGS=$(PREFLAGS) $(OTHERFLAGS) - -FILES=file.o efuns.o socket.o - -files.a: $(FILES) - -rm -f files.a - ar cq files.a $(FILES) - -@RANLIB@ files.a - -clean: - -rm -f *.o *.a - -depend: - gcc -MM $(PREFLAGS) $(SRCDIR)/*.c | $(FIXDEP) $(SRCDIR)/Makefile.in - - - -#Dependencies begin here, DO NOT REMOVE THIS LINE!!!! -datagram.o: datagram.c -efuns.o: efuns.c \ - global.h machine.h \ - config.h \ - debug.h \ - port.h \ - interpret.h \ - program.h \ - svalue.h \ - stralloc.h \ - array.h \ - las.h \ - dynamic_buffer.h \ - mapping.h \ - macros.h \ - fd_control.h file_machine.h -file.o: file.c \ - global.h machine.h \ - config.h \ - debug.h \ - port.h \ - interpret.h \ - program.h \ - svalue.h \ - stralloc.h \ - array.h \ - las.h \ - dynamic_buffer.h \ - object.h \ - macros.h \ - backend.h \ - fd_control.h file_machine.h \ - file.h \ - error.h \ - lpc_signal.h -socket.o: socket.c \ - global.h machine.h \ - config.h \ - debug.h \ - port.h \ - interpret.h \ - program.h \ - svalue.h \ - stralloc.h \ - array.h \ - las.h \ - dynamic_buffer.h \ - object.h \ - macros.h \ - backend.h \ - fd_control.h file_machine.h \ - file.h diff --git a/src/modules/files/Makefile.src b/src/modules/files/Makefile.src new file mode 100644 index 0000000000000000000000000000000000000000..7cfca629e9cce7ebd3fdc8529082a736324eef4a --- /dev/null +++ b/src/modules/files/Makefile.src @@ -0,0 +1,19 @@ +SRCDIR=@srcdir@ +VPATH=@srcdir@:@srcdir@/../..:../.. +PREFLAGS=-I. -I$(SRCDIR) -I$(SRCDIR)/../.. -I../.. +CFLAGS=$(PREFLAGS) $(OTHERFLAGS) + +FILES=file.o efuns.o socket.o + +files.a: $(FILES) + -rm -f files.a + ar cq files.a $(FILES) + -@RANLIB@ files.a + echo >linker_options @LIBS@ + +clean: + -rm -f *.o *.a + +depend: + gcc -MM $(PREFLAGS) $(SRCDIR)/*.c | $(FIXDEP) $(SRCDIR) + diff --git a/src/modules/files/configure b/src/modules/files/configure deleted file mode 100755 index 5f3a4605aa569c759f9e3d969f541cabbdcad696..0000000000000000000000000000000000000000 --- a/src/modules/files/configure +++ /dev/null @@ -1,1293 +0,0 @@ -#! /bin/sh - -# Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.7 -# Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. -# -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. - -# Defaults: -ac_help= -ac_default_prefix=/usr/local -# Any additions from configure.in: - -# Initialize some variables set by options. -# The variables have the same names as the options, with -# dashes changed to underlines. -build=NONE -cache_file=./config.cache -exec_prefix=NONE -host=NONE -no_create= -nonopt=NONE -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -target=NONE -verbose= -x_includes=NONE -x_libraries=NONE -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datadir='${prefix}/share' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -libdir='${exec_prefix}/lib' -includedir='${prefix}/include' -oldincludedir='/usr/include' -infodir='${prefix}/info' -mandir='${prefix}/man' - -# Initialize some other variables. -subdirs= -MFLAGS= MAKEFLAGS= - -ac_prev= -for ac_option -do - - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval "$ac_prev=\$ac_option" - ac_prev= - continue - fi - - case "$ac_option" in - -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; - *) ac_optarg= ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case "$ac_option" in - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir="$ac_optarg" ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build="$ac_optarg" ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file="$ac_optarg" ;; - - -datadir | --datadir | --datadi | --datad | --data | --dat | --da) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ - | --da=*) - datadir="$ac_optarg" ;; - - -disable-* | --disable-*) - ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - eval "enable_${ac_feature}=no" ;; - - -enable-* | --enable-*) - ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; - *) ac_optarg=yes ;; - esac - eval "enable_${ac_feature}='$ac_optarg'" ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix="$ac_optarg" ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he) - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat << EOF -Usage: configure [options] [host] -Options: [defaults in brackets after descriptions] -Configuration: - --cache-file=FILE cache test results in FILE - --help print this message - --no-create do not create output files - --quiet, --silent do not print \`checking...' messages - --version print the version of autoconf that created configure -Directory and file names: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [same as prefix] - --bindir=DIR user executables in DIR [EPREFIX/bin] - --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] - --libexecdir=DIR program executables in DIR [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data in DIR - [PREFIX/share] - --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data in DIR - [PREFIX/com] - --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] - --libdir=DIR object code libraries in DIR [EPREFIX/lib] - --includedir=DIR C header files in DIR [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] - --infodir=DIR info documentation in DIR [PREFIX/info] - --mandir=DIR man documentation in DIR [PREFIX/man] - --srcdir=DIR find the sources in DIR [configure dir or ..] - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM - run sed PROGRAM on installed program names -EOF - cat << EOF -Host type: - --build=BUILD configure for building on BUILD [BUILD=HOST] - --host=HOST configure for HOST [guessed] - --target=TARGET configure for TARGET [TARGET=HOST] -Features and packages: - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --x-includes=DIR X include files are in DIR - --x-libraries=DIR X library files are in DIR -EOF - if test -n "$ac_help"; then - echo "--enable and --with options recognized:$ac_help" - fi - exit 0 ;; - - -host | --host | --hos | --ho) - ac_prev=host ;; - -host=* | --host=* | --hos=* | --ho=*) - host="$ac_optarg" ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir="$ac_optarg" ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir="$ac_optarg" ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir="$ac_optarg" ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir="$ac_optarg" ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst \ - | --locals | --local | --loca | --loc | --lo) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* \ - | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) - localstatedir="$ac_optarg" ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir="$ac_optarg" ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir="$ac_optarg" ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix="$ac_optarg" ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix="$ac_optarg" ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix="$ac_optarg" ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name="$ac_optarg" ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir="$ac_optarg" ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir="$ac_optarg" ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site="$ac_optarg" ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir="$ac_optarg" ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir="$ac_optarg" ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target="$ac_optarg" ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.7" - exit 0 ;; - - -with-* | --with-*) - ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi - ac_package=`echo $ac_package| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; - *) ac_optarg=yes ;; - esac - eval "with_${ac_package}='$ac_optarg'" ;; - - -without-* | --without-*) - ac_package=`echo $ac_option|sed -e 's/-*without-//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi - ac_package=`echo $ac_package| sed 's/-/_/g'` - eval "with_${ac_package}=no" ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes="$ac_optarg" ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries="$ac_optarg" ;; - - -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } - ;; - - *) - if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then - echo "configure: warning: $ac_option: invalid host type" 1>&2 - fi - if test "x$nonopt" != xNONE; then - { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } - fi - nonopt="$ac_option" - ;; - - esac -done - -if test -n "$ac_prev"; then - { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } -fi - -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - -# File descriptor usage: -# 0 standard input -# 1 file creation -# 2 errors and warnings -# 3 some systems may open it to /dev/tty -# 4 used on the Kubota Titan -# 6 checking for... messages and results -# 5 compiler messages saved in config.log -if test "$silent" = yes; then - exec 6>/dev/null -else - exec 6>&1 -fi -exec 5>./config.log - -echo "\ -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. -" 1>&5 - -# Strip out --no-create and --no-recursion so they do not pile up. -# Also quote any args containing shell metacharacters. -ac_configure_args= -for ac_arg -do - case "$ac_arg" in - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) ;; - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) - ac_configure_args="$ac_configure_args '$ac_arg'" ;; - *) ac_configure_args="$ac_configure_args $ac_arg" ;; - esac -done - -# NLS nuisances. -# Only set LANG and LC_ALL to C if already set. -# These must not be set unconditionally because not all systems understand -# e.g. LANG=C (notably SCO). -if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi -if test "${LANG+set}" = set; then LANG=C; export LANG; fi - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo > confdefs.h - -# A filename unique to this package, relative to the directory that -# configure is in, which we can look for to find out if srcdir is correct. -ac_unique_file=file.c - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then its parent. - ac_prog=$0 - ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` - test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. - srcdir=$ac_confdir - if test ! -r $srcdir/$ac_unique_file; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r $srcdir/$ac_unique_file; then - if test "$ac_srcdir_defaulted" = yes; then - { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } - else - { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } - fi -fi -srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` - -# Prefer explicitly selected file to automatically selected ones. -if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi -fi -for ac_site_file in $CONFIG_SITE; do - if test -r "$ac_site_file"; then - echo "loading site script $ac_site_file" - . "$ac_site_file" - fi -done - -if test -r "$cache_file"; then - echo "loading cache $cache_file" - . $cache_file -else - echo "creating cache $cache_file" - > $cache_file -fi - -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='echo $CPP $CPPFLAGS 1>&5; -$CPP $CPPFLAGS' -ac_compile='echo ${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5; -${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5' -ac_link='echo ${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5; -${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5' - -if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then - # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. - if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then - ac_n= ac_c=' -' ac_t=' ' - else - ac_n=-n ac_c= ac_t= - fi -else - ac_n= ac_c='\c' ac_t= -fi - - - - -# Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="gcc" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc" -fi -fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - -echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.c <<EOF -#ifdef __GNUC__ - yes; -#endif -EOF -if ${CC-cc} -E conftest.c 2>&5 | egrep yes >/dev/null 2>&1; then - ac_cv_prog_gcc=yes -else - ac_cv_prog_gcc=no -fi -fi - -echo "$ac_t""$ac_cv_prog_gcc" 1>&6 -if test $ac_cv_prog_gcc = yes; then - GCC=yes - if test "${CFLAGS+set}" != set; then - echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - echo 'void f(){}' > conftest.c -if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then - ac_cv_prog_gcc_g=yes -else - ac_cv_prog_gcc_g=no -fi -rm -f conftest* - -fi - -echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6 - if test $ac_cv_prog_gcc_g = yes; then - CFLAGS="-g -O" - else - CFLAGS="-O" - fi - fi -else - GCC= - test "${CFLAGS+set}" = set || CFLAGS="-g" -fi - -# Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_RANLIB="ranlib" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" -fi -fi -RANLIB="$ac_cv_prog_RANLIB" -if test -n "$RANLIB"; then - echo "$ac_t""$RANLIB" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - - -echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then -if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - # This must be in double quotes, not single quotes, because CPP may get - # substituted into the Makefile and "${CC-cc}" will confuse make. - CPP="${CC-cc} -E" - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. - cat > conftest.$ac_ext <<EOF -#line 641 "configure" -#include "confdefs.h" -#include <assert.h> -Syntax Error -EOF -eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - rm -rf conftest* - CPP="${CC-cc} -E -traditional-cpp" - cat > conftest.$ac_ext <<EOF -#line 655 "configure" -#include "confdefs.h" -#include <assert.h> -Syntax Error -EOF -eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - rm -rf conftest* - CPP=/lib/cpp -fi -rm -f conftest* -fi -rm -f conftest* - ac_cv_prog_CPP="$CPP" -fi - CPP="$ac_cv_prog_CPP" -else - ac_cv_prog_CPP="$CPP" -fi -echo "$ac_t""$CPP" 1>&6 - -for ac_hdr in arpa/inet.h sys/socketvar.h netinet/in.h \ - sys/stream.h sys/protosw.h -do -ac_safe=`echo "$ac_hdr" | tr './\055' '___'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <<EOF -#line 689 "configure" -#include "confdefs.h" -#include <$ac_hdr> -EOF -eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'` - cat >> confdefs.h <<EOF -#define $ac_tr_hdr 1 -EOF - -else - echo "$ac_t""no" 1>&6 -fi -done - -ac_header_dirent=no -for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h -do -ac_safe=`echo "$ac_hdr" | tr './\055' '___'` -echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <<EOF -#line 726 "configure" -#include "confdefs.h" -#include <sys/types.h> -#include <$ac_hdr> -int main() { return 0; } -int t() { -DIR *dirp = 0; -; return 0; } -EOF -if eval $ac_compile; then - rm -rf conftest* - eval "ac_cv_header_dirent_$ac_safe=yes" -else - rm -rf conftest* - eval "ac_cv_header_dirent_$ac_safe=no" -fi -rm -f conftest* - -fi -if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdedfghijklmnopqrstuvwxyz./\055' 'ABCDEDFGHIJKLMNOPQRSTUVWXYZ___'` - cat >> confdefs.h <<EOF -#define $ac_tr_hdr 1 -EOF - ac_header_dirent=$ac_hdr; break -else - echo "$ac_t""no" 1>&6 -fi -done -# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. -if test $ac_header_dirent = dirent.h; then -echo $ac_n "checking for -ldir""... $ac_c" 1>&6 -ac_lib_var=`echo dir | tr '.-/+' '___p'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-ldir $LIBS" -cat > conftest.$ac_ext <<EOF -#line 766 "configure" -#include "confdefs.h" - -int main() { return 0; } -int t() { -opendir() -; return 0; } -EOF -if eval $ac_link; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - LIBS="$LIBS -ldir" -else - echo "$ac_t""no" 1>&6 -fi - -else -echo $ac_n "checking for -lx""... $ac_c" 1>&6 -ac_lib_var=`echo x | tr '.-/+' '___p'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lx $LIBS" -cat > conftest.$ac_ext <<EOF -#line 801 "configure" -#include "confdefs.h" - -int main() { return 0; } -int t() { -opendir() -; return 0; } -EOF -if eval $ac_link; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - LIBS="$LIBS -lx" -else - echo "$ac_t""no" 1>&6 -fi - -fi - -echo $ac_n "checking for -lsocket""... $ac_c" 1>&6 -ac_lib_var=`echo socket | tr '.-/+' '___p'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lsocket $LIBS" -cat > conftest.$ac_ext <<EOF -#line 837 "configure" -#include "confdefs.h" - -int main() { return 0; } -int t() { -socket() -; return 0; } -EOF -if eval $ac_link; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo socket | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <<EOF -#define $ac_tr_lib 1 -EOF - - LIBS="-lsocket $LIBS" - -else - echo "$ac_t""no" 1>&6 -fi - - -for ac_func in socketpair -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <<EOF -#line 877 "configure" -#include "confdefs.h" -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ -#include <assert.h> -/* Override any gcc2 internal prototype to avoid an error. */ -char $ac_func(); - -int main() { return 0; } -int t() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if eval $ac_link; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* - -fi -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <<EOF -#define $ac_tr_func 1 -EOF - -else - echo "$ac_t""no" 1>&6 -fi -done - - -echo $ac_n "checking size of socket buffers""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'lpc_cv_socket_buffer_max'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - -# If we cannot run a trivial program, we must be cross compiling. -echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - ac_cv_c_cross=yes -else -cat > conftest.$ac_ext <<EOF -#line 936 "configure" -#include "confdefs.h" -main(){return(0);} -EOF -eval $ac_link -if test -s conftest && (./conftest; exit) 2>/dev/null; then - ac_cv_c_cross=no -else - ac_cv_c_cross=yes -fi -fi -rm -fr conftest* -fi - -echo "$ac_t""$ac_cv_c_cross" 1>&6 -cross_compiling=$ac_cv_c_cross - -if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else -cat > conftest.$ac_ext <<EOF -#line 957 "configure" -#include "confdefs.h" - -#include <stdio.h> -#include <sys/types.h> -#include <sys/param.h> -#include <errno.h> -#include <fcntl.h> -#include <signal.h> -#include <sys/wait.h> -#include <sys/socket.h> - -int main() -{ - FILE *f; - int fd, try, tmp; - - fd=socket(AF_INET, SOCK_STREAM, 0); - - if(fd < 0) return 1; - - try=1024; - while(try < 65000) - { - tmp=try*2; - if(setsockopt(fd, SOL_SOCKET, SO_SNDBUF, (char *)&tmp, sizeof(int)) < 0) - { - break; - } - try*=2; - } - f=fopen("conftest.out.2","w"); - fprintf(f,"%d\n",try); - fclose(f); - - return 0; -} -EOF -eval $ac_link -if test -s conftest && (./conftest; exit) 2>/dev/null; then - lpc_cv_socket_buffer_max=`cat conftest.out.2` - -else - lpc_cv_socket_buffer_max=0 - -fi -fi -rm -fr conftest* -fi - - -cat >> confdefs.h <<EOF -#define SOCKET_BUFFER_MAX $lpc_cv_socket_buffer_max -EOF - -echo "$ac_t""$lpc_cv_socket_buffer_max" 1>&6 - -trap '' 1 2 15 -cat > confcache <<\EOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs. It is not useful on other systems. -# If it contains results you don't want to keep, you may remove or edit it. -# -# By default, configure uses ./config.cache as the cache file, -# creating it if it does not exist already. You can give configure -# the --cache-file=FILE option to use a different cache file; that is -# what configure does when it calls configure scripts in -# subdirectories, so they share the cache. -# Giving --cache-file=/dev/null disables caching, for debugging configure. -# config.status only pays attention to the cache file if you give it the -# --recheck option to rerun configure. -# -EOF -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -(set) 2>&1 | - sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \ - >> confcache -if cmp -s $cache_file confcache; then - : -else - if test -w $cache_file; then - echo "updating cache $cache_file" - cat confcache > $cache_file - else - echo "not updating unwritable cache $cache_file" - fi -fi -rm -f confcache - -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -# Any assignment to VPATH causes Sun make to only execute -# the first set of double-colon rules, so remove it if not needed. -# If there is a colon in the path, we need to keep it. -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' -fi - -trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 - -DEFS=-DHAVE_CONFIG_H - -# Without the "./", some shells look in PATH for config.status. -: ${CONFIG_STATUS=./config.status} - -echo creating $CONFIG_STATUS -rm -f $CONFIG_STATUS -cat > $CONFIG_STATUS <<EOF -#! /bin/sh -# Generated automatically by configure. -# Run this file to recreate the current configuration. -# This directory was configured as follows, -# on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# -# $0 $ac_configure_args -# -# Compiler output produced by configure, useful for debugging -# configure, is in ./config.log if it exists. - -ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" -for ac_option -do - case "\$ac_option" in - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" - exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; - -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.7" - exit 0 ;; - -help | --help | --hel | --he | --h) - echo "\$ac_cs_usage"; exit 0 ;; - *) echo "\$ac_cs_usage"; exit 1 ;; - esac -done - -ac_given_srcdir=$srcdir - -trap 'rm -fr `echo "Makefile file_machine.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 -EOF -cat >> $CONFIG_STATUS <<EOF - -# Protect against being on the right side of a sed subst in config.status. -sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; - s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF -$ac_vpsub -$extrasub -s%@CFLAGS@%$CFLAGS%g -s%@CPPFLAGS@%$CPPFLAGS%g -s%@CXXFLAGS@%$CXXFLAGS%g -s%@DEFS@%$DEFS%g -s%@LDFLAGS@%$LDFLAGS%g -s%@LIBS@%$LIBS%g -s%@exec_prefix@%$exec_prefix%g -s%@prefix@%$prefix%g -s%@program_transform_name@%$program_transform_name%g -s%@bindir@%$bindir%g -s%@sbindir@%$sbindir%g -s%@libexecdir@%$libexecdir%g -s%@datadir@%$datadir%g -s%@sysconfdir@%$sysconfdir%g -s%@sharedstatedir@%$sharedstatedir%g -s%@localstatedir@%$localstatedir%g -s%@libdir@%$libdir%g -s%@includedir@%$includedir%g -s%@oldincludedir@%$oldincludedir%g -s%@infodir@%$infodir%g -s%@mandir@%$mandir%g -s%@CC@%$CC%g -s%@RANLIB@%$RANLIB%g -s%@CPP@%$CPP%g - -CEOF -EOF -cat >> $CONFIG_STATUS <<EOF - -CONFIG_FILES=\${CONFIG_FILES-"Makefile"} -EOF -cat >> $CONFIG_STATUS <<\EOF -for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then - # Support "outfile[:infile]", defaulting infile="outfile.in". - case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.in" ;; - esac - - # Adjust relative srcdir, etc. for subdirectories. - - # Remove last slash and all that follows it. Not all systems have dirname. - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" - ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" - # A "../" for each directory in $ac_dir_suffix. - ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` - else - ac_dir_suffix= ac_dots= - fi - - case "$ac_given_srcdir" in - .) srcdir=. - if test -z "$ac_dots"; then top_srcdir=. - else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; - /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; - *) # Relative path. - srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" - top_srcdir="$ac_dots$ac_given_srcdir" ;; - esac - - echo creating "$ac_file" - rm -f "$ac_file" - configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." - case "$ac_file" in - *Makefile*) ac_comsub="1i\\ -# $configure_input" ;; - *) ac_comsub= ;; - esac - sed -e "$ac_comsub -s%@configure_input@%$configure_input%g -s%@srcdir@%$srcdir%g -s%@top_srcdir@%$top_srcdir%g -" -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file -fi; done -rm -f conftest.subs - -# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where -# NAME is the cpp macro being defined and VALUE is the value it is being given. -# -# ac_d sets the value in "#define NAME VALUE" lines. -ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' -ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' -ac_dC='\3' -ac_dD='%g' -# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". -ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_uB='\([ ]\)%\1#\2define\3' -ac_uC=' ' -ac_uD='\4%g' -# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". -ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_eB='$%\1#\2define\3' -ac_eC=' ' -ac_eD='%g' - -CONFIG_HEADERS=${CONFIG_HEADERS-"file_machine.h"} -for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then - # Support "outfile[:infile]", defaulting infile="outfile.in". - case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.in" ;; - esac - - echo creating $ac_file - - rm -f conftest.frag conftest.in conftest.out - cp $ac_given_srcdir/$ac_file_in conftest.in - -EOF - -# Transform confdefs.h into a sed script conftest.vals that substitutes -# the proper values into config.h.in to produce config.h. And first: -# Protect against being on the right side of a sed subst in config.status. -# Protect against being in an unquoted here document in config.status. -rm -f conftest.vals -cat > conftest.hdr <<\EOF -s/[\\&%]/\\&/g -s%[\\$`]%\\&%g -s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp -s%ac_d%ac_u%gp -s%ac_u%ac_e%gp -EOF -sed -n -f conftest.hdr confdefs.h > conftest.vals -rm -f conftest.hdr - -# This sed command replaces #undef with comments. This is necessary, for -# example, in the case of _POSIX_SOURCE, which is predefined and required -# on some systems where configure will not decide to define it. -cat >> conftest.vals <<\EOF -s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% -EOF - -# Break up conftest.vals because some shells have a limit on -# the size of here documents, and old seds have small limits too. -# Maximum number of lines to put in a single here document. -ac_max_here_lines=12 - -rm -f conftest.tail -while : -do - ac_lines=`grep -c . conftest.vals` - # grep -c gives empty output for an empty file on some AIX systems. - if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi - # Write a limited-size here document to conftest.frag. - echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS - sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS - echo 'CEOF - sed -f conftest.frag conftest.in > conftest.out - rm -f conftest.in - mv conftest.out conftest.in -' >> $CONFIG_STATUS - sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail - rm -f conftest.vals - mv conftest.tail conftest.vals -done -rm -f conftest.vals - -cat >> $CONFIG_STATUS <<\EOF - rm -f conftest.frag conftest.h - echo "/* $ac_file. Generated automatically by configure. */" > conftest.h - cat conftest.in >> conftest.h - rm -f conftest.in - if cmp -s $ac_file conftest.h 2>/dev/null; then - echo "$ac_file is unchanged" - rm -f conftest.h - else - rm -f $ac_file - mv conftest.h $ac_file - fi -fi; done - - -echo FOO >stamp-h -exit 0 -EOF -chmod +x $CONFIG_STATUS -rm -fr confdefs* $ac_clean_files -test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 - - - diff --git a/src/modules/files/configure.in b/src/modules/files/configure.in index 138f65ad1ee29eaa71a2daa8d92d31f067b66504..4f30d6e5a97f8bc028667a6e8d437ff091e24821 100644 --- a/src/modules/files/configure.in +++ b/src/modules/files/configure.in @@ -6,14 +6,15 @@ AC_PROG_RANLIB AC_SUBST(RANLIB) AC_HAVE_HEADERS(arpa/inet.h sys/socketvar.h netinet/in.h \ - sys/stream.h sys/protosw.h) + sys/stream.h sys/protosw.h netdb.h) AC_HEADER_DIRENT AC_CHECK_LIB(socket, socket) +AC_CHECK_LIB(nsl, gethostbyname) -AC_HAVE_FUNCS(socketpair) +AC_HAVE_FUNCS(socketpair getwd strerror) AC_MSG_CHECKING(size of socket buffers) -AC_CACHE_VAL(lpc_cv_socket_buffer_max, +AC_CACHE_VAL(pike_cv_socket_buffer_max, [ AC_TRY_RUN([ #include <stdio.h> @@ -50,13 +51,65 @@ int main() return 0; }], -lpc_cv_socket_buffer_max=`cat conftest.out.2` +pike_cv_socket_buffer_max=`cat conftest.out.2` , -lpc_cv_socket_buffer_max=0 +pike_cv_socket_buffer_max=0 )]) -AC_DEFINE_UNQUOTED(SOCKET_BUFFER_MAX,$lpc_cv_socket_buffer_max) -AC_MSG_RESULT($lpc_cv_socket_buffer_max) +AC_DEFINE_UNQUOTED(SOCKET_BUFFER_MAX,$pike_cv_socket_buffer_max) +AC_MSG_RESULT($pike_cv_socket_buffer_max) + + +AC_MSG_CHECKING(for working getcwd) +AC_CACHE_VAL(pike_cv_func_working_getcwd, +[ +AC_TRY_RUN([ +#include <unistd.h> +#include <signal.h> + +int sig_child(int arg) +{ +#ifdef HAVE_WAITPID + waitpid(-1,0,WNOHANG); +#else +#ifdef HAVE_WAIT3 + wait3(0,WNOHANG,0); +#else +#ifdef HAVE_WAIT4 + wait3(-1,0,WNOHANG,0); +#else + + /* Leave'em hanging */ + +#endif /* HAVE_WAIT4 */ +#endif /* HAVE_WAIT3 */ +#endif /* HAVE_WAITPID */ + +#ifdef SIGNAL_ONESHOT + my_signal(SIGCHLD, sig_child); +#endif +} + +int sig_alarm() { exit(1); } + +int main() +{ + char *tmp; + signal(SIGCHLD,sig_child); + signal(SIGALRM,sig_alarm); + alarm(4); + tmp=getcwd(0,10000); + if(tmp && strlen(tmp) <10000) exit(0); + exit(1); +} +],pike_cv_func_working_getcwd=yes,pike_cv_func_working_getcwd=no)]) + +if test "$pike_cv_func_working_getcwd" = yes; then + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_WORKING_GETCWD) +else + AC_MSG_RESULT(no) +fi AC_OUTPUT(Makefile,echo FOO >stamp-h ) diff --git a/src/modules/files/datagram.c b/src/modules/files/datagram.c index fbbc9e66690a0abb0c0ccc37272b5a791c365156..933f83af733b0b904a3462a4dd8700d906187518 100644 --- a/src/modules/files/datagram.c +++ b/src/modules/files/datagram.c @@ -1,6 +1,6 @@ /*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ struct datagram diff --git a/doc/files/cd b/src/modules/files/doc/cd similarity index 59% rename from doc/files/cd rename to src/modules/files/doc/cd index e7a7e7eea68c511f17ff7528f8eb90853a2aa2f0..746eb27f260f8f2052ae6b688e088dc71d712d88 100644 --- a/doc/files/cd +++ b/src/modules/files/doc/cd @@ -5,8 +5,11 @@ SYNTAX int cd(string s); DESCRIPTION - Change the current directory for the whole LPC process, return + Change the current directory for the whole Pike process, return 1 for success, 0 otherwise. +KEYWORDS + file + SEE ALSO files/getcwd \ No newline at end of file diff --git a/src/modules/files/doc/errno b/src/modules/files/doc/errno new file mode 100644 index 0000000000000000000000000000000000000000..3140e35aef51cc75059b6c757f44dca6b9ce8496 --- /dev/null +++ b/src/modules/files/doc/errno @@ -0,0 +1,13 @@ +NAME + errno - return system error number + +SYNTAX + int errno(); + +DESCRIPTION + This function returns the system error from the last file operation. + Note that you should normally use the function errno in the file + object instead. + +SEE ALSO + file/errno diff --git a/doc/files/exece b/src/modules/files/doc/exece similarity index 76% rename from doc/files/exece rename to src/modules/files/doc/exece index 57b4b94caecd3fe2cfe4ede2b83c090738a3224b..4789bce40b5708c1c7cf43396e884ec48fa122b6 100644 --- a/doc/files/exece +++ b/src/modules/files/doc/exece @@ -7,7 +7,7 @@ SYNTAX int exece(string file, string *args, mapping(string:string) env); DESCRIPTION - This function transforms the uLPC process into a process running + This function transforms the Pike process into a process running the program specified in the argument 'file' with the argument 'args'. If the mapping 'env' is present, it will completely replace all environment variables before the new program is executed. @@ -15,8 +15,8 @@ DESCRIPTION and in that case it returns zero. NOTA BENE - The uLPC driver _dies_ when this function is called. You must use - fork() if you wish to execute a program and still run the uLPC + The Pike driver _dies_ when this function is called. You must use + fork() if you wish to execute a program and still run the Pike driver. EXAMPLES diff --git a/doc/files/file b/src/modules/files/doc/file similarity index 91% rename from doc/files/file rename to src/modules/files/doc/file index 251a6202c989f89f2a34420fb44a7274417a16c3..d597f7c0cd46d7786695120b6f99101dd19ca16e 100644 --- a/doc/files/file +++ b/src/modules/files/doc/file @@ -2,9 +2,9 @@ NAME /precompiled/file - the basic file handling program DESCRIPTION - /precompiled/file is a pre-compiled LPC program, written in C. + /precompiled/file is a pre-compiled Pike program, written in C. It contains the functions need to handle files, sockets, streams - and pipes from within lpc. /precompiled/file is a part of the files + and pipes from within Pike. /precompiled/file is a part of the files module. Here follows the descriptions of the functions in /precompiled/file: @@ -38,12 +38,12 @@ DESCRIPTION Open a file for read write or append. The variable how should contain one or more of the following letters: - 'r' : open file for reading - 'w' : open file for writing - 'a' : open file for append (use with 'w') - 't' : truncate file at close (use with 'w') - 'c' : create file if it doesn't exist (use with 'w') - 'x' : fail if file already exist (use with 'c') + 'r' open file for reading + 'w' open file for writing + 'a' open file for append (use with 'w') + 't' truncate file at close (use with 'w') + 'c' create file if it doesn't exist (use with 'w') + 'x' fail if file already exist (use with 'c') How should _always_ contain at least one of 'r' or 'w'. @@ -76,11 +76,19 @@ NAME SYNTAX string file->read(int nbytes); + or + string file->read(int nbytes, int notall); DESCRIPTION Read tries to read nbytes bytes from the file, and return it as a string. If something goes wrong, zero is returned. + If a one is given as second argument to read(), read will not try + it's best to read as many bytes as you asked it to read, it will + merely try to read as many bytes as the system read function will + return. This mainly useful with stream devices which can return + exactly one row or packet at a time. + SEE ALSO file->write @@ -171,17 +179,17 @@ DESCRIPTION transfer speed when it does. SEE ALSO - files/socket, port/accept - + file->open_socket, port->accept ============================================================================ NAME set_nonblocking - make stream nonblocking SYNTAX - void file->set_nonblocking(function read_callback, - function write_callback, - function close_callback); + void file->set_nonblocking( + function read_callback, + function write_callback, + function close_callback); DESCRIPTION This function sets a stream to nonblocking mode. When data arrives on @@ -305,7 +313,7 @@ DESCRIPTION the argument a reference to the same file, it creates a new file with the same properties and places it in the argument. -EXAMPLE +EXAMPLE /* Redirect stdin to come from the file 'foo' */ object o; o=clone((program)"/precompiled/file"); diff --git a/src/modules/files/doc/file_stat b/src/modules/files/doc/file_stat new file mode 100644 index 0000000000000000000000000000000000000000..8cccd143ad2809bfcc90bb29dddf6a8af77920a8 --- /dev/null +++ b/src/modules/files/doc/file_stat @@ -0,0 +1,35 @@ +NAME + file_stat - stat a file + +SYNTAX + int *file_stat(string file); + or + int *file_stat(string file, 1); + or + int *file->stat(); + +DESCRIPTION + file_stat returns an array of integers describing some properties + about the file. Currently file_stat return 7 entries: + ({ + mode, /* file mode, protection bits etc. etc. */ + size, /* file size for regular files, + -2 for dirs, + -3 for links, + -4 for otherwise */ + atime, /* last access time */ + mtime, /* last modify time */ + ctime, /* last status time change */ + uid, /* The user who owns this file */ + gid /* The group this file belongs to */ + }) + If you give 1 as a second argument, stat does not follow links. + You can never get -3 as size if you don't give a second argument. + + If there is no such file or directory, zero is returned. + +KEYWORDS + file + +SEE ALSO + files/get_dir diff --git a/doc/files/fork b/src/modules/files/doc/fork similarity index 100% rename from doc/files/fork rename to src/modules/files/doc/fork diff --git a/doc/files/get_dir b/src/modules/files/doc/get_dir similarity index 93% rename from doc/files/get_dir rename to src/modules/files/doc/get_dir index c344114abdaca69ae3d782ef3af3b9c3e820aa35..aa7aa6df8751f7509d406095ff7414ab906ef1e0 100644 --- a/doc/files/get_dir +++ b/src/modules/files/doc/get_dir @@ -8,5 +8,8 @@ DESCRIPTION Return an array of all filenames in the directory dir, or zero if no such directory exists. +KEYWORDS + file + SEE ALSO files/mkdir, files/cd diff --git a/doc/files/getcwd b/src/modules/files/doc/getcwd similarity index 90% rename from doc/files/getcwd rename to src/modules/files/doc/getcwd index d3c010ec8e4929060208342cdd7990e8c27b9b3b..7d6ec4b385f78373b721084b97f6fe49dbc90181 100644 --- a/doc/files/getcwd +++ b/src/modules/files/doc/getcwd @@ -7,5 +7,8 @@ SYNTAX DESCRIPTION getcwd returns the current working directory. +KEYWORDS + file + SEE ALSO files/cd diff --git a/doc/files/mkdir b/src/modules/files/doc/mkdir similarity index 91% rename from doc/files/mkdir rename to src/modules/files/doc/mkdir index 780d8ed25367362b33e646bbc407130f00ce4aa3..49c9ae7596fa486d1ac353ee05d2235c3e96fc96 100644 --- a/doc/files/mkdir +++ b/src/modules/files/doc/mkdir @@ -7,5 +7,8 @@ SYNTAX DESCRIPTION Create a directory, return zero if it fails and nonzero if it fails. +KEYWORDS + file + SEE ALSO files/rm, files/cd diff --git a/doc/files/mv b/src/modules/files/doc/mv similarity index 94% rename from doc/files/mv rename to src/modules/files/doc/mv index c76ea4cb8664d60a9ffcb97f4602ed25f807a232..679710b2414dbeab5c13d843c87a988efb981821 100644 --- a/doc/files/mv +++ b/src/modules/files/doc/mv @@ -9,5 +9,8 @@ DESCRIPTION file already exists, it will be overwritten. Returns 1 on sucess, 0 otherwise. +KEYWORDS + file + SEE ALSO files/rm diff --git a/doc/files/port b/src/modules/files/doc/port similarity index 98% rename from doc/files/port rename to src/modules/files/doc/port index fa3c67fab7dcb8e7e7abc805cdbe38128135ea72..904d2b7234a87fb6fbd15a9a07466357e3aa6621 100644 --- a/doc/files/port +++ b/src/modules/files/doc/port @@ -48,7 +48,7 @@ DESCRIPTION NOTA BENE This function is only for the advanced user, and is generally used - when sockets are passed to uLPC at exec time. + when sockets are passed to Pike at exec time. SEE ALSO port->bind, port->accept @@ -133,6 +133,6 @@ DESCRIPTION /precompiled/file. The new file is by default set to blocking. SEE ALSO - file + /precompiled/file ============================================================================ diff --git a/doc/files/rm b/src/modules/files/doc/rm similarity index 91% rename from doc/files/rm rename to src/modules/files/doc/rm index fdfbef9ff514b32d92cb73c5a5fa19354cc63248..a7a86fef89bfb6cbf74dbe5ce79e2cd87a6123be 100644 --- a/doc/files/rm +++ b/src/modules/files/doc/rm @@ -7,6 +7,8 @@ SYNTAX DESCRIPTION Remove a file or directory, return 0 if it fails. Nonzero otherwise. +KEYWORDS + file + SEE ALSO files/mkdir - \ No newline at end of file diff --git a/src/modules/files/doc/strerror b/src/modules/files/doc/strerror new file mode 100644 index 0000000000000000000000000000000000000000..bcb7a061204ef821538f8e7ded0c0b0024ee3b1f --- /dev/null +++ b/src/modules/files/doc/strerror @@ -0,0 +1,15 @@ +NAME + strerror - return a string describing an error + +SYNTAX + string strerror(int errno); + +DESCRIPTION + This function returns a description of an error code. The error + code is usually obtained from the file->errno() call. + +KEYWORDS + file + +NOTA BENE + This function may not be available on all platforms. diff --git a/src/modules/files/doc/werror b/src/modules/files/doc/werror new file mode 100644 index 0000000000000000000000000000000000000000..bafccdf35004721048e46369e2cdc76204b12537 --- /dev/null +++ b/src/modules/files/doc/werror @@ -0,0 +1,12 @@ +NAME + werror - write to stderr + +SYNTAX + void werror(string s); + +DESCRIPTION + Writes a message to stderr. Stderr is normally the console, even if + the process output has been redirected to a file or pipe. + +KEYWORDS + file diff --git a/src/modules/files/efuns.c b/src/modules/files/efuns.c index ba75f2805f652954b23859a068ef83ef0125f530..064ee8e835a04eb412c24be2de911c189370a2a6 100644 --- a/src/modules/files/efuns.c +++ b/src/modules/files/efuns.c @@ -1,6 +1,6 @@ /*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ #include "global.h" @@ -41,20 +41,20 @@ struct array *encode_stat(struct stat *s) { struct array *a; - a=allocate_array_no_init(7,0,T_INT); - SHORT_ITEM(a)[0].integer=s->st_mode; + a=allocate_array(7); + ITEM(a)[0].u.integer=s->st_mode; switch(S_IFMT & s->st_mode) { - case S_IFREG: SHORT_ITEM(a)[1].integer=s->st_size; break; - case S_IFDIR: SHORT_ITEM(a)[1].integer=-2; break; - case S_IFLNK: SHORT_ITEM(a)[1].integer=-3; break; - default: SHORT_ITEM(a)[1].integer=-4; break; + case S_IFREG: ITEM(a)[1].u.integer=s->st_size; break; + case S_IFDIR: ITEM(a)[1].u.integer=-2; break; + case S_IFLNK: ITEM(a)[1].u.integer=-3; break; + default: ITEM(a)[1].u.integer=-4; break; } - SHORT_ITEM(a)[2].integer=s->st_atime; - SHORT_ITEM(a)[3].integer=s->st_mtime; - SHORT_ITEM(a)[4].integer=s->st_ctime; - SHORT_ITEM(a)[5].integer=s->st_uid; - SHORT_ITEM(a)[6].integer=s->st_gid; + ITEM(a)[2].u.integer=s->st_atime; + ITEM(a)[3].u.integer=s->st_mtime; + ITEM(a)[4].u.integer=s->st_ctime; + ITEM(a)[5].u.integer=s->st_uid; + ITEM(a)[6].u.integer=s->st_gid; return a; } @@ -83,7 +83,7 @@ void f_file_stat(INT32 args) } } -void f_perror(INT32 args) +void f_werror(INT32 args) { if(!args) error("Too few arguments to perror.\n"); @@ -170,7 +170,7 @@ void f_get_dir(INT32 args) push_string(make_shared_binary_string(d->d_name,NAMLEN(d))); } closedir(dir); - a=aggregate_array(sp-save_sp, T_STRING); + a=aggregate_array(sp-save_sp); } pop_n_elems(args); @@ -197,20 +197,29 @@ void f_cd(INT32 args) void f_getcwd(INT32 args) { char *e; - pop_n_elems(args); - -#ifdef HAVE_GETCWD - e=(char *)getcwd(0,1000); +#if defined(HAVE_WORKING_GETCWD) || !defined(HAVE_GETWD) + char *tmp; + INT32 size; + + size=1000; + do { + tmp=(char *)xalloc(size); + e=(char *)getcwd(tmp,1000); + if (e || errno!=ERANGE) break; + free((char *)tmp); + size*=2; + } while (size < 10000); #else #ifndef MAXPATHLEN #define MAXPATHLEN 32768 #endif - e=(char *)getwd((char *)malloc(MAXPATHLEN+1)); - if(!e) - fatal("Couldn't fetch current path.\n"); #endif + if(!e) + error("Failed to fetch current path.\n"); + + pop_n_elems(args); push_string(make_shared_string(e)); free(e); } @@ -243,12 +252,11 @@ void f_exece(INT32 args) if(sp[2-args].type != T_MAPPING) error("Bad argument 3 to exece().\n"); en=sp[2-args].u.mapping; - array_fix_type_field(en->ind); - array_fix_type_field(en->val); + mapping_fix_type_field(en); - if(en->ind->type_field & ~BIT_STRING) + if(m_ind_types(en) & ~BIT_STRING) error("Bad argument 3 to exece().\n"); - if(en->val->type_field & ~BIT_STRING) + if(m_val_types(en) & ~BIT_STRING) error("Bad argument 3 to exece().\n"); case 2: @@ -278,24 +286,26 @@ void f_exece(INT32 args) if(en) { - env=(char **)xalloc((1+en->ind->size) * sizeof(char *)); + INT32 e; + struct array *i,*v; - for(e=0;e<en->ind->size;e++) - { - union anything *a; - a=low_array_get_item_ptr(en->ind,e,T_STRING); - push_string(a->string); - a->string->refs++; + env=(char **)xalloc((1+m_sizeof(en)) * sizeof(char *)); + i=mapping_indices(en); + v=mapping_values(en); + + for(e=0;e<i->size;e++) + { + push_string(ITEM(i)[e].u.string); push_string(make_shared_string("=")); - a=low_array_get_item_ptr(en->val,e,T_STRING); - push_string(a->string); - a->string->refs++; - - f_sum(3); - + push_string(ITEM(v)[e].u.string); + f_add(3); env[e]=sp[-1].u.string->str; + sp--; } + + free_array(i); + free_array(v); env[e]=0; }else{ env=environ; @@ -332,6 +342,31 @@ void f_mv(INT32 args) push_int(!i); } +#ifdef HAVE_STRERROR +void f_strerror(INT32 args) +{ + char *s; + + if(!args) + error("Too few arguments to strerror()\n"); + if(sp[-args].type != T_INT) + error("Bad argument 1 to strerror()\n"); + + s=strerror(sp[-args].u.integer); + pop_n_elems(args); + if(s) + push_text(s); + else + push_int(0); +} +#endif + +void f_errno(INT32 args) +{ + pop_n_elems(args); + push_int(errno); +} + void init_files_efuns() { set_close_on_exec(0,1); @@ -340,7 +375,8 @@ void init_files_efuns() add_efun("file_stat",f_file_stat, "function(string,int|void:int *)",OPT_EXTERNAL_DEPEND); - add_efun("perror",f_perror,"function(string:void)",OPT_SIDE_EFFECT); + add_efun("errno",f_errno,"function(:int)",OPT_EXTERNAL_DEPEND); + add_efun("werror",f_werror,"function(string:void)",OPT_SIDE_EFFECT); add_efun("rm",f_rm,"function(string:int)",OPT_SIDE_EFFECT); add_efun("mkdir",f_mkdir,"function(string,void|int:int)",OPT_SIDE_EFFECT); add_efun("mv", f_mv, "function(string,string:int)", OPT_SIDE_EFFECT); @@ -349,4 +385,8 @@ void init_files_efuns() add_efun("getcwd",f_getcwd,"function(:string)",OPT_EXTERNAL_DEPEND); add_efun("fork",f_fork,"function(:int)",OPT_SIDE_EFFECT); add_efun("exece",f_exece,"function(string,mixed*,void|mapping(string:string):int)",OPT_SIDE_EFFECT); + +#ifdef HAVE_STRERROR + add_efun("strerror",f_strerror,"function(int:string)",0); +#endif } diff --git a/src/modules/files/file.c b/src/modules/files/file.c index 3cb08d658723c05a69813f176d7ba2eaf898b45d..ecbb2d7f32ab7845ace4200bee5b3932760a7e57 100644 --- a/src/modules/files/file.c +++ b/src/modules/files/file.c @@ -1,6 +1,6 @@ /*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ #define READ_BUFFER 16384 @@ -19,7 +19,8 @@ #include "file_machine.h" #include "file.h" #include "error.h" -#include "lpc_signal.h" +#include "signal_handler.h" +#include "pike_types.h" #include <sys/types.h> #include <sys/stat.h> @@ -45,7 +46,22 @@ #include <netdb.h> #endif -#define FD (*(int*)(fp->current_storage)) +#ifndef SEEK_SET +#define SEEK_SET 0 +#endif + +#ifndef SEEK_END +#define SEEK_END 2 +#endif + +struct file_struct +{ + short fd; + short errno; +}; + +#define FD (((struct file_struct *)(fp->current_storage))->fd) +#define ERRNO (((struct file_struct *)(fp->current_storage))->errno) #define THIS (files + FD) static struct my_file files[MAX_OPEN_FILEDESCRIPTORS]; @@ -67,7 +83,6 @@ static void init_fd(int fd, int open_mode) files[fd].write_callback.u.integer=0; files[fd].close_callback.type=T_INT; files[fd].close_callback.u.integer=0; - files[fd].errno=0; } static int close_fd(int fd) @@ -85,17 +100,30 @@ static int close_fd(int fd) { while(1) { - if(close(fd) >= 0) break; - switch(errno) + if(close(fd) < 0) { - default: - fatal("Unknown error in close().\n"); - - case EBADF: - fatal("Closing a non-active file descriptor.\n"); - - case EINTR: + switch(errno) + { + default: + /* What happened? */ + /* files[fd].errno=errno; */ + + /* Try waiting it out in blocking mode */ + set_nonblocking(fd,0); + if(close(fd) >= 0 || errno==EBADF) + break; /* It was actually closed, good! */ + + /* Failed, give up, crash, burn, die */ + error("Failed to close file.\n"); + + case EBADF: + error("Internal error: Closing a non-active file descriptor %d.\n",fd); + + case EINTR: + continue; + } } + break; } set_read_callback(fd,0,0); @@ -109,6 +137,7 @@ static int close_fd(int fd) files[fd].read_callback.type=T_INT; files[fd].write_callback.type=T_INT; files[fd].close_callback.type=T_INT; + files[fd].open_mode = 0; } return 0; } @@ -181,7 +210,7 @@ static void free_dynamic_buffer(dynamic_buffer *b) { free(b->s.str); } static void file_read(INT32 args) { - INT32 i, r, bytes_read; + INT32 i, r, bytes_read, all; ONERROR ebuf; if(args<1 || sp[-args].type != T_INT) @@ -190,15 +219,22 @@ static void file_read(INT32 args) if(FD < 0) error("File not open.\n"); + if(args > 1 && !IS_ZERO(sp+1-args)) + { + all=0; + }else{ + all=1; + } + r=sp[-args].u.integer; pop_n_elems(args); bytes_read=0; - THIS->errno=0; + ERRNO=0; if(r < 65536) { - struct lpc_string *str; + struct pike_string *str; str=begin_shared_string(r); @@ -213,6 +249,7 @@ static void file_read(INT32 args) { r-=i; bytes_read+=i; + if(!all) break; } else if(i==0) { @@ -220,10 +257,11 @@ static void file_read(INT32 args) } else if(errno != EINTR) { - THIS->errno=errno; + ERRNO=errno; if(!bytes_read) { free((char *)str); + UNSET_ONERROR(ebuf); push_int(0); return; } @@ -260,12 +298,14 @@ static void file_read(INT32 args) { r-=i; bytes_read+=i; + if(!all) break; } else if(i>0) { bytes_read+=i; r-=i; low_make_buf_space(i - try_read, &b); + if(!all) break; } else if(i==0) { @@ -277,10 +317,11 @@ static void file_read(INT32 args) low_make_buf_space(-try_read, &b); if(errno != EINTR) { - THIS->errno=errno; + ERRNO=errno; if(!bytes_read) { free(b.s.str); + UNSET_ONERROR(ebuf); push_int(0); return; } @@ -304,44 +345,50 @@ static void file_write_callback(int fd, void *data) static void file_write(INT32 args) { - INT32 i; + INT32 written,i; + if(args<1 || sp[-args].type != T_STRING) error("Bad argument 1 to file->write().\n"); if(FD < 0) error("File not open for write.\n"); - - i=write(FD, sp[-args].u.string->str, sp[-args].u.string->len); - - if(i<0) + + written=0; + while(written < sp[-args].u.string->len) { - switch(errno) + i=write(FD, sp[-args].u.string->str + written, sp[-args].u.string->len - written); + + if(i<0) { - default: - THIS->errno=errno; - pop_n_elems(args); - push_int(-1); - return; + switch(errno) + { + default: + ERRNO=errno; + pop_n_elems(args); + push_int(-1); + return; - case EINTR: - case EWOULDBLOCK: - i=0; + case EINTR: continue; + case EWOULDBLOCK: break; + } + break; } + written+=i; } if(!IS_ZERO(& THIS->write_callback)) set_write_callback(FD, file_write_callback, 0); - THIS->errno=0; + ERRNO=0; pop_n_elems(args); - push_int(i); + push_int(written); } static void do_close(int fd, int flags) { if(fd == -1) return; /* already closed */ - files[fd].errno=0; + /* files[fd].errno=0; */ flags &= files[fd].open_mode; switch(flags & (FILE_READ | FILE_WRITE)) @@ -350,29 +397,28 @@ static void do_close(int fd, int flags) return; case FILE_READ: - files[fd].open_mode &=~ FILE_READ; if(files[fd].open_mode & FILE_WRITE) { set_read_callback(fd,0,0); shutdown(fd, 0); + files[fd].open_mode &=~ FILE_READ; }else{ close_fd(fd); } break; case FILE_WRITE: - files[fd].open_mode &=~ FILE_WRITE; if(files[fd].open_mode & FILE_READ) { set_write_callback(fd,0,0); shutdown(fd, 1); + files[fd].open_mode &=~ FILE_WRITE; }else{ close_fd(fd); } break; case FILE_READ | FILE_WRITE: - files[fd].open_mode &=~ (FILE_WRITE | FILE_WRITE); close_fd(fd); break; } @@ -416,14 +462,12 @@ static void file_open(INT32 args) if(!( flags & (FILE_READ | FILE_WRITE))) error("Must open file for at least one of read and write.\n"); - THIS->errno = 0; - retry: fd=open(sp[-args].u.string->str,map(flags), 00666); if(fd >= MAX_OPEN_FILEDESCRIPTORS) { - THIS->errno=EBADF; + ERRNO=EBADF; close(fd); fd=-1; } @@ -432,13 +476,14 @@ static void file_open(INT32 args) if(errno == EINTR) goto retry; - THIS->errno=errno; + ERRNO=EBADF; } else { - set_close_on_exec(fd,1); init_fd(fd,flags); FD=fd; + ERRNO = 0; + set_close_on_exec(fd,1); } pop_n_elems(args); @@ -458,11 +503,11 @@ static void file_seek(INT32 args) to=sp[-args].u.integer; - THIS->errno=0; + ERRNO=0; to=lseek(FD,to,to<0 ? SEEK_END : SEEK_SET); - if(to<0) THIS->errno=errno; + if(to<0) ERRNO=errno; pop_n_elems(args); push_int(to); @@ -475,10 +520,10 @@ static void file_tell(INT32 args) if(FD < 0) error("File not open.\n"); - THIS->errno=0; + ERRNO=0; to=lseek(FD, 0L, SEEK_CUR); - if(to<0) THIS->errno=errno; + if(to<0) ERRNO=errno; pop_n_elems(args); push_int(to); @@ -499,10 +544,10 @@ static void file_stat(INT32 args) if(fstat(FD, &s) < 0) { if(errno == EINTR) goto retry; - THIS->errno=errno; + ERRNO=errno; push_int(0); }else{ - THIS->errno=0; + ERRNO=0; push_array(encode_stat(&s)); } } @@ -513,13 +558,13 @@ static void file_errno(INT32 args) error("File not open.\n"); pop_n_elems(args); - push_int(THIS->errno); + push_int(ERRNO); } /* Trick compiler to keep 'buffer' in memory for * as short a time as possible. */ -static struct lpc_string *do_read(INT32 *amount,int fd) +static struct pike_string *do_read(INT32 *amount,int fd) { char buffer[READ_BUFFER]; @@ -531,7 +576,7 @@ static struct lpc_string *do_read(INT32 *amount,int fd) static void file_read_callback(int fd, void *data) { - struct lpc_string *s; + struct pike_string *s; INT32 i; #ifdef DEBUG @@ -539,7 +584,7 @@ static void file_read_callback(int fd, void *data) fatal("Error in file::read_callback()\n"); #endif - files[fd].errno=0; + /* files[fd].errno=0; */ s=do_read(&i, fd); @@ -554,7 +599,7 @@ static void file_read_callback(int fd, void *data) if(i < 0) { - files[fd].errno=errno; + /* files[fd].errno=errno; */ switch(errno) { case EINTR: @@ -701,7 +746,8 @@ struct object *file_make_object_from_fd(int fd, int mode) init_fd(fd, mode); o=clone(file_program,0); - *(int *)(o->storage)=fd; + ((struct file_struct *)(o->storage))->fd=fd; + ((struct file_struct *)(o->storage))->errno=0; return o; } @@ -818,7 +864,7 @@ int socketpair(int family, int type, int protocol, int sv[2]) * Make sure this connection was our OWN connection, * otherwise some wizeguy could interfere with our * pipe by guessing our socket and connecting at - * just the right time... uLPC is supposed to be + * just the right time... Pike is supposed to be * pretty safe... */ do @@ -843,17 +889,17 @@ static void file_pipe(INT32 args) do_close(FD,FILE_READ | FILE_WRITE); FD=-1; pop_n_elems(args); - THIS->errno=0; + ERRNO=0; i=socketpair(AF_UNIX, SOCK_STREAM, 0, &inout[0]); if(i<0) { - THIS->errno=errno; + ERRNO=errno; push_int(0); } else if(i >= MAX_OPEN_FILEDESCRIPTORS) { - THIS->errno=EBADF; + ERRNO=EBADF; close(i); push_int(0); } @@ -865,20 +911,22 @@ static void file_pipe(INT32 args) set_close_on_exec(inout[1],1); FD=inout[0]; + ERRNO=0; push_object(file_make_object_from_fd(inout[1],FILE_READ | FILE_WRITE)); } } -static void init_file_struct(char *foo, struct object *o) +static void init_file_struct(struct object *o) { - *(int *)foo = -1; + FD=-1; + ERRNO=-1; } -static void exit_file_struct(char *foo, struct object *o) +static void exit_file_struct(struct object *o) { - do_close(*(int *) foo,FILE_READ | FILE_WRITE); - *(int *)foo=-1; + do_close(FD,FILE_READ | FILE_WRITE); + ERRNO=-1; } static void file_dup(INT32 args) @@ -891,7 +939,9 @@ static void file_dup(INT32 args) pop_n_elems(args); o=clone(file_program,0); - (*(int *)o->storage)=FD; + ((struct file_struct *)o->storage)->fd=FD; + ((struct file_struct *)o->storage)->errno=0; + ERRNO=0; files[FD].refs++; push_object(o); } @@ -915,7 +965,8 @@ static void file_assign(INT32 args) error("Argument 1 to file->assign() must be a clone of /precompiled/file\n"); do_close(FD, FILE_READ | FILE_WRITE); - FD=*(int *)o->storage; + FD=((struct file_struct *)(o->storage))->fd; + ERRNO=0; if(FD >=0) files[FD].refs++; pop_n_elems(args); @@ -944,20 +995,19 @@ static void file_dup2(INT32 args) if(!o->prog || o->prog->inherits[0].prog != file_program) error("Argument 1 to file->assign() must be a clone of /precompiled/file\n"); - fd=*(int *)(o->storage); + fd=((struct file_struct *)(o->storage))->fd; if(fd < 0) error("File given to dup2 not open.\n"); if(dup2(FD,fd) < 0) { - THIS->errno=errno; - *(int *)o->storage=-1; + ERRNO=errno; pop_n_elems(args); push_int(0); return; } - THIS->errno=0; + ERRNO=0; set_close_on_exec(fd, fd > 2); files[fd].open_mode=files[FD].open_mode; @@ -993,14 +1043,14 @@ static void file_open_socket(INT32 args) fd=socket(AF_INET, SOCK_STREAM, 0); if(fd >= MAX_OPEN_FILEDESCRIPTORS) { - THIS->errno = EBADF; + ERRNO=EBADF; pop_n_elems(args); push_int(0); return; } if(fd < 0) { - THIS->errno=errno; + ERRNO=errno; pop_n_elems(args); push_int(0); return; @@ -1011,7 +1061,7 @@ static void file_open_socket(INT32 args) init_fd(fd, FILE_READ | FILE_WRITE); set_close_on_exec(fd,1); FD = fd; - THIS->errno=0; + ERRNO=0; pop_n_elems(args); push_int(1); @@ -1039,12 +1089,12 @@ static void file_connect(INT32 args) if(connect(FD, (struct sockaddr *)&addr, sizeof(addr)) < 0) { /* something went wrong */ - THIS->errno=errno; + ERRNO=errno; pop_n_elems(args); push_int(0); }else{ - THIS->errno=0; + ERRNO=0; pop_n_elems(args); push_int(1); } @@ -1098,7 +1148,7 @@ static void file_query_address(INT32 args) pop_n_elems(args); if(i < 0 || len < (int)sizeof(addr)) { - THIS->errno=errno; + ERRNO=errno; push_int(0); } @@ -1110,6 +1160,27 @@ static void file_query_address(INT32 args) push_string(make_shared_string(buffer)); } +static void file_lsh(INT32 args) +{ + INT32 len; + if(args != 1) + error("Too few/many args to file->`<<\n"); + + if(sp[-1].type != T_STRING) + { + push_string(string_type_string); + string_type_string->refs++; + f_cast(); + } + + len=sp[-1].u.string->len; + file_write(1); + if(len != sp[-1].u.integer) error("File << failed.\n"); + pop_stack(); + + push_object(this_object()); +} + static void file_create(INT32 args) { char *s; @@ -1154,11 +1225,11 @@ void init_files_programs() init_fd(2, FILE_WRITE); start_new_program(); - add_storage(sizeof(int)); + add_storage(sizeof(struct file_struct)); add_function("open",file_open,"function(string,string:int)",0); add_function("close",file_close,"function(string|void:void)",0); - add_function("read",file_read,"function(int:string|int)",0); + add_function("read",file_read,"function(int,int|void:int|string)",0); add_function("write",file_write,"function(string:int)",0); add_function("seek",file_seek,"function(int:int)",0); @@ -1187,6 +1258,7 @@ void init_files_programs() add_function("connect",file_connect,"function(string,int:int)",0); add_function("query_address",file_query_address,"function(int|void:int)",0); add_function("create",file_create,"function(void|string:void)",0); + add_function("`<<",file_lsh,"function(mixed:object)",0); set_init_callback(init_file_struct); set_exit_callback(exit_file_struct); diff --git a/src/modules/files/file.h b/src/modules/files/file.h index 76aace9fd8728cc45cd50fa250d1ea47491b7765..c82375cff45f87e9f47e30fa481cbf5a5ccfc8b5 100644 --- a/src/modules/files/file.h +++ b/src/modules/files/file.h @@ -1,6 +1,6 @@ /*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ #ifndef FILE_H @@ -28,7 +28,6 @@ struct my_file INT32 refs; int fd; short open_mode; - int errno; struct svalue id; struct svalue read_callback; struct svalue write_callback; @@ -37,6 +36,7 @@ struct my_file /* Prototypes begin here */ struct object *file_make_object_from_fd(int fd, int mode); +int socketpair(int family, int type, int protocol, int sv[2]); void get_inet_addr(struct sockaddr_in *addr,char *name); void exit_files(); void init_files_programs(); diff --git a/src/modules/files/file_machine.h b/src/modules/files/file_machine.h deleted file mode 100644 index 3a6998289be990a2b73f34824401759fb86dddb5..0000000000000000000000000000000000000000 --- a/src/modules/files/file_machine.h +++ /dev/null @@ -1,45 +0,0 @@ -/* file_machine.h. Generated automatically by configure. */ -#ifndef FILE_MACHINE_H -#define FILE_MACHINE_H - -/* Define if you have arpa/inhet.h */ -#define HAVE_ARPA_INET_H 1 - -/* Define if you have the <sys/socketvar.h> header file. */ -#define HAVE_SYS_SOCKETVAR_H 1 - -/* Define if you have the <netinet/in.h> header file. */ -#define HAVE_NETINET_IN_H 1 - -/* Define if you have the <sys/straem.h> header file. */ -#define HAVE_SYS_STREAM_H 1 - -/* Define if you have the <sys/protosw.h> header file. */ -#define HAVE_SYS_PROTOSW_H 1 - -/* Define if you have dirent.h. */ -#define HAVE_DIRENT_H 1 - -/* Define if you don't have dirent.h, but have ndir.h. */ -/* #undef HAVE_NDIR_H */ - -/* Define if you don't have dirent.h, but have sys/dir.h. */ -/* #undef HAVE_SYS_DIR_H */ - -/* Define if you don't have dirent.h, but have sys/ndir.h. */ -/* #undef HAVE_SYS_NDIR_H */ - -/* Buffer size to use on open sockets */ -#define SOCKET_BUFFER_MAX 65536 - -/* Do we have socketpair() ? */ -#define HAVE_SOCKETPAIR 1 - -/* Define if you have waitpid */ -/* #undef HAVE_WAITPID */ - -/* Define if you have wait4 */ -/* #undef HAVE_WAIT4 */ - -#endif - diff --git a/src/modules/files/file_machine.h.in b/src/modules/files/file_machine.h.in index d091c641f26f9bdc076c76f6c783255ce79f98c9..1a6ffd74321411631760156a17bda6d18c402554 100644 --- a/src/modules/files/file_machine.h.in +++ b/src/modules/files/file_machine.h.in @@ -16,6 +16,9 @@ /* Define if you have the <sys/protosw.h> header file. */ #undef HAVE_SYS_PROTOSW_H +/* Define if you have the <netdb.h> header file. */ +#undef HAVE_NETDB_H + /* Define if you have dirent.h. */ #undef HAVE_DIRENT_H @@ -34,5 +37,14 @@ /* Do we have socketpair() ? */ #undef HAVE_SOCKETPAIR +/* Define if you have getwd. */ +#undef HAVE_GETWD + +/* Define if you have strerror. */ +#undef HAVE_STRERROR + +/* Define if you have a working getcwd */ +#undef HAVE_WORKING_GETCWD + #endif diff --git a/src/modules/files/socket.c b/src/modules/files/socket.c index a2c84c2c48e4fb9170d0233dcc9093a8e666e2f5..6e39273feb4629304c6b145898e7b8bd15960631 100644 --- a/src/modules/files/socket.c +++ b/src/modules/files/socket.c @@ -1,6 +1,6 @@ /*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ #include "global.h" @@ -190,6 +190,8 @@ static void port_bind(INT32 args) set_close_on_exec(fd,1); + MEMSET((char *)&addr,0,sizeof(struct sockaddr_in)); + if(args > 2 && sp[2-args].type==T_STRING) { get_inet_addr(&addr, sp[2-args].u.string->str); @@ -302,30 +304,26 @@ static void port_accept(INT32 args) push_object(o); } -static void init_port_struct(char *foo, struct object *o) +static void init_port_struct(struct object *o) { - struct port *p; - p=(struct port *) foo; - p->fd=-1; - p->id.type=T_OBJECT; + THIS->fd=-1; + THIS->id.type=T_OBJECT; #ifdef __CHECKER__ - p->id.subtype=0; + THIS->id.subtype=0; #endif - p->id.u.object=o; + THIS->id.u.object=o; o->refs++; - p->accept_callback.type=T_INT; - p->errno=0; + THIS->accept_callback.type=T_INT; + THIS->errno=0; } -static void exit_port_struct(char *foo, struct object *o) +static void exit_port_struct(struct object *o) { - struct port *p; - p=(struct port *) foo; - do_close(p); - free_svalue(& p->id); - free_svalue(& p->accept_callback); - p->id.type=T_INT; - p->accept_callback.type=T_INT; + do_close(THIS); + free_svalue(& THIS->id); + free_svalue(& THIS->accept_callback); + THIS->id.type=T_INT; + THIS->accept_callback.type=T_INT; } void port_setup_program() diff --git a/src/modules/files/stamp-h b/src/modules/files/stamp-h deleted file mode 100644 index b7d6715e2df11b9c32b2341423273c6b3ad9ae8a..0000000000000000000000000000000000000000 --- a/src/modules/files/stamp-h +++ /dev/null @@ -1 +0,0 @@ -FOO diff --git a/src/modules/gdbmmod/.cvsignore b/src/modules/gdbmmod/.cvsignore new file mode 100644 index 0000000000000000000000000000000000000000..95cf939d5375192c28f80cfe1e4cf77564f3f024 --- /dev/null +++ b/src/modules/gdbmmod/.cvsignore @@ -0,0 +1,4 @@ +configure +Makefile.in +configure +Makefile.in diff --git a/src/modules/gdbmmod/.gitignore b/src/modules/gdbmmod/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..3e601eb607884985dad19fcf78bc28ffd8704744 --- /dev/null +++ b/src/modules/gdbmmod/.gitignore @@ -0,0 +1,4 @@ +/configure +/Makefile.in +/configure +/Makefile.in diff --git a/src/modules/gdbmmod/Makefile.src b/src/modules/gdbmmod/Makefile.src new file mode 100644 index 0000000000000000000000000000000000000000..8918ad4889a6e4fcd828cddcd265552c98eade1d --- /dev/null +++ b/src/modules/gdbmmod/Makefile.src @@ -0,0 +1,19 @@ +SRCDIR=@srcdir@ +VPATH=@srcdir@:@srcdir@/../..:../.. +PREFLAGS=-I. -I$(SRCDIR) -I$(SRCDIR)/../.. -I../.. +CFLAGS=$(PREFLAGS) $(OTHERFLAGS) + +FILES=gdbmmod.o +LIB=gdbmmod.a + +$(LIB): $(FILES) + -rm -f $(LIB) + ar cq $(LIB) $(FILES) + -@RANLIB@ $(LIB) + echo >linker_options @LIBS@ + +clean: + -rm -f *.o *.a + +depend: + gcc -MM $(PREFLAGS) $(SRCDIR)/*.c | $(FIXDEP) $(SRCDIR) diff --git a/src/modules/gdbmmod/configure.in b/src/modules/gdbmmod/configure.in new file mode 100644 index 0000000000000000000000000000000000000000..95e44af3ea28e8607c4a6a03755de3a7ccf03906 --- /dev/null +++ b/src/modules/gdbmmod/configure.in @@ -0,0 +1,13 @@ +AC_INIT(gdbmmod.c) +AC_CONFIG_HEADER(gdbm_machine.h) + +AC_PROG_CC +AC_PROG_RANLIB +AC_SUBST(RANLIB) + +AC_CHECK_HEADERS(gdbm.h) +AC_CHECK_LIB(gdbm, gdbm_open) + +AC_OUTPUT(Makefile,echo FOO >stamp-h ) + + diff --git a/src/modules/gdbmmod/doc/gdbm b/src/modules/gdbmmod/doc/gdbm new file mode 100644 index 0000000000000000000000000000000000000000..ddf660a79389a58a1644428b22f3b07b92d9a9e4 --- /dev/null +++ b/src/modules/gdbmmod/doc/gdbm @@ -0,0 +1,150 @@ +NAME + /precompiled/gdbm - database interface + +DESCRIPTION + This is the an interface to the gdbm library. This module might or + might not be available in your Pike depending on weather gdbm was + available when Pike was compiled. + + A gdbm database has essentially the same functionality as a mapping, + except the syntax is different, and it is located on disk, not in + memory. Each gdbm database is one file which contains a set of + key-value pairs. Both keys and values are strings and all keys are + unique. + +============================================================================ +NAME + create - open database + +SYNTAX + int gdbm->create(); + or + int gdbm->create(string file); + or + int gdbm->create(string file, string mode); + +DESCRIPTION + Without arguments, this function does nothing. With one argument it + opens the given file as a gdbm database, if this fails for some + reason, an error will be generated. If a second argument is present, + it specifies how to open the database using one or more of the follow + flags in a string: + + r open database for reading + w open database for writing + c create database if it does not exist + t overwrite existing database + f fast mode + + The fast mode prevents the database from syncronizing each change + in the database immediately. This is dangerous because the database + can be left in an unusable state if Pike is terminated abnormally. + + The default mode is "rwc". + +NOTA BENE + The gdbm manual states that it is important that the database is + closed properly. Unfortunately this will not be the case if Pike + calls exit() or returns from main(). You should therefore make sure + you call close or destruct your gdbm objects when exiting your + program. This will probably be done automatically in the future. + +============================================================================ +NAME + close - close database + +SYNTAX + void gdbm->close(); + +DESCRIPTION + This closes the database. + +============================================================================ +NAME + store - store a value in the database + +SYNTAX + int gdbm->store(string key, string data); + +DESCRIPTION + Associate the contents of 'data' with the key 'key'. If the key 'key' + already exists in the database the data for that key will be replaced. + If it does not exist it will be added. An error will be generated if + the database was not open for writing. + +============================================================================ +NAME + fetch - fetch a value from the databse + +SYNTAX + string gdbm->fetch(string key); + +DESCRIPTION + Return the data associated with the key 'key' in the database. + If there was no such key in the database, zero is returned. + +============================================================================ +NAME + delete - delete a value from the database + +SYNTAX + int gdbm->delete(string key); + +DESCRIPTION + Remove a key from the database. Note that no error will be generated + if the key does not exist. + +============================================================================ +NAME + firstkey - get first key in database + +SYNTAX + string gdbm->firstkey(); + +DESCRIPTION + Return the first key in the database, this can be any key in the + database. + +============================================================================ +NAME + nextkey - get next key in database + +SYNTAX + string gdbm->nextkey(string key); + +DESCRIPTION + This returns the key in database that follows the key 'key' key. + This is of course used to iterate over all keys in the database. + +EXAMPLE + /* Write the contents of the database */ + for(key=gdbm->firstkey(); k; k=gdbm->nextkey(k)) + write(k+":"+gdbm->fetch(k)+"\n"); + +============================================================================ +NAME + reorganize - reorganize database + +SYNTAX + int gdbm->reorganize(); + +DESCRIPTION + Deletions and insertions into the database can cause fragmentation + which will make the database bigger. This routine reorganizes the + contents to get rid of fragmentation. Note however that this function + can take a LOT of time to run. + +============================================================================ +NAME + sync - synchronize database + +SYNTAX + void gdbm->sync(); + +DESCRIPTION + When opening the database with the 'f' flag writings to the database + can be cached in memory for a long time. Calling sync will write + all such caches to disk and not return until everything is stored + on the disk. + +============================================================================ diff --git a/src/modules/gdbmmod/gdbm_machine.h.in b/src/modules/gdbmmod/gdbm_machine.h.in new file mode 100644 index 0000000000000000000000000000000000000000..e0768c6db7f225e501834cd19279e66561c2a6c6 --- /dev/null +++ b/src/modules/gdbmmod/gdbm_machine.h.in @@ -0,0 +1,10 @@ +#ifndef GDBM_MACHINE_H +#define GDBM_MACHINE_H + +/* Define this if you have <gdbm.h> */ +#undef HAVE_GDBM_H + +/* Define this if you have libgdbm */ +#undef HAVE_LIBGDBM + +#endif diff --git a/src/modules/gdbmmod/gdbmmod.c b/src/modules/gdbmmod/gdbmmod.c new file mode 100644 index 0000000000000000000000000000000000000000..ab1525b02b61de654725498ee28adee2e7be3b9a --- /dev/null +++ b/src/modules/gdbmmod/gdbmmod.c @@ -0,0 +1,290 @@ +/*\ +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) +||| See the files COPYING and DISCLAIMER for more information. +\*/ +#include "global.h" +#include "gdbm_machine.h" +#include "types.h" + +#if defined(HAVE_GDBM_H) && defined(HAVE_LIBGDBM) + +#include "interpret.h" +#include "svalue.h" +#include "stralloc.h" +#include "array.h" +#include "object.h" +#include "macros.h" + +#include <gdbm.h> + +struct gdbm_glue +{ + GDBM_FILE dbf; +}; + +#define THIS ((struct gdbm_glue *)(fp->current_storage)) + +static void do_free() +{ + if(THIS->dbf) + { + gdbm_close(THIS->dbf); + THIS->dbf=0; + } +} + +static int fixmods(char *mods) +{ + int mode; + mode=0; + while(1) + { + switch(*(mods++)) + { + case 0: + switch(mode & 15) + { + default: error("No mode given for gdbm->open()\n"); + case 1|16: + case 1: mode=GDBM_READER; break; + case 3: mode=GDBM_WRITER; break; + case 3|16: mode=GDBM_WRITER | GDBM_FAST; break; + case 7: mode=GDBM_WRCREAT; break; + case 7|16: mode=GDBM_WRCREAT | GDBM_FAST; break; + case 15: mode=GDBM_NEWDB; break; + case 15|16: mode=GDBM_NEWDB | GDBM_FAST; break; + } + return mode; + + case 'r': case 'R': mode|=1; break; + case 'w': case 'W': mode|=3; break; + case 'c': case 'C': mode|=7; break; + case 't': case 'T': mode|=15; break; + case 'f': case 'F': mode|=16; break; + + default: + error("Bad mode flag in gdbm->open.\n"); + } + } +} + +void gdbmmod_fatal(char *err) +{ + error("GDBM: %s\n",err); +} + +static void gdbmmod_create(INT32 args) +{ + do_free(); + if(args) + { + int rwmode = GDBM_WRCREAT; + if(sp[-args].type != T_STRING) + error("Bad argument 1 to gdbm->create()\n"); + + if(args>1) + { + if(sp[1-args].type != T_STRING) + error("Bad argument 2 to gdbm->create()\n"); + + rwmode=fixmods(sp[1-args].u.string->str); + } + + THIS->dbf=gdbm_open(sp[-args].u.string->str, 512, rwmode, 00666, gdbmmod_fatal); + pop_n_elems(args); + if(!THIS->dbf) + error("Failed to open GDBM database.\n"); + } +} + +#define STRING_TO_DATUM(dat, st) dat.dptr=st->str,dat.dsize=st->len; +#define DATUM_TO_STRING(dat) make_shared_binary_string(dat.dptr, dat.dsize) + +static void gdbmmod_fetch(INT32 args) +{ + datum key,ret; + if(!args) + error("Too few arguments to gdbm->fetch()\n"); + + if(sp[-args].type != T_STRING) + error("Bad argument 1 to gdbm->fetch()\n"); + + if(!THIS->dbf) + error("GDBM database not open.\n"); + + STRING_TO_DATUM(key, sp[-args].u.string); + + ret=gdbm_fetch(THIS->dbf, key); + pop_n_elems(args); + if(ret.dptr) + { + push_string(DATUM_TO_STRING(ret)); + free(ret.dptr); + }else{ + push_int(0); + } +} + +static void gdbmmod_delete(INT32 args) +{ + datum key; + int ret; + if(!args) + error("Too few arguments to gdbm->delete()\n"); + + if(sp[-args].type != T_STRING) + error("Bad argument 1 to gdbm->delete()\n"); + + if(!THIS->dbf) + error("GDBM database not open.\n"); + + STRING_TO_DATUM(key, sp[-args].u.string); + + ret=gdbm_delete(THIS->dbf, key); + pop_n_elems(args); + push_int(0); +} + +static void gdbmmod_firstkey(INT32 args) +{ + datum ret; + pop_n_elems(args); + + if(!THIS->dbf) error("GDBM database not open.\n"); + + ret=gdbm_firstkey(THIS->dbf); + if(ret.dptr) + { + push_string(DATUM_TO_STRING(ret)); + free(ret.dptr); + }else{ + push_int(0); + } +} + +static void gdbmmod_nextkey(INT32 args) +{ + datum key,ret; + if(!args) + error("Too few arguments to gdbm->nextkey()\n"); + + if(sp[-args].type != T_STRING) + error("Bad argument 1 to gdbm->nextkey()\n"); + + if(!THIS->dbf) + error("GDBM database not open.\n"); + + STRING_TO_DATUM(key, sp[-args].u.string); + + ret=gdbm_nextkey(THIS->dbf, key); + pop_n_elems(args); + if(ret.dptr) + { + push_string(DATUM_TO_STRING(ret)); + free(ret.dptr); + }else{ + push_int(0); + } +} + +static void gdbmmod_store(INT32 args) +{ + datum key,data; + int ret; + if(args<2) + error("Too few arguments to gdbm->store()\n"); + + if(sp[-args].type != T_STRING) + error("Bad argument 1 to gdbm->store()\n"); + + if(sp[1-args].type != T_STRING) + error("Bad argument 2 to gdbm->store()\n"); + + if(!THIS->dbf) + error("GDBM database not open.\n"); + + STRING_TO_DATUM(key, sp[-args].u.string); + STRING_TO_DATUM(data, sp[1-args].u.string); + + ret=gdbm_store(THIS->dbf, key, data, GDBM_REPLACE); + if(ret == -1) + error("GDBM database not open for writing.\n"); + + pop_n_elems(args); + push_int(ret == 0); +} + +static void gdbmmod_reorganize(INT32 args) +{ + datum ret; + pop_n_elems(args); + + if(!THIS->dbf) error("GDBM database not open.\n"); + ret=gdbm_firstkey(THIS->dbf); + pop_n_elems(args); + if(ret.dptr) + { + push_string(DATUM_TO_STRING(ret)); + free(ret.dptr); + }else{ + push_int(0); + } +} + +static void gdbmmod_sync(INT32 args) +{ + pop_n_elems(args); + + if(!THIS->dbf) error("GDBM database not open.\n"); + gdbm_sync(THIS->dbf); + push_int(0); +} + +static void gdbmmod_close(INT32 args) +{ + pop_n_elems(args); + + do_free(THIS->dbf); + push_int(0); +} + +static void init_gdbm_glue(struct object *o) +{ + THIS->dbf=0; +} + +static void exit_gdbm_glue(struct object *o) +{ + do_free(); +} + +#endif + +void init_gdbmmod_efuns(void) {} +void exit_gdbmmod(void) {} + +void init_gdbmmod_programs(void) +{ +#if defined(HAVE_GDBM_H) && defined(HAVE_LIBGDBM) + start_new_program(); + add_storage(sizeof(struct gdbm_glue)); + + add_function("create",gdbmmod_create,"function(void|string,void|string:void)",0); + + add_function("close",gdbmmod_close,"function(:void)",0); + add_function("store",gdbmmod_store,"function(string,string:int)",0); + add_function("fetch",gdbmmod_fetch,"function(string:string)",0); + add_function("delete",gdbmmod_delete,"function(string:int)",0); + add_function("firstkey",gdbmmod_firstkey,"function(:string)",0); + add_function("nextkey",gdbmmod_nextkey,"function(string:string)",0); + add_function("reorganize",gdbmmod_reorganize,"function(:int)",0); + add_function("sync",gdbmmod_sync,"function(:void)",0); + + set_init_callback(init_gdbm_glue); + set_exit_callback(exit_gdbm_glue); + + end_c_program("/precompiled/gdbm"); +#endif +} + diff --git a/src/modules/gmpmod/.cvsignore b/src/modules/gmpmod/.cvsignore new file mode 100644 index 0000000000000000000000000000000000000000..64200ddc24cb90d8f410a6a9e2b0b79c4cd30d58 --- /dev/null +++ b/src/modules/gmpmod/.cvsignore @@ -0,0 +1,2 @@ +Makefile.in +configure diff --git a/src/modules/gmpmod/.gitignore b/src/modules/gmpmod/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..addfc0376f648196d317f7f7299705f23cb23c21 --- /dev/null +++ b/src/modules/gmpmod/.gitignore @@ -0,0 +1,2 @@ +/Makefile.in +/configure diff --git a/src/modules/gmpmod/Makefile.src b/src/modules/gmpmod/Makefile.src new file mode 100644 index 0000000000000000000000000000000000000000..9c2029bb31c1d6cc59916cb67728dc5f08a0db6e --- /dev/null +++ b/src/modules/gmpmod/Makefile.src @@ -0,0 +1,19 @@ +SRCDIR=@srcdir@ +VPATH=@srcdir@:@srcdir@/../..:../.. +PREFLAGS=-I. -I$(SRCDIR) -I$(SRCDIR)/../.. -I../.. +CFLAGS=$(PREFLAGS) $(OTHERFLAGS) + +FILES=mpz_glue.o +LIB=gmpmod.a + +$(LIB): $(FILES) + -rm -f $(LIB) + ar cq $(LIB) $(FILES) + -@RANLIB@ $(LIB) + echo >linker_options @LIBS@ + +clean: + -rm -f *.o *.a + +depend: + gcc -MM $(PREFLAGS) $(SRCDIR)/*.c | $(FIXDEP) $(SRCDIR) diff --git a/src/modules/gmpmod/configure.in b/src/modules/gmpmod/configure.in new file mode 100644 index 0000000000000000000000000000000000000000..b8c1fa3b4afe39a8b85c5d1063174dd7395f44ee --- /dev/null +++ b/src/modules/gmpmod/configure.in @@ -0,0 +1,13 @@ +AC_INIT(mpz_glue.c) +AC_CONFIG_HEADER(gmp_machine.h) + +AC_PROG_CC +AC_PROG_RANLIB +AC_SUBST(RANLIB) + +AC_CHECK_HEADERS(gmp.h) +AC_CHECK_LIB(gmp, mpz_set_si) + +AC_OUTPUT(Makefile,echo FOO >stamp-h ) + + diff --git a/src/modules/gmpmod/doc/mpz b/src/modules/gmpmod/doc/mpz new file mode 100644 index 0000000000000000000000000000000000000000..2e85831a419b5f09e61c1995a70598408d466585 --- /dev/null +++ b/src/modules/gmpmod/doc/mpz @@ -0,0 +1,98 @@ +NAME + /precompiled/mpz - bignum program + +DESCRIPTION + /precompiled/mpz is a builtin program written in C. It implements + large, very large integers. In fact, the only limitation on these + integers is the available memory. + + The mpz object implements all the normal integer operations. + (except xor) There are also some extra operators: + +NOTA BENE + This module is only available if libgmp.a was available and + found when Pike was compiled. + +============================================================================ +NAME + create - initialize a bignum + +SYNTAX + object clone((program)"/precompiled/mpz"); + or + object clone((program)"/precompiled/mpz",int|object|string|float i); + +DESCRIPTION + When cloning an mpz it is by default initalized to zero. However, + you can give a second argument to clone to initialize the new + object to that value. The argument can be an int, float another + mpz object, or a string containing an ascii number. + +SEE ALSO + builtin/clone + +============================================================================ +NAME + powm - raise and modulo + +SYNTAX + object mpz->powm(int|string|float|object a,int|string|float|object b); + +DESCRIPTION + This function returns ( mpz ** a ) % b + +============================================================================ +NAME + sqrt - square root + +SYNTAX + object mpz->sqrt(); + +DESCRIPTION + This function return the the truncated integer part of the square + root of the value of mpz. + +============================================================================ +NAME + probably_prime_p - is this number a prime? + +SYNTAX + int mpz->probably_prime_p(); + +DESCRIPTION + This function returns 1 if mpz is a prime, and 0 most of the time + if it is not. + +============================================================================ +NAME + gcd - greatest common divisor + +SYNTAX + object mpz->gcd(object|int|float|string arg) + +DESCRIPTION + This function returns the greatest common divisor for arg and mpz. + +============================================================================ +NAME + cast - cast to other type + +SYNTAX + object mpz->gcd( "string" | "int" | "float" ); + or + (string) mpz + or + (int) mpz + or + (float) mpz + + +DESCRIPTION + This function converts an mpz to a string, int or float. This is + nessesary when you want to view, store or use the result of an mpz + calculation. + +SEE ALSO + cast + +============================================================================ diff --git a/src/modules/gmpmod/gmp_machine.h.in b/src/modules/gmpmod/gmp_machine.h.in new file mode 100644 index 0000000000000000000000000000000000000000..0a79aef13b5e6bb3e9756f2369fd33595766c378 --- /dev/null +++ b/src/modules/gmpmod/gmp_machine.h.in @@ -0,0 +1,7 @@ +#ifndef GMP_MACHINE_H +#define GMP_MACHINE_H + +/* Define this if you have <gmp.h> */ +#undef HAVE_GMP_H + +#endif diff --git a/src/modules/gmpmod/mpz_glue.c b/src/modules/gmpmod/mpz_glue.c new file mode 100644 index 0000000000000000000000000000000000000000..8b49088961c9cf7b76da4fc688eeb9ad1ba5b5a2 --- /dev/null +++ b/src/modules/gmpmod/mpz_glue.c @@ -0,0 +1,442 @@ +/*\ +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) +||| See the files COPYING and DISCLAIMER for more information. +\*/ +#include "global.h" +#include "gmp_machine.h" +#include "types.h" + +#ifdef HAVE_GMP_H + +#include "interpret.h" +#include "svalue.h" +#include "stralloc.h" +#include "array.h" +#include "macros.h" +#include "program.h" +#include "stralloc.h" +#include "object.h" +#include "pike_types.h" + +#include <gmp.h> + + +#define THIS ((MP_INT *)(fp->current_storage)) +#define OBTOMPZ(o) ((MP_INT *)(o->storage)) + +static struct program *mpzmod_program; + +static void get_new_mpz(MP_INT *tmp, struct svalue *s) +{ + switch(s->type) + { + case T_INT: + mpz_set_si(tmp, (signed long int) s->u.integer); + break; + + case T_FLOAT: + mpz_set_d(tmp, (double) s->u.float_number); + break; + + case T_STRING: + mpz_set_str(tmp, s->u.string->str, 0); + break; + + case T_OBJECT: + if(s->u.object->prog != mpzmod_program) + error("Wrong type of object, cannot convert to mpz.\n"); + + mpz_set(tmp, OBTOMPZ(s->u.object)); + break; + + default: + error("Bad argument 1 to mpz->create()\n"); + } +} + +static void mpzmod_create(INT32 args) +{ + if(args) + { + get_new_mpz(THIS, sp-args); + pop_n_elems(args); + } +} + +static void mpzmod_get_int(INT32 args) +{ + pop_n_elems(args); + push_int(mpz_get_si(THIS)); +} + +static void mpzmod_get_float(INT32 args) +{ + pop_n_elems(args); + push_float((float)mpz_get_d(THIS)); +} + +static void mpzmod_get_string(INT32 args) +{ + struct pike_string *s; + INT32 len; + + pop_n_elems(args); + len=mpz_sizeinbase(THIS,10); + len++; /* For a zero */ + if(mpz_sgn(THIS) < 0) len++; /* For the - sign */ + + s=begin_shared_string(len); + mpz_get_str(s->str,10,THIS); + + len-=4; + if(len < 0) len = 0; + while(s->str[len]) len++; + s->len=len; + s=end_shared_string(s); + push_string(s); +} + +static void mpzmod_cast(INT32 args) +{ + if(args < 1) + error("mpz->cast() called without arguments.\n"); + if(sp[-args].type != T_STRING) + error("Bad argument 1 to mpz->cast().\n"); + + switch(sp[-args].u.string->str[0]) + { + case 'i': + if(!strcmp(sp[-args].u.string->str, "int")) + { + mpzmod_get_int(args); + return; + } + break; + + case 's': + if(!strcmp(sp[-args].u.string->str, "string")) + { + mpzmod_get_string(args); + return; + } + break; + + case 'f': + if(!strcmp(sp[-args].u.string->str, "float")) + { + mpzmod_get_float(args); + return; + } + break; + + case 'o': + if(!strcmp(sp[-args].u.string->str, "object")) + { + pop_n_elems(args); + push_object(this_object()); + } + break; + + case 'm': + if(!strcmp(sp[-args].u.string->str, "mixed")) + { + pop_n_elems(args); + push_object(this_object()); + } + break; + + } + + error("mpz->cast() to other type than string, int or float.\n"); +} + +static MP_INT *get_mpz(struct svalue *s) +{ + struct object *o; + switch(s->type) + { + default: + error("Wrong type of object, cannot convert to mpz.\n"); + return 0; + + case T_INT: + case T_FLOAT: + case T_STRING: + o=clone(mpzmod_program,0); + get_new_mpz(OBTOMPZ(o), s); + free_svalue(s); + s->u.object=o; + s->type=T_OBJECT; + return (MP_INT *)o->storage; + + case T_OBJECT: + if(s->u.object->prog != mpzmod_program) + error("Wrong type of object, cannot convert to mpz.\n"); + + return (MP_INT *)s->u.object->storage; + } +} + +/* These two functions are here so we can allocate temporary + * objects without having to worry about them leaking in + * case of errors.. + */ +static struct object *temporary; +MP_INT *get_tmp() +{ + if(!temporary) + temporary=clone(mpzmod_program,0); + + return (MP_INT *)temporary->storage; +} + +static void return_temporary(INT32 args) +{ + pop_n_elems(args); + push_object(temporary); + temporary=0; +} + +#define BINFUN(name, fun) \ +static void name(INT32 args) \ +{ \ + INT32 e; \ + MP_INT *tmp=get_tmp(); \ + mpz_set(tmp, THIS); \ + for(e=0;e<args;e++) \ + fun(tmp, tmp, get_mpz(sp+e-args)); \ + return_temporary(args); \ +} + +BINFUN(mpzmod_add,mpz_add) +BINFUN(mpzmod_mul,mpz_mul) +BINFUN(mpzmod_gcd,mpz_gcd) + +static void mpzmod_sub(INT32 args) +{ + INT32 e; + MP_INT *tmp=get_tmp(); + mpz_set(tmp, THIS); + + if(args) + { + for(e=0;e<args;e++) + mpz_sub(tmp, tmp, get_mpz(sp+e-args)); + }else{ + mpz_neg(tmp, tmp); + } + + return_temporary(args); +} + +static void mpzmod_div(INT32 args) +{ + INT32 e; + MP_INT *tmp=get_tmp(); + mpz_set(tmp, THIS); + + for(e=0;e<args;e++) + { + MP_INT *tmp2; + tmp2=get_mpz(sp+e-args); + if(!mpz_sgn(tmp2)) + error("Division by zero.\n"); + mpz_tdiv_q(tmp, tmp, tmp2); + } + return_temporary(args); +} + +static void mpzmod_mod(INT32 args) +{ + INT32 e; + MP_INT *tmp=get_tmp(); + mpz_set(tmp, THIS); + + for(e=0;e<args;e++) + { + MP_INT *tmp2; + tmp2=get_mpz(sp+e-args); + if(!mpz_sgn(tmp2)) + error("Modulo by zero.\n"); + mpz_tdiv_r(tmp, tmp, tmp2); + } + return_temporary(args); +} + + +BINFUN(mpzmod_and,mpz_and) +BINFUN(mpzmod_or,mpz_ior) + +static void mpzmod_compl(INT32 args) +{ + struct object *o; + pop_n_elems(args); + o=clone(mpzmod_program,0); + push_object(o); + mpz_com(OBTOMPZ(o), THIS); +} + + +#define CMPFUN(name,cmp) \ +static void name(INT32 args) \ +{ \ + INT32 i; \ + if(!args) error("Comparison with one argument?\n"); \ + i=mpz_cmp(THIS, get_mpz(sp-args)) cmp 0; \ + pop_n_elems(args); \ + push_int(i); \ +} + +CMPFUN(mpzmod_gt, >) +CMPFUN(mpzmod_lt, <) +CMPFUN(mpzmod_ge, >=) +CMPFUN(mpzmod_le, <=) +CMPFUN(mpzmod_eq, ==) +CMPFUN(mpzmod_nq, !=) + +static void mpzmod_probably_prime_p(INT32 args) +{ + pop_n_elems(args); + push_int(mpz_probab_prime_p(THIS, 25)); +} + +static void mpzmod_sgn(INT32 args) +{ + pop_n_elems(args); + push_int(mpz_sgn(THIS)); +} + + +static void mpzmod_sqrt(INT32 args) +{ + struct object *o; + pop_n_elems(args); + if(mpz_sgn(THIS)<0) + error("mpz->sqrt() on negative number.\n"); + + o=clone(mpzmod_program,0); + push_object(o); + mpz_sqrt(OBTOMPZ(o), THIS); +} + +static void mpzmod_lsh(INT32 args) +{ + MP_INT *tmp; + pop_n_elems(args-1); + push_string(int_type_string); + int_type_string->refs++; + f_cast(2); + tmp=get_tmp(); + if(sp[-1].u.integer < 0) + error("mpz->lsh on negative number.\n"); + mpz_mul_2exp(tmp, THIS, sp[-1].u.integer); + return_temporary(1); +} + +static void mpzmod_rsh(INT32 args) +{ + MP_INT *tmp; + pop_n_elems(args-1); + push_string(int_type_string); + int_type_string->refs++; + f_cast(2); + tmp=get_tmp(); + mpz_set_ui(tmp,1); + mpz_mul_2exp(tmp, tmp, sp[-1].u.integer); + mpz_tdiv_q(tmp, THIS, tmp); + return_temporary(1); +} + +static void mpzmod_powm(INT32 args) +{ + MP_INT *tmp; + if(args < 2) + error("Too few arguments to mpzmod->powm()\n"); + + tmp=get_tmp(); + mpz_powm(tmp, tmp, get_mpz(sp-args), get_mpz(sp+1-args)); + return_temporary(args); +} + +static void mpzmod_not(INT32 args) +{ + pop_n_elems(args); + push_int(!mpz_sgn(THIS)); +} + +static void init_mpz_glue(struct object *o) +{ + mpz_init(THIS); +} + +static void exit_mpz_glue(struct object *o) +{ + mpz_clear(THIS); +} +#endif + +void init_gmpmod_efuns(void) {} +void exit_gmpmod(void) +{ +#ifdef HAVE_GMP_H + if(temporary) free_object(temporary); + free_program(mpzmod_program); +#endif +} + +void init_gmpmod_programs(void) +{ +#ifdef HAVE_GMP_H + start_new_program(); + add_storage(sizeof(MP_INT)); + + add_function("create",mpzmod_create,"function(void|string|int|float|object:void)",0); + +#define MPZ_BINOP_TYPE "function(string|int|float|object...:object)" + + add_function("`+",mpzmod_add,MPZ_BINOP_TYPE,0); + add_function("`-",mpzmod_sub,MPZ_BINOP_TYPE,0); + add_function("`*",mpzmod_mul,MPZ_BINOP_TYPE,0); + add_function("`/",mpzmod_div,MPZ_BINOP_TYPE,0); + add_function("`%",mpzmod_mod,MPZ_BINOP_TYPE,0); + add_function("`&",mpzmod_and,MPZ_BINOP_TYPE,0); + add_function("`|",mpzmod_or,MPZ_BINOP_TYPE,0); + +#define MPZ_SHIFT_TYPE "function(object|int|float|object:object)" + add_function("`<<",mpzmod_lsh,MPZ_SHIFT_TYPE,0); + add_function("`>>",mpzmod_rsh,MPZ_SHIFT_TYPE,0); + +#define MPZ_CMPOP_TYPE "function(string|int|float|object:int)" + + add_function("`>", mpzmod_gt,MPZ_CMPOP_TYPE,0); + add_function("`<", mpzmod_lt,MPZ_CMPOP_TYPE,0); + add_function("`>=",mpzmod_ge,MPZ_CMPOP_TYPE,0); + add_function("`<=",mpzmod_le,MPZ_CMPOP_TYPE,0); + + add_function("`==",mpzmod_le,MPZ_CMPOP_TYPE,0); + add_function("`!=",mpzmod_le,MPZ_CMPOP_TYPE,0); + + add_function("`!",mpzmod_not,"function(:int)",0); + + add_function("__hash",mpzmod_get_int,"function(:int)",0); + add_function("cast",mpzmod_cast,"function(string:mixed)",0); + + add_function("cast_to_int",mpzmod_get_int,"function(:int)",0); + add_function("cast_to_string",mpzmod_get_string,"function(:string)",0); + add_function("cast_to_float",mpzmod_get_float,"function(:float)",0); + + add_function("probably_prime_p",mpzmod_probably_prime_p,"function(:int)",0); + add_function("gcd",mpzmod_gcd,"function(object|string|int|float...:object)",0); + add_function("sqrt",mpzmod_gcd,"function(:object)",0); + add_function("`~",mpzmod_gcd,"function(:object)",0); + add_function("powm",mpzmod_gcd,"function(object|string|int|float,object|string|int|float:object)",0); + + set_init_callback(init_mpz_glue); + set_exit_callback(exit_mpz_glue); + + mpzmod_program=end_c_program("/precompiled/mpz"); + mpzmod_program->refs++; +#endif +} + diff --git a/src/modules/image/Makefile.in b/src/modules/image/Makefile.in new file mode 100644 index 0000000000000000000000000000000000000000..c04a34c52ed7fc4f19dfd766c3613a5a4b86693d --- /dev/null +++ b/src/modules/image/Makefile.in @@ -0,0 +1,79 @@ +SRCDIR=@srcdir@ +VPATH=@srcdir@:@srcdir@/../..:../.. +PREFLAGS=-I$(SRCDIR) -I$(SRCDIR)/../.. -I../.. +CFLAGS=$(PREFLAGS) $(OTHERFLAGS) @DEFS@ + +FILES=image.o font.o quant.o lzw.o togif.o + +image.a: $(FILES) + -rm -f image.a + ar cq image.a $(FILES) + -@RANLIB@ image.a + +clean: + -rm -f *.o *.a + +pike: image.a + cd ../..; make + +pure: image.a + cd ../..; make pure + + +depend: + gcc -MM $(PREFLAGS) $(SRCDIR)/*.c | $(FIXDEP) $(SRCDIR) + +# Depencies begin here +font.o: font.c \ + global.h machine.h \ + config.h \ + port.h \ + stralloc.h \ + macros.h \ + object.h \ + svalue.h \ + constants.h \ + hashtable.h \ + las.h \ + dynamic_buffer.h \ + program.h \ + interpret.h \ + array.h \ + image.h +image.o: image.c \ + stralloc.h \ + types.h machine.h \ + global.h \ + config.h \ + port.h \ + macros.h \ + object.h \ + svalue.h \ + constants.h \ + hashtable.h \ + las.h \ + dynamic_buffer.h \ + program.h \ + interpret.h \ + array.h \ + error.h \ + image.h +lzw.o: lzw.c \ + lzw.h +quant.o: quant.c \ + types.h machine.h \ + image.h \ + error.h \ + svalue.h \ + global.h \ + config.h \ + port.h +togif.o: togif.c \ + stralloc.h \ + types.h machine.h \ + global.h \ + config.h \ + port.h \ + dynamic_buffer.h \ + image.h \ + lzw.h diff --git a/src/modules/image/Makefile.src b/src/modules/image/Makefile.src new file mode 100644 index 0000000000000000000000000000000000000000..cc1938e55d97e6f60ffeea60173614ee24ee6883 --- /dev/null +++ b/src/modules/image/Makefile.src @@ -0,0 +1,25 @@ +SRCDIR=@srcdir@ +VPATH=@srcdir@:@srcdir@/../..:../.. +PREFLAGS=-I$(SRCDIR) -I$(SRCDIR)/../.. -I../.. +CFLAGS=$(PREFLAGS) $(OTHERFLAGS) @DEFS@ + +FILES=image.o font.o quant.o lzw.o togif.o + +image.a: $(FILES) + -rm -f image.a + ar cq image.a $(FILES) + -@RANLIB@ image.a + +clean: + -rm -f *.o *.a + +pike: image.a + cd ../..; make + +pure: image.a + cd ../..; make pure + + +depend: + gcc -MM $(PREFLAGS) $(SRCDIR)/*.c | $(FIXDEP) $(SRCDIR) + diff --git a/src/modules/math/configure b/src/modules/image/configure similarity index 92% rename from src/modules/math/configure rename to src/modules/image/configure index 5a16e38dbd68f589df4f42effbcb49910086f147..ed184d5a2422b417a531bb3480b13942cefb7b2d 100755 --- a/src/modules/math/configure +++ b/src/modules/image/configure @@ -1,8 +1,8 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.7 -# Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. +# Generated automatically using autoconf version 2.10 +# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. @@ -330,7 +330,7 @@ EOF verbose=yes ;; -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.7" + echo "configure generated by autoconf version 2.10" exit 0 ;; -with-* | --with-*) @@ -445,7 +445,7 @@ echo > confdefs.h # A filename unique to this package, relative to the directory that # configure is in, which we can look for to find out if srcdir is correct. -ac_unique_file=math.c +ac_unique_file=image.c # Find the source files, if location was not specified. if test -z "$srcdir"; then @@ -495,12 +495,9 @@ fi ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='echo $CPP $CPPFLAGS 1>&5; -$CPP $CPPFLAGS' -ac_compile='echo ${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5; -${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5' -ac_link='echo ${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5; -${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5' +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. @@ -534,7 +531,6 @@ else fi done IFS="$ac_save_ifs" - test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc" fi fi CC="$ac_cv_prog_CC" @@ -544,6 +540,55 @@ else echo "$ac_t""no" 1>&6 fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + ac_prog_rejected=no + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + break + fi + done + IFS="$ac_save_ifs" +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# -gt 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + set dummy "$ac_dir/$ac_word" "$@" + shift + ac_cv_prog_CC="$@" + fi +fi +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } +fi echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then @@ -554,7 +599,7 @@ else yes; #endif EOF -if ${CC-cc} -E conftest.c 2>&5 | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:603: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -675,7 +720,7 @@ trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. cat > conftest.defs <<\EOF -s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%-D\1=\2%g +s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g s%\[%\\&%g s%\]%\\&%g @@ -710,7 +755,7 @@ do echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.7" + echo "$CONFIG_STATUS generated by autoconf version 2.10" exit 0 ;; -help | --help | --hel | --he | --h) echo "\$ac_cs_usage"; exit 0 ;; diff --git a/src/modules/image/configure.in b/src/modules/image/configure.in new file mode 100644 index 0000000000000000000000000000000000000000..fcaf3dc941872fc1d3b6e6dcf073c93c80f4911a --- /dev/null +++ b/src/modules/image/configure.in @@ -0,0 +1,10 @@ +AC_INIT(image.c) + +AC_PROG_CC +AC_PROG_RANLIB + +AC_SUBST(RANLIB) + +AC_OUTPUT(Makefile,echo FOO >stamp-h ) + + diff --git a/src/modules/image/dependencies b/src/modules/image/dependencies new file mode 100644 index 0000000000000000000000000000000000000000..d6a94c7519619afd3e91fd8cbc684b4daa0ab62c --- /dev/null +++ b/src/modules/image/dependencies @@ -0,0 +1,53 @@ +font.o: /home/hubbe/pike/src/modules/image/font.c \ + /home/hubbe/pike/src/modules/image/global.h machine.h \ + /home/hubbe/pike/src/modules/image/config.h \ + /home/hubbe/pike/src/modules/image/port.h \ + /home/hubbe/pike/src/modules/image/stralloc.h \ + /home/hubbe/pike/src/modules/image/macros.h \ + /home/hubbe/pike/src/modules/image/object.h \ + /home/hubbe/pike/src/modules/image/svalue.h \ + /home/hubbe/pike/src/modules/image/constants.h \ + /home/hubbe/pike/src/modules/image/hashtable.h \ + /home/hubbe/pike/src/modules/image/las.h \ + /home/hubbe/pike/src/modules/image/dynamic_buffer.h \ + /home/hubbe/pike/src/modules/image/program.h \ + /home/hubbe/pike/src/modules/image/interpret.h \ + /home/hubbe/pike/src/modules/image/array.h \ + /home/hubbe/pike/src/modules/image/image.h +image.o: /home/hubbe/pike/src/modules/image/image.c \ + /home/hubbe/pike/src/modules/image/stralloc.h \ + /home/hubbe/pike/src/modules/image/types.h machine.h \ + /home/hubbe/pike/src/modules/image/global.h \ + /home/hubbe/pike/src/modules/image/config.h \ + /home/hubbe/pike/src/modules/image/port.h \ + /home/hubbe/pike/src/modules/image/macros.h \ + /home/hubbe/pike/src/modules/image/object.h \ + /home/hubbe/pike/src/modules/image/svalue.h \ + /home/hubbe/pike/src/modules/image/constants.h \ + /home/hubbe/pike/src/modules/image/hashtable.h \ + /home/hubbe/pike/src/modules/image/las.h \ + /home/hubbe/pike/src/modules/image/dynamic_buffer.h \ + /home/hubbe/pike/src/modules/image/program.h \ + /home/hubbe/pike/src/modules/image/interpret.h \ + /home/hubbe/pike/src/modules/image/array.h \ + /home/hubbe/pike/src/modules/image/error.h \ + /home/hubbe/pike/src/modules/image/image.h +lzw.o: /home/hubbe/pike/src/modules/image/lzw.c \ + /home/hubbe/pike/src/modules/image/lzw.h +quant.o: /home/hubbe/pike/src/modules/image/quant.c \ + /home/hubbe/pike/src/modules/image/types.h machine.h \ + /home/hubbe/pike/src/modules/image/image.h \ + /home/hubbe/pike/src/modules/image/error.h \ + /home/hubbe/pike/src/modules/image/svalue.h \ + /home/hubbe/pike/src/modules/image/global.h \ + /home/hubbe/pike/src/modules/image/config.h \ + /home/hubbe/pike/src/modules/image/port.h +togif.o: /home/hubbe/pike/src/modules/image/togif.c \ + /home/hubbe/pike/src/modules/image/stralloc.h \ + /home/hubbe/pike/src/modules/image/types.h machine.h \ + /home/hubbe/pike/src/modules/image/global.h \ + /home/hubbe/pike/src/modules/image/config.h \ + /home/hubbe/pike/src/modules/image/port.h \ + /home/hubbe/pike/src/modules/image/dynamic_buffer.h \ + /home/hubbe/pike/src/modules/image/image.h \ + /home/hubbe/pike/src/modules/image/lzw.h diff --git a/src/modules/image/doc.txt b/src/modules/image/doc.txt new file mode 100644 index 0000000000000000000000000000000000000000..857f82a7583c19501b296a6097f73586433340bb --- /dev/null +++ b/src/modules/image/doc.txt @@ -0,0 +1,368 @@ + Pike module: + + image + + Pontus Hagland law@infovav.se + Per Hedbor per@infovav.se + David K�gedal kg@infovav.se +---------------------------------------------------------------------------- +This package adds two Pike progams: + + * "precompiled/image" and + * "precompiled/font". + +---------------------------------------------------------------------------- + +methods in precompiled/image: + +Methods resulting in a new object: +object new( [int xsize,int ysize [,int r,int g,int b] ] ); + +object copy( [int x1,int y1,int x2,int y2 [,int r,int g,int b] ] ); +object crop( [int x1,int y1,int x2,int y2 [,int r,int g,int b] ] ); +object autocrop( [int border_width [,int left,int right,int top,int bottom] +[,int r,int g,int b] ] ); + +object gray(); +object color(int r,int g,int b); +object invert(); +object threshold([int r,int g,int b]); +object apply_matrix(array(array(int)) matrix,[int r,int g,int b[,int div]]); + +object scale(float factor); +object scale(float factorx,float factory); +object scale(int newx|0,int newy|0); + +Methods operating on current object: +string toppm(void); +void fromppm(string s); +string togif( [int r,inr g,int b] ); + +void paste(object img [,int x,int y]) +void paste_alpha(object img, int alpha [,int x, int y]); +void paste_mask(object img, object alpha_mask [,int x,int y]); + +void setcolor(int r,int g,int b); +void setpixel(int x,int y [,int r,int g,int b] ); +void line(int x1,int y1,int x2,int y2 [,int r,int g,int b] ); +void box(int x1,int y1,int x2,int y2 [,int r,int g,int b] ); +void circle(int x,int y,int radx,int rady [,int r,int b,int g] ); +void tuned_box(int x1,int y1,int x2,int y2,array(array(int)) corner_rgb); +---------------------------------------------------------------------------- + +METHOD + object apply_matrix(array(array(int)) matrix,[int r,int g,int b[,int + div]]); +DESCRIPTION + This method applies a matrix on the image. Each surrounding pixel is + multiplied with the value of the matrix element in that point, these + values are added and divided by the total sum of the matrix values (and + the div argument) and stored on the pixel (eventually added to the + r,g,b argument given as 'mean' value). + + It is possible to use a matrix of RGB groups (ie an array of three + integers) instead of the simple values, this making it possible to + apply different matrices on red, green and blue channel. +RETURN VALUE + the new object +EXAMPLE + A 'blur' operation (3x3, gaussian): + + blurred=image->apply_matrix( ({ ({1,2,1}), ({2,3,2}), ({1,2,1}) }) ); + + A 'Emboss' operation (3x3): + + emossed=image->apply_matrix(({ ({0,1,8}), ({-1,0,1}), ({-8,-1,0}) }), 128,128,128, 15 ); + + Here i'm using 128,128,128 (gray) as a mean, because i get negative + values. + A division by 15 is good to give 'normal' edges. +BUGS + not known + +---------------------------------------------------------------------------- + +METHOD + object autocrop( [int border_width [,int left,int right,int top,int + bottom] [,int r,int g,int b] ] ); +DESCRIPTION + Crops away unneccesary borders from the image. The border argument is + to define the new thickness of the surrounding border and the r,g,b is + the newly created border color. + + The left, right, ... arguments is used to tell which edges should be + autocropped. +RETURN VALUE + the new object +EXAMPLE + + cropped=image->autocrop(); + +BUGS + now known + +---------------------------------------------------------------------------- + +METHOD + void box(int x1,int y1,int x2,int y2 [,int r,int g,int b] ); +DESCRIPTION + Draw a box of the default or specified color. +RETURN VALUE + none +EXAMPLE +BUGS + +---------------------------------------------------------------------------- + +METHOD + void circle(int x,int y,int radx,int rady [,int r,int b,int g] ); +DESCRIPTION + Draw a circle. The coordinates given are the center of the image and + the radius in x (horisontal) and y (vertical), this making it possible + to draw an ellipse too. :-) +RETURN VALUE + none +EXAMPLE +BUGS + +---------------------------------------------------------------------------- + +METHOD + object color(int r,int g,int b); +DESCRIPTION + Apply a color filter on the image. +RETURN VALUE + the new object +EXAMPLE + + cyan=image->color(64,255,192); + + This function is most usable on a image that has been grayed first. +BUGS + +---------------------------------------------------------------------------- + +METHOD + object copy( [int x1,int y1,int x2,int y2 [,int r,int g,int b] ] ); + object crop( [int x1,int y1,int x2,int y2 [,int r,int g,int b] ] ); +DESCRIPTION + Copy a part (or more) of the image. +RETURN VALUE + the new object +EXAMPLE + + copy=image->copy(); + + copy=image->copy(-10,-10,image->xsize()+9,image->ysize()+9); + +BUGS + +---------------------------------------------------------------------------- + +METHOD + void fromppm(string s); +DESCRIPTION + Import a ppm image. +RETURN VALUE + none +EXAMPLE + + image=clone( (program)"precompiled/image" ); + image->fromppm(read_bytes("my_image.ppm",0,10000000)); + +BUGS + +---------------------------------------------------------------------------- + +METHOD + object gray([int r,int g,int b]); +DESCRIPTION + Make this image gray (each r,g,b gets the same value). + If a color is given, that specifies the amount of r, g, and b that is + used to compute the gray level. Default is 87,127,41. +RETURN VALUE + the new object +EXAMPLE + + gray=image->gray() + +BUGS + +---------------------------------------------------------------------------- + +METHOD + object invert(); +DESCRIPTION + Invert the image. +RETURN VALUE + the new object +EXAMPLE + + inverted=image->invert() + +BUGS + +---------------------------------------------------------------------------- + +METHOD + void line(int x1,int y1,int x2,int y2 [,int r,int g,int b] ); +DESCRIPTION + Draw a line from x1,y1 to x2,y2. +RETURN VALUE + none +EXAMPLE + + image->line(17,100,42,1000); + +BUGS + +---------------------------------------------------------------------------- + +METHOD + object new( [int xsize,int ysize [,int r,int g,int b] ] ); +DESCRIPTION + make a new object and return it +RETURN VALUE + the new object +EXAMPLE +BUGS + +---------------------------------------------------------------------------- + +METHOD + void paste(object img [,int x,int y]) + void paste_alpha(object img, int alpha [,int x, int y]); + void paste_mask(object img, object alpha_mask [,int x,int y]); +DESCRIPTION + Paste an image on this image. Use the specified alpha channel value or + the second specified image as an alpha channel. +RETURN VALUE + none this function doesn't return anything +EXAMPLE + + image->paste(other_smaller_image,17,42); + + image->paste_mask(other_image,alpha_channel_image); + +BUGS + +---------------------------------------------------------------------------- + +METHOD + object scale(float factor); (1 + object scale(float factorx,float factory); (2 + object scale(int newx|0,int newy|0); (3 +DESCRIPTION + Scale this image. + 1. scale the image with a (line scale) factor + 2. scale the image with different factors on x and y + 3. scale the image to a new size + with newx or newy set to zero, just scale the image to fit the x + or y size and keep proportions. +RETURN VALUE + the new object this function doesn't return anything +EXAMPLE +BUGS + +---------------------------------------------------------------------------- +METHOD + void setcolor(int r,int g,int b); +DESCRIPTION + set the default color used for drawing lines, etc +RETURN VALUE + none +EXAMPLE +BUGS + +---------------------------------------------------------------------------- +METHOD + void setpixel(int x,int y [,int r,int g,int b] ); +DESCRIPTION + set the color of the specified pixel +RETURN VALUE + none +EXAMPLE +BUGS + +---------------------------------------------------------------------------- + +METHOD + object threshold([int r,int g,int b]); +DESCRIPTION + make image black-and-white using the given value as the threshold +RETURN VALUE + the new object +EXAMPLE +BUGS + +---------------------------------------------------------------------------- + +METHOD + string togif( [int r,inr g,int b] ); +DESCRIPTION + export gif + if the color are given, this is the transparent color +RETURN VALUE + the gifimage as a string +EXAMPLE +BUGS + +---------------------------------------------------------------------------- + +METHOD + string toppm(void); +DESCRIPTION + export ppm +RETURN VALUE + the ppm image as a string +EXAMPLE +BUGS + +---------------------------------------------------------------------------- + +METHOD + void tuned_box(int x1,int y1,int x2,int y2,array(array(int)) + corner_rgb); +DESCRIPTION + draw a box with the specified corner colours, and shade the colors + between +RETURN VALUE + none +EXAMPLE + + image->tuned_box(0,0,img->xsize()-1,img->ysize()-1, + ({({0,0,64}),({16,16,128}), + ({16,16,128}),({192,160,128})})); + +BUGS + +---------------------------------------------------------------------------- + +methods in precompiled/font: + +int load(string file_name); +object write(string line, ...); +---------------------------------------------------------------------------- + +METHOD + int load(string file_name); +DESCRIPTION + load this font object with the font from the specified file +RETURN VALUE + true on success +EXAMPLE +BUGS + +---------------------------------------------------------------------------- + +METHOD + object write(string line, ...); +DESCRIPTION + make a new image object from the specified text, each argument + representing a line +RETURN VALUE + the new image object +EXAMPLE +BUGS + +---------------------------------------------------------------------------- diff --git a/src/modules/image/doc/image.html b/src/modules/image/doc/image.html new file mode 100644 index 0000000000000000000000000000000000000000..201ed1c320604d613abc04b31a2c70aa4a1f0be4 --- /dev/null +++ b/src/modules/image/doc/image.html @@ -0,0 +1,455 @@ +<center> +<i>Pike module: </i> +<h1>image</h1> +Pontus Hagland <a href=law@infovav.se><i>law@infovav.se</i></a> +<br>Per Hedbor <a href=per@infovav.se><i>per@infovav.se</i></a> +<br>David K�gedal <a href=kg@infovav.se><i>kg@infovav.se</i></a> +</center> + +<hr> + +This package adds two Pike progams: + +<ul> +<li><tt><a href=#image>"precompiled/image"</a></tt> and +<li><tt><a href=#font>"precompiled/font"</a></tt>. +</ul> + +<hr> + +<a name=image><h2>methods in precompiled/image:</h2></a> + +Methods resulting in a new object: + +<br><a name=newr><tt>object <a href=#new><b>new</b></a>( </tt>[<tt>int <b>xsize</b>,int <b>ysize</b> </tt>[<tt>,int <b>r</b>,int <b>g</b>,int <b>b</b></tt>]<tt> </b></tt>]<tt> </b>);</tt></a> +<p><a name=copyr><tt>object <a href=#copy><b>copy</b></a>( </tt>[<tt>int <b>x1</b>,int <b>y1</b>,int <b>x2</b>,int <b>y2</b> </tt>[<tt>,int <b>r</b>,int <b>g</b>,int <b>b</b></tt>]<tt> </b></tt>]<tt> </b>);</tt></a> +<br><a name=cropr><tt>object <a href=#crop><b>crop</b></a>( </tt>[<tt>int <b>x1</b>,int <b>y1</b>,int <b>x2</b>,int <b>y2</b> </tt>[<tt>,int <b>r</b>,int <b>g</b>,int <b>b</b></tt>]<tt> </b></tt>]<tt> </b>);</tt></a> +<br><a name=autocropr><tt>object <a href=#autocrop><b>autocrop</b></a>( </tt>[<tt>int <b>border_width</b> </tt>[<tt>,int <b>left</b>,int <b>right</b>,int <b>top</b>,int <b>bottom</b></tt>]<tt></b> </tt>[<tt>,int <b>r</b>,int <b>g</b>,int <b>b</b></tt>]<tt> </b></tt>]<tt> </b>);</tt></a> +<p><a name=grayr><tt>object <a href=#gray><b>gray</b></a>();</tt></a> +<br><a name=colorr><tt>object <a href=#color><b>color</b></a>(int <b>r</b>,int <b>g</b>,int <b>b</b>);</tt></a> +<br><a name=invertr><tt>object <a href=#invert><b>invert</b></a>();</tt></a> +<br><a name=thresholdr><tt>object <a href=#threshold><b>threshold</b></a>(</tt>[<tt>int <b>r</b>,int <b>g</b>,int <b>b</b></tt>]<tt></b>); </tt></a> +<br><a name=apply_matrixr><tt>object <a href=#apply_matrix><b>apply_matrix</b></a>(array(array(int)) <b>matrix</b>,</tt>[<tt>int <b>r</b>,int <b>g</b>,int <b>b</b></tt>[<tt>,int <b>div</b></tt>]]<tt>);</tt></a> +<p><a name=scaler><tt>object <a href=#scale><b>scale</b></a>(float <b>factor</b>);</tt></a> +<br><a name=scaler><tt>object <a href=#scale><b>scale</b></a>(float <b>factorx</b>,float <b>factory</b>);</tt></a> +<br><a name=scaler><tt>object <a href=#scale><b>scale</b></a>(int <b>newx</b></tt>|<tt><b>0</b>,int <b>newy</b></tt>|<tt><b>0</b>);</tt></a> + +<p>Methods operating on current object: + +<br><a name=toppmr><tt>string <a href=#toppm><b>toppm</b></a>(void</b>);</tt></a> +<br><a name=fromppmr><tt>string|void <a href=#fromppm><b>fromppm</b></a>(string <b>s</b>);</tt></a> +<br><a name=togifr><tt>string <a href=#togif><b>togif</b></a>( </tt>[<tt>int <b>r</b>,inr g</b>,int <b>b</b></tt>]<tt> </b>);</tt></a> +<p><a name=paster><tt>void <a href=#paste><b>paste</b></a>(object <b>img</b> </tt>[<tt>,int <b>x</b>,int <b>y</b></tt>]<tt></b>)</tt></a> +<br><a name=paste_alphar><tt>void <a href=#paste_alpha><b>paste_alpha</b></a>(object <b>img</b>, int <b>alpha</b> </tt>[<tt>,int <b>x</b>, int <b>y</b></tt>]<tt></b>);</tt></a> +<br><a name=paste_maskr><tt>void <a href=#paste_mask><b>paste_mask</b></a>(object <b>img</b>, object <b>alpha_mask</b> </tt>[<tt>,int <b>x</b>,int <b>y</b></tt>]<tt></b>);</tt></a> +<p><a name=setcolorr><tt>void <a href=#setcolor><b>setcolor</b></a>(int <b>r</b>,int <b>g</b>,int <b>b</b>);</tt></a> +<br><a name=setpixelr><tt>void <a href=#setpixel><b>setpixel</b></a>(int <b>x</b>,int <b>y</b> </tt>[<tt>,int <b>r</b>,int <b>g</b>,int <b>b</b></tt>]<tt> </b>);</tt></a> +<br><a name=liner><tt>void <a href=#line><b>line</b></a>(int <b>x1</b>,int <b>y1</b>,int <b>x2</b>,int <b>y2</b> </tt>[<tt>,int <b>r</b>,int <b>g</b>,int <b>b</b></tt>]<tt> </b>);</tt></a> +<br><a name=boxr><tt>void <a href=#box><b>box</b></a>(int <b>x1</b>,int <b>y1</b>,int <b>x2</b>,int <b>y2</b> </tt>[<tt>,int <b>r</b>,int <b>g</b>,int <b>b</b></tt>]<tt> </b>);</tt></a> +<br><a name=circler><tt>void <a href=#circle><b>circle</b></a>(int <b>x</b>,int <b>y</b>,int <b>radx</b>,int <b>rady</b> </tt>[<tt>,int <b>r</b>,int <b>b</b>,int <b>g</b></tt>]<tt> </b>);</tt></a> +<br><a name=tuned_boxr><tt>void <a href=#tuned_box><b>tuned_box</b></a>(int <b>x1</b>,int <b>y1</b>,int <b>x2</b>,int <b>y2</b>,array(array(int)) corner_rgb</b>);</tt></a> + +<p>Information giving methods: +<br><a name=xsizer><tt>void <a href=#xsize><b>xsize</b></a>();</tt></a> +<br><a name=ysizer><tt>void <a href=#ysize><b>ysize</b></a>();</tt></a> + +<hr> + +<dl> +<dt>METHOD +<dd><a name=apply_matrix><tt>object <a href=#apply_matrixr><b>apply_matrix</b></a>(array(array(int)) <b>matrix</b>,</tt>[<tt>int <b>r</b>,int <b>g</b>,int <b>b</b></tt>[<tt>,int <b>div</b></tt>]]<tt>);</tt></a> +<dt>DESCRIPTION + +<dd>This method applies a matrix on the image. Each surrounding pixel +is multiplied with the value of the matrix element in that point, +these values are added and divided by the total sum of the matrix +values (and the <b>div</b> argument) and stored on the pixel +(eventually added to the <b>r</b>,<b>g</b>,<b>b</b> argument given as +'mean' value). + +<p>It is possible to use a matrix of RGB groups (ie an array of three +integers) instead of the simple values, this making it possible to +apply different matrices on red, green and blue channel. + +<dt>RETURN VALUE +<dd>the new object +<dt>EXAMPLE +<dd> +A 'blur' operation (3x3, gaussian): +<pre>blurred=image->apply_matrix( ({ ({1,2,1}), ({2,3,2}), ({1,2,1}) }) );</pre> +<p>A 'Emboss' operation (3x3): +<pre>emossed=image->apply_matrix(({ ({0,1,8}), ({-1,0,1}), ({-8,-1,0}) }), 128,128,128, 15 );</pre> +Here i'm using 128,128,128 (gray) as a mean, because i get negative values. +<br>A division by 15 is good to give 'normal' edges. + +<dt>BUGS +<dd>not known +</dl> + +<hr> + +<dl> +<dt>METHOD +<dd><a name=autocrop><tt>object <a href=#autocropr><b>autocrop</b></a>( </tt>[<tt>int <b>border_width</b> </tt>[<tt>,int <b>left</b>,int <b>right</b>,int <b>top</b>,int <b>bottom</b></tt>]<tt></b> </tt>[<tt>,int <b>r</b>,int <b>g</b>,int <b>b</b></tt>]<tt> </b></tt>]<tt> </b>);</tt></a> +<dt>DESCRIPTION + +<dd>Crops away unneccesary borders from the image. The <b>border</b> +argument is to define the new thickness of the surrounding border and +the <b>r</b>,<b>g</b>,<b>b</b> is the newly created border color. + +<p>The <b>left</b>, <b>right</b>, ... arguments is used to tell which +edges should be autocropped. + +<dt>RETURN VALUE +<dd>the new object +<dt>EXAMPLE +<dd><pre>cropped=image->autocrop();</pre> +<dt>BUGS +<dd>now known +</dl> + +<hr> + +<dl> +<dt>METHOD +<dd><a name=box><tt>void <a href=#boxr><b>box</b></a>(int <b>x1</b>,int <b>y1</b>,int <b>x2</b>,int <b>y2</b> </tt>[<tt>,int <b>r</b>,int <b>g</b>,int <b>b</b></tt>]<tt> </b>);</tt></a> +<dt>DESCRIPTION + +<dd>Draw a box of the default or specified color. + +<dt>RETURN VALUE +<dd>none +<dt>EXAMPLE +<dd> +<dt>BUGS +<dd> +</dl> + +<hr> + +<dl> +<dt>METHOD +<dd><a name=circle><tt>void <a href=#circler><b>circle</b></a>(int <b>x</b>,int <b>y</b>,int <b>radx</b>,int <b>rady</b> </tt>[<tt>,int <b>r</b>,int <b>b</b>,int <b>g</b></tt>]<tt> </b>);</tt></a> +<dt>DESCRIPTION +<dd>Draw a circle. The coordinates given are the center of the image and the radius in x (horisontal) and y (vertical), this making it possible to draw an ellipse too. <tt>:-)</tt> +<dt>RETURN VALUE +<dd>none +<dt>EXAMPLE +<dd> +<dt>BUGS +<dd> +</dl> + +<hr> + +<dl> +<dt>METHOD +<dd><a name=color><tt>object <a href=#colorr><b>color</b></a>(int <b>r</b>,int <b>g</b>,int <b>b</b>);</tt></a> +<dt>DESCRIPTION +<dd>Apply a color filter on the image. +<dt>RETURN VALUE +<dd>the new object +<dt>EXAMPLE +<dd><pre>cyan=image->color(64,255,192);</pre> +This function is most usable on a image that has been <a href=#gray>gray</a>ed first. +<dt>BUGS +<dd> +</dl> + +<hr> + +<dl> +<dt>METHOD +<dd><a name=copy><tt>object <a href=#copyr><b>copy</b></a>( </tt>[<tt>int <b>x1</b>,int <b>y1</b>,int <b>x2</b>,int <b>y2</b> </tt>[<tt>,int <b>r</b>,int <b>g</b>,int <b>b</b></tt>]<tt> </b></tt>]<tt> </b>);</tt></a> +<dd><a name=crop><tt>object <a href=#cropr><b>crop</b></a>( </tt>[<tt>int <b>x1</b>,int <b>y1</b>,int <b>x2</b>,int <b>y2</b> </tt>[<tt>,int <b>r</b>,int <b>g</b>,int <b>b</b></tt>]<tt> </b></tt>]<tt> </b>);</tt></a> +<dt>DESCRIPTION +<dd>Copy a part (or more) of the image. +<dt>RETURN VALUE +<dd>the new object +<dt>EXAMPLE +<dd><pre>copy=image->copy(); + +copy=image->copy(-10,-10,image->xsize()+9,image->ysize()+9);</pre> +<dt>BUGS +<dd> +</dl> + +<hr> + +<dl> +<dt>METHOD +<dd><a name=fromppm><tt>string|void <a href=#fromppmr><b>fromppm</b></a>(string <b>s</b>);</tt></a> +<dt>DESCRIPTION +<dd>Import a ppm image. +<dt>RETURN VALUE +<dd>0 (void) upon success, else the error message (string). +<dt>EXAMPLE +<dd><pre>image=clone( (program)"precompiled/image" ); +image->fromppm(read_bytes("my_image.ppm",0,10000000));</pre> +<dt>BUGS +<dd> +</dl> + +<hr> + +<dl> +<dt>METHOD +<dd><a name=gray><tt>object <a href=#grayr><b>gray</b></a>(</tt>[<tt>int <b>r</b>,int <b>g</b>,int <b>b</b></tt>]<tt>);</tt></a> +<dt>DESCRIPTION + +<dd>Make this image gray (each r,g,b gets the same value).<br> If a +color is given, that specifies the amount of r, g, and b that is used +to compute the gray level. Default is 87,127,41. + +<dt>RETURN VALUE +<dd>the new object +<dt>EXAMPLE +<dd><pre>gray=image->gray()</pre> +<dt>BUGS +<dd> +</dl> + +<hr> + +<dl> +<dt>METHOD +<dd><a name=invert><tt>object <a href=#invertr><b>invert</b></a>();</tt></a> +<dt>DESCRIPTION +<dd>Invert the image. +<dt>RETURN VALUE +<dd>the new object +<dt>EXAMPLE +<dd><pre>inverted=image->invert()</pre> +<dt>BUGS +<dd> +</dl> + +<hr> + +<dl> +<dt>METHOD +<dd><a name=line><tt>void <a href=#liner><b>line</b></a>(int <b>x1</b>,int <b>y1</b>,int <b>x2</b>,int <b>y2</b> </tt>[<tt>,int <b>r</b>,int <b>g</b>,int <b>b</b></tt>]<tt> </b>);</tt></a> +<dt>DESCRIPTION +<dd>Draw a line from <b>x1</b>,<b>y1</b> to <b>x2</b>,<b>y2</b>. +<dt>RETURN VALUE +<dd>none +<dt>EXAMPLE +<dd><pre>image->line(17,100,42,1000);</pre> +<dt>BUGS +<dd> +</dl> + +<hr> + +<dl> +<dt>METHOD +<dd><a name=new><tt>object <a href=#newr><b>new</b></a>( </tt>[<tt>int <b>xsize</b>,int <b>ysize</b> </tt>[<tt>,int <b>r</b>,int <b>g</b>,int <b>b</b></tt>]<tt> </b></tt>]<tt> </b>);</tt></a> +<dt>DESCRIPTION +<dd>make a new object and return it +<dt>RETURN VALUE +<dd>the new object +<dt>EXAMPLE +<dd> +<dt>BUGS +<dd> +</dl> + +<hr> + +<dl> +<dt>METHOD +<dd><a name=paste><tt>void <a href=#paster><b>paste</b></a>(object <b>img</b> </tt>[<tt>,int <b>x</b>,int <b>y</b></tt>]<tt></b>)</tt></a> +<dd><a name=paste_alpha><tt>void <a href=#paste_alphar><b>paste_alpha</b></a>(object <b>img</b>, int <b>alpha</b> </tt>[<tt>,int <b>x</b>, int <b>y</b></tt>]<tt></b>);</tt></a> +<dd><a name=paste_mask><tt>void <a href=#paste_maskr><b>paste_mask</b></a>(object <b>img</b>, object <b>alpha_mask</b> </tt>[<tt>,int <b>x</b>,int <b>y</b></tt>]<tt></b>);</tt></a> +<dt>DESCRIPTION +<dd>Paste an image on this image. Use the specified alpha channel +value or the second specified image as an alpha channel.<br> +The first argument is the image that will be pasted. +<dt>RETURN VALUE +<dd>none +this function doesn't return anything +<dt>EXAMPLE +<dd><pre>image->paste(other_smaller_image,17,42); + +image->paste_mask(other_image,alpha_channel_image);</pre> +Paste a dog on a landscape:<pre>landscape->paste(dog,dog_alpha_channel,xpos,ypos);</pre> +Write some text:<pre>text=font->write("some text"); +foreground=image->new(text->xsize(),text->ysize(),255,255,255); // white +background->paste(foreground,text,xpos,ypos);</pre> +<dt>BUGS +<dd> +</dl> + +<hr> + +<dl> +<dt>METHOD +<dd><a name=scale><tt>object <a href=#scaler><b>scale</b></a>(float <b>factor</b>);</tt> (1</a> +<dd><a name=scale><tt>object <a href=#scaler><b>scale</b></a>(float <b>factorx</b>,float <b>factory</b>);</tt> (2</a> +<dd><a name=scale><tt>object <a href=#scaler><b>scale</b></a>(int <b>newx</b></tt>|<tt><b>0</b>,int <b>newy</b></tt>|<tt><b>0</b>);</tt> (3</a> +<dt>DESCRIPTION +<dd>Scale this image. +<ol> +<li>scale the image with a (line scale) factor +<li>scale the image with different factors on x and y +<li>scale the image to a new size +<br>with newx or newy set to zero, just scale the image to fit the x +or y size and keep proportions. +</ol> +<dt>RETURN VALUE +<dd>the new object +this function doesn't return anything +<dt>EXAMPLE +<dd> +<dt>BUGS +<dd> +</dl> + +<hr> + +<dt>METHOD +<dd><a name=setcolor><tt>void <a href=#setcolorr><b>setcolor</b></a>(int <b>r</b>,int <b>g</b>,int <b>b</b>);</tt></a> +<dt>DESCRIPTION +<dd>set the default color used for drawing lines, etc +<dt>RETURN VALUE +<dd>none +<dt>EXAMPLE +<dd> +<dt>BUGS +<dd> +</dl> + +<hr> + +<dt>METHOD +<dd><a name=setpixel><tt>void <a href=#setpixelr><b>setpixel</b></a>(int <b>x</b>,int <b>y</b> </tt>[<tt>,int <b>r</b>,int <b>g</b>,int <b>b</b></tt>]<tt> </b>);</tt></a> +<dt>DESCRIPTION +<dd>set the color of the specified pixel +<dt>RETURN VALUE +<dd>none +<dt>EXAMPLE +<dd> +<dt>BUGS +<dd> +</dl> + +<hr> + +<dl> +<dt>METHOD +<dd><a name=threshold><tt>object <a href=#thresholdr><b>threshold</b></a>(</tt>[<tt>int <b>r</b>,int <b>g</b>,int <b>b</b></tt>]<tt></b>); </tt></a> +<dt>DESCRIPTION +<dd>make image black-and-white using the given value as the threshold +<dt>RETURN VALUE +<dd>the new object +<dt>EXAMPLE +<dd> +<dt>BUGS +<dd> +</dl> + +<hr> + +<dl> +<dt>METHOD +<dd><a name=togif><tt>string <a href=#togifr><b>togif</b></a>( </tt>[<tt>int <b>r</b>,inr g</b>,int <b>b</b></tt>]<tt> </b>);</tt></a> +<dt>DESCRIPTION +<dd>export gif +<br>if the color are given, this is the transparent color +<dt>RETURN VALUE +<dd>the gifimage as a string +<dt>EXAMPLE +<dd> +<dt>BUGS +<dd> +</dl> + +<hr> + +<dl> +<dt>METHOD +<dd><a name=toppm><tt>string <a href=#toppmr><b>toppm</b></a>(void</b>);</tt></a> +<dt>DESCRIPTION +<dd>export ppm +<dt>RETURN VALUE +<dd>the ppm image as a string +<dt>EXAMPLE +<dd> +<dt>BUGS +<dd> +</dl> + +<hr> + +<dl> +<dt>METHOD +<dd><a name=tuned_box><tt>void <a href=#tuned_boxr><b>tuned_box</b></a>(int <b>x1</b>,int <b>y1</b>,int <b>x2</b>,int <b>y2</b>,array(array(int)) corner_rgb</b>);</tt></a> +<dt>DESCRIPTION +<dd>draw a box with the specified corner colours, and shade the colors between +<dt>RETURN VALUE +<dd>none +<dt>EXAMPLE +<dd><pre>image->tuned_box(0,0,img->xsize()-1,img->ysize()-1, + ({({0,0,64}),({16,16,128}), + ({16,16,128}),({192,160,128})}));</pre> +<dt>BUGS +<dd> +</dl> + +<hr> +<dl> +<dt>METHOD +<dd><a name=xsize><tt>void <a href=#xsizer><b>xsize</b></a>();</tt></a> +<dd><a name=ysize><tt>void <a href=#ysizer><b>ysize</b></a>();</tt></a> +<dt>DESCRIPTION +<dd> +<dt>RETURN VALUE +<dd>Gives the x- or the y-size (horisontal or vertical size) of the image. +<dt>EXAMPLE +<dd> +<dt>BUGS +<dd> +</dl> + + +<hr> + +<a name=font><h2>methods in precompiled/font:</h2></a> + +<a name=loadr><tt>int <a href=#load><b>load</b></a>(string <b>file_name</b>);</tt> +<br><a name=writer><tt>object <a href=#write><b>write</b></a>(string <b>line</b>, </tt>...<tt>);</tt> + +<hr> +<dl> +<dt>METHOD +<dd><a name=load><tt>int <a href=#loadr><b>load</b></a>(string <b>file_name</b>);</tt> +<dt>DESCRIPTION +<dd>load this font object with the font from the specified file +<dt>RETURN VALUE +<dd>true on success +<dt>EXAMPLE +<dd> +<dt>BUGS +<dd> +</dl> + +<hr> + +<dl> +<dt>METHOD +<dd><a name=write><tt>object <a href=#writer><b>write</b></a>(string <b>line</b>, </tt>...<tt>);</tt> +<dt>DESCRIPTION +<dd>make a new image object from the specified text, each argument representing a line +<dt>RETURN VALUE +<dd>the new image object +<dt>EXAMPLE +<dd> +<dt>BUGS +<dd> +</dl> + +<hr> + + + + diff --git a/src/modules/image/font.c b/src/modules/image/font.c new file mode 100644 index 0000000000000000000000000000000000000000..489403dda4413f8e473b1abc16cdcba324291b5c --- /dev/null +++ b/src/modules/image/font.c @@ -0,0 +1,372 @@ +#include "global.h" + +#include <sys/types.h> +#include <sys/stat.h> + +#ifdef _AIX +#include <fcntl.h> +#else +#include <sys/fcntl.h> +#endif + +#include <netinet/in.h> +#include <errno.h> + +#include "config.h" + +#include "stralloc.h" +#include "types.h" +#include "macros.h" +#include "object.h" +#include "constants.h" +#include "interpret.h" +#include "svalue.h" +#include "array.h" + +#include "image.h" +#ifdef HAVE_MMAP +#include <sys/mman.h> +#endif + + +static struct program *font_program; +extern struct program *image_program; + +#define THIS (*(struct font **)(fp->current_storage)) +#define THISOBJ (fp->current_object) + +struct font +{ + unsigned long height; /* height of character rectangles */ + unsigned long baseline; /* baseline of characters */ +#ifdef HAVE_MMAP + unsigned long mmaped_size; /* if 0 - not mmaped: just free() mem */ +#endif + void *mem; /* pointer to mmaped/malloced memory */ + unsigned long chars; /* number of characters */ + struct _char + { + unsigned long width; /* character rectangle has this width in pixels */ + unsigned long spacing; /* pixels to next character */ + unsigned char *pixels; /* character rectangle */ + } charinfo [1]; +}; + +/***************** init & exit *********************************/ + +static inline void free_font_struct(struct font *font) +{ + if (font) + { + if (font->mem) + { +#ifdef HAVE_MMAP + munmap(font->mem,font->mmaped_size); +#else + free(font->mem); +#endif + } + free(font); + } +} + +static void init_font_struct(struct object *o) +{ + THIS=NULL; +} + +static void exit_font_struct(struct object *obj) +{ + free_font_struct(THIS); + THIS=NULL; +} + +/***************** internals ***********************************/ + + +static inline int my_read(int from, char *buf, int towrite) +{ + int res; + while((res = read(from, buf, towrite)) < 0) + { + switch(errno) + { + case EAGAIN: case EINTR: + continue; + + default: + res = 0; + return 0; + } + } + return res; +} + +static inline long file_size(int fd) +{ + struct stat tmp; + int res; + if(!fstat(fd, &tmp)) return res = tmp.st_size; + return -1; +} + +static inline write_char(struct _char *ci, + rgb_group *pos, + INT32 xsize, + INT32 height) +{ + rgb_group *nl; + INT32 x,y; + unsigned char *p; + + p=ci->pixels; + + for (y=height; y>0; y--) + { + nl=pos+xsize; + for (x=(INT32)ci->width; x>0; x--) + { + register char c; + c=255-*p; + if (pos->r==0) + pos->r=pos->g=pos->b=c; + else if (pos->r+c>255) + pos->r=pos->g=pos->b=255; + else + { + pos->r+=c; + pos->g+=c; + pos->b+=c; + } + pos++; + p++; + } + pos=nl; + } +} + +/***************** methods *************************************/ + + +void font_load(INT32 args) +{ + int fd; + + if (args<1 + || sp[-args].type!=T_STRING) + error("font->read: illegal or wrong number of arguments\n"); + + if (THIS) + { + free_font_struct(THIS); + THIS=NULL; + } + + if ( (fd = open(sp[-args].u.string->str,O_RDONLY)) > -1) + { + long size; + size = file_size(fd); + if (size > 0) + { + THIS=malloc(sizeof(struct font)); +#ifdef HAVE_MMAP + THIS->mem = + mmap(0,size,PROT_READ,MAP_SHARED,fd,0); + THIS->mmaped_size=size; +#else + THIS->mem = malloc(size); + if (THIS->mem) + my_read(fd,THIS->mem,size); +#endif + if (THIS->mem) + { + int i; + + struct file_head + { + unsigned long cookie; + unsigned long version; + unsigned long chars; + unsigned long height; + unsigned long baseline; + unsigned long o[1]; + } *fh; + struct char_head + { + unsigned long width; + unsigned long spacing; + unsigned char data[1]; + } *ch; + + fh=(struct file_head*)THIS->mem; + + if (ntohl(fh->cookie)==0x464f4e54) /* "FONT" */ + if (ntohl(fh->version)==1) + { + unsigned long i; + struct font *new; + + THIS->chars=ntohl(fh->chars); + + new=malloc(sizeof(struct font)+ + sizeof(struct _char)*(THIS->chars-1)); + new->mem=THIS->mem; +#ifdef HAVE_MMAP + new->mmaped_size=THIS->mmaped_size; +#endif + new->chars=THIS->chars; + free(THIS); + THIS=new; + + THIS->height=ntohl(fh->height); + THIS->baseline=ntohl(fh->baseline); + + for (i=0; i<THIS->chars; i++) + { + ch=(struct char_head*) + ((char *)(THIS->mem)+ntohl(fh->o[i])); + THIS->charinfo[i].width = ntohl(ch->width); + THIS->charinfo[i].spacing = ntohl(ch->spacing); + THIS->charinfo[i].pixels = ch->data; + } + + close(fd); + pop_n_elems(args); + push_int(1); /* success */ + return; + } /* wrong version */ + /* wrong cookie */ + } /* mem failure */ + free_font_struct(THIS); + THIS=NULL; + } /* size failure */ + close(fd); + } /* fd failure */ + + pop_n_elems(args); + push_int(0); + return; +} + +void font_write(INT32 args) +{ + struct object *o; + struct image *img; + INT32 xsize,i,maxwidth,c,maxwidth2,j; + + if (!THIS) + error("font->write: no font loaded\n"); + + maxwidth2=0; + + for (j=0; j<args; j++) + { + if (sp[j-args].type!=T_STRING) + error("font->write: illegal argument(s)\n"); + + xsize = 0; + maxwidth = 0; + + for (i = 0; i < sp[j-args].u.string->len; i++) + if ((c=(unsigned char)sp[j-args].u.string->str[i]) + <(unsigned char)THIS->chars) + { + if (xsize + (signed long)THIS->charinfo[c].width > maxwidth) + maxwidth = xsize + THIS->charinfo[c].width; + xsize += THIS->charinfo[c].spacing; + } + + if (xsize>maxwidth) maxwidth=xsize; + if (maxwidth>maxwidth2) maxwidth2=maxwidth; + } + + o = clone(image_program,0); + img = ((struct image*)o->storage); + img->xsize = maxwidth2; + img->ysize = THIS->height * args; + img->rgb.r=img->rgb.g=img->rgb.b=255; + img->img=malloc(img->xsize*img->ysize*sizeof(rgb_group)); + + if (!img) { free_object(o); error("Out of memory\n"); } + + MEMSET(img->img,0,img->xsize*img->ysize*sizeof(rgb_group)); + + for (j=0; j<args; j++) + { + xsize = 0; + for (i = 0; i < (int)sp[j-args].u.string->len; i++) + if ( (c=(unsigned char)sp[j-args].u.string->str[i]) < + (unsigned char)THIS->chars) + { + write_char(THIS->charinfo+c, + img->img+xsize+img->xsize*j*THIS->height, + img->xsize, + THIS->height); + xsize += THIS->charinfo[c].spacing; + } + } + + pop_n_elems(args); + push_object(o); +} + +void font_height(INT32 args) +{ + pop_n_elems(args); + if (THIS) + push_int(THIS->height); + else + push_int(0); +} + +void font_baseline(INT32 args) +{ + pop_n_elems(args); + if (THIS) + push_int(THIS->baseline); + else + push_int(0); +} + +/***************** global init etc *****************************/ + +/* + +int load(string filename); // load font file, true is success +object write(string text); // new image object +int height(); // font heigth +int baseline(); // font baseline + +*/ + +void init_font_programs(void) +{ + start_new_program(); + add_storage(sizeof(struct font*)); + + add_function("load",font_load, + "function(string:int)",0); + + add_function("write",font_write, + "function(string:object)",0); + + add_function("height",font_height, + "function(:int)",0); + + add_function("baseline",font_baseline, + "function(:int)",0); + + set_init_callback(init_font_struct); + set_exit_callback(exit_font_struct); + + font_program=end_c_program("/precompiled/font"); + + font_program->refs++; +} + +void exit_font(void) +{ + free_program(font_program); +} + + diff --git a/src/modules/image/image.c b/src/modules/image/image.c new file mode 100644 index 0000000000000000000000000000000000000000..e515d5e4d92668dcd1703e2072def2f5c15e39d5 --- /dev/null +++ b/src/modules/image/image.c @@ -0,0 +1,1756 @@ +#include <math.h> +#include <ctype.h> + +#include "stralloc.h" +#include "global.h" +#include "types.h" +#include "macros.h" +#include "object.h" +#include "constants.h" +#include "interpret.h" +#include "svalue.h" +#include "array.h" +#include "error.h" + +#include "image.h" + +struct program *image_program; +#define THIS ((struct image *)(fp->current_storage)) +#define THISOBJ (fp->current_object) + +#define min(a,b) ((a)<(b)?(a):(b)) +#define max(a,b) ((a)<(b)?(b):(a)) + +#define CIRCLE_STEPS 128 +static INT32 circle_sin_table[CIRCLE_STEPS]; +#define circle_sin(x) circle_sin_table[((x)+CIRCLE_STEPS)%CIRCLE_STEPS] +#define circle_cos(x) circle_sin((x)-CIRCLE_STEPS/4) + +#define circle_sin_mul(x,y) ((circle_sin(x)*(y))/4096) +#define circle_cos_mul(x,y) ((circle_cos(x)*(y))/4096) + +/* colortable declarations - from quant */ + +struct colortable *colortable_quant(struct image *img); +int colortable_rgb(struct colortable *ct,rgb_group rgb); +void colortable_free(struct colortable *ct); + +/***************** init & exit *********************************/ + +static void init_image_struct(struct object *o) +{ + THIS->img=NULL; + THIS->rgb.r=0; + THIS->rgb.g=0; + THIS->rgb.b=0; +} + +static void exit_image_struct(struct object *obj) +{ + if (THIS->img) { free(THIS->img); THIS->img=NULL; } +} + +/***************** internals ***********************************/ + +#define apply_alpha(x,y,alpha) \ + ((unsigned char)((y*(255L-(alpha))+x*(alpha))/255L)) + +#define set_rgb_group_alpha(dest,src,alpha) \ + ((dest).r=apply_alpha((dest).r,(src).r,alpha), \ + (dest).g=apply_alpha((dest).g,(src).g,alpha), \ + (dest).b=apply_alpha((dest).b,(src).b,alpha)) + +#define pixel(_img,x,y) ((_img)->img[(x)+(y)*(_img)->xsize]) + +#define setpixel(x,y) \ + (THIS->alpha? \ + set_rgb_group_alpha(THIS->img[(x)+(y)*THIS->xsize],THIS->rgb,THIS->alpha): \ + ((pixel(THIS,x,y)=THIS->rgb),0)) + +#define setpixel_test(x,y) \ + (((x)<0||(y)<0||(x)>=THIS->xsize||(y)>=THIS->ysize)? \ + 0:(setpixel(x,y),0)) + +static INLINE void getrgb(struct image *img,INT32 args_start,INT32 args,char *name) +{ + INT32 i; + if (args-args_start<3) return; + for (i=0; i<3; i++) + if (sp[-args+i+args_start].type!=T_INT) + error("Illegal r,g,b argument to %s\n",name); + img->rgb.r=(unsigned char)sp[-args+args_start].u.integer; + img->rgb.g=(unsigned char)sp[1-args+args_start].u.integer; + img->rgb.b=(unsigned char)sp[2-args+args_start].u.integer; + if (args-args_start>=4) + if (sp[3-args+args_start].type!=T_INT) + error("Illegal alpha argument to %s\n",name); + else + img->alpha=sp[3-args+args_start].u.integer; + else + img->alpha=0; +} + +static INLINE void getrgbl(rgbl_group *rgb,INT32 args_start,INT32 args,char *name) +{ + INT32 i; + if (args-args_start<3) return; + for (i=0; i<3; i++) + if (sp[-args+i+args_start].type!=T_INT) + error("Illegal r,g,b argument to %s\n",name); + rgb->r=sp[-args+args_start].u.integer; + rgb->g=sp[1-args+args_start].u.integer; + rgb->b=sp[2-args+args_start].u.integer; +} + +static INLINE void img_clear(rgb_group *dest,rgb_group rgb,INT32 size) +{ + while (size--) *(dest++)=rgb; +} + +static INLINE void img_box_nocheck(INT32 x1,INT32 y1,INT32 x2,INT32 y2) +{ + INT32 x,mod; + rgb_group *foo,*end,rgb; + + mod=THIS->xsize-(x2-x1)-1; + foo=THIS->img+x1+y1*THIS->xsize; + end=THIS->img+x2+y2*THIS->xsize; + rgb=THIS->rgb; + + for (; foo<end; foo+=mod) for (x=x1; x<=x2; x++) *(foo++)=rgb; +} + +static INLINE void img_blit(rgb_group *dest,rgb_group *src,INT32 width, + INT32 lines,INT32 moddest,INT32 modsrc) +{ + while (lines--) + { + memcpy(dest,src,sizeof(rgb_group)*width); + dest+=moddest; + src+=modsrc; + } +} + +static void img_crop(struct image *dest, + struct image *img, + INT32 x1,INT32 y1, + INT32 x2,INT32 y2) +{ + rgb_group *new; + int mirrx,mirry; + INT32 blitwidth; + INT32 blitheight; + + if (dest->img) { free(dest->img); dest->img=NULL; } + + if (x1==0 && y1==0 && + img->xsize-1==x2 && img->ysize-1==y2) + { + *dest=*img; + new=malloc( (x2-x1+1)*(y2-y1+1)*sizeof(rgb_group) ); + if (!new) return; /* out of memory? */ + memcpy(new,img->img,(x2-x1+1)*(y2-y1+1)*sizeof(rgb_group)); + dest->img=new; + return; + } + + if (x1>x2) mirrx=1,x1^=x2,x2^=x1,x1^=x2; else mirrx=0; + if (y1>y2) mirry=1,y1^=y2,y2^=y1,y1^=y2; else mirry=0; + + new=malloc( (x2-x1+1)*(y2-y1+1)*sizeof(rgb_group) ); + if (!new) return; /* out of memory? */ + + img_clear(new,THIS->rgb,(x2-x1+1)*(y2-y1+1)); + + blitwidth=min(x2,img->xsize-1)-max(x1,0)+1; + blitheight=min(y2,img->ysize-1)-max(y1,0)+1; + + img_blit(new+max(0,-x1)+(x2-x1+1)*max(0,-y1), + img->img+max(0,x1)+(img->xsize)*max(0,y1), + blitwidth, + blitheight, + (x2-x1+1), + img->xsize); + + dest->img=new; + dest->xsize=x2-x1+1; + dest->ysize=y2-y1+1; +} + +static INLINE void img_clone(struct image *newimg,struct image *img) +{ + if (newimg->img) free(newimg->img); + newimg->img=malloc(sizeof(rgb_group)*img->xsize*img->ysize); + if (!newimg->img) return; /* out of memory? */ + memcpy(newimg->img,img->img,sizeof(rgb_group)*img->xsize*img->ysize); + newimg->xsize=img->xsize; + newimg->ysize=img->ysize; + newimg->rgb=img->rgb; +} + +static INLINE void img_line(INT32 x1,INT32 y1,INT32 x2,INT32 y2) +{ + INT32 pixelstep,pos; + if (x1==x2) + { + if (y1>y2) y1^=y2,y2^=y1,y1^=y2; + if (x1<0||x1>=THIS->xsize|| + y2<0||y2>=THIS->ysize) return; + if (y1<0) y1=0; + if (y2>=THIS->ysize) y2=THIS->ysize-1; + for (;y1<=y2;y1++) setpixel_test(x1,y1); + return; + } + else if (y1==y2) + { + if (x1>x2) x1^=x2,x2^=x1,x1^=x2; + if (y1<0||y1>=THIS->ysize|| + x2<0||x1>=THIS->xsize) return; + if (x1<0) x1=0; + if (x2>=THIS->xsize) x2=THIS->xsize-1; + for (;x1<=x2;x1++) setpixel_test(x1,y1); + return; + } + else if (abs(x2-x1)<abs(y2-y1)) /* mostly vertical line */ + { + if (y1>y2) y1^=y2,y2^=y1,y1^=y2, + x1^=x2,x2^=x1,x1^=x2; + pixelstep=((x2-x1)*1024)/(y2-y1); + pos=x1*1024; + for (;y1<=y2;y1++) + { + setpixel_test((pos+512)/1024,y1); + pos+=pixelstep; + } + } + else /* mostly horisontal line */ + { + if (x1>x2) y1^=y2,y2^=y1,y1^=y2, + x1^=x2,x2^=x1,x1^=x2; + pixelstep=((y2-y1)*1024)/(x2-x1); + pos=y1*1024; + for (;x1<=x2;x1++) + { + setpixel_test(x1,(pos+512)/1024); + pos+=pixelstep; + } + } +} + + +static INLINE void img_box(INT32 x1,INT32 y1,INT32 x2,INT32 y2) +{ + if (x1>x2) x1^=x2,x2^=x1,x1^=x2; + if (y1>y2) y1^=y2,y2^=y1,y1^=y2; + if (x2<0||y2<0||x1>=THIS->xsize||y1>=THIS->ysize) return; + img_box_nocheck(max(x1,0),max(y1,0),min(x2,THIS->xsize-1),min(y2,THIS->ysize-1)); +} + +#define decimals(x) ((x)-(int)(x)) +#define testrange(x) max(min((x),255),0) +#define _scale_add_rgb(dest,src,factor) \ + ((dest).r=testrange((dest).r+(int)((src).r*(factor)+0.5)), \ + (dest).g=testrange((dest).g+(int)((src).g*(factor)+0.5)), \ + (dest).b=testrange((dest).b+(int)((src).b*(factor)+0.5))) +#define scale_add_pixel(dest,dx,dy,dxw,src,sx,sy,sxw,factor) \ + _scale_add_rgb(dest[(dx)+(dy)*(dxw)],src[(sx)+(sy)*(sxw)],factor) + +static INLINE void scale_add_line(rgb_group *new,INT32 yn,INT32 newx, + rgb_group *img,INT32 y,INT32 xsize, + double py,double dx) +{ + INT32 x,xd; + double xn; + for (x=0,xn=0; x<THIS->xsize; x++,xn+=dx) + { + if ((INT32)xn<(INT32)(xn+dx)) + { + scale_add_pixel(new,(INT32)xn,yn,newx,img,x,y,xsize,py*(1.0-decimals(xn))); + if ((xd=(INT32)(xn+dx)-(INT32)(xn))>1) + while (--xd) + scale_add_pixel(new,(INT32)xn+xd,yn,newx,img,x,y,xsize,py); + scale_add_pixel(new,(INT32)(xn+dx),yn,newx,img,x,y,xsize,py*decimals(xn+dx)); + } + else + scale_add_pixel(new,(int)xn,yn,newx,img,x,y,xsize,py*dx); + } +} + +static void img_scale(struct image *dest, + struct image *source, + INT32 newx,INT32 newy) +{ + rgb_group *new; + INT32 y,yd; + double yn,dx,dy; + + if (dest->img) { free(dest->img); dest->img=NULL; } + + if (!THIS->img || newx<=0 || newy<=0) return; /* no way */ + new=malloc(newx*newy*sizeof(rgb_group)); + if (!new) return; /* out of memory */ + + memset(new,0,newx*newy*sizeof(rgb_group)); + + dx=((double)newx-0.000001)/source->xsize; + dy=((double)newy-0.000001)/source->ysize; + + for (y=0,yn=0; y<source->ysize; y++,yn+=dy) + { + if ((INT32)yn<(INT32)(yn+dy)) + { + scale_add_line(new,(INT32)(yn),newx,source->img,y,source->xsize, + (1.0-decimals(yn)),dx); + if ((yd=(INT32)(yn+dy)-(INT32)(yn))>1) + while (--yd) + scale_add_line(new,(INT32)yn+yd,newx,source->img,y,source->xsize, + 1.0,dx); + scale_add_line(new,(INT32)(yn+dy),newx,source->img,y,source->xsize, + (decimals(yn+dy)),dx); + } + else + scale_add_line(new,(INT32)yn,newx,source->img,y,source->xsize, + dy,dx); + } + + dest->img=new; + dest->xsize=newx; + dest->ysize=newy; +} + +/* Special, faster, case for scale=1/2 */ +static void img_scale2(struct image *dest, struct image *source) +{ + rgb_group *new; + INT32 x, y, newx, newy; + newx = source->xsize >> 1; + newy = source->ysize >> 1; + + if (dest->img) { free(dest->img); dest->img=NULL; } + if (!THIS->img || newx<=0 || newy<=0) return; /* no way */ + new=malloc(newx*newy*sizeof(rgb_group)); + if (!new) return; /* out of memory */ + memset(new,0,newx*newy*sizeof(rgb_group)); + + dest->img=new; + dest->xsize=newx; + dest->ysize=newy; + for (y = 0; y < newy; y++) + for (x = 0; x < newx; x++) { + pixel(dest,x,y).r = (COLOURTYPE) + (((INT32) pixel(source,2*x+0,2*y+0).r+ + (INT32) pixel(source,2*x+1,2*y+0).r+ + (INT32) pixel(source,2*x+0,2*y+1).r+ + (INT32) pixel(source,2*x+1,2*y+1).r) >> 2); + pixel(dest,x,y).g = (COLOURTYPE) + (((INT32) pixel(source,2*x+0,2*y+0).g+ + (INT32) pixel(source,2*x+1,2*y+0).g+ + (INT32) pixel(source,2*x+0,2*y+1).g+ + (INT32) pixel(source,2*x+1,2*y+1).g) >> 2); + pixel(dest,x,y).b = (COLOURTYPE) + (((INT32) pixel(source,2*x+0,2*y+0).b+ + (INT32) pixel(source,2*x+1,2*y+0).b+ + (INT32) pixel(source,2*x+0,2*y+1).b+ + (INT32) pixel(source,2*x+1,2*y+1).b) >> 2); + } +} + +static INLINE unsigned char getnext(struct pike_string *s,INT32 *pos) +{ + if (*pos>=s->len) return 0; + if (s->str[(*pos)]=='#') + for (;*pos<s->len && isspace(s->str[*pos]);(*pos)++); + return s->str[(*pos)++]; +} + +static INLINE void skip_to_eol(struct pike_string *s,INT32 *pos) +{ + for (;*pos<s->len && s->str[*pos]!=10;(*pos)++); +} + +static INLINE unsigned char getnext_skip_comment(struct pike_string *s,INT32 *pos) +{ + unsigned char c; + while ((c=getnext(s,pos))=='#') + skip_to_eol(s,pos); + return c; +} + +static INLINE void skipwhite(struct pike_string *s,INT32 *pos) +{ + while (*pos<s->len && + ( isspace(s->str[*pos]) || + s->str[*pos]=='#')) + getnext_skip_comment(s,pos); +} + +static INLINE INT32 getnextnum(struct pike_string *s,INT32 *pos) +{ + INT32 i; + skipwhite(s,pos); + i=0; + while (*pos<s->len && + s->str[*pos]>='0' && s->str[*pos]<='9') + { + i=(i*10)+s->str[*pos]-'0'; + getnext(s,pos); + } + return i; +} + +static char* img_frompnm(struct pike_string *s) +{ + struct image new; + INT32 type,c=0,maxval=255; + INT32 pos=0,x,y,i; + + skipwhite(s,&pos); + if (getnext(s,&pos)!='P') return "not pnm"; /* not pnm */ + type=getnext(s,&pos); + if (type<'1'||type>'6') return "unknown type"; /* unknown type */ + new.xsize=getnextnum(s,&pos); + new.ysize=getnextnum(s,&pos); + if (new.xsize<=0||new.ysize<=0) return "illegal size"; /* illegal size */ + if (type=='3'||type=='2'||type=='6'||type=='5') + maxval=getnextnum(s,&pos); + new.img=malloc(new.xsize*new.ysize*sizeof(rgb_group)); + if (!new.img) return "out of memory"; /* out of memory */ + if (type=='1'||type=='2'||type=='3') skipwhite(s,&pos); + else { skip_to_eol(s,&pos); pos++; } + for (y=0; y<new.ysize; y++) + for (i=0,x=0; x<new.xsize; x++) + switch (type) + { + case '1': + c=getnextnum(s,&pos); + pixel(&new,x,y).r=pixel(&new,x,y).g=pixel(&new,x,y).b= + (unsigned char)~(c*255); + break; + case '2': + c=getnextnum(s,&pos); + pixel(&new,x,y).r=pixel(&new,x,y).g=pixel(&new,x,y).b= + (unsigned char)((c*255L)/maxval); + break; + case '3': + pixel(&new,x,y).r=(unsigned char)((getnextnum(s,&pos)*255L)/maxval); + pixel(&new,x,y).g=(unsigned char)((getnextnum(s,&pos)*255L)/maxval); + pixel(&new,x,y).b=(unsigned char)((getnextnum(s,&pos)*255L)/maxval); + break; + case '4': + if (!i) c=getnext(s,&pos),i=8; + pixel(&new,x,y).r=pixel(&new,x,y).g=pixel(&new,x,y).b= + (unsigned char)~(((c>>7)&1)*255); + c<<=1; + i--; + break; + case '5': + c=getnext(s,&pos); + pixel(&new,x,y).r=pixel(&new,x,y).g=pixel(&new,x,y).b= + (unsigned char)((c*255L)/maxval); + break; + case '6': + pixel(&new,x,y).r=(unsigned char)((getnext(s,&pos)*255L)/maxval); + pixel(&new,x,y).g=(unsigned char)((getnext(s,&pos)*255L)/maxval); + pixel(&new,x,y).b=(unsigned char)((getnext(s,&pos)*255L)/maxval); + break; + } + if (THIS->img) free(THIS->img); + THIS->xsize=new.xsize; + THIS->ysize=new.ysize; + THIS->img=new.img; + return NULL; +} + +static INLINE rgb_group _pixel_apply_matrix(struct image *img, + int x,int y, + int width,int height, + rgbl_group *matrix, + rgb_group default_rgb, + INT32 div) +{ + rgb_group res; + int i,j,bx,by,xp,yp; + int sumr,sumg,sumb,r,g,b; + + sumr=sumg=sumb=0; + r=g=b=0; + + bx=width/2; + by=height/2; + + for (xp=x-bx,i=0; i<width; i++,xp++) + for (yp=y-by,j=0; j<height; j++,yp++) + if (xp>=0 && xp<img->xsize && yp>=0 && yp<img->ysize) + { + r+=matrix[i+j*width].r*img->img[xp+yp*img->xsize].r; + g+=matrix[i+j*width].g*img->img[xp+yp*img->xsize].g; + b+=matrix[i+j*width].b*img->img[xp+yp*img->xsize].b; +#ifdef MATRIX_DEBUG + fprintf(stderr,"%d,%d %d,%d->%d,%d,%d\n", + i,j,xp,yp, + img->img[x+i+(y+j)*img->xsize].r, + img->img[x+i+(y+j)*img->xsize].g, + img->img[x+i+(y+j)*img->xsize].b); +#endif + sumr+=matrix[i+j*width].r; + sumg+=matrix[i+j*width].g; + sumb+=matrix[i+j*width].b; + } + if (sumr) res.r=testrange(default_rgb.r+r/(sumr*div)); + else res.r=testrange(r/div+default_rgb.r); + if (sumg) res.g=testrange(default_rgb.g+g/(sumg*div)); + else res.g=testrange(g/div+default_rgb.g); + if (sumb) res.b=testrange(default_rgb.g+b/(sumb*div)); + else res.b=testrange(b/div+default_rgb.b); +#ifdef MATRIX_DEBUG + fprintf(stderr,"->%d,%d,%d\n",res.r,res.g,res.b); +#endif + return res; +} + +static void img_apply_matrix(struct image *dest, + struct image *img, + int width,int height, + rgbl_group *matrix, + rgb_group default_rgb, + INT32 div) +{ + rgb_group *d; + int i,j,x,y,bx,by,ex,ey,xp,yp; + int sumr,sumg,sumb; + + sumr=sumg=sumb=0; + for (i=0; i<width; i++) + for (j=0; j<height; j++) + { + sumr+=matrix[i+j*width].r; + sumg+=matrix[i+j*width].g; + sumb+=matrix[i+j*width].b; + } + + if (!sumr) sumr=1; sumr*=div; + if (!sumg) sumg=1; sumg*=div; + if (!sumb) sumb=1; sumb*=div; + + bx=width/2; + by=height/2; + ex=width-bx; + ey=height-by; + + d=malloc(sizeof(rgb_group)*img->xsize*img->ysize); + + for (x=bx; x<img->xsize-ex; x++) + for (y=by; y<img->ysize-ey; y++) + { + long r=0,g=0,b=0; + for (xp=x-bx,i=0; i<width; i++,xp++) + for (yp=y-by,j=0; j<height; j++,yp++) + { + r+=matrix[i+j*width].r*img->img[xp+yp*img->xsize].r; + g+=matrix[i+j*width].g*img->img[xp+yp*img->xsize].g; + b+=matrix[i+j*width].b*img->img[xp+yp*img->xsize].b; +#ifdef MATRIX_DEBUG + fprintf(stderr,"%d,%d ->%d,%d,%d\n", + i,j, + img->img[x+i+(y+j)*img->xsize].r, + img->img[x+i+(y+j)*img->xsize].g, + img->img[x+i+(y+j)*img->xsize].b); +#endif + } +#ifdef MATRIX_DEBUG + fprintf(stderr,"->%d,%d,%d\n",r/sumr,g/sumg,b/sumb); +#endif + d[x+y*img->xsize].r=testrange(default_rgb.r+r/sumr); + d[x+y*img->xsize].g=testrange(default_rgb.g+g/sumg); + d[x+y*img->xsize].b=testrange(default_rgb.b+b/sumb); + } + + + for (y=0; y<img->ysize; y++) + { + for (x=0; x<bx; x++) + d[x+y*img->xsize]=_pixel_apply_matrix(img,x,y,width,height, + matrix,default_rgb,div); + for (x=img->xsize-ex; x<img->xsize; x++) + d[x+y*img->xsize]=_pixel_apply_matrix(img,x,y,width,height, + matrix,default_rgb,div); + } + + for (x=0; x<img->xsize; x++) + { + for (y=0; y<by; y++) + d[x+y*img->xsize]=_pixel_apply_matrix(img,x,y,width,height, + matrix,default_rgb,div); + for (y=img->ysize-ey; y<img->ysize; y++) + d[x+y*img->xsize]=_pixel_apply_matrix(img,x,y,width,height, + matrix,default_rgb,div); + } + + if (dest->img) free(dest->img); + *dest=*img; + dest->img=d; +} + +/***************** methods *************************************/ + +void image_new(INT32 args) +{ + struct object *o; + struct image *img; + + if (args==0) + { + push_object(clone(image_program,0)); + return ; + } + + if (args<2|| + sp[-args].type!=T_INT|| + sp[1-args].type!=T_INT) + error("Illegal arguments to image->new()\n"); + + getrgb(THIS,2,args,"image->new()"); + + o=clone(image_program,0); + img=(struct image*)(o->storage); + + img->xsize=sp[-args].u.integer; + img->ysize=sp[1-args].u.integer; + if (img->xsize<=0) img->xsize=1; + if (img->ysize<=0) img->ysize=1; + + img->img=malloc(3*sp[-args].u.integer*sp[1-args].u.integer); + if (!img->img) { free_object(o); error("out of memory\n"); } + + img_clear(img->img,img->rgb,img->xsize*img->ysize); + pop_n_elems(args); + push_object(o); +} + +void image_toppm(INT32 args) +{ + char buf[80]; + struct pike_string *a,*b; + + pop_n_elems(args); + if (!THIS->img) { error("no image\n"); return; } + sprintf(buf,"P6\n# generated by...\n%d %d\n255\n",THIS->xsize,THIS->ysize); + a=make_shared_string(buf); + b=make_shared_binary_string((char*)THIS->img, + THIS->xsize*THIS->ysize*3); + push_string(add_shared_strings(a,b)); + free_string(a); + free_string(b); +} + +struct pike_string * + image_encode_gif(struct image *img,struct colortable *ct, + rgb_group *transparent); + +void image_togif(INT32 args) +{ + char buf[80]; + struct pike_string *a,*b; + rgb_group *transparent=NULL; + + if (args>=3) + { + getrgb(THIS,0,args,"image->togif() (transparency)"); + transparent=&(THIS->rgb); + } + + pop_n_elems(args); + if (!THIS->img) { error("no image\n"); return; } + + push_string( image_encode_gif( THIS,colortable_quant(THIS), + transparent) ); +} + +void image_frompnm(INT32 args) +{ + char *s; + if (args<1|| + sp[-args].type!=T_STRING) + error("Illegal argument to image->frompnm()\n"); + s=img_frompnm(sp[-args].u.string); + pop_n_elems(args); + if (!s) push_int(0); + else push_string(make_shared_string(s)); +} + +void image_crop(INT32 args) +{ + struct object *o; + struct image *img; + + if (!args) return; + if (args<4|| + sp[-args].type!=T_INT|| + sp[1-args].type!=T_INT|| + sp[2-args].type!=T_INT|| + sp[3-args].type!=T_INT) + error("illegal arguments to image->crop()\n"); + + getrgb(THIS,2,args,"image->new()"); + + o=clone(image_program,0); + img=(struct image*)(o->storage); + + img_crop(img,THIS, + sp[-args].u.integer,sp[1-args].u.integer, + sp[2-args].u.integer,sp[3-args].u.integer); + + pop_n_elems(args); + push_object(o); +} + +static INLINE int try_autocrop_vertical(INT32 x,INT32 y,INT32 y2, + INT32 rgb_set,rgb_group *rgb) +{ + if (!rgb_set) *rgb=pixel(THIS,x,y); + for (;y<=y2; y++) + if (pixel(THIS,x,y).r!=rgb->r || + pixel(THIS,x,y).g!=rgb->g || + pixel(THIS,x,y).b!=rgb->b) return 0; + return 1; +} + +static INLINE int try_autocrop_horisontal(INT32 y,INT32 x,INT32 x2, + INT32 rgb_set,rgb_group *rgb) +{ + if (!rgb_set) *rgb=pixel(THIS,x,y); + for (;x<=x2; x++) + if (pixel(THIS,x,y).r!=rgb->r || + pixel(THIS,x,y).g!=rgb->g || + pixel(THIS,x,y).b!=rgb->b) return 0; + return 1; +} + +void image_autocrop(INT32 args) +{ + INT32 border=0,x1,y1,x2,y2; + rgb_group rgb; + int rgb_set=0,done; + struct object *o; + struct image *img; + int left=1,right=1,top=1,bottom=1; + + if (args) + if (sp[-args].type!=T_INT) + error("Illegal argument to image->autocrop()\n"); + else + border=sp[-args].u.integer; + + if (args>=5) + { + left=!(sp[1-args].type==T_INT && sp[1-args].u.integer==0); + right=!(sp[2-args].type==T_INT && sp[2-args].u.integer==0); + top=!(sp[3-args].type==T_INT && sp[3-args].u.integer==0); + bottom=!(sp[4-args].type==T_INT && sp[4-args].u.integer==0); + getrgb(THIS,5,args,"image->autocrop()"); + } + else getrgb(THIS,1,args,"image->autocrop()"); + + if (!THIS->img) + { + error("no image\n"); + return; + } + + x1=y1=0; + x2=THIS->xsize-1; + y2=THIS->ysize-1; + + while (x2>x1 && y2>y1) + { + done=0; + if (left && + try_autocrop_vertical(x1,y1,y2,rgb_set,&rgb)) x1++,done=rgb_set=1; + if (right && + x2>x1 && + try_autocrop_vertical(x2,y1,y2,rgb_set,&rgb)) x2--,done=rgb_set=1; + if (top && + try_autocrop_horisontal(y1,x1,x2,rgb_set,&rgb)) y1++,done=rgb_set=1; + if (bottom && + y2>y1 && + try_autocrop_horisontal(y2,x1,x2,rgb_set,&rgb)) y2--,done=rgb_set=1; + if (!done) break; + } + + o=clone(image_program,0); + img=(struct image*)(o->storage); + + img_crop(img,THIS,x1-border,y1-border,x2+border,y2+border); + + pop_n_elems(args); + push_object(o); +} + +void image_copy(INT32 args) +{ + struct object *o; + struct image *newimg; + + if (!args) + { + o=clone(image_program,0); + if (THIS->img) img_clone((struct image*)o->storage,THIS); + pop_n_elems(args); + push_object(o); + return; + } + if (args<4|| + sp[-args].type!=T_INT|| + sp[1-args].type!=T_INT|| + sp[2-args].type!=T_INT|| + sp[3-args].type!=T_INT) + error("illegal arguments to image->copy()\n"); + + getrgb(THIS,4,args,"image->copy()"); + o=clone(image_program,0); + if (THIS->img) + { + newimg=(struct image*)o->storage; + newimg->rgb=THIS->rgb; + img_crop(newimg,THIS,sp[-args].u.integer,sp[1-args].u.integer, + sp[2-args].u.integer,sp[3-args].u.integer); + } + pop_n_elems(args); + push_object(o); +} + +void image_paste(INT32 args) +{ + struct image *img; + INT32 x1,y1,x2,y2,blitwidth,blitheight; + + if (args<1 + || sp[-args].type!=T_OBJECT + || !sp[-args].u.object + || sp[-args].u.object->prog!=image_program) + error("illegal argument 1 to image->paste()\n"); + if (!THIS->img) return; + + img=(struct image*)sp[-args].u.object->storage; + if (!img) return; + + if (args>=3) + { + if (sp[1-args].type!=T_INT + || sp[2-args].type!=T_INT) + error("illegal arguments to image->paste()\n"); + x1=sp[1-args].u.integer; + y1=sp[2-args].u.integer; + } + else x1=y1=0; + pop_n_elems(args-1); + + x2=x1+img->xsize-1; + y2=y1+img->ysize-1; + + blitwidth=min(x2,THIS->xsize-1)-max(x1,0)+1; + blitheight=min(y2,THIS->ysize-1)-max(y1,0)+1; + + img_blit(THIS->img+max(0,x1)+(THIS->xsize)*max(0,y1), + img->img+max(0,-x1)+(x2-x1+1)*max(0,-y1), + blitwidth, + blitheight, + THIS->xsize, + img->xsize); +} + +void image_paste_alpha(INT32 args) +{ + struct image *img; + INT32 x1,y1,x,y; + + if (args<2 + || sp[-args].type!=T_OBJECT + || !sp[-args].u.object + || sp[-args].u.object->prog!=image_program + || sp[1-args].type!=T_INT) + error("illegal arguments to image->paste_alpha()\n"); + if (!THIS->img) return; + + img=(struct image*)sp[-args].u.object->storage; + if (!img) return; + THIS->alpha=(unsigned char)(sp[1-args].u.integer); + + if (args>=4) + { + if (sp[2-args].type!=T_INT + || sp[3-args].type!=T_INT) + error("illegal arguments to image->paste_alpha()\n"); + x1=sp[2-args].u.integer; + y1=sp[3-args].u.integer; + } + else x1=y1=0; + pop_n_elems(args-1); + + for (x=0; x<img->xsize; x++) + for (y=0; y<img->ysize; y++) + { + THIS->rgb=pixel(img,x,y); + setpixel_test(x1+x,y1+y); + } +} + +void image_paste_mask(INT32 args) +{ + struct image *img,*mask; + INT32 x1,y1,x,y,x2,y2; + + if (args<2) + error("illegal number of arguments to image->paste_mask()\n"); + if (sp[-args].type!=T_OBJECT + || !sp[-args].u.object + || sp[-args].u.object->prog!=image_program) + error("illegal argument 1 to image->paste_mask()\n"); + if (sp[1-args].type!=T_OBJECT + || !sp[1-args].u.object + || sp[1-args].u.object->prog!=image_program) + error("illegal argument 2 to image->paste_mask()\n"); + if (!THIS->img) return; + + img=(struct image*)sp[-args].u.object->storage; + mask=(struct image*)sp[1-args].u.object->storage; + if ((!img)||(!img->img)) error("argument 1 has no image\n"); + if ((!mask)||(!mask->img)) error("argument 2 (alpha) has no image\n"); + + if (args>=4) + { + if (sp[2-args].type!=T_INT + || sp[3-args].type!=T_INT) + error("illegal coordinate arguments to image->paste_mask()\n"); + x1=sp[2-args].u.integer; + y1=sp[3-args].u.integer; + } + else x1=y1=0; + + x2=min(THIS->xsize-x1,min(img->xsize,mask->xsize)); + y2=min(THIS->ysize-y1,min(img->ysize,mask->ysize)); + + pop_n_elems(args-1); + + for (x=max(0,-x1); x<x2; x++) + for (y=max(0,-y1); y<y2; y++) + { + pixel(THIS,x+x1,y+y1).r= + (unsigned char)((pixel(THIS,x+x1,y+y1).r*(long)(255-pixel(mask,x,y).r)+ + pixel(img,x,y).r*(long)pixel(mask,x,y).r)/255); + pixel(THIS,x+x1,y+y1).g= + (unsigned char)((pixel(THIS,x+x1,y+y1).g*(long)(255-pixel(mask,x,y).g)+ + pixel(img,x,y).g*(long)pixel(mask,x,y).g)/255); + pixel(THIS,x+x1,y+y1).b= + (unsigned char)((pixel(THIS,x+x1,y+y1).b*(long)(255-pixel(mask,x,y).b)+ + pixel(img,x,y).b*(long)pixel(mask,x,y).b)/255); + } +} + +void image_paste_alpha_color(INT32 args) +{ + struct image *img,*mask; + INT32 x1,y1,x,y,x2,y2; + + if (args!=1 && args!=4 && args!=6 && args!=3) + error("illegal number of arguments to image->paste_alpha_color()\n"); + if (sp[-args].type!=T_OBJECT + || !sp[-args].u.object + || sp[-args].u.object->prog!=image_program) + error("illegal argument 1 to image->paste_alpha_color()\n"); + if (!THIS->img) return; + + if (args==6 || args==4) /* colors at arg 2..4 */ + getrgb(THIS,1,args,"image->paste_alpha_color()\n"); + if (args==3) /* coords at 2..3 */ + { + if (sp[1-args].type!=T_INT + || sp[2-args].type!=T_INT) + error("illegal coordinate arguments to image->paste_alpha_color()\n"); + x1=sp[1-args].u.integer; + y1=sp[2-args].u.integer; + } + else if (args==6) /* at 5..6 */ + { + if (sp[4-args].type!=T_INT + || sp[5-args].type!=T_INT) + error("illegal coordinate arguments to image->paste_alpha_color()\n"); + x1=sp[4-args].u.integer; + y1=sp[5-args].u.integer; + } + else x1=y1=0; + + mask=(struct image*)sp[-args].u.object->storage; + if (!mask||!mask->img) error("argument 2 (alpha) has no image\n"); + + x2=min(THIS->xsize-x1,mask->xsize); + y2=min(THIS->ysize-y1,mask->ysize); + + pop_n_elems(args-1); + + for (x=max(0,-x1); x<x2; x++) + for (y=max(0,-y1); y<y2; y++) + { + pixel(THIS,x+x1,y+y1).r= + (unsigned char)((pixel(THIS,x+x1,y+y1).r*(long)(255-pixel(mask,x,y).r)+ + THIS->rgb.r*(long)pixel(mask,x,y).r)/255); + pixel(THIS,x+x1,y+y1).g= + (unsigned char)((pixel(THIS,x+x1,y+y1).g*(long)(255-pixel(mask,x,y).g)+ + THIS->rgb.g*(long)pixel(mask,x,y).g)/255); + pixel(THIS,x+x1,y+y1).b= + (unsigned char)((pixel(THIS,x+x1,y+y1).b*(long)(255-pixel(mask,x,y).b)+ + THIS->rgb.b*(long)pixel(mask,x,y).b)/255); + } +} + +void image_setcolor(INT32 args) +{ + if (args<3) + error("illegal arguments to image->setcolor()\n"); + getrgb(THIS,0,args,"image->setcolor()"); + pop_n_elems(args-1); +} + +void image_setpixel(INT32 args) +{ + INT32 x,y; + if (args<2|| + sp[-args].type!=T_INT|| + sp[1-args].type!=T_INT) + error("Illegal arguments to image->setpixel()\n"); + getrgb(THIS,2,args,"image->setpixel()"); + if (!THIS->img) return; + x=sp[-args].u.integer; + y=sp[1-args].u.integer; + if (!THIS->img) return; + pop_n_elems(args-1); + setpixel_test(x,y); +} + +void image_line(INT32 args) +{ + if (args<4|| + sp[-args].type!=T_INT|| + sp[1-args].type!=T_INT|| + sp[2-args].type!=T_INT|| + sp[3-args].type!=T_INT) + error("Illegal arguments to image->line()\n"); + getrgb(THIS,4,args,"image->line()"); + if (!THIS->img) return; + + img_line(sp[-args].u.integer, + sp[1-args].u.integer, + sp[2-args].u.integer, + sp[3-args].u.integer); + pop_n_elems(args-1); +} + +void image_box(INT32 args) +{ + if (args<4|| + sp[-args].type!=T_INT|| + sp[1-args].type!=T_INT|| + sp[2-args].type!=T_INT|| + sp[3-args].type!=T_INT) + error("Illegal arguments to image->line()\n"); + getrgb(THIS,4,args,"image->line()"); + if (!THIS->img) return; + + img_box(sp[-args].u.integer, + sp[1-args].u.integer, + sp[2-args].u.integer, + sp[3-args].u.integer); + pop_n_elems(args-1); +} + +void image_circle(INT32 args) +{ + INT32 x,y,rx,ry; + INT32 i; + + if (args<4|| + sp[-args].type!=T_INT|| + sp[1-args].type!=T_INT|| + sp[2-args].type!=T_INT|| + sp[3-args].type!=T_INT) + error("illegal arguments to image->circle()\n"); + getrgb(THIS,4,args,"image->circle()"); + if (!THIS->img) return; + + x=sp[-args].u.integer; + y=sp[1-args].u.integer; + rx=sp[2-args].u.integer; + ry=sp[3-args].u.integer; + + for (i=0; i<CIRCLE_STEPS; i++) + img_line(x+circle_sin_mul(i,rx), + y+circle_cos_mul(i,ry), + x+circle_sin_mul(i+1,rx), + y+circle_cos_mul(i+1,ry)); +} + +void image_scale(INT32 args) +{ + float factor; + struct object *o; + struct image *newimg; + + o=clone(image_program,0); + newimg=(struct image*)(o->storage); + + if (args==1 && sp[-args].type==T_FLOAT) { + if (sp[-args].u.float_number == 0.5) + img_scale2(newimg,THIS); + else + img_scale(newimg,THIS, + (INT32)(THIS->xsize*sp[-args].u.float_number), + (INT32)(THIS->ysize*sp[-args].u.float_number)); + } + else if (args>=2 && + sp[-args].type==T_INT && sp[-args].u.integer==0 && + sp[1-args].type==T_INT) + { + factor=((float)sp[1-args].u.integer)/THIS->ysize; + img_scale(newimg,THIS, + (INT32)(THIS->xsize*factor), + sp[1-args].u.integer); + } + else if (args>=2 && + sp[1-args].type==T_INT && sp[1-args].u.integer==0 && + sp[-args].type==T_INT) + { + factor=((float)sp[-args].u.integer)/THIS->xsize; + img_scale(newimg,THIS, + sp[-args].u.integer, + (INT32)(THIS->ysize*factor)); + } + else if (args>=2 && + sp[-args].type==T_FLOAT && + sp[1-args].type==T_FLOAT) + img_scale(newimg,THIS, + (INT32)(THIS->xsize*sp[-args].u.float_number), + (INT32)(THIS->ysize*sp[1-args].u.float_number)); + else if (args>=2 && + sp[-args].type==T_INT && + sp[1-args].type==T_INT) + img_scale(newimg,THIS, + sp[-args].u.integer, + sp[1-args].u.integer); + else + { + free_object(o); + error("illegal arguments to image->scale()\n"); + } + pop_n_elems(args); + push_object(o); +} + +static INLINE void get_rgba_group_from_array_index(rgba_group *rgba,struct array *v,INT32 index) +{ + struct svalue s,s2; + array_index_no_free(&s,v,index); + if (s.type!=T_ARRAY|| + s.u.array->size<3) + rgba->r=rgba->b=rgba->g=rgba->alpha=0; + else + { + array_index_no_free(&s2,s.u.array,0); + if (s2.type!=T_INT) rgba->r=0; else rgba->r=s2.u.integer; + array_index(&s2,s.u.array,1); + if (s2.type!=T_INT) rgba->g=0; else rgba->g=s2.u.integer; + array_index(&s2,s.u.array,2); + if (s2.type!=T_INT) rgba->b=0; else rgba->b=s2.u.integer; + if (s.u.array->size>=4) + { + array_index(&s2,s.u.array,3); + if (s2.type!=T_INT) rgba->alpha=0; else rgba->alpha=s2.u.integer; + } + else rgba->alpha=0; + free_svalue(&s2); + } + free_svalue(&s); + return; +} + +static INLINE void + add_to_rgba_sum_with_factor(rgba_group *sum, + rgba_group rgba, + double factor) +{ + sum->r=testrange(sum->r+(INT32)(rgba.r*factor+0.5)); + sum->g=testrange(sum->g+(INT32)(rgba.g*factor+0.5)); + sum->b=testrange(sum->b+(INT32)(rgba.b*factor+0.5)); + sum->alpha=testrange(sum->alpha+(INT32)(rgba.alpha*factor+0.5)); +} + +void image_tuned_box(INT32 args) +{ + INT32 x1,y1,x2,y2,xw,yw,x,y; + rgba_group topleft,topright,bottomleft,bottomright,sum,sumzero={0,0,0,0}; + if (args<5|| + sp[-args].type!=T_INT|| + sp[1-args].type!=T_INT|| + sp[2-args].type!=T_INT|| + sp[3-args].type!=T_INT|| + sp[4-args].type!=T_ARRAY|| + sp[4-args].u.array->size<4) + error("Illegal number of arguments to image->scaled_box()\n"); + + if (!THIS->img) return; + + x1=sp[-args].u.integer; + y1=sp[1-args].u.integer; + x2=sp[2-args].u.integer; + y2=sp[3-args].u.integer; + + get_rgba_group_from_array_index(&topleft,sp[4-args].u.array,0); + get_rgba_group_from_array_index(&topright,sp[4-args].u.array,1); + get_rgba_group_from_array_index(&bottomleft,sp[4-args].u.array,2); + get_rgba_group_from_array_index(&bottomright,sp[4-args].u.array,3); + + if (x1>x2) x1^=x2,x2^=x1,x1^=x2, + sum=topleft,topleft=topright,topright=sum, + sum=bottomleft,bottomleft=bottomright,bottomright=sum; + if (y1>y2) y1^=y2,y2^=y1,y1^=y2, + sum=topleft,topleft=bottomleft,bottomleft=sum, + sum=topright,topright=bottomright,bottomright=sum; + if (x2<0||y2<0||x1>=THIS->xsize||y1>=THIS->ysize) return; + + xw=x2-x1; + yw=y2-y1; + for (x=0; x<=xw; x++) + for (y=0; y<=yw; y++) + { + sum=sumzero; +#define sq(x) ((x)*(x)) +#define tune_factor_from(x,y,xw,yw) \ + ((1.0-((double)(x)/(xw)))*(1.0-((double)(y)/(yw)))) + add_to_rgba_sum_with_factor(&sum,topleft,tune_factor_from(x,y,xw,yw)); + add_to_rgba_sum_with_factor(&sum,topright,tune_factor_from(xw-x,y,xw,yw)); + add_to_rgba_sum_with_factor(&sum,bottomleft,tune_factor_from(x,yw-y,xw,yw)); + add_to_rgba_sum_with_factor(&sum,bottomright,tune_factor_from(xw-x,yw-y,xw,yw)); + THIS->rgb.r=sum.r; + THIS->rgb.g=sum.g; + THIS->rgb.b=sum.b; + THIS->alpha=sum.alpha; + setpixel_test(x+x1,y+y1); + } + + pop_n_elems(args-1); +} + +void image_xsize(INT32 args) +{ + pop_n_elems(args); + if (THIS->img) push_int(THIS->xsize); else push_int(0); +} + +void image_ysize(INT32 args) +{ + pop_n_elems(args); + if (THIS->img) push_int(THIS->ysize); else push_int(0); +} + +void image_gray(INT32 args) +{ + INT32 x,y,div; + rgbl_group rgb; + rgb_group *d,*s; + struct object *o; + struct image *img; + + if (args<3) + { + rgb.r=87; + rgb.g=127; + rgb.b=41; + } + else + getrgbl(&rgb,0,args,"image->gray()"); + div=rgb.r+rgb.g+rgb.b; + + o=clone(image_program,0); + img=(struct image*)o->storage; + *img=*THIS; + if (!(img->img=malloc(sizeof(rgb_group)*THIS->xsize*THIS->ysize))) + { + free_object(o); + error("Out of memory\n"); + } + + d=img->img; + s=THIS->img; + for (x=0; x<THIS->xsize; x++) + for (y=0; y<THIS->ysize; y++) + { + d->r=d->g=d->b= + testrange( ((((long)s->r)*rgb.r+ + ((long)s->g)*rgb.g+ + ((long)s->b)*rgb.b)/div) ); + d++; + s++; + } + pop_n_elems(args); + push_object(o); +} + +void image_color(INT32 args) +{ + INT32 x,y; + rgbl_group rgb; + rgb_group *s,*d; + struct object *o; + struct image *img; + + if (!THIS->img) error("no image\n"); + if (args<3) + { + rgb.r=255; + rgb.g=255; + rgb.b=255; + } + else + getrgbl(&rgb,0,args,"image->color()"); + + o=clone(image_program,0); + img=(struct image*)o->storage; + *img=*THIS; + if (!(img->img=malloc(sizeof(rgb_group)*THIS->xsize*THIS->ysize))) + { + free_object(o); + error("Out of memory\n"); + } + + d=img->img; + s=THIS->img; + for (x=0; x<THIS->xsize; x++) + for (y=0; y<THIS->ysize; y++) + { + d->r=testrange( (((long)rgb.r*s->r)/255) ); + d->g=testrange( (((long)rgb.g*s->g)/255) ); + d->b=testrange( (((long)rgb.b*s->b)/255) ); + d++; + s++; + } + + pop_n_elems(args); + push_object(o); +} + +void image_invert(INT32 args) +{ + INT32 x,y; + rgb_group *s,*d; + struct object *o; + struct image *img; + + if (!THIS->img) error("no image\n"); + + o=clone(image_program,0); + img=(struct image*)o->storage; + *img=*THIS; + if (!(img->img=malloc(sizeof(rgb_group)*THIS->xsize*THIS->ysize))) + { + free_object(o); + error("Out of memory\n"); + } + + d=img->img; + s=THIS->img; + + for (x=0; x<THIS->xsize; x++) + for (y=0; y<THIS->ysize; y++) + { + d->r=testrange( 255-s->r ); + d->g=testrange( 255-s->g ); + d->b=testrange( 255-s->b ); + d++; + s++; + } + + pop_n_elems(args); + push_object(o); +} + +void image_threshold(INT32 args) +{ + INT32 x,y; + rgb_group *s,*d; + struct object *o; + struct image *img; + + if (!THIS->img) error("no image\n"); + + getrgb(THIS,0,args,"image->threshold()"); + + o=clone(image_program,0); + img=(struct image*)o->storage; + *img=*THIS; + if (!(img->img=malloc(sizeof(rgb_group)*THIS->xsize*THIS->ysize))) + { + free_object(o); + error("Out of memory\n"); + } + + d=img->img; + s=THIS->img; + + for (x=0; x<THIS->xsize; x++) + for (y=0; y<THIS->ysize; y++) + { + if (s->r>=THIS->rgb.r && + s->g>=THIS->rgb.g && + s->b>=THIS->rgb.b) + d->r=d->g=d->b=255; + else + d->r=d->g=d->b=0; + + d++; + s++; + } + + pop_n_elems(args); + push_object(o); +} + +void image_apply_matrix(INT32 args) +{ + int width,height,i,j; + rgbl_group *matrix; + rgb_group default_rgb; + struct object *o; + INT32 div; + + if (args<1 || + sp[-args].type!=T_ARRAY) + error("Illegal arguments to image->apply_matrix()\n"); + + if (args>3) + if (sp[1-args].type!=T_INT || + sp[2-args].type!=T_INT || + sp[3-args].type!=T_INT) + error("Illegal argument(s) (2,3,4) to image->apply_matrix()\n"); + else + { + default_rgb.r=sp[1-args].u.integer; + default_rgb.g=sp[1-args].u.integer; + default_rgb.b=sp[1-args].u.integer; + } + else + { + default_rgb.r=0; + default_rgb.g=0; + default_rgb.b=0; + } + if (args>4 + && sp[4-args].type==T_INT) + { + div=sp[4-args].u.integer; + if (!div) div=1; + } + else + div=1; + + height=sp[-args].u.array->size; + width=-1; + for (i=0; i<height; i++) + { + struct svalue s; + array_index_no_free(&s,sp[-args].u.array,i); + if (s.type!=T_ARRAY) + error("Illegal contents of (root) array (image->apply_matrix)\n"); + if (width==-1) + width=s.u.array->size; + else + if (width!=s.u.array->size) + error("Arrays has different size (image->apply_matrix)\n"); + free_svalue(&s); + } + if (width==-1) width=0; + + matrix=malloc(sizeof(rgbl_group)*width*height); + if (!matrix) error("Out of memory"); + + for (i=0; i<height; i++) + { + struct svalue s,s2; + array_index_no_free(&s,sp[-args].u.array,i); + for (j=0; j<width; j++) + { + array_index_no_free(&s2,s.u.array,j); + if (s2.type==T_ARRAY && s2.u.array->size == 3) + { + struct svalue s3; + array_index_no_free(&s3,s2.u.array,0); + if (s3.type==T_INT) matrix[j+i*width].r=s3.u.integer; + else matrix[j+i*width].r=0; + free_svalue(&s3); + array_index_no_free(&s3,s2.u.array,1); + if (s3.type==T_INT) matrix[j+i*width].g=s3.u.integer; + else matrix[j+i*width].g=0; + free_svalue(&s3); + array_index_no_free(&s3,s2.u.array,2); + if (s3.type==T_INT) matrix[j+i*width].b=s3.u.integer; + else matrix[j+i*width].b=0; + free_svalue(&s3); + } + else if (s2.type==T_INT) + matrix[j+i*width].r=matrix[j+i*width].g= + matrix[j+i*width].b=s2.u.integer; + else + matrix[j+i*width].r=matrix[j+i*width].g= + matrix[j+i*width].b=0; + free_svalue(&s2); + } + free_svalue(&s2); + } + + o=clone(image_program,0); + + if (THIS->img) + img_apply_matrix((struct image*)o->storage,THIS, + width,height,matrix,default_rgb,div); + + free(matrix); + + pop_n_elems(args); + push_object(o); +} + +void image_modify_by_intensity(INT32 args) +{ + INT32 x,y,i; + rgbl_group rgb; + rgb_group *list; + rgb_group *s,*d; + struct object *o; + struct image *img; + long div; + + if (!THIS->img) error("no image\n"); + if (args<5) + error("too few arguments to image->modify_by_intensity()\n"); + + getrgbl(&rgb,0,args,"image->modify_by_intensity()"); + div=rgb.r+rgb.g+rgb.b; + if (!div) div=1; + + s=malloc(sizeof(rgb_group)*(args-3)); + if (!s) error("Out of memory\n"); + + for (x=0; x<args-3; x++) + { + if (sp[3-args+x].type==T_INT) + s[x].r=s[x].g=s[x].b=testrange( sp[3-args+x].u.integer ); + else if (sp[3-args+x].type==T_ARRAY && + sp[3-args+x].u.array->size >= 3) + { + struct svalue sv; + array_index_no_free(&sv,sp[3-args+x].u.array,0); + if (sv.type==T_INT) s[x].r=testrange( sv.u.integer ); + else s[x].r=0; + array_index(&sv,sp[3-args+x].u.array,1); + if (sv.type==T_INT) s[x].g=testrange( sv.u.integer ); + else s[x].g=0; + array_index(&sv,sp[3-args+x].u.array,2); + if (sv.type==T_INT) s[x].b=testrange( sv.u.integer ); + else s[x].b=0; + free_svalue(&sv); + } + else s[x].r=s[x].g=s[x].b=0; + } + + list=malloc(sizeof(rgb_group)*256); + if (!list) + { + free(s); + error("out of memory\n"); + } + for (x=0; x<args-4; x++) + { + INT32 p1,p2,r; + p1=(255L*x)/(args-4); + p2=(255L*(x+1))/(args-4); + r=p2-p1; + for (y=0; y<r; y++) + { + list[y+p1].r=(((long)s[x].r)*(r-y)+((long)s[x+1].r)*(y))/r; + list[y+p1].g=(((long)s[x].g)*(r-y)+((long)s[x+1].g)*(y))/r; + list[y+p1].b=(((long)s[x].b)*(r-y)+((long)s[x+1].b)*(y))/r; + } + } + list[255]=s[x]; + free(s); + + o=clone(image_program,0); + img=(struct image*)o->storage; + *img=*THIS; + if (!(img->img=malloc(sizeof(rgb_group)*THIS->xsize*THIS->ysize))) + { + free_object(o); + error("Out of memory\n"); + } + + d=img->img; + s=THIS->img; + for (x=0; x<THIS->xsize; x++) + for (y=0; y<THIS->ysize; y++) + { + i= testrange( ((((long)s->r)*rgb.r+ + ((long)s->g)*rgb.g+ + ((long)s->b)*rgb.b)/div) ); + *d=list[i]; + d++; + s++; + } + + free(list); + + pop_n_elems(args); + push_object(o); +} + +static void image_quant(INT32 args) +{ + struct colortable *ct; + long i; + rgb_group *rgb; + + if (!THIS->img) error("no image\n"); + pop_n_elems(args); + + ct=colortable_quant(THIS); + + i=THIS->xsize*THIS->ysize; + rgb=THIS->img; + while (i--) + { + *rgb=ct->clut[colortable_rgb(ct,*rgb)]; + rgb++; + } + + colortable_free(ct); + + pop_n_elems(args); + push_int(0); +} + +/***************** global init etc *****************************/ + +/* these functions are destructive, they write (read) in the current + object */ +/* +string toppm(void); +void frompnm(string s); +string togif( [int r,inr g,int b] ); + +void paste(object img [,int x,int y]) +void paste_alpha(object img, int alpha [,int x, int y]); +void paste_mask(object img, object alpha_mask [,int x,int y]); + +void setcolor(int r,int g,int b); +void setpixel(int x,int y [,int r,int g,int b] ); +void line(int x1,int y1,int x2,int y2 [,int r,int g,int b] ); +void box(int x1,int y1,int x2,int y2 [,int r,int g,int b] ); +void circle(int x,int y,int radx,int rady [,int r,int b,int g] ); +void tuned_box(int x1,int y1,int x2,int y2,array(array(int)) corner_rgb); +*/ + +#define RGB_TYPE "int|void,int|void,int|void,int|void" + +void init_font_programs(void); +void exit_font(void); + +void init_image_programs() +{ + int i; + + start_new_program(); + add_storage(sizeof(struct image)); + + add_function("new",image_new, + "function(int,int,"RGB_TYPE":void)",0); + add_function("toppm",image_toppm, + "function(:string)",0); + add_function("frompnm",image_frompnm, + "function(string:void)",0); + add_function("fromppm",image_frompnm, + "function(string:void)",0); + add_function("togif",image_togif, + "function(:string)",0); + + add_function("copy",image_copy, + "function(void|int,void|int,void|int,void|int,"RGB_TYPE":object)",0); + add_function("crop",image_crop, + "function(int,int,int,int,"RGB_TYPE":void)",0); + add_function("autocrop",image_autocrop, + "function(:void)",0); + add_function("scale",image_scale, + "function(int|float,int|float|void:void)",0); + + add_function("paste",image_paste, + "function(object,int|void,int|void:void)",0); + add_function("paste_alpha",image_paste_alpha, + "function(object,int,int|void,int|void:void)",0); + add_function("paste_mask",image_paste_mask, + "function(object,object,int|void,int|void:void)",0); + add_function("paste_alpha_color",image_paste_alpha_color, + "function(object,void|int,void|int,void|int,int|void,int|void:void)",0); + + add_function("setcolor",image_setcolor, + "function(int,int,int:void)",0); + add_function("setpixel",image_setpixel, + "function(int,int,"RGB_TYPE":void)",0); + add_function("line",image_line, + "function(int,int,int,int,"RGB_TYPE":void)",0); + add_function("circle",image_circle, + "function(int,int,int,int,"RGB_TYPE":void)",0); + add_function("box",image_box, + "function(int,int,int,int,"RGB_TYPE":void)",0); + add_function("tuned_box",image_tuned_box, + "function(int,int,int,int,array:void)",0); + + add_function("gray",image_gray, + "function("RGB_TYPE":void)",0); + add_function("color",image_color, + "function("RGB_TYPE":void)",0); + add_function("invert",image_invert, + "function("RGB_TYPE":void)",0); + add_function("threshold",image_threshold, + "function("RGB_TYPE":void)",0); + + add_function("apply_matrix",image_apply_matrix, + "function(array(array(int|array(int))):void)",0); + add_function("modify_by_intensity",image_modify_by_intensity, + "function(int,int,int,int,int:void)",0); + + add_function("xsize",image_xsize, + "function(:int)",0); + add_function("ysize",image_ysize, + "function(:int)",0); + + add_function("quant",image_quant, + "function(:void)",0); + + set_init_callback(init_image_struct); + set_exit_callback(exit_image_struct); + + image_program=end_c_program("/precompiled/image"); + + image_program->refs++; + + for (i=0; i<CIRCLE_STEPS; i++) + circle_sin_table[i]=(INT32)4096*sin(((double)i)*2.0*3.141592653589793/(double)CIRCLE_STEPS); + + init_font_programs(); +} + +void init_image_efuns(void) {} + +void exit_image(void) +{ + free_program(image_program); + exit_font(); +} + + diff --git a/src/modules/image/image.h b/src/modules/image/image.h new file mode 100644 index 0000000000000000000000000000000000000000..eaf28e20af918b4666a17e066bb08f031dd492f4 --- /dev/null +++ b/src/modules/image/image.h @@ -0,0 +1,41 @@ + +#define QUANT_MAP_BITS 4 +#define QUANT_MAP_SKIP_BITS (8-(QUANT_MAP_BITS)) +#define QUANT_MAP_THIS(X) ((X)>>QUANT_MAP_SKIP_BITS) +#define QUANT_MAP_REAL (1L<<QUANT_MAP_BITS) + +#define COLOURTYPE unsigned char + +typedef struct +{ + COLOURTYPE r,g,b; +} rgb_group; + +typedef struct +{ + unsigned char r,g,b,alpha; +} rgba_group; + +typedef struct +{ + signed long r,g,b; +} rgbl_group; + +struct image +{ + rgb_group *img; + INT32 xsize,ysize; + rgb_group rgb; + unsigned char alpha; +}; + +struct colortable +{ + rgb_group clut[256]; + struct map_entry + { + unsigned char cl; + unsigned char used; + struct map_entry *next; + } map[QUANT_MAP_REAL][QUANT_MAP_REAL][QUANT_MAP_REAL]; +}; diff --git a/src/modules/image/lzw.c b/src/modules/image/lzw.c new file mode 100644 index 0000000000000000000000000000000000000000..8d3211191905a523df30b555320d5ba1147f1cf1 --- /dev/null +++ b/src/modules/image/lzw.c @@ -0,0 +1,183 @@ +#include <stdio.h> +#include <unistd.h> +#include <stdlib.h> + +#include "lzw.h" + +#define DEFAULT_OUTBYTES 16384 + +static void lzw_output(struct lzw *lzw,lzwcode_t codeno); + +void lzw_init(struct lzw *lzw,int bits) +{ + int i; +#ifdef GIF_LZW + lzw->codes=(1L<<bits)+2; +#else + lzw->codes=(1L<<bits); +#endif + lzw->bits=bits; + lzw->codebits=bits+1; + lzw->code=(struct lzwc*) malloc(sizeof(struct lzwc)*lzw->codes); + + for (i=0; i<lzw->codes; i++) + { + lzw->code[i].c=(unsigned char)i; + lzw->code[i].firstchild=NULL; + lzw->code[i].next=NULL; + lzw->code[i].no=i; + } + lzw->out=malloc(DEFAULT_OUTBYTES); + lzw->outlen=DEFAULT_OUTBYTES; + lzw->outpos=0; + lzw->current=NULL; + lzw->outbit=0; + lzw->lastout=0; +#ifdef GIF_LZW + lzw_output(lzw,1L<<bits); +#endif +} + +static void lzw_free_lzwc_tree(struct lzwc *lzwc) +{ + struct lzwc *l; + while (lzwc) + { + l=lzwc->next; + if (lzwc->firstchild) lzw_free_lzwc_tree(lzwc->firstchild); + free(lzwc); + lzwc=l; + } +} + +void lzw_quit(struct lzw *lzw) +{ + int i; + + for (i=0; i<(1L<<lzw->bits); i++) + { + lzw_free_lzwc_tree(lzw->code[i].firstchild); + lzw->code[i].firstchild=NULL; + } + free(lzw->code); + free(lzw->out); +} + +static void lzw_output(struct lzw *lzw,lzwcode_t codeno) +{ + int bits,bitp; + unsigned char c; + +/* + fprintf(stderr,"%03x bits=%d codes %d %c\n",codeno,lzw->codebits,lzw->codes+1, + (codeno==lzw->codes+1) ? '=' : ' '); + */ + + if (lzw->outpos+4>=lzw->outlen) + lzw->out=realloc(lzw->out,lzw->outlen*=2); + + bitp=lzw->outbit; + c=lzw->lastout; + bits=lzw->codebits; +#ifdef GIF_LZW + if (bits>12) bits=12; +#endif + + while (bits) + { + c|=(codeno<<bitp); + if (bits+bitp>=8) + { + bits-=8-bitp; + codeno>>=8-bitp; + bitp=0; + lzw->out[lzw->outpos++]=c; + c=0; + } + else + { + lzw->outbit=bitp+bits; + lzw->lastout=c; + return; + } + } + lzw->lastout=0; + lzw->outbit=0; +} + +void lzw_write_last(struct lzw *lzw) +{ + if (lzw->current) + lzw_output(lzw,lzw->current->no); +#ifdef GIF_LZW + lzw_output( lzw, (1L<<lzw->bits)+1 ); /* GIF end code */ +#endif + if (lzw->outbit) + lzw->out[lzw->outpos++]=lzw->lastout; +} + +void lzw_add(struct lzw *lzw,int c) +{ + struct lzwc *l; + + if (!lzw->current) /* no current, load */ + { + lzw->current=lzw->code+c; + return; + } + + l=lzw->current->firstchild; /* check if we have this sequence */ + while (l) + { + if (l->c==c && l->no!=lzw->codes ) + { + lzw->current=l; + return; + } + l=l->next; + } + + +#ifdef GIF_LZW + if (lzw->codes==4096) /* needs more than 12 bits */ + { + int i; + + lzw_output(lzw,lzw->current->no); + + for (i=0; i<(1L<<lzw->bits); i++) + { + lzw_free_lzwc_tree(lzw->code[i].firstchild); + lzw->code[i].firstchild=NULL; + } + lzw->codes=(1L<<lzw->bits)+2; + + /* output clearcode, 1000... (bits) */ + lzw_output(lzw,1L<<lzw->bits); + + lzw->codebits=lzw->bits+1; + lzw->current=lzw->code+c; + return; + } +#endif + + /* output current code no, make new & reset */ + + lzw_output(lzw,lzw->current->no); + + l=lzw->current->firstchild; + + lzw->current->firstchild=malloc(sizeof(struct lzwc)); + lzw->current->firstchild->next=l; + l=lzw->current->firstchild; + + l->firstchild=NULL; + l->no=lzw->codes; + l->c=c; + + lzw->codes++; + if (lzw->codes>(1L<<lzw->codebits)) lzw->codebits++; + + lzw->current=lzw->code+c; +} + diff --git a/src/modules/image/lzw.h b/src/modules/image/lzw.h new file mode 100644 index 0000000000000000000000000000000000000000..8ccd27345923c562341fc433d2e25dfc76c3043a --- /dev/null +++ b/src/modules/image/lzw.h @@ -0,0 +1,29 @@ +#define GIF_LZW + +#ifdef GIF_LZW +typedef unsigned short lzwcode_t; /* no more than 12 bits used */ +#else +typedef unsigned long lzwcode_t; +#endif + +struct lzw +{ + unsigned long codes; + unsigned long bits; /* initial encoding bits */ + unsigned long codebits; /* current encoding bits */ + unsigned long outlen,outpos,outbit; + unsigned char *out,lastout; + struct lzwc + { + lzwcode_t no; + unsigned char c; + struct lzwc *firstchild; + struct lzwc *next; + } *code,*current; +}; + +void lzw_add(struct lzw *lzw,int c); +void lzw_quit(struct lzw *lzw); +void lzw_init(struct lzw *lzw,int bits); + + diff --git a/src/modules/image/quant.c b/src/modules/image/quant.c new file mode 100644 index 0000000000000000000000000000000000000000..d138afc004920b98617648d7317b57baea100704 --- /dev/null +++ b/src/modules/image/quant.c @@ -0,0 +1,359 @@ +#include <unistd.h> +#include <stdio.h> +#include <stdlib.h> + +#include "types.h" +#include "image.h" +#include "error.h" +#include "global.h" + + +/**********************************************************************/ + +/*#define QUANT_DEBUG*/ + +typedef struct +{ + rgb_group rgb; + int count; +} rgb_entry; + +typedef struct +{ + int len, entries; + rgb_entry tbl[1]; +} rgb_hashtbl; + +typedef struct colortable coltab; + +static int hash(rgb_entry *entry, int len) +{ + return abs((23*entry->rgb.r + 21*entry->rgb.g + 17*entry->rgb.b) % len); +} + +static int same_col(rgb_entry *entry1, rgb_entry *entry2) +{ + return ((entry1->rgb.r == entry2->rgb.r) && + (entry1->rgb.g == entry2->rgb.g) && + (entry1->rgb.b == entry2->rgb.b)); +} + + +static void hash_enter(rgb_hashtbl *tbl, rgb_entry *entry) +{ + int i = hash(entry, tbl->len); + int inc = 1; + +#if 0 +/* fprintf(stderr,"%d.", entry->count); */ +/* fprintf(stderr,"hash_enter: %3d.%3d.%3d count = %d, hash = %d ", + entry->rgb.r, entry->rgb.b, entry->rgb.b, entry->count, i);*/ +#endif + + while (tbl->tbl[i].count && + (entry->count || !same_col(entry, &tbl->tbl[i]))) + { +#ifdef QUANT_DEBUG + fprintf(stderr,"."); +#endif + i = (i + inc++) % tbl->len; + } + + if (tbl->tbl[i].count == 0) + { +#if 0 + fprintf(stderr,"new"); +#endif + tbl->tbl[i] = *entry; + if (tbl->tbl[i].count == 0) + tbl->tbl[i].count = 1; + tbl->entries++; + } else + tbl->tbl[i].count++; + +#if 0 + fprintf(stderr," (%d,%d)\n", tbl->tbl[i].count, tbl->entries); +#endif +} + +static rgb_hashtbl *img_rehash(rgb_hashtbl *old, int newsize) +{ + int i; + rgb_hashtbl *new = malloc(sizeof(rgb_hashtbl) + + sizeof(rgb_entry) * ( newsize - 1 ) ); + MEMSET(new->tbl, 0, sizeof(rgb_entry) * newsize ); + + if (!new) error("Out of memory\n"); +#ifdef QUANT_DEBUG + fprintf(stderr,"img_rehash: old size = %d, new size = %d\n", + (old ? old->len : 0), newsize); +#endif + + new->len = newsize; + new->entries = 0; + if (old) + { + for (i=0;i<old->len;i++) + { + if (old->tbl[i].count > 0) + hash_enter(new,&old->tbl[i]); + } + free(old); + } + return new; +} + +static int cmp_red(rgb_entry *e1, rgb_entry *e2) +{ + return e1->rgb.r - e2->rgb.r; +} + +static int cmp_green(rgb_entry *e1, rgb_entry *e2) +{ + return e1->rgb.g - e2->rgb.g; +} + +static int cmp_blue(rgb_entry *e1, rgb_entry *e2) +{ + return e1->rgb.b - e2->rgb.b; +} + +static int get_tbl_median(rgb_entry *tbl,int len) +{ + return len/2; +} + +static rgb_group get_tbl_point(rgb_entry *tbl,int len) +{ + return tbl[len/2].rgb; +} + +static void sort_tbl(rgb_hashtbl *ht, int start, int len, + int level, int idx, coltab *ct, + rgb_group lower,rgb_group upper) +{ + rgb_entry *tbl = ht->tbl; + + +#ifdef QUANT_DEBUG + + int x,y; + + fprintf(stderr,"%*ssort_tbl: level %d start = %d len=%d, idx = %d", + level, "", + level, start, len, idx); + fprintf(stderr,"%*s\n%d,%d,%d-%d,%d,%d ",level,"", + lower.r,lower.g,lower.b,upper.r,upper.g,upper.b); + + fprintf(stderr,"[%d,%d,%d] - [%d,%d,%d]\n", + QUANT_MAP_THIS(lower.r), + QUANT_MAP_THIS(lower.g), + QUANT_MAP_THIS(lower.b), + QUANT_MAP_THIS(upper.r), + QUANT_MAP_THIS(upper.g), + QUANT_MAP_THIS(upper.b)); + +#endif + + switch (level%3) + { + case 0: qsort(tbl+start, len, sizeof(rgb_entry), + (int (*)(const void *, const void *))cmp_red); break; + case 1: qsort(tbl+start, len, sizeof(rgb_entry), + (int (*)(const void *, const void *))cmp_green); break; + case 2: qsort(tbl+start, len, sizeof(rgb_entry), + (int (*)(const void *, const void *))cmp_blue); break; + } + + if (level < 8) + { + int pos; + rgb_group less,more,rgb; +#ifdef QUANT_DEBUG + fprintf(stderr, "\n"); +#endif + pos=get_tbl_median(tbl+start,len); + rgb=tbl[start+pos].rgb; + + less=upper; + more=lower; + + switch (level%3) + { + case 0: more.r=rgb.r+1; less.r=rgb.r;break; + case 1: more.g=rgb.g+1; less.g=rgb.g;break; + case 2: more.b=rgb.b+1; less.b=rgb.b;break; + } + + sort_tbl(ht,start,pos, + level+1,idx,ct, + lower,less); + + sort_tbl(ht,start+pos,len-pos, + level+1,idx+(128>>level),ct, + more,upper); + } + else + { + int r,g,b; + ct->clut[idx]=get_tbl_point(tbl+start,len); +#ifdef QUANT_DEBUG + fprintf(stderr,"\n [%d,%d,%d] - [%d,%d,%d] %d\n", + lower.r, lower.g, lower.b, upper.r, upper.g, upper.b, + (upper.r-lower.r+1)*(upper.g-lower.g+1)*(upper.b-lower.b+1)); + fprintf(stderr,"[%d,%d,%d] - [%d,%d,%d]\n", + QUANT_MAP_THIS(lower.r), + QUANT_MAP_THIS(lower.g), + QUANT_MAP_THIS(lower.b), + QUANT_MAP_THIS(upper.r), + QUANT_MAP_THIS(upper.g), + QUANT_MAP_THIS(upper.b)); +#endif + for (r = QUANT_MAP_THIS(lower.r); + r <= QUANT_MAP_THIS(upper.r); r++) + for (g = QUANT_MAP_THIS(lower.g); + g <= QUANT_MAP_THIS(upper.g); g++) + for (b = QUANT_MAP_THIS(lower.b); + b <= QUANT_MAP_THIS(upper.b); b++) + { +#ifdef QUANT_DEBUG + fprintf(stderr,"[%d,%d,%d] = %d (%d,%d,%d)\n",r,g,b,idx,ct->clut[idx].r,ct->clut[idx].g,ct->clut[idx].b); +#endif + if (ct->map[r][g][b].used) + { + struct map_entry *me; + me=malloc(sizeof(struct map_entry)); + me->used=1; + me->cl=idx; + me->next=ct->map[r][g][b].next; + ct->map[r][g][b].next=me; + } + else + { + ct->map[r][g][b].used=1; + ct->map[r][g][b].next=NULL; + ct->map[r][g][b].cl=idx; + } + } + } +} + + +struct colortable *colortable_quant(struct image *img) +{ + rgb_hashtbl *tbl; + INT32 i,j; + INT32 sz = img->xsize * img->ysize; + rgb_entry entry; + coltab *ct; + rgb_group black,white; + +#ifdef QUANT_DEBUG + fprintf(stderr,"img_quant called\n"); +#endif + + ct = malloc(sizeof(coltab)); + + MEMSET(ct,0,sizeof(coltab)); + + if (!ct) error("Out of memory.\n"); + + tbl = img_rehash(NULL, 8192 /*(img->xsize*img->ysize) / 6*/); + for (i=0;i<sz;i++) + { + entry.rgb = img->img[i]; + entry.count = 0; + hash_enter(tbl, &entry); + if (tbl->entries > tbl->len * 3 / 4) + tbl = img_rehash(tbl, tbl->len * 2); + } + + /* Compact the hash table */ + +#ifdef QUANT_DEBUG + fprintf(stderr,"Compacting\n"); +#endif + i = tbl->len - 1; + j = 0; + while (i > tbl->entries) + { + while ((i >= tbl->entries) && tbl->tbl[i].count == 0) i--; + while ((j < tbl->entries) && tbl->tbl[j].count != 0) j++; + if (j<i) + { + tbl->tbl[j] = tbl->tbl[i]; + tbl->tbl[i].count = 0; + } + } + tbl->len = tbl->entries; + + white.r=white.g=white.b=255; + black.r=black.g=black.b=0; + + sort_tbl(tbl, 0, tbl->len, 0, 0, ct, black, white); + +#ifdef QUANT_DEBUG + fprintf(stderr,"img_quant done, %d colors found\n", tbl->entries); +#endif + + free(tbl); + return ct; +} + +#define sq(x) ((x)*(x)) +#define DISTANCE(A,B) \ + (sq((A).r-(B).r)+sq((A).g-(B).g)+sq((A).b-(B).b)) + +int colortable_rgb(struct colortable *ct,rgb_group rgb) +{ + struct map_entry *me; + int mindistance,best; + me=&(ct->map[QUANT_MAP_THIS(rgb.r)] + [QUANT_MAP_THIS(rgb.g)] + [QUANT_MAP_THIS(rgb.b)]); +#ifdef QUANT_DEBUG + fprintf(stderr,"%d,%d,%d -> %d %d %d: ",rgb.r,rgb.g,rgb.b, + QUANT_MAP_THIS(rgb.r), + QUANT_MAP_THIS(rgb.g), + QUANT_MAP_THIS(rgb.b)); + fprintf(stderr,"%lx %d,%d,%d %d ",me,ct->clut[me->cl].r,ct->clut[me->cl].g,ct->clut[me->cl].b,me->cl); + if (!me->used) { fprintf(stderr,"unused "); } +#endif + if (!me->next) return me->cl; + mindistance=DISTANCE(rgb,ct->clut[me->cl]); + best=me->cl; + while ( (me=me->next) && mindistance) + { + int d; +#ifdef QUANT_DEBUG +fprintf(stderr,"%lx %d,%d,%d ",me,ct->clut[me->cl].r,ct->clut[me->cl].g,ct->clut[me->cl].b); +#endif + d=DISTANCE(rgb,ct->clut[me->cl]); + if (d<mindistance) + { + mindistance=DISTANCE(rgb,ct->clut[me->cl]); + best=me->cl; + } + } +#ifdef QUANT_DEBUG +fprintf(stderr,"%lx\n",me); +#endif + return best; +} + +void colortable_free(struct colortable *ct) +{ + int r,g,b; + for (r=0; r<QUANT_MAP_REAL; r++) + for (g=0; g<QUANT_MAP_REAL; g++) + for (b=0; b<QUANT_MAP_REAL; b++) + { + struct map_entry *me; + if ( (me=ct->map[r][g][b].next) ) + { + ct->map[r][g][b].next=me->next; + free(me); + } + } + free(ct); +} diff --git a/src/modules/image/togif.c b/src/modules/image/togif.c new file mode 100644 index 0000000000000000000000000000000000000000..e140e0b1990b59613afe575ac15f8f28197b709d --- /dev/null +++ b/src/modules/image/togif.c @@ -0,0 +1,98 @@ +#include "stralloc.h" +#include "global.h" +#include "types.h" +#include "dynamic_buffer.h" + +#include "image.h" +#include "lzw.h" + +#define INITIAL_BUF_LEN 8192 + +/** compress algorithm *************/ + + +void buf_word( unsigned short w, dynamic_buffer *buf ) +{ + low_my_putchar( w&0xff, buf ); + low_my_putchar( (w>>8)&0xff, buf ); +} + +struct pike_string * + image_encode_gif(struct image *img,struct colortable *ct, + rgb_group *transparent) +{ + dynamic_buffer buf; + long i; + rgb_group *rgb; + struct lzw lzw; + + buf.s.str=NULL; + low_init_buf(&buf); + + low_my_binary_strcat(transparent?"GIF89a":"GIF87a",6,&buf); + buf_word((unsigned short)img->xsize,&buf); + buf_word((unsigned short)img->ysize,&buf); + low_my_putchar( (char)(0xe0|7), &buf); + /* 7 is bpp - 1 e is global colormap + resolution (??!) */ + + low_my_putchar( 0, &buf ); /* background color */ + low_my_putchar( 0, &buf ); /* just zero */ + + for (i=0; i<256; i++) + { + low_my_putchar(ct->clut[i].r,&buf); + low_my_putchar(ct->clut[i].g,&buf); + low_my_putchar(ct->clut[i].b,&buf); + } + + if (transparent) + { + low_my_putchar( '!', &buf ); /* extras */ + low_my_putchar( 0xf9, &buf ); /* transparency */ + low_my_putchar( 4, &buf ); + low_my_putchar( 1, &buf ); + low_my_putchar( 0, &buf ); + low_my_putchar( 0, &buf ); + low_my_putchar( colortable_rgb(ct,*transparent), &buf ); + low_my_putchar( 0, &buf ); + } + + + low_my_putchar( ',', &buf ); /* image separator */ + + buf_word(0,&buf); /* leftofs */ + buf_word(0,&buf); /* topofs */ + buf_word(img->xsize,&buf); /* width */ + buf_word(img->ysize,&buf); /* height */ + + low_my_putchar(0x00, &buf); + /* not interlaced (interlaced == 0x40) */ + /* no local colormap ( == 0x80) */ + + low_my_putchar( 8, &buf ); /* bits per pixel , or min 2 */ + + i=img->xsize*img->ysize; + rgb=img->img; + + lzw_init(&lzw,8); + while (i--) lzw_add(&lzw,colortable_rgb(ct,*(rgb++))); + + lzw_write_last(&lzw); + + for (i=0; i<(int)lzw.outpos; i+=254) + { + int wr; + if (i+254>(int)lzw.outpos) wr=lzw.outpos-i; + else wr=254; + low_my_putchar( (unsigned char)wr, &buf ); /* bytes in chunk */ + low_my_binary_strcat( lzw.out+i, wr, &buf ); + } + low_my_putchar( 0, &buf ); /* terminate stream */ + + lzw_quit(&lzw); + + low_my_putchar( ';', &buf ); /* end gif file */ + + return low_free_buf(&buf); +} + diff --git a/src/modules/math/.cvsignore b/src/modules/math/.cvsignore new file mode 100644 index 0000000000000000000000000000000000000000..76e8a85506890a9ad4125ab962e5b80341ffecdc --- /dev/null +++ b/src/modules/math/.cvsignore @@ -0,0 +1,2 @@ +configure +Makefile.in diff --git a/src/modules/math/.gitignore b/src/modules/math/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..1f3e111bcb9a733de582cbc47266cc26dd1ec797 --- /dev/null +++ b/src/modules/math/.gitignore @@ -0,0 +1,2 @@ +/configure +/Makefile.in diff --git a/src/modules/math/Makefile b/src/modules/math/Makefile deleted file mode 100644 index f7d483fca6430d45a2074aa3edf10f4d85d4ae82..0000000000000000000000000000000000000000 --- a/src/modules/math/Makefile +++ /dev/null @@ -1,31 +0,0 @@ -# Generated automatically from Makefile.in by configure. -SRCDIR=. -VPATH=.:./../..:../.. -PREFLAGS=-I$(SRCDIR) -I$(SRCDIR)/../.. -I../.. -CFLAGS=$(PREFLAGS) $(OTHERFLAGS) - -FILES=math.o - -math.a: $(FILES) - -rm -f math.a - ar cq math.a $(FILES) - -ranlib math.a - -clean: - -rm -f *.o - -depend: - gcc -MM $(PREFLAGS) $(SRCDIR)/*.c | $(FIXDEP) $(SRCDIR)/Makefile.in - - -#Dependencies begin here, DO NOT REMOVE THIS LINE!!!! -math.o: math.c \ - interpret.h \ - program.h \ - config.h machine.h \ - types.h \ - add_efun.h \ - svalue.h \ - hashtable.h \ - las.h \ - dynamic_buffer.h diff --git a/src/modules/math/Makefile.in b/src/modules/math/Makefile.in deleted file mode 100644 index 6dfea158133f0c6f4f2b09029178d444e3e38fc2..0000000000000000000000000000000000000000 --- a/src/modules/math/Makefile.in +++ /dev/null @@ -1,30 +0,0 @@ -SRCDIR=@srcdir@ -VPATH=@srcdir@:@srcdir@/../..:../.. -PREFLAGS=-I$(SRCDIR) -I$(SRCDIR)/../.. -I../.. -CFLAGS=$(PREFLAGS) $(OTHERFLAGS) - -FILES=math.o - -math.a: $(FILES) - -rm -f math.a - ar cq math.a $(FILES) - -@RANLIB@ math.a - -clean: - -rm -f *.o - -depend: - gcc -MM $(PREFLAGS) $(SRCDIR)/*.c | $(FIXDEP) $(SRCDIR)/Makefile.in - - -#Dependencies begin here, DO NOT REMOVE THIS LINE!!!! -math.o: math.c \ - interpret.h \ - program.h \ - config.h machine.h \ - types.h \ - add_efun.h \ - svalue.h \ - hashtable.h \ - las.h \ - dynamic_buffer.h diff --git a/src/modules/math/Makefile.src b/src/modules/math/Makefile.src new file mode 100644 index 0000000000000000000000000000000000000000..44f0678005d6d14eefbe50563e4da76011b8a1ea --- /dev/null +++ b/src/modules/math/Makefile.src @@ -0,0 +1,18 @@ +SRCDIR=@srcdir@ +VPATH=@srcdir@:@srcdir@/../..:../.. +PREFLAGS=-I$(SRCDIR) -I$(SRCDIR)/../.. -I../.. +CFLAGS=$(PREFLAGS) $(OTHERFLAGS) + +FILES=math.o + +math.a: $(FILES) + -rm -f math.a + ar cq math.a $(FILES) + -@RANLIB@ math.a + echo >linker_options @LIBS@ + +clean: + -rm -f *.o + +depend: + gcc -MM $(PREFLAGS) $(SRCDIR)/*.c | $(FIXDEP) $(SRCDIR) diff --git a/src/modules/math/configure.in b/src/modules/math/configure.in index 1a03a6eafd95ceedd5cc4ec7d35a973691b09f07..caa04e6aab996feecce7c284d2e5b3dedc45b708 100644 --- a/src/modules/math/configure.in +++ b/src/modules/math/configure.in @@ -3,6 +3,12 @@ AC_INIT(math.c) AC_PROG_CC AC_PROG_RANLIB +AC_CHECK_LIB(m, floor) +if test "${ac_cv_lib_m}" = "no" -a "${pike_cv_sys_os}" = "Linux"; then + AC_MSG_WARN(I will compensate for this by adding -lc -lm) + LIBS="${LIBS} -lc -lm" +fi + AC_SUBST(RANLIB) AC_OUTPUT(Makefile,echo FOO >stamp-h ) diff --git a/doc/math/acos b/src/modules/math/doc/acos similarity index 90% rename from doc/math/acos rename to src/modules/math/doc/acos index 0c2f758e37eed0eb852dca3eb78fe985b778713f..bd3ca9225b7bc12782929da738d808e4eec0e02e 100644 --- a/doc/math/acos +++ b/src/modules/math/doc/acos @@ -7,5 +7,8 @@ SYNTAX DESCRIPTION Return the arcus cosinus value for f. +KEYWORDS + float + SEE ALSO math/cos, math/asin diff --git a/doc/math/asin b/src/modules/math/doc/asin similarity index 90% rename from doc/math/asin rename to src/modules/math/doc/asin index c71c06156a1aafb7bee1df2bbe7a81cb1d0b0314..af772d5b39c685e3da8865670bdc64ef6dcd96a2 100644 --- a/doc/math/asin +++ b/src/modules/math/doc/asin @@ -7,5 +7,8 @@ SYNTAX DESCRIPTION Return the arcus sinus value for f. +KEYWORDS + float + SEE ALSO math/sin, math/acos diff --git a/doc/math/atan b/src/modules/math/doc/atan similarity index 90% rename from doc/math/atan rename to src/modules/math/doc/atan index 64092f422daabcc30f6a5fbd3cbc0d2dbe6fdb06..d6ebcb70024e44b1d7bb75e4b70402d847521733 100644 --- a/doc/math/atan +++ b/src/modules/math/doc/atan @@ -7,5 +7,8 @@ SYNTAX DESCRIPTION Return the arcus tangent value for f. +KEYWORDS + float + SEE ALSO math/tan, math/asin, math/acos diff --git a/doc/math/ceil b/src/modules/math/doc/ceil similarity index 93% rename from doc/math/ceil rename to src/modules/math/doc/ceil index c560d878d0181f0bcf4c0f9f3acb93a2b73716f2..5017676469df91f94a4a536994c95b9a94c4b114 100644 --- a/doc/math/ceil +++ b/src/modules/math/doc/ceil @@ -8,5 +8,8 @@ DESCRIPTION Return the closest integral value higher or equal to x. Note that ceil() does _not_ return an int, merely an integral value. +KEYWORDS + float + SEE ALSO math/floor diff --git a/doc/math/cos b/src/modules/math/doc/cos similarity index 89% rename from doc/math/cos rename to src/modules/math/doc/cos index e8d953663962e8ac9b249525fab902d745a3f930..921c46ded29b6d22c7350a9db7a0b226c1328d24 100644 --- a/doc/math/cos +++ b/src/modules/math/doc/cos @@ -7,5 +7,8 @@ SYNTAX DESCRIPTION Return the cosinus value for f. +KEYWORDS + float + SEE ALSO math/acos, math/sin diff --git a/doc/math/exp b/src/modules/math/doc/exp similarity index 92% rename from doc/math/exp rename to src/modules/math/doc/exp index 45698f298fb4004c0fec10a9323096184a5a2487..13963c29ded662987e43c01cc50bd78110df1764 100644 --- a/doc/math/exp +++ b/src/modules/math/doc/exp @@ -8,5 +8,8 @@ DESCRIPTION Return the natural exponent of f. log( exp( x ) ) == x as long as exp(x) doesn't overflow an int. +KEYWORDS + float + SEE ALSO math/pow, math/log diff --git a/doc/math/floor b/src/modules/math/doc/floor similarity index 93% rename from doc/math/floor rename to src/modules/math/doc/floor index 3dc6cd8826d1e4939e7c8611f545a16bdf8059b8..b257489c99eeb8f3e4717f3094d36c4b0315bdab 100644 --- a/doc/math/floor +++ b/src/modules/math/doc/floor @@ -8,5 +8,8 @@ DESCRIPTION Return the closest integral value lower or equal to x. Note that floor() does _not_ return an int, merely an integral value. +KEYWORDS + float + SEE ALSO math/ceil diff --git a/doc/math/log b/src/modules/math/doc/log similarity index 90% rename from doc/math/log rename to src/modules/math/doc/log index 80dee7c7f95f6b8906794d8239fed626ed4fe99c..e58c48f6731e555a61a8df85d37bf33b46bf91b2 100644 --- a/doc/math/log +++ b/src/modules/math/doc/log @@ -8,5 +8,8 @@ DESCRIPTION Return the natural logarithm of f. exp( log(x) ) == x for x > 0. +KEYWORDS + float + SEE ALSO math/pow, math/exp diff --git a/doc/math/pow b/src/modules/math/doc/pow similarity index 90% rename from doc/math/pow rename to src/modules/math/doc/pow index ad87a22ad45c8c1e8149299b9cc51ccc6188e029..8bc39e252fc4fcd8f84b902c6ff9e210a9b49a85 100644 --- a/doc/math/pow +++ b/src/modules/math/doc/pow @@ -7,5 +7,8 @@ SYNTAX DESCRIPTION Return n raised to the power of x. +KEYWORDS + float + SEE ALSO math/exp, math/log diff --git a/doc/math/sin b/src/modules/math/doc/sin similarity index 88% rename from doc/math/sin rename to src/modules/math/doc/sin index 8944254e81b4f8b8a02d0d9925eefdffad1c04a8..e3d6ae96bf825cf81b5209b05c2e113ac65a9c80 100644 --- a/doc/math/sin +++ b/src/modules/math/doc/sin @@ -7,5 +7,8 @@ SYNTAX DESCRIPTION Return the sinus value for f. +KEYWORDS + float + SEE ALSO math/asin, math/cos diff --git a/doc/math/sqrt b/src/modules/math/doc/sqrt similarity index 91% rename from doc/math/sqrt rename to src/modules/math/doc/sqrt index 6bfa0d678437d05d03a7169bd7f0b098f9d9fa7a..c84faca6dce851a6d9e1e99f72c1328287de8e07 100644 --- a/doc/math/sqrt +++ b/src/modules/math/doc/sqrt @@ -10,5 +10,8 @@ DESCRIPTION Return the square root of f, or in the second case, the square root truncated to the closest lower integer. +KEYWORDS + float, int + SEE ALSO math/pow, math/log, math/exp, math/floor diff --git a/doc/math/tan b/src/modules/math/doc/tan similarity index 89% rename from doc/math/tan rename to src/modules/math/doc/tan index f78b014e4f0afcdb9f91abe602547ba54986e745..0672360e6f0ab4d63d42e2459976552a1a03846b 100644 --- a/doc/math/tan +++ b/src/modules/math/doc/tan @@ -7,5 +7,8 @@ SYNTAX DESCRIPTION Return the tangent value for f. +KEYWORDS + float + SEE ALSO math/atan, math/sin, math/cos diff --git a/src/modules/math/math.c b/src/modules/math/math.c index 1b1cb183fa64793579e890e1554c6debc565fbfb..baa0b35d78b5303ba0b64ecb73dfa0491557c6ea 100644 --- a/src/modules/math/math.c +++ b/src/modules/math/math.c @@ -1,11 +1,11 @@ /*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ #include <math.h> #include "interpret.h" -#include "add_efun.h" +#include "constants.h" #include "svalue.h" #ifndef M_PI diff --git a/src/modules/math/stamp-h b/src/modules/math/stamp-h deleted file mode 100644 index b7d6715e2df11b9c32b2341423273c6b3ad9ae8a..0000000000000000000000000000000000000000 --- a/src/modules/math/stamp-h +++ /dev/null @@ -1 +0,0 @@ -FOO diff --git a/src/modules/module_dir_marker b/src/modules/module_dir_marker new file mode 100644 index 0000000000000000000000000000000000000000..095cf52524680bcb24200ede16cc788f61401b7e --- /dev/null +++ b/src/modules/module_dir_marker @@ -0,0 +1 @@ +Just ignore this file... diff --git a/src/modules/pipe/Makefile b/src/modules/pipe/Makefile deleted file mode 100644 index cd6e7adcd2799aa1b4483fd41e0ebe84cbc4c360..0000000000000000000000000000000000000000 --- a/src/modules/pipe/Makefile +++ /dev/null @@ -1,26 +0,0 @@ -# Generated automatically from Makefile.in by configure. -SRCDIR=. -VPATH=.:./../..:../.. -PREFLAGS=-I$(SRCDIR) -I$(SRCDIR)/../.. -I../.. -CFLAGS=$(PREFLAGS) $(OTHERFLAGS) - -FILES=pipe.o - -pipe.a: $(FILES) - -rm -f pipe.a - ar cq pipe.a $(FILES) - -ranlib pipe.a - -clean: - -rm -f *.o *.a - -depend: - gcc -MM $(PREFLAGS) $(SRCDIR)/*.c | sed 's;"$(SRCDIR)/";;g' | sed 's;\.\./;;g' | sed 's;\./;;g' >$(SRCDIR)/dependencies - cat $(SRCDIR)/Makefile.in.src $(SRCDIR)/dependencies > $(SRCDIR)/Makefile.in - config.status - -pipe.o: pipe.c config.h machine.h global.h \ - config.h debug.h port.h stralloc.h \ - macros.h object.h svalue.h add_efun.h \ - hashtable.h las.h dynamic_buffer.h \ - program.h interpret.h error.h diff --git a/src/modules/pipe/Makefile.in b/src/modules/pipe/Makefile.in index d2ea225cebdaea0ff35ddb0be5472c0dbf35568e..a41278ca93042d988168399e9501a5d004024ded 100644 --- a/src/modules/pipe/Makefile.in +++ b/src/modules/pipe/Makefile.in @@ -1,7 +1,7 @@ SRCDIR=@srcdir@ VPATH=@srcdir@:@srcdir@/../..:../.. PREFLAGS=-I$(SRCDIR) -I$(SRCDIR)/../.. -I../.. -CFLAGS=$(PREFLAGS) $(OTHERFLAGS) +CFLAGS=$(PREFLAGS) $(OTHERFLAGS) @DEFS@ FILES=pipe.o @@ -14,12 +14,21 @@ clean: -rm -f *.o *.a depend: - gcc -MM $(PREFLAGS) $(SRCDIR)/*.c | sed 's;"$(SRCDIR)/";;g' | sed 's;\.\./;;g' | sed 's;\./;;g' >$(SRCDIR)/dependencies - cat $(SRCDIR)/Makefile.in.src $(SRCDIR)/dependencies > $(SRCDIR)/Makefile.in - config.status - -pipe.o: pipe.c config.h machine.h global.h \ - config.h debug.h port.h stralloc.h \ - macros.h object.h svalue.h add_efun.h \ - hashtable.h las.h dynamic_buffer.h \ - program.h interpret.h error.h + gcc -MM $(PREFLAGS) $(SRCDIR)/*.c | $(FIXDEP) $(SRCDIR) +# Depencies begin here +pipe.o: pipe.c \ + config.h machine.h \ + global.h \ + config.h \ + port.h \ + stralloc.h \ + macros.h \ + object.h \ + svalue.h \ + constants.h \ + hashtable.h \ + las.h \ + dynamic_buffer.h \ + program.h \ + interpret.h \ + error.h diff --git a/src/modules/pipe/Makefile.in.src b/src/modules/pipe/Makefile.in.src deleted file mode 100644 index 8db2cf12f871b64af48053f0107b193fd3067655..0000000000000000000000000000000000000000 --- a/src/modules/pipe/Makefile.in.src +++ /dev/null @@ -1,20 +0,0 @@ -SRCDIR=@srcdir@ -VPATH=@srcdir@:@srcdir@/../..:../.. -PREFLAGS=-I$(SRCDIR) -I$(SRCDIR)/../.. -I../.. -CFLAGS=$(PREFLAGS) $(OTHERFLAGS) - -FILES=pipe.o - -pipe.a: $(FILES) - -rm -f pipe.a - ar cq pipe.a $(FILES) - -@RANLIB@ pipe.a - -clean: - -rm -f *.o *.a - -depend: - gcc -MM $(PREFLAGS) $(SRCDIR)/*.c | sed 's;"$(SRCDIR)/";;g' | sed 's;\.\./;;g' | sed 's;\./;;g' >$(SRCDIR)/dependencies - cat $(SRCDIR)/Makefile.in.src $(SRCDIR)/dependencies > $(SRCDIR)/Makefile.in - config.status - diff --git a/src/modules/pipe/Makefile.src b/src/modules/pipe/Makefile.src new file mode 100644 index 0000000000000000000000000000000000000000..f8dd060cf0ed5cd624647b8622f585c839c303bb --- /dev/null +++ b/src/modules/pipe/Makefile.src @@ -0,0 +1,17 @@ +SRCDIR=@srcdir@ +VPATH=@srcdir@:@srcdir@/../..:../.. +PREFLAGS=-I$(SRCDIR) -I$(SRCDIR)/../.. -I../.. +CFLAGS=$(PREFLAGS) $(OTHERFLAGS) @DEFS@ + +FILES=pipe.o + +pipe.a: $(FILES) + -rm -f pipe.a + ar cq pipe.a $(FILES) + -@RANLIB@ pipe.a + +clean: + -rm -f *.o *.a + +depend: + gcc -MM $(PREFLAGS) $(SRCDIR)/*.c | $(FIXDEP) $(SRCDIR) diff --git a/src/modules/pipe/config.h b/src/modules/pipe/config.h index 488130c583e08e90cfd150f99ae64b3d7202c076..9ded0c6f758e05c5582b780738d2f264abb788f9 100644 --- a/src/modules/pipe/config.h +++ b/src/modules/pipe/config.h @@ -1,4 +1 @@ /* config.h. Generated automatically by configure. */ -#define HAVE_SYS_MMAN_H 1 -#define HAVE_MMAP 1 -#define HAVE_MUNMAP 1 diff --git a/src/modules/pipe/config.h.in b/src/modules/pipe/config.h.in deleted file mode 100644 index c8da5874a9bf281a06619a2ae89df83db6e20c62..0000000000000000000000000000000000000000 --- a/src/modules/pipe/config.h.in +++ /dev/null @@ -1,3 +0,0 @@ -#undef HAVE_SYS_MMAN_H -#undef HAVE_MMAP -#undef HAVE_MUNMAP diff --git a/src/modules/pipe/configure b/src/modules/pipe/configure index 6a0e18cc40b776d8317e344adec9ba6fd73b3c05..8016afa72274fcab707847a170f97416fd8531ae 100755 --- a/src/modules/pipe/configure +++ b/src/modules/pipe/configure @@ -1,8 +1,8 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.4 -# Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. +# Generated automatically using autoconf version 2.10 +# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. @@ -33,9 +33,22 @@ target=NONE verbose= x_includes=NONE x_libraries=NONE +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datadir='${prefix}/share' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +libdir='${exec_prefix}/lib' +includedir='${prefix}/include' +oldincludedir='/usr/include' +infodir='${prefix}/info' +mandir='${prefix}/man' # Initialize some other variables. subdirs= +MFLAGS= MAKEFLAGS= ac_prev= for ac_option @@ -57,9 +70,14 @@ do case "$ac_option" in - -build | --build | --buil | --bui | --bu | --b) + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir="$ac_optarg" ;; + + -build | --build | --buil | --bui | --bu) ac_prev=build ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*) + -build=* | --build=* | --buil=* | --bui=* | --bu=*) build="$ac_optarg" ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ @@ -69,6 +87,12 @@ do | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file="$ac_optarg" ;; + -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ + | --da=*) + datadir="$ac_optarg" ;; + -disable-* | --disable-*) ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` # Reject names that are not valid shell variable names. @@ -119,12 +143,29 @@ Configuration: Directory and file names: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] - --exec-prefix=PREFIX install architecture-dependent files in PREFIX + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [same as prefix] + --bindir=DIR user executables in DIR [EPREFIX/bin] + --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] + --libexecdir=DIR program executables in DIR [EPREFIX/libexec] + --datadir=DIR read-only architecture-independent data in DIR + [PREFIX/share] + --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data in DIR + [PREFIX/com] + --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] + --libdir=DIR object code libraries in DIR [EPREFIX/lib] + --includedir=DIR C header files in DIR [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] + --infodir=DIR info documentation in DIR [PREFIX/info] + --mandir=DIR man documentation in DIR [PREFIX/man] --srcdir=DIR find the sources in DIR [configure dir or ..] --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM run sed PROGRAM on installed program names + --program-transform-name=PROGRAM + run sed PROGRAM on installed program names +EOF + cat << EOF Host type: --build=BUILD configure for building on BUILD [BUILD=HOST] --host=HOST configure for HOST [guessed] @@ -136,8 +177,10 @@ Features and packages: --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --x-includes=DIR X include files are in DIR --x-libraries=DIR X library files are in DIR ---enable and --with options recognized:$ac_help EOF + if test -n "$ac_help"; then + echo "--enable and --with options recognized:$ac_help" + fi exit 0 ;; -host | --host | --hos | --ho) @@ -145,6 +188,44 @@ EOF -host=* | --host=* | --hos=* | --ho=*) host="$ac_optarg" ;; + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir="$ac_optarg" ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir="$ac_optarg" ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir="$ac_optarg" ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir="$ac_optarg" ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst \ + | --locals | --local | --loca | --loc | --lo) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* \ + | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) + localstatedir="$ac_optarg" ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir="$ac_optarg" ;; + -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; @@ -157,6 +238,15 @@ EOF | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir="$ac_optarg" ;; + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) @@ -197,6 +287,23 @@ EOF | -silent | --silent | --silen | --sile | --sil) silent=yes ;; + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir="$ac_optarg" ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir="$ac_optarg" ;; + -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) @@ -207,6 +314,13 @@ EOF -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir="$ac_optarg" ;; + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir="$ac_optarg" ;; + -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) @@ -216,7 +330,7 @@ EOF verbose=yes ;; -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.4" + echo "configure generated by autoconf version 2.10" exit 0 ;; -with-* | --with-*) @@ -262,7 +376,7 @@ EOF -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } ;; - *) + *) if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then echo "configure: warning: $ac_option: invalid host type" 1>&2 fi @@ -382,8 +496,8 @@ fi ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5' -ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. @@ -399,7 +513,6 @@ fi - # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 @@ -418,7 +531,6 @@ else fi done IFS="$ac_save_ifs" - test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc" fi fi CC="$ac_cv_prog_CC" @@ -428,6 +540,55 @@ else echo "$ac_t""no" 1>&6 fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + ac_prog_rejected=no + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + break + fi + done + IFS="$ac_save_ifs" +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# -gt 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + set dummy "$ac_dir/$ac_word" "$@" + shift + ac_cv_prog_CC="$@" + fi +fi +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } +fi echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then @@ -438,12 +599,13 @@ else yes; #endif EOF -if ${CC-cc} -E conftest.c 2>&5 | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:603: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no fi fi + echo "$ac_t""$ac_cv_prog_gcc" 1>&6 if test $ac_cv_prog_gcc = yes; then GCC=yes @@ -461,7 +623,8 @@ fi rm -f conftest* fi - echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6 + +echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6 if test $ac_cv_prog_gcc_g = yes; then CFLAGS="-g -O" else @@ -519,12 +682,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext <<EOF -#line 523 "configure" +#line 686 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF -eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:692: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -533,12 +697,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext <<EOF -#line 537 "configure" +#line 701 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF -eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:707: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -558,7 +723,7 @@ else fi echo "$ac_t""$CPP" 1>&6 -for ac_hdr in sys/mman.h +for ac_hdr in sys/mman.h linux/mman.h do ac_safe=`echo "$ac_hdr" | tr './\055' '___'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 @@ -566,11 +731,12 @@ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 570 "configure" +#line 735 "configure" #include "confdefs.h" #include <$ac_hdr> EOF -eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:740: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -584,7 +750,7 @@ rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'` + ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'` cat >> confdefs.h <<EOF #define $ac_tr_hdr 1 EOF @@ -601,13 +767,15 @@ if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 605 "configure" +#line 771 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ #include <assert.h> /* Override any gcc2 internal prototype to avoid an error. */ -char $ac_func(); +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); int main() { return 0; } int t() { @@ -623,7 +791,7 @@ $ac_func(); ; return 0; } EOF -if eval $ac_link; then +if { (eval echo configure:795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -635,7 +803,7 @@ rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'` + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <<EOF #define $ac_tr_func 1 EOF @@ -695,7 +863,19 @@ fi trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 -DEFS=-DHAVE_CONFIG_H +# Transform confdefs.h into DEFS. +# Protect against shell expansion while executing Makefile rules. +# Protect against Makefile macro expansion. +cat > conftest.defs <<\EOF +s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g +s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g +s%\[%\\&%g +s%\]%\\&%g +s%\$%$$%g +EOF +DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '` +rm -f conftest.defs + # Without the "./", some shells look in PATH for config.status. : ${CONFIG_STATUS=./config.status} @@ -722,7 +902,7 @@ do echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.4" + echo "$CONFIG_STATUS generated by autoconf version 2.10" exit 0 ;; -help | --help | --hel | --he | --h) echo "\$ac_cs_usage"; exit 0 ;; @@ -732,11 +912,13 @@ done ac_given_srcdir=$srcdir -trap 'rm -fr `echo "Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 +trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 +EOF +cat >> $CONFIG_STATUS <<EOF -# Protect against being on the right side of a sed subst in config.status. -sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g; - s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF +# Protect against being on the right side of a sed subst in config.status. +sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; + s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF $ac_vpsub $extrasub s%@CFLAGS@%$CFLAGS%g @@ -748,6 +930,18 @@ s%@LIBS@%$LIBS%g s%@exec_prefix@%$exec_prefix%g s%@prefix@%$prefix%g s%@program_transform_name@%$program_transform_name%g +s%@bindir@%$bindir%g +s%@sbindir@%$sbindir%g +s%@libexecdir@%$libexecdir%g +s%@datadir@%$datadir%g +s%@sysconfdir@%$sysconfdir%g +s%@sharedstatedir@%$sharedstatedir%g +s%@localstatedir@%$localstatedir%g +s%@libdir@%$libdir%g +s%@includedir@%$includedir%g +s%@oldincludedir@%$oldincludedir%g +s%@infodir@%$infodir%g +s%@mandir@%$mandir%g s%@CC@%$CC%g s%@RANLIB@%$RANLIB%g s%@CPP@%$CPP%g @@ -807,102 +1001,6 @@ s%@top_srcdir@%$top_srcdir%g fi; done rm -f conftest.subs -# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where -# NAME is the cpp macro being defined and VALUE is the value it is being given. -# -# ac_d sets the value in "#define NAME VALUE" lines. -ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' -ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' -ac_dC='\3' -ac_dD='%g' -# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". -ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_uB='\([ ]\)%\1#\2define\3' -ac_uC=' ' -ac_uD='\4%g' -# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". -ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_eB='$%\1#\2define\3' -ac_eC=' ' -ac_eD='%g' - -CONFIG_HEADERS=${CONFIG_HEADERS-"config.h"} -for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then - # Support "outfile[:infile]", defaulting infile="outfile.in". - case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.in" ;; - esac - - echo creating $ac_file - - rm -f conftest.frag conftest.in conftest.out - cp $ac_given_srcdir/$ac_file_in conftest.in - -EOF - -# Transform confdefs.h into a sed script conftest.vals that substitutes -# the proper values into config.h.in to produce config.h. And first: -# Protect against being on the right side of a sed subst in config.status. -# Protect against being in an unquoted here document in config.status. -rm -f conftest.vals -cat > conftest.hdr <<\EOF -s/[\\&%]/\\&/g -s%[\\$`]%\\&%g -s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp -s%ac_d%ac_u%gp -s%ac_u%ac_e%gp -EOF -sed -n -f conftest.hdr confdefs.h > conftest.vals -rm -f conftest.hdr - -# This sed command replaces #undef with comments. This is necessary, for -# example, in the case of _POSIX_SOURCE, which is predefined and required -# on some systems where configure will not decide to define it. -cat >> conftest.vals <<\EOF -s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% -EOF - -# Break up conftest.vals because some shells have a limit on -# the size of here documents, and old seds have small limits too. -# Maximum number of lines to put in a single here document. -ac_max_here_lines=12 - -rm -f conftest.tail -while : -do - ac_lines=`grep -c . conftest.vals` - # grep -c gives empty output for an empty file on some AIX systems. - if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi - # Write a limited-size here document to conftest.frag. - echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS - sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS - echo 'CEOF - sed -f conftest.frag conftest.in > conftest.out - rm -f conftest.in - mv conftest.out conftest.in -' >> $CONFIG_STATUS - sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail - rm -f conftest.vals - mv conftest.tail conftest.vals -done -rm -f conftest.vals - -cat >> $CONFIG_STATUS <<\EOF - rm -f conftest.frag conftest.h - echo "/* $ac_file. Generated automatically by configure. */" > conftest.h - cat conftest.in >> conftest.h - rm -f conftest.in - if cmp -s $ac_file conftest.h 2>/dev/null; then - echo "$ac_file is unchanged" - rm -f conftest.h - else - rm -f $ac_file - mv conftest.h $ac_file - fi -fi; done - echo FOO >stamp-h exit 0 diff --git a/src/modules/pipe/configure.in b/src/modules/pipe/configure.in index 1c6f1373b269546d422c2713b4b7ac0f29caad5f..79fd885d7aa986b6f8bb8a4127873ed71fb581bb 100644 --- a/src/modules/pipe/configure.in +++ b/src/modules/pipe/configure.in @@ -1,12 +1,11 @@ AC_INIT(pipe.c) -AC_CONFIG_HEADER(config.h) AC_PROG_CC AC_PROG_RANLIB AC_SUBST(RANLIB) -AC_HAVE_HEADERS(sys/mman.h) +AC_HAVE_HEADERS(sys/mman.h linux/mman.h) AC_HAVE_FUNCS(mmap munmap) AC_OUTPUT(Makefile,echo FOO >stamp-h ) diff --git a/src/modules/pipe/dependencies b/src/modules/pipe/dependencies index 7b809f13e7d06a787fcfb89ada59a7761b6c9afb..a8ac43a0e00d979f35ef477e7d78defd56209dbe 100644 --- a/src/modules/pipe/dependencies +++ b/src/modules/pipe/dependencies @@ -1,5 +1,16 @@ -pipe.o: pipe.c config.h machine.h global.h \ - config.h debug.h port.h stralloc.h \ - macros.h object.h svalue.h add_efun.h \ - hashtable.h las.h dynamic_buffer.h \ - program.h interpret.h error.h +pipe.o: /home/hubbe/pike/src/modules/pipe/pipe.c \ + /home/hubbe/pike/src/modules/pipe/config.h machine.h \ + /home/hubbe/pike/src/modules/pipe/global.h \ + /home/hubbe/pike/src/modules/pipe/config.h \ + /home/hubbe/pike/src/modules/pipe/port.h \ + /home/hubbe/pike/src/modules/pipe/stralloc.h \ + /home/hubbe/pike/src/modules/pipe/macros.h \ + /home/hubbe/pike/src/modules/pipe/object.h \ + /home/hubbe/pike/src/modules/pipe/svalue.h \ + /home/hubbe/pike/src/modules/pipe/constants.h \ + /home/hubbe/pike/src/modules/pipe/hashtable.h \ + /home/hubbe/pike/src/modules/pipe/las.h \ + /home/hubbe/pike/src/modules/pipe/dynamic_buffer.h \ + /home/hubbe/pike/src/modules/pipe/program.h \ + /home/hubbe/pike/src/modules/pipe/interpret.h \ + /home/hubbe/pike/src/modules/pipe/error.h diff --git a/src/modules/pipe/pipe.c b/src/modules/pipe/pipe.c index db5e606c6cc7e0a9f2fab24d32eedad849cd823c..f2ca33ebb660ca83b4f8c59b967776827b16a27a 100644 --- a/src/modules/pipe/pipe.c +++ b/src/modules/pipe/pipe.c @@ -6,6 +6,15 @@ #ifdef HAVE_SYS_MMAN_H #include <sys/mman.h> +#else +#ifdef HAVE_LINUX_MMAN_H +#include <linux/mman.h> +#else +#ifdef HAVE_MMAP +/* sys/mman.h is _probably_ there anyway. */ +#include <sys/mman.h> +#endif +#endif #endif #include <fcntl.h> @@ -15,7 +24,7 @@ #include "types.h" #include "macros.h" #include "object.h" -#include "add_efun.h" +#include "constants.h" #include "interpret.h" #include "svalue.h" #include "error.h" @@ -86,7 +95,7 @@ struct input union { struct object *obj; - struct lpc_string *str; + struct pike_string *str; unsigned char *mmap; } u; unsigned long len; /* current input: string or mmap len */ @@ -113,7 +122,7 @@ struct output struct buffer { - struct lpc_string *s; + struct pike_string *s; struct buffer *next; }; @@ -233,8 +242,9 @@ static INLINE void pipe_done(void) apply_svalue(&(THIS->done_callback),1); pop_stack(); - if(!THISOBJ->prog) - error("Pipe done callback destructed pipe.\n"); + if(!THISOBJ->prog) /* We will not free anything in this case. */ + return; + /* error("Pipe done callback destructed pipe.\n"); */ } close_and_free_everything(THISOBJ,THIS); } @@ -258,7 +268,7 @@ static void finished_p(void) * scheduled for output. Return 1 if we have more bytes in buffers * than allowed afterwards. */ -static INLINE int append_buffer(struct lpc_string *s) +static INLINE int append_buffer(struct pike_string *s) /* 1=buffer full */ { struct buffer *b; @@ -294,13 +304,14 @@ static INLINE int append_buffer(struct lpc_string *s) /* Wake up the sleepers */ static void low_start() { - struct object *obj; + struct object *obj, *next; struct output *o; THISOBJ->refs++; /* dont kill yourself now */ - for(obj=THIS->firstoutput;obj;obj=o->next) + for(obj=THIS->firstoutput;obj;obj=next) { + obj->refs++; /* Hang on PLEASE!! /hubbe */ o=(struct output *)&(obj->storage); if (o->obj && o->mode==O_SLEEP) { @@ -320,6 +331,8 @@ static void low_start() o->mode=O_RUN; /* Hubbe */ } } + next=o->next; + free_object(obj); } free_object(THISOBJ); @@ -368,7 +381,7 @@ static INLINE void input_finish(void) /* This function reads some data from the file cache.. * Called when we want some data to send. */ -static INLINE struct lpc_string* gimme_some_data(unsigned long pos) +static INLINE struct pike_string* gimme_some_data(unsigned long pos) { struct buffer *b; unsigned long len; @@ -506,7 +519,7 @@ static INLINE void output_finish(struct object *obj) static INLINE void output_try_write_some(struct object *obj) { struct output *out; - struct lpc_string *s; + struct pike_string *s; unsigned long len; INT32 ret; @@ -869,7 +882,7 @@ static void pipe_close_output_callback(INT32 args) static void pipe_read_input_callback(INT32 args) { struct input *i; - struct lpc_string *s; + struct pike_string *s; if (args<2 || sp[1-args].type!=T_STRING) error("Illegal argument to pipe->read_input_callback\n"); @@ -928,8 +941,7 @@ static void pipe_close_input_callback(INT32 args) static void pipe_version(INT32 args) { pop_n_elems(args); - push_int(0); - push_string(make_shared_string("PIPE ver 2.0 compiled "__DATE__)); + push_string(make_shared_string("PIPE ver 2.0")); } /********** init/exit *******************************************************/ @@ -997,39 +1009,33 @@ void close_and_free_everything(struct object *thisobj,struct pipe *p) p->done=0; } -static void init_pipe_struct(char *foo, struct object *o) +static void init_pipe_struct(struct object *o) { - struct pipe *p; - p=(struct pipe *) foo; - - p->firstbuffer=p->lastbuffer=NULL; - p->firstinput=p->lastinput=NULL; - p->firstoutput=NULL; - p->bytes_in_buffer=0; - p->pos=0; - p->sleeping=0; - p->done=0; - p->fd=-1; - p->done_callback.type=T_INT; - p->output_closed_callback.type=T_INT; - p->id.type=T_INT; - p->id.u.integer=0; - p->living_outputs=0; + THIS->firstbuffer=THIS->lastbuffer=NULL; + THIS->firstinput=THIS->lastinput=NULL; + THIS->firstoutput=NULL; + THIS->bytes_in_buffer=0; + THIS->pos=0; + THIS->sleeping=0; + THIS->done=0; + THIS->fd=-1; + THIS->done_callback.type=T_INT; + THIS->output_closed_callback.type=T_INT; + THIS->id.type=T_INT; + THIS->id.u.integer=0; + THIS->living_outputs=0; } -static void exit_pipe_struct(char *foo, struct object *o) +static void exit_pipe_struct(struct object *o) { - struct pipe *p; - - p=(struct pipe *) foo; - close_and_free_everything(NULL,p); + close_and_free_everything(NULL,THIS); } -static void exit_output_struct(char *foo, struct object *obj) +static void exit_output_struct(struct object *obj) { struct output *o; - o=(struct output *)foo; + o=(struct output *)(fp->current_storage); if (o->obj) { if(o->obj->prog) @@ -1054,16 +1060,15 @@ static void exit_output_struct(char *foo, struct object *obj) } } -static void init_output_struct(char *foo, struct object *ob) +static void init_output_struct(struct object *ob) { struct output *o; - - o=(struct output *)foo; + o=(struct output *)(fp->current_storage); o->obj=0; } -/********** ulpc init *******************************************************/ +/********** Pike init *******************************************************/ void port_setup_program(void); diff --git a/src/modules/pipe/stamp-h b/src/modules/pipe/stamp-h deleted file mode 100644 index b7d6715e2df11b9c32b2341423273c6b3ad9ae8a..0000000000000000000000000000000000000000 --- a/src/modules/pipe/stamp-h +++ /dev/null @@ -1 +0,0 @@ -FOO diff --git a/src/modules/readlinemod/.cvsignore b/src/modules/readlinemod/.cvsignore new file mode 100644 index 0000000000000000000000000000000000000000..64200ddc24cb90d8f410a6a9e2b0b79c4cd30d58 --- /dev/null +++ b/src/modules/readlinemod/.cvsignore @@ -0,0 +1,2 @@ +Makefile.in +configure diff --git a/src/modules/readlinemod/.gitignore b/src/modules/readlinemod/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..addfc0376f648196d317f7f7299705f23cb23c21 --- /dev/null +++ b/src/modules/readlinemod/.gitignore @@ -0,0 +1,2 @@ +/Makefile.in +/configure diff --git a/src/modules/readlinemod/Makefile.src b/src/modules/readlinemod/Makefile.src new file mode 100644 index 0000000000000000000000000000000000000000..46940d347237f433b766176f8936b2d3e964d638 --- /dev/null +++ b/src/modules/readlinemod/Makefile.src @@ -0,0 +1,19 @@ +SRCDIR=@srcdir@ +VPATH=@srcdir@:@srcdir@/../..:../.. +PREFLAGS=-I. -I$(SRCDIR) -I$(SRCDIR)/../.. -I../.. +CFLAGS=$(PREFLAGS) $(OTHERFLAGS) + +FILES=readlinemod.o +LIB=readlinemod.a + +$(LIB): $(FILES) + -rm -f $(LIB) + ar cq $(LIB) $(FILES) + -@RANLIB@ $(LIB) + echo >linker_options @LIBS@ + +clean: + -rm -f *.o *.a + +depend: + gcc -MM $(PREFLAGS) $(SRCDIR)/*.c | $(FIXDEP) $(SRCDIR) diff --git a/src/modules/readlinemod/configure.in b/src/modules/readlinemod/configure.in new file mode 100644 index 0000000000000000000000000000000000000000..7b8688b8fbe00c089fbd3f40b248c68fdde39b13 --- /dev/null +++ b/src/modules/readlinemod/configure.in @@ -0,0 +1,14 @@ +AC_INIT(readlinemod.c) +AC_CONFIG_HEADER(readline_machine.h) + +AC_PROG_CC +AC_PROG_RANLIB +AC_SUBST(RANLIB) + +AC_CHECK_HEADERS(readline.h history.h readline/readline.h history/history.h readline/history.h) +AC_CHECK_LIB(termcap, tputs) +AC_CHECK_LIB(readline, readline) + +AC_OUTPUT(Makefile,echo FOO >stamp-h ) + + diff --git a/src/modules/readlinemod/doc/readline b/src/modules/readlinemod/doc/readline new file mode 100644 index 0000000000000000000000000000000000000000..01f3204c02d443f207edaa5b1348f320f1031c28 --- /dev/null +++ b/src/modules/readlinemod/doc/readline @@ -0,0 +1,14 @@ +NAME + readline - read a line from stdin + +SYNTAX + string readline(string prompt); + +DESCRIPTION + This function writes the string 'prompt' and then waits until the + user has entered a line from the keyboard. If the readline library + was available when Pike was compiled the user will have history and + line edithing at his/her disposal when entering the line. + +SEE ALSO + files/file diff --git a/src/modules/readlinemod/readline_machine.h.in b/src/modules/readlinemod/readline_machine.h.in new file mode 100644 index 0000000000000000000000000000000000000000..7ce5c2ec3ae6a7ec83311f5c10fc614513a3f908 --- /dev/null +++ b/src/modules/readlinemod/readline_machine.h.in @@ -0,0 +1,19 @@ +#ifndef GDBM_MACHINE_H +#define GDBM_MACHINE_H + +/* Define this if you have <readline.h> */ +#undef HAVE_READLINE_H +#undef HAVE_READLINE_READLINE_H + +/* Define this if you have <history.h> */ +#undef HAVE_HISTORY_H +#undef HAVE_HISTORY_HISTORY_H +#undef HAVE_READLINE_HISTORY_H + +/* Define this if you have -lreadline */ +#undef HAVE_LIBREADLINE + +/* Define this if you have -ltermcap */ +#undef HAVE_LIBTERMCAP + +#endif diff --git a/src/modules/readlinemod/readlinemod.c b/src/modules/readlinemod/readlinemod.c new file mode 100644 index 0000000000000000000000000000000000000000..a18fc0fc2240f5e74f9bf2200d9e4732bd456032 --- /dev/null +++ b/src/modules/readlinemod/readlinemod.c @@ -0,0 +1,118 @@ +/*\ +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) +||| See the files COPYING and DISCLAIMER for more information. +\*/ +#include "global.h" +#include "readline_machine.h" +#include "types.h" +#include "interpret.h" +#include "svalue.h" +#include "stralloc.h" +#include "array.h" +#include "object.h" +#include "macros.h" + +#if !defined(HAVE_READLINE_H) && !defined(HAVE_READLINE_READLINE_H) +#undef HAVE_LIBREADLINE +#endif + +#if !defined(HAVE_HISTORY_H) && !defined(HAVE_READLINE_HISTORY_H) && !defined(HAVE_HISTORY_HISTORY_H) +#undef HAVE_LIBREADLINE +#endif + +#ifdef HAVE_LIBREADLINE + +#ifdef HAVE_READLINE_READLINE_H +#include <readline/readline.h> +#else +#ifdef HAVE_READLINE_H +#include <readline.h> +#endif +#endif + +#ifdef HAVE_READLINE_HISTORY_H +#include <readline/history.h> +#else +#ifdef HAVE_HISTORY_HISTORY_H +#include <history/history.h> +#else +#ifdef HAVE_HISTORY_H +#include <history.h> +#endif +#endif +#endif + +static void f_readline(INT32 args) +{ + char *r; + if(args < 1) + error("Too few arguments to readline().\n"); + + if(sp[-args].type != T_STRING) + error("Bad argument 1 to readline()\n"); + + r=readline(sp[-args].u.string->str); + pop_n_elems(args); + if(r) + { + if(*r) add_history(r); + push_string(make_shared_string(r)); + free(r); + } else { + push_int(0); + } +} + +void init_readlinemod_efuns(void) +{ + rl_bind_key('\t', rl_insert); + add_efun("readline",f_readline,"function(string:string)",OPT_SIDE_EFFECT); +} + +#else + +#include <stdio.h> + +#define BLOCK 16384 + +static void f_readline(INT32 args) +{ + char line[BLOCK]; + char *r; + if(args < 1) + error("Too few arguments to readline().\n"); + + if(sp[-args].type != T_STRING) + error("Bad argument 1 to readline()\n"); + + fwrite(sp[-args].u.string->str,1,sp[-args].u.string->len,stdout); + fflush(stdout); + + pop_n_elems(args); + if(fgets(line,BLOCK,stdin)) + { + INT32 len; + if(len=strlen(line)) + { + if(line[len-1]=='\n') + { + push_string(make_shared_binary_string(line,len-1)); + return; + } + } + } + push_int(0); +} + +void init_readlinemod_efuns(void) +{ + add_efun("readline",f_readline,"function(string:string)",OPT_SIDE_EFFECT); +} + +#endif + +void exit_readlinemod(void) {} +void init_readlinemod_programs(void) { } + + diff --git a/src/modules/regexp/.cvsignore b/src/modules/regexp/.cvsignore new file mode 100644 index 0000000000000000000000000000000000000000..76e8a85506890a9ad4125ab962e5b80341ffecdc --- /dev/null +++ b/src/modules/regexp/.cvsignore @@ -0,0 +1,2 @@ +configure +Makefile.in diff --git a/src/modules/regexp/.gitignore b/src/modules/regexp/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..1f3e111bcb9a733de582cbc47266cc26dd1ec797 --- /dev/null +++ b/src/modules/regexp/.gitignore @@ -0,0 +1,2 @@ +/configure +/Makefile.in diff --git a/src/modules/regexp/Makefile b/src/modules/regexp/Makefile deleted file mode 100644 index 584d2e61a057e6d4b4e317cbde5793245f2c349d..0000000000000000000000000000000000000000 --- a/src/modules/regexp/Makefile +++ /dev/null @@ -1,43 +0,0 @@ -# Generated automatically from Makefile.in by configure. -SRCDIR=. -VPATH=.:./../..:../.. -PREFLAGS=-I$(SRCDIR) -I$(SRCDIR)/../.. -I../.. -CFLAGS=$(PREFLAGS) $(OTHERFLAGS) - -FILES=regexp.o glue.o - -regexp.a: $(FILES) - -rm -f regexp.a - ar cq regexp.a $(FILES) - -ranlib regexp.a - -clean: - -rm -f *.o *.a - -depend: - gcc -MM $(PREFLAGS) $(SRCDIR)/*.c | $(FIXDEP) $(SRCDIR)/Makefile.in - - -#Dependencies begin here, DO NOT REMOVE THIS LINE!!!! -glue.o: glue.c \ - global.h machine.h \ - config.h \ - debug.h \ - port.h \ - interpret.h \ - program.h \ - svalue.h \ - stralloc.h \ - array.h \ - las.h \ - dynamic_buffer.h \ - object.h \ - macros.h -regexp.o: regexp.c \ - global.h machine.h \ - config.h \ - debug.h \ - port.h \ - regexp.h \ - error.h \ - svalue.h diff --git a/src/modules/regexp/Makefile.in b/src/modules/regexp/Makefile.in deleted file mode 100644 index d2bc317acdf146b93a18476bacd5a5f1251b2549..0000000000000000000000000000000000000000 --- a/src/modules/regexp/Makefile.in +++ /dev/null @@ -1,42 +0,0 @@ -SRCDIR=@srcdir@ -VPATH=@srcdir@:@srcdir@/../..:../.. -PREFLAGS=-I$(SRCDIR) -I$(SRCDIR)/../.. -I../.. -CFLAGS=$(PREFLAGS) $(OTHERFLAGS) - -FILES=regexp.o glue.o - -regexp.a: $(FILES) - -rm -f regexp.a - ar cq regexp.a $(FILES) - -@RANLIB@ regexp.a - -clean: - -rm -f *.o *.a - -depend: - gcc -MM $(PREFLAGS) $(SRCDIR)/*.c | $(FIXDEP) $(SRCDIR)/Makefile.in - - -#Dependencies begin here, DO NOT REMOVE THIS LINE!!!! -glue.o: glue.c \ - global.h machine.h \ - config.h \ - debug.h \ - port.h \ - interpret.h \ - program.h \ - svalue.h \ - stralloc.h \ - array.h \ - las.h \ - dynamic_buffer.h \ - object.h \ - macros.h -regexp.o: regexp.c \ - global.h machine.h \ - config.h \ - debug.h \ - port.h \ - regexp.h \ - error.h \ - svalue.h diff --git a/src/modules/regexp/Makefile.src b/src/modules/regexp/Makefile.src new file mode 100644 index 0000000000000000000000000000000000000000..0ca33fdcc447e431db40c7e52e44cd1eaabbe542 --- /dev/null +++ b/src/modules/regexp/Makefile.src @@ -0,0 +1,17 @@ +SRCDIR=@srcdir@ +VPATH=@srcdir@:@srcdir@/../..:../.. +PREFLAGS=-I$(SRCDIR) -I$(SRCDIR)/../.. -I../.. +CFLAGS=$(PREFLAGS) $(OTHERFLAGS) + +FILES=regexp.o glue.o + +regexp.a: $(FILES) + -rm -f regexp.a + ar cq regexp.a $(FILES) + -@RANLIB@ regexp.a + +clean: + -rm -f *.o *.a + +depend: + gcc -MM $(PREFLAGS) $(SRCDIR)/*.c | $(FIXDEP) $(SRCDIR) diff --git a/src/modules/regexp/configure b/src/modules/regexp/configure deleted file mode 100755 index eedd6785c03c018462de06fdbe07db523ac3932a..0000000000000000000000000000000000000000 --- a/src/modules/regexp/configure +++ /dev/null @@ -1,819 +0,0 @@ -#! /bin/sh - -# Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.7 -# Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. -# -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. - -# Defaults: -ac_help= -ac_default_prefix=/usr/local -# Any additions from configure.in: - -# Initialize some variables set by options. -# The variables have the same names as the options, with -# dashes changed to underlines. -build=NONE -cache_file=./config.cache -exec_prefix=NONE -host=NONE -no_create= -nonopt=NONE -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -target=NONE -verbose= -x_includes=NONE -x_libraries=NONE -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datadir='${prefix}/share' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -libdir='${exec_prefix}/lib' -includedir='${prefix}/include' -oldincludedir='/usr/include' -infodir='${prefix}/info' -mandir='${prefix}/man' - -# Initialize some other variables. -subdirs= -MFLAGS= MAKEFLAGS= - -ac_prev= -for ac_option -do - - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval "$ac_prev=\$ac_option" - ac_prev= - continue - fi - - case "$ac_option" in - -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; - *) ac_optarg= ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case "$ac_option" in - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir="$ac_optarg" ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build="$ac_optarg" ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file="$ac_optarg" ;; - - -datadir | --datadir | --datadi | --datad | --data | --dat | --da) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ - | --da=*) - datadir="$ac_optarg" ;; - - -disable-* | --disable-*) - ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - eval "enable_${ac_feature}=no" ;; - - -enable-* | --enable-*) - ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; - *) ac_optarg=yes ;; - esac - eval "enable_${ac_feature}='$ac_optarg'" ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix="$ac_optarg" ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he) - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat << EOF -Usage: configure [options] [host] -Options: [defaults in brackets after descriptions] -Configuration: - --cache-file=FILE cache test results in FILE - --help print this message - --no-create do not create output files - --quiet, --silent do not print \`checking...' messages - --version print the version of autoconf that created configure -Directory and file names: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [same as prefix] - --bindir=DIR user executables in DIR [EPREFIX/bin] - --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] - --libexecdir=DIR program executables in DIR [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data in DIR - [PREFIX/share] - --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data in DIR - [PREFIX/com] - --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] - --libdir=DIR object code libraries in DIR [EPREFIX/lib] - --includedir=DIR C header files in DIR [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] - --infodir=DIR info documentation in DIR [PREFIX/info] - --mandir=DIR man documentation in DIR [PREFIX/man] - --srcdir=DIR find the sources in DIR [configure dir or ..] - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM - run sed PROGRAM on installed program names -EOF - cat << EOF -Host type: - --build=BUILD configure for building on BUILD [BUILD=HOST] - --host=HOST configure for HOST [guessed] - --target=TARGET configure for TARGET [TARGET=HOST] -Features and packages: - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --x-includes=DIR X include files are in DIR - --x-libraries=DIR X library files are in DIR -EOF - if test -n "$ac_help"; then - echo "--enable and --with options recognized:$ac_help" - fi - exit 0 ;; - - -host | --host | --hos | --ho) - ac_prev=host ;; - -host=* | --host=* | --hos=* | --ho=*) - host="$ac_optarg" ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir="$ac_optarg" ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir="$ac_optarg" ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir="$ac_optarg" ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir="$ac_optarg" ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst \ - | --locals | --local | --loca | --loc | --lo) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* \ - | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) - localstatedir="$ac_optarg" ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir="$ac_optarg" ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir="$ac_optarg" ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix="$ac_optarg" ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix="$ac_optarg" ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix="$ac_optarg" ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name="$ac_optarg" ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir="$ac_optarg" ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir="$ac_optarg" ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site="$ac_optarg" ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir="$ac_optarg" ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir="$ac_optarg" ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target="$ac_optarg" ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.7" - exit 0 ;; - - -with-* | --with-*) - ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi - ac_package=`echo $ac_package| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; - *) ac_optarg=yes ;; - esac - eval "with_${ac_package}='$ac_optarg'" ;; - - -without-* | --without-*) - ac_package=`echo $ac_option|sed -e 's/-*without-//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi - ac_package=`echo $ac_package| sed 's/-/_/g'` - eval "with_${ac_package}=no" ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes="$ac_optarg" ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries="$ac_optarg" ;; - - -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } - ;; - - *) - if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then - echo "configure: warning: $ac_option: invalid host type" 1>&2 - fi - if test "x$nonopt" != xNONE; then - { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } - fi - nonopt="$ac_option" - ;; - - esac -done - -if test -n "$ac_prev"; then - { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } -fi - -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - -# File descriptor usage: -# 0 standard input -# 1 file creation -# 2 errors and warnings -# 3 some systems may open it to /dev/tty -# 4 used on the Kubota Titan -# 6 checking for... messages and results -# 5 compiler messages saved in config.log -if test "$silent" = yes; then - exec 6>/dev/null -else - exec 6>&1 -fi -exec 5>./config.log - -echo "\ -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. -" 1>&5 - -# Strip out --no-create and --no-recursion so they do not pile up. -# Also quote any args containing shell metacharacters. -ac_configure_args= -for ac_arg -do - case "$ac_arg" in - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) ;; - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) - ac_configure_args="$ac_configure_args '$ac_arg'" ;; - *) ac_configure_args="$ac_configure_args $ac_arg" ;; - esac -done - -# NLS nuisances. -# Only set LANG and LC_ALL to C if already set. -# These must not be set unconditionally because not all systems understand -# e.g. LANG=C (notably SCO). -if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi -if test "${LANG+set}" = set; then LANG=C; export LANG; fi - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo > confdefs.h - -# A filename unique to this package, relative to the directory that -# configure is in, which we can look for to find out if srcdir is correct. -ac_unique_file=regexp.c - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then its parent. - ac_prog=$0 - ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` - test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. - srcdir=$ac_confdir - if test ! -r $srcdir/$ac_unique_file; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r $srcdir/$ac_unique_file; then - if test "$ac_srcdir_defaulted" = yes; then - { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } - else - { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } - fi -fi -srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` - -# Prefer explicitly selected file to automatically selected ones. -if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi -fi -for ac_site_file in $CONFIG_SITE; do - if test -r "$ac_site_file"; then - echo "loading site script $ac_site_file" - . "$ac_site_file" - fi -done - -if test -r "$cache_file"; then - echo "loading cache $cache_file" - . $cache_file -else - echo "creating cache $cache_file" - > $cache_file -fi - -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='echo $CPP $CPPFLAGS 1>&5; -$CPP $CPPFLAGS' -ac_compile='echo ${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5; -${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5' -ac_link='echo ${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5; -${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5' - -if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then - # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. - if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then - ac_n= ac_c=' -' ac_t=' ' - else - ac_n=-n ac_c= ac_t= - fi -else - ac_n= ac_c='\c' ac_t= -fi - - - -# Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="gcc" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc" -fi -fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - -echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.c <<EOF -#ifdef __GNUC__ - yes; -#endif -EOF -if ${CC-cc} -E conftest.c 2>&5 | egrep yes >/dev/null 2>&1; then - ac_cv_prog_gcc=yes -else - ac_cv_prog_gcc=no -fi -fi - -echo "$ac_t""$ac_cv_prog_gcc" 1>&6 -if test $ac_cv_prog_gcc = yes; then - GCC=yes - if test "${CFLAGS+set}" != set; then - echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - echo 'void f(){}' > conftest.c -if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then - ac_cv_prog_gcc_g=yes -else - ac_cv_prog_gcc_g=no -fi -rm -f conftest* - -fi - -echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6 - if test $ac_cv_prog_gcc_g = yes; then - CFLAGS="-g -O" - else - CFLAGS="-O" - fi - fi -else - GCC= - test "${CFLAGS+set}" = set || CFLAGS="-g" -fi - -# Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_RANLIB="ranlib" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" -fi -fi -RANLIB="$ac_cv_prog_RANLIB" -if test -n "$RANLIB"; then - echo "$ac_t""$RANLIB" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - - -trap '' 1 2 15 -cat > confcache <<\EOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs. It is not useful on other systems. -# If it contains results you don't want to keep, you may remove or edit it. -# -# By default, configure uses ./config.cache as the cache file, -# creating it if it does not exist already. You can give configure -# the --cache-file=FILE option to use a different cache file; that is -# what configure does when it calls configure scripts in -# subdirectories, so they share the cache. -# Giving --cache-file=/dev/null disables caching, for debugging configure. -# config.status only pays attention to the cache file if you give it the -# --recheck option to rerun configure. -# -EOF -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -(set) 2>&1 | - sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \ - >> confcache -if cmp -s $cache_file confcache; then - : -else - if test -w $cache_file; then - echo "updating cache $cache_file" - cat confcache > $cache_file - else - echo "not updating unwritable cache $cache_file" - fi -fi -rm -f confcache - -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -# Any assignment to VPATH causes Sun make to only execute -# the first set of double-colon rules, so remove it if not needed. -# If there is a colon in the path, we need to keep it. -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' -fi - -trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 - -# Transform confdefs.h into DEFS. -# Protect against shell expansion while executing Makefile rules. -# Protect against Makefile macro expansion. -cat > conftest.defs <<\EOF -s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%-D\1=\2%g -s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g -s%\[%\\&%g -s%\]%\\&%g -s%\$%$$%g -EOF -DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '` -rm -f conftest.defs - - -# Without the "./", some shells look in PATH for config.status. -: ${CONFIG_STATUS=./config.status} - -echo creating $CONFIG_STATUS -rm -f $CONFIG_STATUS -cat > $CONFIG_STATUS <<EOF -#! /bin/sh -# Generated automatically by configure. -# Run this file to recreate the current configuration. -# This directory was configured as follows, -# on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# -# $0 $ac_configure_args -# -# Compiler output produced by configure, useful for debugging -# configure, is in ./config.log if it exists. - -ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" -for ac_option -do - case "\$ac_option" in - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" - exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; - -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.7" - exit 0 ;; - -help | --help | --hel | --he | --h) - echo "\$ac_cs_usage"; exit 0 ;; - *) echo "\$ac_cs_usage"; exit 1 ;; - esac -done - -ac_given_srcdir=$srcdir - -trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 -EOF -cat >> $CONFIG_STATUS <<EOF - -# Protect against being on the right side of a sed subst in config.status. -sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; - s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF -$ac_vpsub -$extrasub -s%@CFLAGS@%$CFLAGS%g -s%@CPPFLAGS@%$CPPFLAGS%g -s%@CXXFLAGS@%$CXXFLAGS%g -s%@DEFS@%$DEFS%g -s%@LDFLAGS@%$LDFLAGS%g -s%@LIBS@%$LIBS%g -s%@exec_prefix@%$exec_prefix%g -s%@prefix@%$prefix%g -s%@program_transform_name@%$program_transform_name%g -s%@bindir@%$bindir%g -s%@sbindir@%$sbindir%g -s%@libexecdir@%$libexecdir%g -s%@datadir@%$datadir%g -s%@sysconfdir@%$sysconfdir%g -s%@sharedstatedir@%$sharedstatedir%g -s%@localstatedir@%$localstatedir%g -s%@libdir@%$libdir%g -s%@includedir@%$includedir%g -s%@oldincludedir@%$oldincludedir%g -s%@infodir@%$infodir%g -s%@mandir@%$mandir%g -s%@CC@%$CC%g -s%@RANLIB@%$RANLIB%g - -CEOF -EOF -cat >> $CONFIG_STATUS <<EOF - -CONFIG_FILES=\${CONFIG_FILES-"Makefile"} -EOF -cat >> $CONFIG_STATUS <<\EOF -for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then - # Support "outfile[:infile]", defaulting infile="outfile.in". - case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.in" ;; - esac - - # Adjust relative srcdir, etc. for subdirectories. - - # Remove last slash and all that follows it. Not all systems have dirname. - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" - ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" - # A "../" for each directory in $ac_dir_suffix. - ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` - else - ac_dir_suffix= ac_dots= - fi - - case "$ac_given_srcdir" in - .) srcdir=. - if test -z "$ac_dots"; then top_srcdir=. - else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; - /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; - *) # Relative path. - srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" - top_srcdir="$ac_dots$ac_given_srcdir" ;; - esac - - echo creating "$ac_file" - rm -f "$ac_file" - configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." - case "$ac_file" in - *Makefile*) ac_comsub="1i\\ -# $configure_input" ;; - *) ac_comsub= ;; - esac - sed -e "$ac_comsub -s%@configure_input@%$configure_input%g -s%@srcdir@%$srcdir%g -s%@top_srcdir@%$top_srcdir%g -" -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file -fi; done -rm -f conftest.subs - - -echo FOO >stamp-h -exit 0 -EOF -chmod +x $CONFIG_STATUS -rm -fr confdefs* $ac_clean_files -test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 - - - diff --git a/doc/regexp/regexp b/src/modules/regexp/doc/regexp similarity index 67% rename from doc/regexp/regexp rename to src/modules/regexp/doc/regexp index a9c0faf9412ac241a4bababa2edcc5dcd4effe8d..b7358e616d66fdccc1ae4354f73a8d14715dafa1 100644 --- a/doc/regexp/regexp +++ b/src/modules/regexp/doc/regexp @@ -2,32 +2,34 @@ NAME /precompiled/regexp - regexp handling module DESCRIPTION - /precompiled/regexp is a precompiled LPC program that interfaces a + /precompiled/regexp is a precompiled Pike program that interfaces a regexp package written in C. It contains a few simple functions to handle regexps. A short description of regexp follows: - . Matches any character - [abc] Matches a, b or c - [a-z] Matches any character a to z inclusive - [^ac] Matches any character except a and c - (x) Matches x (x might be any regexp) - x* Matches zero or more occurances of 'x' (x may be anything) - x|y Matches x or y. (x or y may be any regexp) - xy Matches xy (x and y may be any regexp) - ^ Matches beginning of string (but no characters) - $ Matches end of string (but no characters) - <x> Used with split() to put the string matching x into the - result array. + . Matches any character + [abc] Matches a, b or c + [a-z] Matches any character a to z inclusive + [^ac] Matches any character except a and c + (x) Matches x (x might be any regexp) If used with split, this + also puts the string matching x into the result array. + x* Matches zero or more occurances of 'x' (x may be any regexp) + x+ Matches one or more occurances of 'x' (x may be any regexp) + x|y Matches x or y. (x or y may be any regexp) + xy Matches xy (x and y may be any regexp) + ^ Matches beginning of string (but no characters) + $ Matches end of string (but no characters) + \< matches the beginning of a word (but no characters) + \> matches the end of a word (but no characters) Note that \ can be used to quote these characters in which case they match themselves, nothing else. Also note that when quoting - these something in uLPC you need two \ because uLPC also uses + these something in Pike you need two \ because Pike also uses this character for quoting. For more information about regexps, refer to your unix manuals such as sed or ed. - Descriptions of all functions in /precompiled/file follows: + Descriptions of all functions in /precompiled/regexp follows: ============================================================================ NAME @@ -76,7 +78,7 @@ SYNTAX DESCRIPTION Works as regexp->match, but returns an array of the strings that - matched the subregexps. Subregexps are those contained in < > in + matched the subregexps. Subregexps are those contained in ( ) in the regexp. Subregexps that were not matched will contain zero. If the total regexp didn't match, zero is returned. diff --git a/src/modules/regexp/glue.c b/src/modules/regexp/glue.c index f378f797ba0cead42ef23d9bf942d8e4e668c2b3..72f6ae956df43cbc613be5f815b9cc90bd430264 100644 --- a/src/modules/regexp/glue.c +++ b/src/modules/regexp/glue.c @@ -1,6 +1,6 @@ /*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ #include "global.h" @@ -58,7 +58,7 @@ static void regexp_match(INT32 args) static void regexp_split(INT32 args) { - struct lpc_string *s; + struct pike_string *s; struct regexp *r; if(!args) error("Too few arguments to regexp->split()\n"); @@ -84,7 +84,7 @@ static void regexp_split(INT32 args) } } if(j<i-1) pop_n_elems(i-j-1); - push_array(aggregate_array(j,T_STRING)); + push_array(aggregate_array(j)); free_string(s); }else{ pop_n_elems(args); @@ -92,12 +92,12 @@ static void regexp_split(INT32 args) } } -static void init_regexp_glue(char *foo, struct object *o) +static void init_regexp_glue(struct object *o) { THIS->regexp=0; } -static void exit_regexp_glue(char *foo, struct object *o) +static void exit_regexp_glue(struct object *o) { do_free(); } diff --git a/src/modules/regexp/regexp.c b/src/modules/regexp/regexp.c index 49b3b6bda69c9574428b2479233db5fd6e661c58..6c496acdffdfd12f5bd7fc6b993cda00693ed6b9 100644 --- a/src/modules/regexp/regexp.c +++ b/src/modules/regexp/regexp.c @@ -40,6 +40,10 @@ * maximum number of bytes that can be written to the memory region * pointed to by dest * + * Also altered by Fredrik Hubinette to handle the + operator and + * eight-bit chars. Mars 22 1996 + * + * * Beware that some of this code is subtly aware of the way operator * precedence is structured in regular expressions. Serious changes in * regular-expression syntax might require a total rethink. @@ -164,11 +168,12 @@ * Utility definitions. */ -#define regerror(X) error(X); +#define regerror(X) error("Regexp: %s\n",X); #define SPECIAL 0x100 #define LBRAC ('('|SPECIAL) #define RBRAC (')'|SPECIAL) #define ASTERIX ('*'|SPECIAL) +#define PLUS ('+'|SPECIAL) #define OR_OP ('|'|SPECIAL) #define DOLLAR ('$'|SPECIAL) #define DOT ('.'|SPECIAL) @@ -178,8 +183,8 @@ #define LSHBRAC ('<'|SPECIAL) #define RSHBRAC ('>'|SPECIAL) #define FAIL(m) { regerror(m); return(NULL); } -#define ISMULT(c) ((c) == ASTERIX) -#define META "^$.[()|*\\" +#define ISMULT(c) ((c) == ASTERIX || (c)==PLUS) +#define META "^$.[()|*+\\" #ifndef CHARBITS #define CHARBITS 0xff #define UCHARAT(p) ((int)*(unsigned char *)(p)) @@ -238,17 +243,17 @@ STATIC void regoptail(); * of the structure of the compiled regexp. */ regexp *regcomp(exp,excompat) -char *exp; +unsigned char *exp; int excompat; /* \( \) operators like in unix ex */ { register regexp *r; - register char *scan; + register unsigned char *scan; register char *longest; register int len; int flags; short *exp2,*dest,c; - if (exp == (char *)NULL) + if (exp == (unsigned char *)NULL) FAIL("NULL argument"); exp2=(short*)xalloc( (strlen(exp)+1) * (sizeof(short[8])/sizeof(char[8])) ); @@ -260,6 +265,7 @@ int excompat; /* \( \) operators like in unix ex */ break; case '.': case '*': + case '+': case '|': case '$': case '^': @@ -477,41 +483,60 @@ int *flagp; static char *regpiece(flagp) int *flagp; { - register char *ret; - register short op; - /* register char *nxt; */ - int flags; - - ret = regatom(&flags); - if (ret == (char *)NULL) - return ((char *)NULL); - - op = *regparse; - if (!ISMULT(op)) { - *flagp = flags; - return (ret); + register char *ret; + register short op; + /* register char *nxt; */ + int flags; + + ret = regatom(&flags); + if (ret == (char *)NULL) + return ((char *)NULL); + + op = *regparse; + if (!ISMULT(op)) { + *flagp = flags; + return (ret); + } + if (!(flags & HASWIDTH)) + FAIL("* or + operand could be empty"); + *flagp = (WORST | SPSTART); + + if(op == ASTERIX) + { + if (flags & SIMPLE) + { + reginsert(STAR, ret); } - if (!(flags & HASWIDTH)) - FAIL("* operand could be empty"); - *flagp = (WORST | SPSTART); - - if (op == ASTERIX && (flags & SIMPLE)) - reginsert(STAR, ret); - else if (op == ASTERIX) { - /* Emit x* as (x&|), where & means "self". */ - reginsert(BRANCH, ret); /* Either x */ - regoptail(ret, regnode(BACK)); /* and loop */ - regoptail(ret, ret); /* back */ - regtail(ret, regnode(BRANCH)); /* or */ - regtail(ret, regnode(NOTHING)); /* null. */ + else + { + /* Emit x* as (x&|), where & means "self". */ + reginsert(BRANCH, ret); /* Either x */ + regoptail(ret, regnode(BACK)); /* and loop */ + regoptail(ret, ret); /* back */ + regtail(ret, regnode(BRANCH)); /* or */ + regtail(ret, regnode(NOTHING)); /* null. */ } - regparse++; - if (ISMULT(*regparse)) - FAIL("nested *"); - - return (ret); + } + else if(op == PLUS) + { + /* Emit a+ as (a&) where & means "self" /Fredrik Hubinette */ + char *tmp; + tmp=regnode(BACK); + reginsert(BRANCH, tmp); + regtail(ret, tmp); + regoptail(tmp, ret); + regtail(ret, regnode(BRANCH)); + regtail(ret, regnode(NOTHING)); + } + + regparse++; + if (ISMULT(*regparse)) + FAIL("nested * or +"); + + return (ret); } + /* - regatom - the lowest level * @@ -601,9 +626,9 @@ int *flagp; for (len=0; regparse[len] && !(regparse[len]&SPECIAL) && regparse[len] != RSQBRAC; len++) ; if (len <= 0) - { - FAIL("internal disaster"); - } + { + FAIL("internal disaster"); + } ender = *(regparse + len); if (len > 1 && ISMULT(ender)) len--; /* Back off clear of * operand. */ diff --git a/src/modules/regexp/regexp.h b/src/modules/regexp/regexp.h index 0e5ae642230495f528a3fb15cb38db0611767997..5fa51439e9d3a849345c4e2039523083d5f85639 100644 --- a/src/modules/regexp/regexp.h +++ b/src/modules/regexp/regexp.h @@ -1,6 +1,6 @@ /*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ #ifndef REGEXP_H diff --git a/src/modules/regexp/stamp-h b/src/modules/regexp/stamp-h deleted file mode 100644 index b7d6715e2df11b9c32b2341423273c6b3ad9ae8a..0000000000000000000000000000000000000000 --- a/src/modules/regexp/stamp-h +++ /dev/null @@ -1 +0,0 @@ -FOO diff --git a/src/modules/spider/Makefile b/src/modules/spider/Makefile deleted file mode 100644 index d2c771c2ecc52adb619cee677e6b67fd1bc18f5d..0000000000000000000000000000000000000000 --- a/src/modules/spider/Makefile +++ /dev/null @@ -1,52 +0,0 @@ -# Generated automatically from Makefile.in by configure. -SRCDIR=. -VPATH=.:./../..:../.. -PREFLAGS=-I. -I$(SRCDIR) -I$(SRCDIR)/../.. -I../.. -CFLAGS=$(PREFLAGS) $(OTHERFLAGS) - -FILES=spider.o discdate.o stardate.o sdebug.o tree.o - -spider.a: $(FILES) - -rm -f spider.a - ar cq spider.a $(FILES) - -ranlib spider.a - -clean: - -rm -f *.o *.a - -depend: - gcc -MM $(PREFLAGS) $(SRCDIR)/*.c | sed 's;"$(SRCDIR)/";;g' | sed 's;\.\./;;g' | sed 's;\./;;g' >$(SRCDIR)/dependencies - cat $(SRCDIR)/Makefile.in.src $(SRCDIR)/dependencies > $(SRCDIR)/Makefile.in - config.status - -discdate.o: discdate.c stralloc.h types.h \ - machine.h global.h config.h debug.h \ - port.h macros.h object.h svalue.h \ - add_efun.h hashtable.h las.h \ - dynamic_buffer.h program.h interpret.h \ - mapping.h array.h builtin_efuns.h spider.h -sdebug.o: sdebug.c stralloc.h types.h \ - machine.h global.h config.h debug.h \ - port.h macros.h object.h svalue.h \ - add_efun.h hashtable.h las.h \ - dynamic_buffer.h program.h interpret.h \ - mapping.h array.h builtin_efuns.h spider.h -spider.o: spider.c machine.h stralloc.h \ - types.h global.h config.h debug.h \ - port.h macros.h object.h svalue.h \ - add_efun.h hashtable.h las.h \ - dynamic_buffer.h program.h interpret.h \ - mapping.h array.h builtin_efuns.h spider.h \ - conf.h -stardate.o: stardate.c stralloc.h types.h \ - machine.h global.h config.h debug.h \ - port.h macros.h object.h svalue.h \ - add_efun.h hashtable.h las.h \ - dynamic_buffer.h program.h interpret.h \ - mapping.h array.h builtin_efuns.h spider.h -tree.o: tree.c machine.h stralloc.h types.h \ - global.h config.h debug.h port.h \ - macros.h object.h svalue.h add_efun.h \ - hashtable.h las.h dynamic_buffer.h \ - program.h interpret.h mapping.h \ - array.h builtin_efuns.h spider.h diff --git a/src/modules/spider/Makefile.in b/src/modules/spider/Makefile.in index d432ac9f545e1ffd052c4f96de44792c97e65a26..cdd899a64e70958284286660c1c85f718f55d768 100644 --- a/src/modules/spider/Makefile.in +++ b/src/modules/spider/Makefile.in @@ -1,61 +1,182 @@ SRCDIR=@srcdir@ VPATH=@srcdir@:@srcdir@/../..:../.. PREFLAGS=-I. -I$(SRCDIR) -I$(SRCDIR)/../.. -I../.. -CFLAGS=$(PREFLAGS) $(OTHERFLAGS) +CFLAGS=$(PREFLAGS) $(OTHERFLAGS) @DEFS@ -FILES=spider.o discdate.o stardate.o sdebug.o tree.o lock.o streamed_parser.o\ - http_parse.o encode_decode.o sharedmem.o +FILES=spider.o discdate.o stardate.o sdebug.o tree.o lock.o sharedmem.o streamed_parser.o encode_decode.o http_parse.o spider.a: $(FILES) -rm -f spider.a ar cq spider.a $(FILES) -@RANLIB@ spider.a - echo >linker_options @LIBS@ clean: - -rm -f *.o *.a spider.h Makefile + -rm -f *.o *.a depend: - gcc -MM $(PREFLAGS) $(SRCDIR)/*.c | sed 's;"$(SRCDIR)/";;g' | sed 's;\.\./;;g' | sed 's;\./;;g' >$(SRCDIR)/dependencies - cat $(SRCDIR)/Makefile.in.src $(SRCDIR)/dependencies > $(SRCDIR)/Makefile.in - config.status + gcc -MM $(PREFLAGS) $(SRCDIR)/*.c | $(FIXDEP) $(SRCDIR) -discdate.o: discdate.c stralloc.h types.h \ - machine.h global.h config.h port.h \ - macros.h object.h svalue.h add_efun.h \ - hashtable.h las.h dynamic_buffer.h program.h \ - interpret.h mapping.h array.h builtin_efuns.h \ - spider.h -lock.o: lock.c stralloc.h types.h machine.h \ - global.h config.h port.h macros.h \ - object.h svalue.h add_efun.h hashtable.h \ - las.h dynamic_buffer.h program.h interpret.h \ - mapping.h array.h builtin_efuns.h -sdebug.o: sdebug.c stralloc.h types.h machine.h \ - global.h config.h port.h macros.h \ - object.h svalue.h add_efun.h hashtable.h \ - las.h dynamic_buffer.h program.h interpret.h \ - mapping.h array.h builtin_efuns.h spider.h -spider.o: spider.c machine.h stralloc.h types.h \ - global.h config.h port.h macros.h \ - object.h svalue.h add_efun.h hashtable.h \ - las.h dynamic_buffer.h program.h interpret.h \ - mapping.h array.h builtin_efuns.h spider.h conf.h \ +# Depencies begin here +discdate.o: discdate.c \ + stralloc.h \ + types.h machine.h \ + global.h \ + config.h \ + port.h \ + macros.h \ + object.h \ + svalue.h \ + constants.h \ + hashtable.h \ + las.h \ + dynamic_buffer.h \ + program.h \ + interpret.h \ + mapping.h \ + array.h \ + builtin_functions.h \ + callback.h +encode_decode.o: encode_decode.c \ + stralloc.h \ + types.h machine.h \ + global.h \ + config.h \ + port.h \ + macros.h \ + object.h \ + svalue.h \ + constants.h \ + hashtable.h \ + las.h \ + dynamic_buffer.h \ + program.h \ + interpret.h \ + mapping.h \ + array.h \ + multiset.h \ + builtin_functions.h \ + callback.h +http_parse.o: http_parse.c \ + stralloc.h \ + types.h machine.h \ + global.h \ + config.h \ + port.h \ + macros.h \ + object.h \ + svalue.h \ + constants.h \ + hashtable.h \ + las.h \ + dynamic_buffer.h \ + program.h \ + interpret.h \ + mapping.h \ + array.h \ + builtin_functions.h \ + callback.h +lock.o: lock.c +sdebug.o: sdebug.c \ + stralloc.h \ + types.h machine.h \ + global.h \ + config.h \ + port.h \ + macros.h \ + object.h \ + svalue.h \ + constants.h \ + hashtable.h \ + las.h \ + dynamic_buffer.h \ + program.h \ + interpret.h \ + mapping.h \ + array.h \ + builtin_functions.h \ + callback.h +shared_mem_mapping.o: \ + shared_mem_mapping.c +sharedmem.o: sharedmem.c \ + sharedmem.h +spider.o: spider.c machine.h \ + stralloc.h \ + types.h \ + global.h \ + config.h \ + port.h \ + macros.h \ + object.h \ + svalue.h \ + constants.h \ + hashtable.h \ + las.h \ + dynamic_buffer.h \ + program.h \ + interpret.h \ + mapping.h \ + array.h \ + builtin_functions.h \ + callback.h \ + lock.h \ + defs.h \ streamed_parser.h -stardate.o: stardate.c stralloc.h types.h \ - machine.h global.h config.h port.h \ - macros.h object.h svalue.h add_efun.h \ - hashtable.h las.h dynamic_buffer.h program.h \ - interpret.h mapping.h array.h builtin_efuns.h \ - spider.h -streamed_parser.o: streamed_parser.c stralloc.h types.h \ - machine.h global.h config.h port.h \ - macros.h object.h svalue.h add_efun.h \ - hashtable.h las.h dynamic_buffer.h program.h \ - interpret.h mapping.h array.h builtin_efuns.h \ +stardate.o: stardate.c \ + stralloc.h \ + types.h machine.h \ + global.h \ + config.h \ + port.h \ + macros.h \ + object.h \ + svalue.h \ + constants.h \ + hashtable.h \ + las.h \ + dynamic_buffer.h \ + program.h \ + interpret.h \ + mapping.h \ + array.h \ + builtin_functions.h \ + callback.h +streamed_parser.o: \ + streamed_parser.c \ + stralloc.h \ + types.h machine.h \ + global.h \ + config.h \ + port.h \ + macros.h \ + object.h \ + svalue.h \ + constants.h \ + hashtable.h \ + las.h \ + dynamic_buffer.h \ + program.h \ + interpret.h \ + mapping.h \ + array.h \ + builtin_functions.h \ + callback.h \ streamed_parser.h -tree.o: tree.c machine.h stralloc.h types.h \ - global.h config.h port.h macros.h \ - object.h svalue.h add_efun.h hashtable.h \ - las.h dynamic_buffer.h program.h interpret.h \ - mapping.h array.h builtin_efuns.h spider.h +tree.o: tree.c machine.h \ + stralloc.h \ + types.h \ + global.h \ + config.h \ + port.h \ + macros.h \ + object.h \ + svalue.h \ + constants.h \ + hashtable.h \ + las.h \ + dynamic_buffer.h \ + program.h \ + interpret.h \ + mapping.h \ + array.h \ + builtin_functions.h \ + callback.h diff --git a/src/modules/spider/Makefile.in.src b/src/modules/spider/Makefile.in.src deleted file mode 100644 index b104e1e2efd492377d26e6a74bba69ec3324ec23..0000000000000000000000000000000000000000 --- a/src/modules/spider/Makefile.in.src +++ /dev/null @@ -1,20 +0,0 @@ -SRCDIR=@srcdir@ -VPATH=@srcdir@:@srcdir@/../..:../.. -PREFLAGS=-I. -I$(SRCDIR) -I$(SRCDIR)/../.. -I../.. -CFLAGS=$(PREFLAGS) $(OTHERFLAGS) - -FILES=spider.o discdate.o stardate.o sdebug.o tree.o - -spider.a: $(FILES) - -rm -f spider.a - ar cq spider.a $(FILES) - -@RANLIB@ spider.a - -clean: - -rm -f *.o *.a - -depend: - gcc -MM $(PREFLAGS) $(SRCDIR)/*.c | sed 's;"$(SRCDIR)/";;g' | sed 's;\.\./;;g' | sed 's;\./;;g' >$(SRCDIR)/dependencies - cat $(SRCDIR)/Makefile.in.src $(SRCDIR)/dependencies > $(SRCDIR)/Makefile.in - config.status - diff --git a/src/modules/spider/Makefile.src b/src/modules/spider/Makefile.src new file mode 100644 index 0000000000000000000000000000000000000000..40ed0d61d1fdfce4c3ee7e3d6c8fe69803d28708 --- /dev/null +++ b/src/modules/spider/Makefile.src @@ -0,0 +1,18 @@ +SRCDIR=@srcdir@ +VPATH=@srcdir@:@srcdir@/../..:../.. +PREFLAGS=-I. -I$(SRCDIR) -I$(SRCDIR)/../.. -I../.. +CFLAGS=$(PREFLAGS) $(OTHERFLAGS) @DEFS@ + +FILES=spider.o discdate.o stardate.o sdebug.o tree.o lock.o sharedmem.o streamed_parser.o encode_decode.o http_parse.o + +spider.a: $(FILES) + -rm -f spider.a + ar cq spider.a $(FILES) + -@RANLIB@ spider.a + +clean: + -rm -f *.o *.a + +depend: + gcc -MM $(PREFLAGS) $(SRCDIR)/*.c | $(FIXDEP) $(SRCDIR) + diff --git a/src/modules/spider/configure b/src/modules/spider/configure index 190a91edf51fc88b9838ed6c9599ec4eb94920fb..b5adc7346e4915d3045a7e737bc8ec918cc23b85 100755 --- a/src/modules/spider/configure +++ b/src/modules/spider/configure @@ -513,7 +513,6 @@ fi - # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 @@ -600,7 +599,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:604: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:603: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -674,7 +673,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lthread $LIBS" cat > conftest.$ac_ext <<EOF -#line 678 "configure" +#line 677 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -686,7 +685,7 @@ int t() { mutex_unlock() ; return 0; } EOF -if { (eval echo configure:690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -718,7 +717,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <<EOF -#line 722 "configure" +#line 721 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -730,7 +729,7 @@ int t() { socket() ; return 0; } EOF -if { (eval echo configure:734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -762,7 +761,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <<EOF -#line 766 "configure" +#line 765 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -774,7 +773,7 @@ int t() { gethostbyname() ; return 0; } EOF -if { (eval echo configure:778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -808,7 +807,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpthread $LIBS" cat > conftest.$ac_ext <<EOF -#line 812 "configure" +#line 811 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -820,7 +819,7 @@ int t() { pthread_mutex_unlock() ; return 0; } EOF -if { (eval echo configure:824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -861,13 +860,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext <<EOF -#line 865 "configure" +#line 864 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:871: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:870: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -876,13 +875,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext <<EOF -#line 880 "configure" +#line 879 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:886: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:885: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -904,7 +903,8 @@ echo "$ac_t""$CPP" 1>&6 for ac_hdr in syslog.h sys/syslog.h arpa/inet.h sys/socketvar.h \ netinet/in.h sys/mman.h sys/utsname.h netdb.h sys/socket.h pwd.h\ - shadow.h thread.h sync.h sys/sockio.h sys/conf.h stropts.h + shadow.h thread.h sync.h sys/sockio.h sys/conf.h stropts.h\ + sys/uio.h linux/mman.h do ac_safe=`echo "$ac_hdr" | tr './\055' '___'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 @@ -942,19 +942,17 @@ fi done -for ac_func in syslog perror strerror getppid getpgrp getuid getgid \ - gethostname geteuid getegid fchroot strdup seteuid setegid setresuid \ - setresgid uname gethostbyname gethostbyaddr alarm\ - getpwent setpwent endpwent getpwuid getpwnam \ - getspent setspent endspent getspnam \ - initgroups mutex_unlock mmap sendmsg +for ac_func in syslog perror strerror getppid getpgrp strdup\ + gethostname geteuid fchroot seteuid setresuid \ + uname gethostbyname getpwnam getspnam initgroups \ + mutex_unlock mmap sendmsg do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 958 "configure" +#line 956 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -978,7 +976,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1010,12 +1008,12 @@ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1014 "configure" +#line 1012 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1019: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1017: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1046,7 +1044,7 @@ if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1050 "configure" +#line 1048 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -1070,7 +1068,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:1074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:1072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1098,12 +1096,12 @@ fi echo $ac_n "checking how to find timezone""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'lpc_cv_timezone'+set}'`\" = set"; then +if eval "test \"`echo '$''{'pike_cv_timezone'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1107 "configure" +#line 1105 "configure" #include "confdefs.h" #include <time.h> @@ -1120,13 +1118,13 @@ int t() { ; return 0; } EOF -if { (eval echo configure:1124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:1122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* - lpc_cv_timezone='localtime' + pike_cv_timezone='localtime' else rm -rf conftest* - lpc_cv_timezone='int' + pike_cv_timezone='int' fi rm -f conftest* @@ -1134,7 +1132,7 @@ rm -f conftest* fi -if test "$lpc_cv_timezone" = int; then +if test "$pike_cv_timezone" = int; then cat >> confdefs.h <<\EOF #define HAVE_INT_TIMEZONE 1 EOF @@ -1193,7 +1191,19 @@ fi trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 -DEFS=-DHAVE_CONFIG_H +# Transform confdefs.h into DEFS. +# Protect against shell expansion while executing Makefile rules. +# Protect against Makefile macro expansion. +cat > conftest.defs <<\EOF +s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g +s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g +s%\[%\\&%g +s%\]%\\&%g +s%\$%$$%g +EOF +DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '` +rm -f conftest.defs + # Without the "./", some shells look in PATH for config.status. : ${CONFIG_STATUS=./config.status} @@ -1230,7 +1240,7 @@ done ac_given_srcdir=$srcdir -trap 'rm -fr `echo "Makefile spider.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 +trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 EOF cat >> $CONFIG_STATUS <<EOF @@ -1319,108 +1329,6 @@ s%@top_srcdir@%$top_srcdir%g fi; done rm -f conftest.subs -# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where -# NAME is the cpp macro being defined and VALUE is the value it is being given. -# -# ac_d sets the value in "#define NAME VALUE" lines. -ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' -ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' -ac_dC='\3' -ac_dD='%g' -# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". -ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_uB='\([ ]\)%\1#\2define\3' -ac_uC=' ' -ac_uD='\4%g' -# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". -ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_eB='$%\1#\2define\3' -ac_eC=' ' -ac_eD='%g' - -CONFIG_HEADERS=${CONFIG_HEADERS-"spider.h"} -for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then - # Support "outfile[:infile]", defaulting infile="outfile.in". - case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.in" ;; - esac - - echo creating $ac_file - - rm -f conftest.frag conftest.in conftest.out - cp $ac_given_srcdir/$ac_file_in conftest.in - -EOF - -# Transform confdefs.h into a sed script conftest.vals that substitutes -# the proper values into config.h.in to produce config.h. And first: -# Protect against being on the right side of a sed subst in config.status. -# Protect against being in an unquoted here document in config.status. -rm -f conftest.vals -cat > conftest.hdr <<\EOF -s/[\\&%]/\\&/g -s%[\\$`]%\\&%g -s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp -s%ac_d%ac_u%gp -s%ac_u%ac_e%gp -EOF -sed -n -f conftest.hdr confdefs.h > conftest.vals -rm -f conftest.hdr - -# This sed command replaces #undef with comments. This is necessary, for -# example, in the case of _POSIX_SOURCE, which is predefined and required -# on some systems where configure will not decide to define it. -cat >> conftest.vals <<\EOF -s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% -EOF - -# Break up conftest.vals because some shells have a limit on -# the size of here documents, and old seds have small limits too. -# Maximum number of lines to put in a single here document. -ac_max_here_lines=12 - -rm -f conftest.tail -while : -do - ac_lines=`grep -c . conftest.vals` - # grep -c gives empty output for an empty file on some AIX systems. - if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi - # Write a limited-size here document to conftest.frag. - echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS - sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS - echo 'CEOF - sed -f conftest.frag conftest.in > conftest.out - rm -f conftest.in - mv conftest.out conftest.in -' >> $CONFIG_STATUS - sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail - rm -f conftest.vals - mv conftest.tail conftest.vals -done -rm -f conftest.vals - -cat >> $CONFIG_STATUS <<\EOF - rm -f conftest.frag conftest.h - echo "/* $ac_file. Generated automatically by configure. */" > conftest.h - cat conftest.in >> conftest.h - rm -f conftest.in - if cmp -s $ac_file conftest.h 2>/dev/null; then - echo "$ac_file is unchanged" - rm -f conftest.h - else - # Remove last slash and all that follows it. Not all systems have dirname. - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" - fi - rm -f $ac_file - mv conftest.h $ac_file - fi -fi; done - echo FOO >stamp-h exit 0 diff --git a/src/modules/spider/configure.in b/src/modules/spider/configure.in index 0cfdbb6ec02daa6de13bc1f2608296894bbdd5f1..387e769af891595d700e26f784c240d55cd531e6 100644 --- a/src/modules/spider/configure.in +++ b/src/modules/spider/configure.in @@ -1,5 +1,4 @@ AC_INIT(spider.c) -AC_CONFIG_HEADER(spider.h) AC_PROG_CC AC_PROG_RANLIB @@ -14,14 +13,13 @@ fi AC_HAVE_HEADERS(syslog.h sys/syslog.h arpa/inet.h sys/socketvar.h \ netinet/in.h sys/mman.h sys/utsname.h netdb.h sys/socket.h pwd.h\ - shadow.h thread.h sync.h sys/sockio.h sys/conf.h stropts.h) + shadow.h thread.h sync.h sys/sockio.h sys/conf.h stropts.h\ + sys/uio.h linux/mman.h) -AC_HAVE_FUNCS(syslog perror strerror getppid getpgrp getuid getgid \ - gethostname geteuid getegid fchroot strdup seteuid setegid setresuid \ - setresgid uname gethostbyname gethostbyaddr alarm\ - getpwent setpwent endpwent getpwuid getpwnam \ - getspent setspent endspent getspnam \ - initgroups mutex_unlock mmap sendmsg) +AC_HAVE_FUNCS(syslog perror strerror getppid getpgrp strdup\ + gethostname geteuid fchroot seteuid setresuid \ + uname gethostbyname getpwnam getspnam initgroups \ + mutex_unlock mmap sendmsg) if test x$ac_cv_lib_thread_mutex_inlock = xno ; then AC_HAVE_HEADERS( pthread.h ) @@ -32,7 +30,7 @@ AC_SUBST(RANLIB) AC_MSG_CHECKING(how to find timezone) -AC_CACHE_VAL(lpc_cv_timezone, +AC_CACHE_VAL(pike_cv_timezone, [ AC_TRY_LINK([ #include <time.h> @@ -44,12 +42,12 @@ AC_TRY_LINK([ _tz = g->tm_gmtoff; ], - lpc_cv_timezone='localtime' + pike_cv_timezone='localtime' , - lpc_cv_timezone='int' + pike_cv_timezone='int' )]) -if test "$lpc_cv_timezone" = int; then +if test "$pike_cv_timezone" = int; then AC_DEFINE(HAVE_INT_TIMEZONE) AC_MSG_RESULT([int]); else diff --git a/src/modules/spider/conf.h b/src/modules/spider/defs.h similarity index 100% rename from src/modules/spider/conf.h rename to src/modules/spider/defs.h diff --git a/src/modules/spider/dependencies b/src/modules/spider/dependencies new file mode 100644 index 0000000000000000000000000000000000000000..160e4ee295d1eea34e33d0a989c2f06575a8c444 --- /dev/null +++ b/src/modules/spider/dependencies @@ -0,0 +1,163 @@ +discdate.o: /home/hubbe/pike/src/modules/spider/discdate.c \ + /home/hubbe/pike/src/modules/spider/stralloc.h \ + /home/hubbe/pike/src/modules/spider/types.h machine.h \ + /home/hubbe/pike/src/modules/spider/global.h \ + /home/hubbe/pike/src/modules/spider/config.h \ + /home/hubbe/pike/src/modules/spider/port.h \ + /home/hubbe/pike/src/modules/spider/macros.h \ + /home/hubbe/pike/src/modules/spider/object.h \ + /home/hubbe/pike/src/modules/spider/svalue.h \ + /home/hubbe/pike/src/modules/spider/constants.h \ + /home/hubbe/pike/src/modules/spider/hashtable.h \ + /home/hubbe/pike/src/modules/spider/las.h \ + /home/hubbe/pike/src/modules/spider/dynamic_buffer.h \ + /home/hubbe/pike/src/modules/spider/program.h \ + /home/hubbe/pike/src/modules/spider/interpret.h \ + /home/hubbe/pike/src/modules/spider/mapping.h \ + /home/hubbe/pike/src/modules/spider/array.h \ + /home/hubbe/pike/src/modules/spider/builtin_functions.h \ + /home/hubbe/pike/src/modules/spider/callback.h +encode_decode.o: /home/hubbe/pike/src/modules/spider/encode_decode.c \ + /home/hubbe/pike/src/modules/spider/stralloc.h \ + /home/hubbe/pike/src/modules/spider/types.h machine.h \ + /home/hubbe/pike/src/modules/spider/global.h \ + /home/hubbe/pike/src/modules/spider/config.h \ + /home/hubbe/pike/src/modules/spider/port.h \ + /home/hubbe/pike/src/modules/spider/macros.h \ + /home/hubbe/pike/src/modules/spider/object.h \ + /home/hubbe/pike/src/modules/spider/svalue.h \ + /home/hubbe/pike/src/modules/spider/constants.h \ + /home/hubbe/pike/src/modules/spider/hashtable.h \ + /home/hubbe/pike/src/modules/spider/las.h \ + /home/hubbe/pike/src/modules/spider/dynamic_buffer.h \ + /home/hubbe/pike/src/modules/spider/program.h \ + /home/hubbe/pike/src/modules/spider/interpret.h \ + /home/hubbe/pike/src/modules/spider/mapping.h \ + /home/hubbe/pike/src/modules/spider/array.h \ + /home/hubbe/pike/src/modules/spider/multiset.h \ + /home/hubbe/pike/src/modules/spider/builtin_functions.h \ + /home/hubbe/pike/src/modules/spider/callback.h +http_parse.o: /home/hubbe/pike/src/modules/spider/http_parse.c \ + /home/hubbe/pike/src/modules/spider/stralloc.h \ + /home/hubbe/pike/src/modules/spider/types.h machine.h \ + /home/hubbe/pike/src/modules/spider/global.h \ + /home/hubbe/pike/src/modules/spider/config.h \ + /home/hubbe/pike/src/modules/spider/port.h \ + /home/hubbe/pike/src/modules/spider/macros.h \ + /home/hubbe/pike/src/modules/spider/object.h \ + /home/hubbe/pike/src/modules/spider/svalue.h \ + /home/hubbe/pike/src/modules/spider/constants.h \ + /home/hubbe/pike/src/modules/spider/hashtable.h \ + /home/hubbe/pike/src/modules/spider/las.h \ + /home/hubbe/pike/src/modules/spider/dynamic_buffer.h \ + /home/hubbe/pike/src/modules/spider/program.h \ + /home/hubbe/pike/src/modules/spider/interpret.h \ + /home/hubbe/pike/src/modules/spider/mapping.h \ + /home/hubbe/pike/src/modules/spider/array.h \ + /home/hubbe/pike/src/modules/spider/builtin_functions.h \ + /home/hubbe/pike/src/modules/spider/callback.h +lock.o: /home/hubbe/pike/src/modules/spider/lock.c +sdebug.o: /home/hubbe/pike/src/modules/spider/sdebug.c \ + /home/hubbe/pike/src/modules/spider/stralloc.h \ + /home/hubbe/pike/src/modules/spider/types.h machine.h \ + /home/hubbe/pike/src/modules/spider/global.h \ + /home/hubbe/pike/src/modules/spider/config.h \ + /home/hubbe/pike/src/modules/spider/port.h \ + /home/hubbe/pike/src/modules/spider/macros.h \ + /home/hubbe/pike/src/modules/spider/object.h \ + /home/hubbe/pike/src/modules/spider/svalue.h \ + /home/hubbe/pike/src/modules/spider/constants.h \ + /home/hubbe/pike/src/modules/spider/hashtable.h \ + /home/hubbe/pike/src/modules/spider/las.h \ + /home/hubbe/pike/src/modules/spider/dynamic_buffer.h \ + /home/hubbe/pike/src/modules/spider/program.h \ + /home/hubbe/pike/src/modules/spider/interpret.h \ + /home/hubbe/pike/src/modules/spider/mapping.h \ + /home/hubbe/pike/src/modules/spider/array.h \ + /home/hubbe/pike/src/modules/spider/builtin_functions.h \ + /home/hubbe/pike/src/modules/spider/callback.h +shared_mem_mapping.o: \ + /home/hubbe/pike/src/modules/spider/shared_mem_mapping.c +sharedmem.o: /home/hubbe/pike/src/modules/spider/sharedmem.c \ + /home/hubbe/pike/src/modules/spider/sharedmem.h +spider.o: /home/hubbe/pike/src/modules/spider/spider.c machine.h \ + /home/hubbe/pike/src/modules/spider/stralloc.h \ + /home/hubbe/pike/src/modules/spider/types.h \ + /home/hubbe/pike/src/modules/spider/global.h \ + /home/hubbe/pike/src/modules/spider/config.h \ + /home/hubbe/pike/src/modules/spider/port.h \ + /home/hubbe/pike/src/modules/spider/macros.h \ + /home/hubbe/pike/src/modules/spider/object.h \ + /home/hubbe/pike/src/modules/spider/svalue.h \ + /home/hubbe/pike/src/modules/spider/constants.h \ + /home/hubbe/pike/src/modules/spider/hashtable.h \ + /home/hubbe/pike/src/modules/spider/las.h \ + /home/hubbe/pike/src/modules/spider/dynamic_buffer.h \ + /home/hubbe/pike/src/modules/spider/program.h \ + /home/hubbe/pike/src/modules/spider/interpret.h \ + /home/hubbe/pike/src/modules/spider/mapping.h \ + /home/hubbe/pike/src/modules/spider/array.h \ + /home/hubbe/pike/src/modules/spider/builtin_functions.h \ + /home/hubbe/pike/src/modules/spider/callback.h \ + /home/hubbe/pike/src/modules/spider/lock.h \ + /home/hubbe/pike/src/modules/spider/defs.h \ + /home/hubbe/pike/src/modules/spider/streamed_parser.h +stardate.o: /home/hubbe/pike/src/modules/spider/stardate.c \ + /home/hubbe/pike/src/modules/spider/stralloc.h \ + /home/hubbe/pike/src/modules/spider/types.h machine.h \ + /home/hubbe/pike/src/modules/spider/global.h \ + /home/hubbe/pike/src/modules/spider/config.h \ + /home/hubbe/pike/src/modules/spider/port.h \ + /home/hubbe/pike/src/modules/spider/macros.h \ + /home/hubbe/pike/src/modules/spider/object.h \ + /home/hubbe/pike/src/modules/spider/svalue.h \ + /home/hubbe/pike/src/modules/spider/constants.h \ + /home/hubbe/pike/src/modules/spider/hashtable.h \ + /home/hubbe/pike/src/modules/spider/las.h \ + /home/hubbe/pike/src/modules/spider/dynamic_buffer.h \ + /home/hubbe/pike/src/modules/spider/program.h \ + /home/hubbe/pike/src/modules/spider/interpret.h \ + /home/hubbe/pike/src/modules/spider/mapping.h \ + /home/hubbe/pike/src/modules/spider/array.h \ + /home/hubbe/pike/src/modules/spider/builtin_functions.h \ + /home/hubbe/pike/src/modules/spider/callback.h +streamed_parser.o: \ + /home/hubbe/pike/src/modules/spider/streamed_parser.c \ + /home/hubbe/pike/src/modules/spider/stralloc.h \ + /home/hubbe/pike/src/modules/spider/types.h machine.h \ + /home/hubbe/pike/src/modules/spider/global.h \ + /home/hubbe/pike/src/modules/spider/config.h \ + /home/hubbe/pike/src/modules/spider/port.h \ + /home/hubbe/pike/src/modules/spider/macros.h \ + /home/hubbe/pike/src/modules/spider/object.h \ + /home/hubbe/pike/src/modules/spider/svalue.h \ + /home/hubbe/pike/src/modules/spider/constants.h \ + /home/hubbe/pike/src/modules/spider/hashtable.h \ + /home/hubbe/pike/src/modules/spider/las.h \ + /home/hubbe/pike/src/modules/spider/dynamic_buffer.h \ + /home/hubbe/pike/src/modules/spider/program.h \ + /home/hubbe/pike/src/modules/spider/interpret.h \ + /home/hubbe/pike/src/modules/spider/mapping.h \ + /home/hubbe/pike/src/modules/spider/array.h \ + /home/hubbe/pike/src/modules/spider/builtin_functions.h \ + /home/hubbe/pike/src/modules/spider/callback.h \ + /home/hubbe/pike/src/modules/spider/streamed_parser.h +tree.o: /home/hubbe/pike/src/modules/spider/tree.c machine.h \ + /home/hubbe/pike/src/modules/spider/stralloc.h \ + /home/hubbe/pike/src/modules/spider/types.h \ + /home/hubbe/pike/src/modules/spider/global.h \ + /home/hubbe/pike/src/modules/spider/config.h \ + /home/hubbe/pike/src/modules/spider/port.h \ + /home/hubbe/pike/src/modules/spider/macros.h \ + /home/hubbe/pike/src/modules/spider/object.h \ + /home/hubbe/pike/src/modules/spider/svalue.h \ + /home/hubbe/pike/src/modules/spider/constants.h \ + /home/hubbe/pike/src/modules/spider/hashtable.h \ + /home/hubbe/pike/src/modules/spider/las.h \ + /home/hubbe/pike/src/modules/spider/dynamic_buffer.h \ + /home/hubbe/pike/src/modules/spider/program.h \ + /home/hubbe/pike/src/modules/spider/interpret.h \ + /home/hubbe/pike/src/modules/spider/mapping.h \ + /home/hubbe/pike/src/modules/spider/array.h \ + /home/hubbe/pike/src/modules/spider/builtin_functions.h \ + /home/hubbe/pike/src/modules/spider/callback.h diff --git a/src/modules/spider/discdate.c b/src/modules/spider/discdate.c index fb4e67ed7029a0b40d3af0b7a9ba7ff6cac10059..593f81dbf4db24dba0f4c8090aa8cdc6310ab8fe 100644 --- a/src/modules/spider/discdate.c +++ b/src/modules/spider/discdate.c @@ -13,13 +13,12 @@ #include "types.h" #include "macros.h" #include "object.h" -#include "add_efun.h" +#include "constants.h" #include "interpret.h" #include "svalue.h" #include "mapping.h" #include "array.h" -#include "builtin_efuns.h" -#include "spider.h" +#include "builtin_functions.h" #include <time.h> #include <string.h> #include <stdio.h> diff --git a/src/modules/spider/encode_decode.c b/src/modules/spider/encode_decode.c index 3536893e3941450f03650d0db157bd6ac1203b9e..3bba91534546d65cdd62d60bb59c2cccb0e04130 100644 --- a/src/modules/spider/encode_decode.c +++ b/src/modules/spider/encode_decode.c @@ -3,16 +3,20 @@ #include "types.h" #include "macros.h" #include "object.h" -#include "add_efun.h" +#include "constants.h" #include "interpret.h" #include "svalue.h" #include "mapping.h" #include "array.h" -#include "list.h" -#include "builtin_efuns.h" +#include "multiset.h" +#include "builtin_functions.h" #include "dynamic_buffer.h" -#include "spider.h" +#ifdef _AIX +#include <net/nh.h> +#endif + + #define strcat(buff, s, l) low_my_binary_strcat((s), (l), (buff)) #define addchar(buff, t) low_my_putchar((t),(buff)) @@ -91,8 +95,8 @@ static void rec_save_value(struct svalue *val, dynamic_buffer *buff, { case T_ARRAY: add_int_to_buffer(buff, val->u.array->size); - for(i=0; i<val->u.array->size; i++) - rec_save_value(ITEM(val->u.array)+i, buff, p); + for(i=0; i<val->u.array->size; i++) + rec_save_value(ITEM(val->u.array)+i, buff, p); break; case T_MAPPING: @@ -111,10 +115,10 @@ static void rec_save_value(struct svalue *val, dynamic_buffer *buff, pop_n_elems(2); break; - case T_LIST: - add_int_to_buffer(buff, val->u.list->ind->size); - for(i=0; i<val->u.list->ind->size; i++) - rec_save_value(ITEM(val->u.list->ind)+i, buff, p); + case T_MULTISET: + add_int_to_buffer(buff, val->u.multiset->ind->size); + for(i=0; i<val->u.multiset->ind->size; i++) + rec_save_value(ITEM(val->u.multiset->ind)+i, buff, p); break; case T_OBJECT: @@ -281,11 +285,11 @@ static void rec_restore_value(char **v, INT32 *l) f_aggregate(t); return; - case T_LIST: + case T_MULTISET: t = extract_int(v,l); for(i=0;i<t;i++) rec_restore_value(v,l); - f_aggregate_list(t); + f_aggregate_multiset(t); return; case T_MAPPING: @@ -326,7 +330,7 @@ static void rec_restore_value(char **v, INT32 *l) void f_decode_value(INT32 args) { - struct lpc_string *s; + struct pike_string *s; char *v; INT32 l; diff --git a/src/modules/spider/http_parse.c b/src/modules/spider/http_parse.c index 9a284945104a3498a20601bdf97375cac6d279a5..b76fb7acc9ee0401e3738007bff826992672930e 100644 --- a/src/modules/spider/http_parse.c +++ b/src/modules/spider/http_parse.c @@ -1,16 +1,14 @@ -#include "spider.h" - #include "stralloc.h" #include "global.h" #include "types.h" #include "macros.h" #include "object.h" -#include "add_efun.h" +#include "constants.h" #include "interpret.h" #include "svalue.h" #include "mapping.h" #include "array.h" -#include "builtin_efuns.h" +#include "builtin_functions.h" #include <errno.h> @@ -23,7 +21,7 @@ struct program *feed_program; struct parsebuffer { struct mapping *so_far; - struct lpc_string *left_in_buffer; + struct pike_string *left_in_buffer; int bpos; /* Temporary */ int data_left; /* Only used when the state is 'DATA' */ enum { INITIAL, HEADERS, DATA } state; @@ -127,6 +125,7 @@ static int to_eol() static void f_feed(INT32 args) { + struct svalue *data; int p=0, t=0; if(args!=1) error("Feed me correctly!\n"); @@ -227,17 +226,17 @@ static void f_feed(INT32 args) { f_aggregate_mapping(p*2); push_text("headers"); - if((t=set_lookup(this->so_far->ind, sp-1)) > -1) + if(data=low_mapping_lookup(this->so_far, sp-1)) { pop_stack(); - push_mapping(this->so_far->val->item[t].u.mapping); - sp[-1].u.mapping->refs++; + push_svalue(data); f_add(2); push_text("headers"); } /* MAPPING "headers" */ mapping_insert(this->so_far, sp-1, sp-2); - pop_stack(); sp--; + pop_stack(); + sp--; } push_string(make_shared_binary_string(this->left_in_buffer->str+this->bpos, this->left_in_buffer->len-this->bpos)); @@ -255,15 +254,15 @@ static void f_feed(INT32 args) } push_text("headers"); - if((t=set_lookup(this->so_far->ind, sp-1)) > -1) + if(data=low_mapping_lookup(this->so_far, sp-1)) { struct mapping *m; pop_stack(); push_text("content-length"); - m = this->so_far->val->item[t].u.mapping; - if((t=set_lookup(m->ind, sp-1))>-1) + m = data->u.mapping; + if(data=low_mapping_lookup(m, sp-1)) { - this->data_left= atoi((char *)m->val->item[t].u.string->str); + this->data_left = atoi((char *)data->u.string->str); fprintf(stderr, "Found len: %d bytes.\n", this->data_left); } } @@ -288,16 +287,15 @@ static void f_feed(INT32 args) } } -static void init_feeder(char *foo, struct object *o) +static void init_feeder(struct object *o) { struct parsebuffer *p; if(!o->prog) error("Destructed object?\n"); - p = (struct parsebuffer *)foo; - MEMSET(p, 0, sizeof(struct parsebuffer)); + + MEMSET(this, 0, sizeof(struct parsebuffer)); #if 0 - p->so_far = 0; - p->left_in_buffer = 0; - p + this->so_far = 0; + this->left_in_buffer = 0; #endif } diff --git a/src/modules/spider/lock.c b/src/modules/spider/lock.c index 54c9642d5d6bf23e652d2683f0bc129bc261f5bd..049c7f090de80948f32839cd11848bf46bfbacc9 100644 --- a/src/modules/spider/lock.c +++ b/src/modules/spider/lock.c @@ -1,5 +1,3 @@ -#include "spider.h" - #if defined(HAVE_PTHREAD_MUTEX_UNLOCK) || defined(HAVE_MUTEX_UNLOCK) #include <sys/types.h> @@ -21,12 +19,12 @@ #include "types.h" #include "macros.h" #include "object.h" -#include "add_efun.h" +#include "constants.h" #include "interpret.h" #include "svalue.h" #include "mapping.h" #include "array.h" -#include "builtin_efuns.h" +#include "builtin_functions.h" #include <fcntl.h> #include <sys/stat.h> diff --git a/src/modules/spider/sdebug.c b/src/modules/spider/sdebug.c index fca467f7a2b5987d8834b34f9efc4b46c49d4acc..543500ad69a7e0cef55a0228987888f8fb3f4eff 100644 --- a/src/modules/spider/sdebug.c +++ b/src/modules/spider/sdebug.c @@ -3,13 +3,12 @@ #include "types.h" #include "macros.h" #include "object.h" -#include "add_efun.h" +#include "constants.h" #include "interpret.h" #include "svalue.h" #include "mapping.h" #include "array.h" -#include "builtin_efuns.h" -#include "spider.h" +#include "builtin_functions.h" #include "config.h" #include "program.h" diff --git a/src/modules/spider/shared_mem_mapping.c b/src/modules/spider/shared_mem_mapping.c new file mode 100644 index 0000000000000000000000000000000000000000..9f669afe04d08c9e5c0078cb30bfffb43b1401a6 --- /dev/null +++ b/src/modules/spider/shared_mem_mapping.c @@ -0,0 +1,79 @@ +/* Not currently used, If i make one, I will make a _real_ one */ + +#define SHM_HASH_SIZE 255 + +typedefe struct { + char data[4096]; /* Max string len, currently. Sad, but true. */ + int len; +} value_string; + +typedefe struct { + char data[16]; +/* Max string len, currently. Sad, but true. This is due to the method used + * for the sharing of the memory (there is no _real_ shm_free() call, so we + * cannot just free some memory. It could be solved by using the mmap librabry + */ + int len; +} key_string; + + +typedef struct { + enum { STRING, INTEGER } type; + union { + key_string str; + int integer; + } u; +} key_thing; + +typedef struct { + enum { STRING, INTEGER } type; + union { + value_string str; + int integer; + } u; +} value_thing; + +typedef struct +{ + key_thing key; + value_thing value; + thing *next; +} item; + +struct shmmap { + item *item_hash_table[ SHM_HASH_SIZE ]; +}; + + +int shm_hash_thing(thing *what) +{ + int i, res; + switch(what->type) + { + case TYPE_STRING: + for(i=0; i<what->u.str.len; i++) + res += what->u.str.data[i]; + return res & 255; + case TYPE_INTEGER: + return what->u.integer & 255; + } +} + + +struct item *shm_find_index(thing *value) +{ + int i = shm_hash_thing( value ); + item *ths; + + for(;ths;ths=ths->next) + if(ths->type == value->type) + if((value->type == TYPE_INTEGER) + && (ths->u.integer == value->u.integer)) + return ths; + else if((value->type == TYPE_STRING) + && (ths->u.str.len == value->u.str.len) + && !MEMCMP(ths->u.str.data, value->u.str.data, value->u.str.len)) + return ths; + return 0; +} + diff --git a/src/modules/spider/sharedmem.c b/src/modules/spider/sharedmem.c new file mode 100644 index 0000000000000000000000000000000000000000..a1bb15901b12a04c4329b8419d2394d95b47bbc6 --- /dev/null +++ b/src/modules/spider/sharedmem.c @@ -0,0 +1,185 @@ +#include <sys/types.h> + +#ifdef HAVE_THREAD_H +# include <thread.h> +#else +# ifdef HAVE_PTHREAD_H +# include <pthread.h> +# endif +#endif + +#ifdef HAVE_SYS_MMAN_H +# include <sys/mman.h> +#else +#ifdef HAVE_LINUX_MMAN_H +# include <linux/mman.h> +#endif +#endif + +#ifndef MAP_FAILED +#define MAP_FAILED ((void *)-1) + /*is this correct on all systems that lack MAP_FAILED?*/ +#endif + +#include "sharedmem.h" + +#include <sys/stat.h> +#include <fcntl.h> + +#ifdef HAVE_MMAP +#include <unistd.h> + +#undef SHARED_MALLOC_DEBUG + +#ifdef SHARED_MALLOC_DEBUG +/* Force realloc often. */ +# define CHUNK 1<<8 +#else +# define CHUNK 1<<16 +#endif + +static struct shared_memory_chunk { + char *p; + size_t len; + size_t left; + int refs; + struct shared_memory_chunk *next, *prev; +} *shmem_head = NULL; + +static void new_shared_chunk(int len) +{ + int fd; + void *pointer; + char fname[100]; + struct shared_memory_chunk *foo; + +#ifdef SHARED_MALLOC_DEBUG + fprintf(stderr, "new_shared_chunk(%d)\n", len); +#endif + + sprintf(fname, "/tmp/.spinnerlock_%d", (int)getuid()); + unlink(fname); + fd = open(fname, O_RDWR|O_CREAT, 0777); + unlink(fname); + + lseek(fd, len, SEEK_SET); + write(fd, &fd, 2); + lseek(fd, 0, SEEK_SET); + + if(fd == -1) + { + perror("shared_malloc::open"); + error("shared_malloc(): Can't open() /tmp/.spinnerlock.\n"); + } + + pointer = mmap(NULL, len, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); + + if(pointer==MAP_FAILED) + { + perror("shared_malloc::mmap"); + error("shared_malloc(): Can't mmap() /tmp/.spinnerlock.\n"); + } + close(fd); + foo = (void *)calloc(sizeof(struct shared_memory_chunk), 1); + foo->len = len-1; + foo->left = len-1; + foo->next = shmem_head; + if(shmem_head) + shmem_head->prev = foo; + foo->prev = NULL; + foo->p = pointer; + shmem_head = foo; +#ifdef SHARED_MALLOC_DEBUG + fprintf(stderr, "return %p;\n", foo); +#endif +} + +static void free_shared_chunk(struct shared_memory_chunk *which) +{ +#ifdef SHARED_MALLOC_DEBUG + fprintf(stderr, "free_shared_chunk(%p)\n", which); +#endif + if(which->refs) + error("Freeing chunk with refs!\n"); + munmap(which->p, which->len); + if(which->next) + which->next->prev = which->prev; + if(which->prev) + which->prev->next = which->next; + if(which == shmem_head) + shmem_head = which->next; + free(which); +} + + +#ifdef SHARED_MALLOC_DEBUG +static void debug_print_shmem_head() +{ + fprintf(stderr, "shmem_head(%p): len=%x; left=%x; base=%p\n", + shmem_head, shmem_head->len, shmem_head->left, shmem_head->p); +} +#endif + +void *shared_malloc(size_t size) +{ +#ifdef SHARED_MALLOC_DEBUG + fprintf(stderr, "shared_malloc(%d <%d>)\n", size, (size/8+1)*8); +#endif + size = (size/8+1)*8; /* Align. 8 bytes should work on all CPUs. */ + if(size > CHUNK) + new_shared_chunk((size/CHUNK+1)*CHUNK); + + if(!shmem_head || (shmem_head->left < size)) + new_shared_chunk(CHUNK); + + shmem_head->refs++; + shmem_head->left -= size; +#ifdef SHARED_MALLOC_DEBUG + debug_print_shmem_head(); + fprintf(stderr, "return %p;\n", shmem_head->p + shmem_head->len - shmem_head->left); +#endif + return shmem_head->p + shmem_head->len - shmem_head->left - size; +} + +void shared_free(void *pointer) +{ + struct shared_memory_chunk *which = shmem_head; + +#ifdef SHARED_MALLOC_DEBUG + fprintf(stderr, "shared_free(%p)\n", pointer); +#endif + while(which) + { + if(which->p <= pointer && pointer < (which->p + which->len)) + break; + which = which->next; + } + + if(!which) + { + error("shared_free(): Cannot find chunk to free from!\n"); + } + + if(!--which->refs) + free_shared_chunk(which); +} + +#else +/* Should look for shmop as well, probably */ +void *shared_malloc(int size) +{ +#ifdef SHARED_MALLOC_DEBUG + fprintf(stderr, "fake_shared_malloc(%d)\n", size); +#endif + return (void *)malloc(size); /* Incorrect, really, since this is not + * shared _at_all_ */ +} + +void shared_free(void *pointer) +{ +#ifdef SHARED_MALLOC_DEBUG + fprintf(stderr, "fake_shared_free(%p)\n", pointer); +#endif + free(pointer); +} +#endif diff --git a/src/modules/spider/sharedmem.h b/src/modules/spider/sharedmem.h new file mode 100644 index 0000000000000000000000000000000000000000..d97c5ef658855a12637328342922fa0a92049b5f --- /dev/null +++ b/src/modules/spider/sharedmem.h @@ -0,0 +1,3 @@ +void *shared_malloc(size_t size); +void shared_free(void *pointer); + diff --git a/src/modules/spider/spider.c b/src/modules/spider/spider.c index ddb003b37bf3fab638ccad44f15e4bcf3bcf610f..d3ad7422c68bc7b9b93f6762d1859cb229b45195 100644 --- a/src/modules/spider/spider.c +++ b/src/modules/spider/spider.c @@ -11,6 +11,10 @@ #include <time.h> #include <limits.h> +#ifdef HAVE_SYS_UIO_H +#include <sys/uio.h> +#endif + #if HAVE_SYS_TIME_H #include <sys/time.h> #endif @@ -20,18 +24,17 @@ #include "types.h" #include "macros.h" #include "object.h" -#include "add_efun.h" +#include "constants.h" #include "interpret.h" #include "svalue.h" #include "mapping.h" #include "array.h" -#include "builtin_efuns.h" +#include "builtin_functions.h" #include "lock.h" #include <pwd.h> -#include "spider.h" -#include "conf.h" +#include "defs.h" #ifdef HAVE_SYS_CONF_H #include <sys/conf.h> @@ -60,12 +63,13 @@ #ifdef HAVE_NETDB_H #include <netdb.h> #endif + #include <errno.h> #define MAX_PARSE_RECURSE 1024 -void do_html_parse(struct lpc_string *ss, +void do_html_parse(struct pike_string *ss, struct mapping *cont,struct mapping *single, int *strings,int recurse_left, struct array *extra_args); @@ -76,7 +80,7 @@ void f_http_decode_string(INT32 args) { int proc; char *foo,*bar,*end; - struct lpc_string *newstr; + struct pike_string *newstr; if (!args || sp[-args].type != T_STRING) error("Invalid argument to http_decode_string(STRING);\n"); @@ -146,6 +150,7 @@ void f_parse_accessed_database(INT32 args) } + #ifdef I_SENDFD #define HAVE_SEND_FD void f_send_fd(INT32 args) @@ -179,7 +184,9 @@ void f_send_fd(INT32 args) case EWOULDBLOCK: case EINTR: case ENOMEM: +#ifdef ENOSR case ENOSR: +#endif continue; default: @@ -193,6 +200,12 @@ void f_send_fd(INT32 args) } #else +#if 0 + /* + / Shuffle is only compiled on Solaris anyway. It is _not_ easy to fix + / this for _all_ systems (SYSV, BSDI, BSD, Linux all use different +/ styles) +*/ #if HAVE_SENDMSG #define HAVE_SEND_FD void f_send_fd(INT32 args) @@ -249,10 +262,11 @@ void f_send_fd(INT32 args) } #endif #endif +#endif void f_parse_html(INT32 args) { - struct lpc_string *ss; + struct pike_string *ss; struct mapping *cont,*single; int strings; struct array *extra_args; @@ -471,7 +485,7 @@ INLINE int tagsequal(char *s, char *t, int len, char *end) return 1; } -int find_endtag(struct lpc_string *tag, char *s, int len, int *aftertag) +int find_endtag(struct pike_string *tag, char *s, int len, int *aftertag) { int num=1; @@ -503,7 +517,7 @@ int find_endtag(struct lpc_string *tag, char *s, int len, int *aftertag) return j; } -void do_html_parse(struct lpc_string *ss, +void do_html_parse(struct pike_string *ss, struct mapping *cont,struct mapping *single, int *strings,int recurse_left, struct array *extra_args) @@ -511,7 +525,7 @@ void do_html_parse(struct lpc_string *ss, int i,j,k,l,m,len,last; unsigned char *s; struct svalue sval1,sval2; - struct lpc_string *ss2; + struct pike_string *ss2; if (!ss->len) { free_string(ss); @@ -727,64 +741,6 @@ static int does_match(char *s,int len,char *m,int mlen) return 0; } -void f_do_match(INT32 args) -{ - struct lpc_string *match,*str; - struct array *a; - int i; - struct svalue *sval; - - if (args<2|| - sp[1-args].type!=T_STRING|| - (sp[-args].type!=T_STRING && - sp[-args].type!=T_ARRAY)) - error("Illegal arguments to do_match\n"); - - copy_shared_string(match,sp[1-args].u.string); - pop_n_elems(args-1); - - if (sp[-1].type==T_ARRAY) - { - a=sp[-1].u.array; - a->refs++; - pop_stack(); - i=a->size; - if (!i) { push_int(0); return; } - push_array_items(a); - while (i--) - { - match->refs++; - push_string(match); - f_do_match(2); - if (sp[-1].type!=T_INT) - { - sval=sp-1; - sp--; - pop_n_elems(i); - sp[0]=*sval; - sp++; - free_string(match); - return; - } - pop_stack(); - } - push_int(0); - free_string(match); - return; - } - copy_shared_string(str,sp[-1].u.string); - pop_stack(); - - if (does_match(str->str,str->len,match->str,match->len)) - { - push_string(str); - free_string(match); - return; - } - push_int(0); - free_string(str); - free_string(match); -} #if !HAVE_INT_TIMEZONE int _tz; @@ -794,38 +750,6 @@ extern long int timezone; -void f_localtime(INT32 args) -{ - struct tm *tm; - time_t t; - if (args<1|| - sp[-1].type!=T_INT) - error("Illegal argument to localtime"); - t=sp[-1].u.integer; - tm=localtime(&t); - pop_stack(); - - push_string(make_shared_string("sec")); push_int(tm->tm_sec); - push_string(make_shared_string("min")); push_int(tm->tm_min); - push_string(make_shared_string("hour")); push_int(tm->tm_hour); - - push_string(make_shared_string("mday")); push_int(tm->tm_mday); - push_string(make_shared_string("mon")); push_int(tm->tm_mon); - push_string(make_shared_string("year")); push_int(tm->tm_year); - - push_string(make_shared_string("wday")); push_int(tm->tm_wday); - push_string(make_shared_string("yday")); push_int(tm->tm_yday); - push_string(make_shared_string("isdst")); push_int(tm->tm_isdst); - - push_string(make_shared_string("timezone")); -#if !HAVE_INT_TIMEZONE - push_int(_tz); -#else - push_int(timezone); -#endif - f_aggregate_mapping(20); -} - #ifdef HAVE_INITGROUPS void f_initgroups(INT32 args) { @@ -907,9 +831,7 @@ void f_do_seteuid(INT32 args) #endif pop_n_elems(args-1); } -#endif -#if defined(HAVE_SETEGID) || defined(HAVE_SETRESGID) void f_do_setegid(INT32 args) { struct passwd *pw; @@ -926,7 +848,7 @@ void f_do_setegid(INT32 args) } else id = sp[-1].u.integer; -#ifdef HAVE_SETEGID +#ifdef HAVE_SETEUID setegid(id); #else setresgid(-1, id, -1); @@ -1108,23 +1030,6 @@ void f_closelog(INT32 args) } #endif - -#ifdef HAVE_STRERROR -void f_strerror(INT32 args) -{ - char *s; - if(!args) - s=strerror(errno); - else - s=strerror(sp[-args].u.integer); - pop_n_elems(args); - if(s) - push_text(s); - else - push_int(0); -} -#endif - #ifdef HAVE_PERROR void f_real_perror(INT32 args) { @@ -1172,12 +1077,12 @@ void f_fd_info(INT32 args) push_string(make_shared_string(buf)); } -struct lpc_string *fd_marks[MAX_OPEN_FILEDESCRIPTORS]; +struct pike_string *fd_marks[MAX_OPEN_FILEDESCRIPTORS]; void f_mark_fd(INT32 args) { int fd; - struct lpc_string *s; + struct pike_string *s; if (args<1 || sp[-args].type!=T_INT || (args>2 && sp[-args+1].type!=T_STRING)) @@ -1250,16 +1155,11 @@ void f_mark_fd(INT32 args) #define get(X) void f_##X(INT32 args){ pop_n_elems(args); push_int((INT32)X()); } -#ifdef HAVE_GETUID get(getuid) -#endif +get(getgid) + #ifdef HAVE_GETEUID get(geteuid) -#endif -#ifdef HAVE_GETGID -get(getgid) -#endif -#ifdef HAVE_GETEGID get(getegid) #endif get(getpid) @@ -1358,7 +1258,7 @@ void f_gethostname(INT32 args) #endif #endif -#ifdef HAVE_GETHOSTBYADDR +#ifdef HAVE_GETHOSTBYNAME void f_gethostbyaddr(INT32 args) { u_long addr; @@ -1399,9 +1299,6 @@ void f_gethostbyaddr(INT32 args) f_aggregate(sp-old_sp); } -#endif - -#ifdef HAVE_GETHOSTBYNAME void f_gethostbyname(INT32 args) { struct hostent *hp; @@ -1467,16 +1364,12 @@ static void push_pwent(struct passwd *ent) { struct spwd *foo; if((foo = getspnam(ent->pw_name))) - { push_text(foo->sp_pwdp); - } else { + else push_text("x"); - } } else -#endif - { +#endif /* Shadow password support */ push_text(ent->pw_passwd); - } push_int(ent->pw_uid); push_int(ent->pw_gid); push_text(ent->pw_gecos); @@ -1496,9 +1389,7 @@ void f_getpwnam(INT32 args) pop_stack(); push_pwent(foo); } -#endif -#ifdef HAVE_GETPWUID void f_getpwuid(INT32 args) { struct passwd *foo; @@ -1509,25 +1400,21 @@ void f_getpwuid(INT32 args) } #endif -#ifdef HAVE_SETPWENT +#ifdef HAVE_GETPWENT void f_setpwent(INT32 args) { setpwent(); pop_n_elems(args); push_int(0); } -#endif -#ifdef HAVE_ENDPWENT void f_endpwent(INT32 args) { setpwent(); pop_n_elems(args); push_int(0); } -#endif -#ifdef HAVE_GETPWENT void f_getpwent(INT32 args) { struct passwd *foo; @@ -1542,17 +1429,6 @@ void f_getpwent(INT32 args) } #endif -#ifdef HAVE_ALARM -void f_alarm(INT32 args) -{ - int i; - if(!args || sp[-1].type != T_INT || sp[-1].u.integer < 0) - error("Invalid argument to alarm(INT);\n"); - i=sp[-1].u.integer; - push_int(alarm(i)); -} -#endif - void f_fcgi_create_listen_socket(INT32 args) { int fd, true; @@ -1614,26 +1490,16 @@ void init_spider_efuns(void) add_efun("http_decode_string",f_http_decode_string,"function(string:string)", OPT_TRY_OPTIMIZE); -#ifdef HAVE_ALARM - add_efun("alarm", f_alarm, "function(int:int)", OPT_SIDE_EFFECT); -#endif - #ifdef HAVE_GETPWNAM add_efun("getpwnam", f_getpwnam, "function(string:array)", OPT_EXTERNAL_DEPEND); -#endif -#ifdef HAVE_GETPWUID add_efun("getpwuid", f_getpwuid, "function(int:array)", OPT_EXTERNAL_DEPEND); #endif -#ifdef HAVE_GETPWENT +#ifdef HAVE_SETPWENT add_efun("getpwent", f_getpwent, "function(void:array)", OPT_EXTERNAL_DEPEND); -#endif -#ifdef HAVE_ENDPWENT - add_efun("endpwent", f_endpwent, "function(void:int)", OPT_EXTERNAL_DEPEND); -#endif -#ifdef HAVE_SETPWENT add_efun("setpwent", f_setpwent, "function(void:int)", OPT_EXTERNAL_DEPEND); + add_efun("endpwent", f_endpwent, "function(void:int)", OPT_EXTERNAL_DEPEND); #endif @@ -1646,9 +1512,6 @@ void init_spider_efuns(void) #ifdef HAVE_GETHOSTBYNAME add_efun("gethostbyname", f_gethostbyname, "function(string:array)", OPT_TRY_OPTIMIZE); -#endif - -#ifdef HAVE_GETHOSTBYADDR add_efun("gethostbyaddr", f_gethostbyaddr, "function(string:array)", OPT_TRY_OPTIMIZE); #endif @@ -1667,19 +1530,11 @@ void init_spider_efuns(void) add_efun("send_fd", f_send_fd, "function(int,int:int)", OPT_EXTERNAL_DEPEND); #endif -#ifdef HAVE_GETUID add_efun("getuid", f_getuid, "function(:int)", OPT_EXTERNAL_DEPEND); -#endif + add_efun("getgid", f_getgid, "function(:int)", OPT_EXTERNAL_DEPEND); #ifdef HAVE_GETEUID add_efun("geteuid", f_geteuid, "function(:int)", OPT_EXTERNAL_DEPEND); -#endif - -#ifdef HAVE_GETGID - add_efun("getgid", f_getgid, "function(:int)", OPT_EXTERNAL_DEPEND); -#endif - -#ifdef HAVE_GETEGID add_efun("getegid", f_getegid, "function(:int)", OPT_EXTERNAL_DEPEND); #endif @@ -1726,16 +1581,6 @@ void init_spider_efuns(void) "function(string,mapping(string:function(string,mapping(string:string),mixed ...:string)),mapping(string:function(string,mapping(string:string),string,mixed ...:string)),mixed ...:string)", 0); - add_efun("do_match",f_do_match, - "function(string|array(string),string:string)",OPT_TRY_OPTIMIZE); - - add_efun("localtime",f_localtime, - "function(int:mapping(string:int))",OPT_EXTERNAL_DEPEND); - -#ifdef HAVE_STRERROR - add_efun("strerror",f_strerror,"function(int|void:string)",0); -#endif - #ifdef HAVE_PERROR add_efun("real_perror",f_real_perror, "function(:void)",OPT_EXTERNAL_DEPEND); #endif @@ -1760,9 +1605,6 @@ void init_spider_efuns(void) #if defined(HAVE_SETEUID) || defined(HAVE_SETRESUID) add_efun("seteuid", f_do_seteuid, "function(int:void)", 0); -#endif - -#if defined(HAVE_SETEGID) || defined(HAVE_SETRESGID) add_efun("setegid", f_do_setegid, "function(int:void)", 0); #endif diff --git a/src/modules/spider/spider.h b/src/modules/spider/spider.h deleted file mode 100644 index d5b0f95138100f8a96a86ad23cb298482ae1c46f..0000000000000000000000000000000000000000 --- a/src/modules/spider/spider.h +++ /dev/null @@ -1,36 +0,0 @@ -/* spider.h. Generated automatically by configure. */ -#define HAVE_GETPGRP 1 - -#define HAVE_GETPPID 1 - -#define HAVE_GETGID 1 - -#define HAVE_GETEGID 1 - -#define HAVE_GETEUID 1 - -#define HAVE_GETGID 1 - -#define HAVE_GETUID 1 - -#define HAVE_SYSLOG_H 1 - -#define HAVE_SYSLOG 1 - -#define HAVE_INT_TIMEZONE 1 - -#define HAVE_PERROR 1 - -#define HAVE_STRERROR 1 - -#define HAVE_ARPA_INET_H 1 - -#define HAVE_SYS_SOCKETVAR_H 1 - -#define HAVE_NETINET_IN_H 1 - -#define HAVE_FCHROOT 1 - -#define HAVE_SYS_MMAN_H 1 - -#define HAVE_STRDUP 1 \ No newline at end of file diff --git a/src/modules/spider/spider.h.in b/src/modules/spider/spider.h.in index 225496ac21ae30dbc55ca21ab5da53a40b38205c..d0298ff3bdb7ce4e135b919263a29ceb5b0b3ebe 100644 --- a/src/modules/spider/spider.h.in +++ b/src/modules/spider/spider.h.in @@ -25,12 +25,19 @@ #undef HAVE_SYSLOG_H #undef HAVE_ARPA_INET_H #undef HAVE_NETINET_IN_H +#undef HAVE_SYS_UIO_H #undef HAVE_SYS_MMAN_H #undef HAVE_SYS_SOCKETVAR_H #undef HAVE_SYS_SOCKET_H #undef HAVE_NETDB_H #undef HAVE_SYS_UTSNAME_H + +/* Why do it like everyone else when it can be done in a more + interresting way? *sigh* */ +#undef HAVE_LINUX_MMAN_H + + /* Passwd functions */ #undef HAVE_SETPWENT #undef HAVE_ENDPWENT @@ -64,4 +71,4 @@ #undef HAVE_SENDMSG #undef HAVE_SYS_SOCKIO_H #undef HAVE_SYS_CONF_H -#undef HAVE_STROPTS_H \ No newline at end of file +#undef HAVE_STROPTS_H diff --git a/src/modules/spider/stamp-h b/src/modules/spider/stamp-h deleted file mode 100644 index b7d6715e2df11b9c32b2341423273c6b3ad9ae8a..0000000000000000000000000000000000000000 --- a/src/modules/spider/stamp-h +++ /dev/null @@ -1 +0,0 @@ -FOO diff --git a/src/modules/spider/stardate.c b/src/modules/spider/stardate.c index 02d40fc55e0ee315ed111df123e35c33afc2b6d3..032d1a6bf3820ab50034d000632dee83a27561b2 100644 --- a/src/modules/spider/stardate.c +++ b/src/modules/spider/stardate.c @@ -3,13 +3,13 @@ #include "types.h" #include "macros.h" #include "object.h" -#include "add_efun.h" +#include "constants.h" #include "interpret.h" #include "svalue.h" #include "mapping.h" #include "array.h" -#include "builtin_efuns.h" -#include "spider.h" +#include "builtin_functions.h" + #ifdef HAVE_SYS_TIME_H #include <sys/time.h> #endif diff --git a/src/modules/spider/streamed_parser.c b/src/modules/spider/streamed_parser.c index 46bf11eeb3444e2d8014b1b1cac092041aad86dd..ad15ff9c2da79deb72c8331889ac5cf7d04aee3f 100644 --- a/src/modules/spider/streamed_parser.c +++ b/src/modules/spider/streamed_parser.c @@ -3,12 +3,12 @@ #include "types.h" #include "macros.h" #include "object.h" -#include "add_efun.h" +#include "constants.h" #include "interpret.h" #include "svalue.h" #include "mapping.h" #include "array.h" -#include "builtin_efuns.h" +#include "builtin_functions.h" #include "streamed_parser.h" @@ -177,16 +177,18 @@ void streamed_parser_set_data( INT32 args ) static int handle_tag( struct svalue *data_arg ) { - int lookup; + struct svalue *fun; + + push_svalue(data_arg); + if(!(fun = low_mapping_lookup( DATA->start_tags, sp-3 ))) + error("Error in streamed parser.\n"); + + apply_svalue(fun, 3); - assign_svalue_no_free( sp, data_arg ); - sp++; - lookup = set_lookup( DATA->start_tags->ind, sp-3 ); - apply_svalue( ITEM( DATA->start_tags->val ) + lookup, 3 ); if (sp[-1].type == T_STRING) - return 1; - else { + return 1; + } else { pop_stack(); return 0; } @@ -194,12 +196,13 @@ static int handle_tag( struct svalue *data_arg ) static int handle_content_tag( struct svalue *data_arg ) { - int lookup; + struct svalue *fun; + + push_svalue(data_arg); + if(!(fun = low_mapping_lookup( DATA->content_tags, sp-3 ))) + error("Error in streamed parser.\n"); - assign_svalue_no_free( sp, data_arg ); - sp++; - lookup = set_lookup( DATA->content_tags->ind, sp-4 ); - apply_svalue( ITEM( DATA->content_tags->val ) + lookup, 4 ); + apply_svalue(fun, 3); if (sp[-1].type == T_STRING) return 1; else @@ -211,15 +214,18 @@ static int handle_content_tag( struct svalue *data_arg ) static int handle_end_tag( struct svalue *data_arg ) { - int lookup; + struct svalue *fun; - lookup = set_lookup( DATA->start_tags->ind, sp-1 ); + fun = low_mapping_lookup( DATA->start_tags, sp-1); + + /* NB: fun would not be valid if the value popped here is an object, + * fortunately it is not. */ pop_stack(); - assign_svalue_no_free( sp, data_arg ); - sp++; - if (lookup != -1) + + push_svalue(data_arg); + if(fun) { - apply_svalue( ITEM( DATA->start_tags->val ) + lookup, 1 ); + apply_svalue(fun, 1); if (sp[-1].type == T_STRING) return 1; else @@ -335,7 +341,7 @@ void streamed_parser_parse( INT32 args ) ind2 = c-1; push_string( make_shared_binary_string( str + ind, ind2 - ind ) ); f_lower_case( 1 ); - if (list_member( DATA->end_tags, sp-1 )) + if (multiset_member( DATA->end_tags, sp-1 )) { if (handle_end_tag( data_arg )) { @@ -397,14 +403,14 @@ void streamed_parser_parse( INT32 args ) case WS: push_string( make_shared_binary_string( str + ind, c - ind ) ); f_lower_case( 1 ); - if (list_member( DATA->start_tags, sp-1 )) + if (multiset_member( DATA->start_tags, sp-1 )) { f_aggregate_mapping( 0 ); state = TAG_WS; sp_tag_save = sp-1; content_tag = 0; } - else if (list_member( DATA->content_tags, sp-1 )) + else if (multiset_member( DATA->content_tags, sp-1 )) { f_aggregate_mapping( 0 ); state = TAG_WS; @@ -420,7 +426,7 @@ void streamed_parser_parse( INT32 args ) case '>': push_string( make_shared_binary_string( str + ind, c - ind ) ); f_lower_case( 1 ); - if (list_member( DATA->start_tags, sp-1 )) + if (multiset_member( DATA->start_tags, sp-1 )) { f_aggregate_mapping( 0 ); if (handle_tag( data_arg )) @@ -437,7 +443,7 @@ void streamed_parser_parse( INT32 args ) ; #endif } - else if (list_member( DATA->content_tags, sp-1 )) + else if (multiset_member( DATA->content_tags, sp-1 )) { f_aggregate_mapping( 0 ); ind2 = c+1; diff --git a/src/modules/spider/tree.c b/src/modules/spider/tree.c index 7d760a55cfe684495a09b607be13aa590e7b9102..d19027f0d40e53104e01ffb2cb005b336ae0d99e 100644 --- a/src/modules/spider/tree.c +++ b/src/modules/spider/tree.c @@ -4,14 +4,12 @@ #include "types.h" #include "macros.h" #include "object.h" -#include "add_efun.h" +#include "constants.h" #include "interpret.h" #include "svalue.h" #include "mapping.h" #include "array.h" -#include "builtin_efuns.h" - -#include "spider.h" +#include "builtin_functions.h" /* * Root node header diff --git a/src/modules/sprintf/.cvsignore b/src/modules/sprintf/.cvsignore new file mode 100644 index 0000000000000000000000000000000000000000..76e8a85506890a9ad4125ab962e5b80341ffecdc --- /dev/null +++ b/src/modules/sprintf/.cvsignore @@ -0,0 +1,2 @@ +configure +Makefile.in diff --git a/src/modules/sprintf/.gitignore b/src/modules/sprintf/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..1f3e111bcb9a733de582cbc47266cc26dd1ec797 --- /dev/null +++ b/src/modules/sprintf/.gitignore @@ -0,0 +1,2 @@ +/configure +/Makefile.in diff --git a/src/modules/sprintf/Makefile b/src/modules/sprintf/Makefile deleted file mode 100644 index b5be4edf73866d93928440cb02166f03322959f8..0000000000000000000000000000000000000000 --- a/src/modules/sprintf/Makefile +++ /dev/null @@ -1,37 +0,0 @@ -# Generated automatically from Makefile.in by configure. -SRCDIR=. -VPATH=.:./../..:../.. -PREFLAGS=-I$(SRCDIR) -I$(SRCDIR)/../.. -I../.. -CFLAGS=$(PREFLAGS) $(OTHERFLAGS) - -FILES=sprintf.o - -sprintf.a: $(FILES) - -rm -f sprintf.a - ar cq sprintf.a $(FILES) - -ranlib sprintf.a - -clean: - -rm -f *.o *.a - -depend: - gcc -MM $(PREFLAGS) $(SRCDIR)/*.c | $(FIXDEP) $(SRCDIR)/Makefile.in - - -#Dependencies begin here, DO NOT REMOVE THIS LINE!!!! -sprintf.o: sprintf.c \ - global.h machine.h \ - config.h \ - debug.h \ - port.h \ - error.h \ - svalue.h \ - array.h \ - las.h \ - dynamic_buffer.h \ - program.h \ - stralloc.h \ - lpc_types.h \ - add_efun.h \ - hashtable.h \ - interpret.h diff --git a/src/modules/sprintf/Makefile.in b/src/modules/sprintf/Makefile.in deleted file mode 100644 index 5ace6c5549a2de0443099b1cb62997cd78c6f1c0..0000000000000000000000000000000000000000 --- a/src/modules/sprintf/Makefile.in +++ /dev/null @@ -1,36 +0,0 @@ -SRCDIR=@srcdir@ -VPATH=@srcdir@:@srcdir@/../..:../.. -PREFLAGS=-I$(SRCDIR) -I$(SRCDIR)/../.. -I../.. -CFLAGS=$(PREFLAGS) $(OTHERFLAGS) - -FILES=sprintf.o - -sprintf.a: $(FILES) - -rm -f sprintf.a - ar cq sprintf.a $(FILES) - -@RANLIB@ sprintf.a - -clean: - -rm -f *.o *.a - -depend: - gcc -MM $(PREFLAGS) $(SRCDIR)/*.c | $(FIXDEP) $(SRCDIR)/Makefile.in - - -#Dependencies begin here, DO NOT REMOVE THIS LINE!!!! -sprintf.o: sprintf.c \ - global.h machine.h \ - config.h \ - debug.h \ - port.h \ - error.h \ - svalue.h \ - array.h \ - las.h \ - dynamic_buffer.h \ - program.h \ - stralloc.h \ - lpc_types.h \ - add_efun.h \ - hashtable.h \ - interpret.h diff --git a/src/modules/sprintf/Makefile.src b/src/modules/sprintf/Makefile.src new file mode 100644 index 0000000000000000000000000000000000000000..a6a33e732228bf75a025a436b544148ff1480acf --- /dev/null +++ b/src/modules/sprintf/Makefile.src @@ -0,0 +1,17 @@ +SRCDIR=@srcdir@ +VPATH=@srcdir@:@srcdir@/../..:../.. +PREFLAGS=-I$(SRCDIR) -I$(SRCDIR)/../.. -I../.. +CFLAGS=$(PREFLAGS) $(OTHERFLAGS) + +FILES=sprintf.o + +sprintf.a: $(FILES) + -rm -f sprintf.a + ar cq sprintf.a $(FILES) + -@RANLIB@ sprintf.a + +clean: + -rm -f *.o *.a + +depend: + gcc -MM $(PREFLAGS) $(SRCDIR)/*.c | $(FIXDEP) $(SRCDIR) diff --git a/src/modules/sprintf/configure b/src/modules/sprintf/configure deleted file mode 100755 index 41f06d0a61d594202fd828cd04c8d5f78490c36f..0000000000000000000000000000000000000000 --- a/src/modules/sprintf/configure +++ /dev/null @@ -1,819 +0,0 @@ -#! /bin/sh - -# Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.7 -# Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. -# -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. - -# Defaults: -ac_help= -ac_default_prefix=/usr/local -# Any additions from configure.in: - -# Initialize some variables set by options. -# The variables have the same names as the options, with -# dashes changed to underlines. -build=NONE -cache_file=./config.cache -exec_prefix=NONE -host=NONE -no_create= -nonopt=NONE -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -target=NONE -verbose= -x_includes=NONE -x_libraries=NONE -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datadir='${prefix}/share' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -libdir='${exec_prefix}/lib' -includedir='${prefix}/include' -oldincludedir='/usr/include' -infodir='${prefix}/info' -mandir='${prefix}/man' - -# Initialize some other variables. -subdirs= -MFLAGS= MAKEFLAGS= - -ac_prev= -for ac_option -do - - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval "$ac_prev=\$ac_option" - ac_prev= - continue - fi - - case "$ac_option" in - -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; - *) ac_optarg= ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case "$ac_option" in - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir="$ac_optarg" ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build="$ac_optarg" ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file="$ac_optarg" ;; - - -datadir | --datadir | --datadi | --datad | --data | --dat | --da) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ - | --da=*) - datadir="$ac_optarg" ;; - - -disable-* | --disable-*) - ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - eval "enable_${ac_feature}=no" ;; - - -enable-* | --enable-*) - ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; - *) ac_optarg=yes ;; - esac - eval "enable_${ac_feature}='$ac_optarg'" ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix="$ac_optarg" ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he) - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat << EOF -Usage: configure [options] [host] -Options: [defaults in brackets after descriptions] -Configuration: - --cache-file=FILE cache test results in FILE - --help print this message - --no-create do not create output files - --quiet, --silent do not print \`checking...' messages - --version print the version of autoconf that created configure -Directory and file names: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [same as prefix] - --bindir=DIR user executables in DIR [EPREFIX/bin] - --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] - --libexecdir=DIR program executables in DIR [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data in DIR - [PREFIX/share] - --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data in DIR - [PREFIX/com] - --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] - --libdir=DIR object code libraries in DIR [EPREFIX/lib] - --includedir=DIR C header files in DIR [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] - --infodir=DIR info documentation in DIR [PREFIX/info] - --mandir=DIR man documentation in DIR [PREFIX/man] - --srcdir=DIR find the sources in DIR [configure dir or ..] - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM - run sed PROGRAM on installed program names -EOF - cat << EOF -Host type: - --build=BUILD configure for building on BUILD [BUILD=HOST] - --host=HOST configure for HOST [guessed] - --target=TARGET configure for TARGET [TARGET=HOST] -Features and packages: - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --x-includes=DIR X include files are in DIR - --x-libraries=DIR X library files are in DIR -EOF - if test -n "$ac_help"; then - echo "--enable and --with options recognized:$ac_help" - fi - exit 0 ;; - - -host | --host | --hos | --ho) - ac_prev=host ;; - -host=* | --host=* | --hos=* | --ho=*) - host="$ac_optarg" ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir="$ac_optarg" ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir="$ac_optarg" ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir="$ac_optarg" ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir="$ac_optarg" ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst \ - | --locals | --local | --loca | --loc | --lo) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* \ - | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) - localstatedir="$ac_optarg" ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir="$ac_optarg" ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir="$ac_optarg" ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix="$ac_optarg" ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix="$ac_optarg" ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix="$ac_optarg" ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name="$ac_optarg" ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir="$ac_optarg" ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir="$ac_optarg" ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site="$ac_optarg" ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir="$ac_optarg" ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir="$ac_optarg" ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target="$ac_optarg" ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.7" - exit 0 ;; - - -with-* | --with-*) - ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi - ac_package=`echo $ac_package| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; - *) ac_optarg=yes ;; - esac - eval "with_${ac_package}='$ac_optarg'" ;; - - -without-* | --without-*) - ac_package=`echo $ac_option|sed -e 's/-*without-//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi - ac_package=`echo $ac_package| sed 's/-/_/g'` - eval "with_${ac_package}=no" ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes="$ac_optarg" ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries="$ac_optarg" ;; - - -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } - ;; - - *) - if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then - echo "configure: warning: $ac_option: invalid host type" 1>&2 - fi - if test "x$nonopt" != xNONE; then - { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } - fi - nonopt="$ac_option" - ;; - - esac -done - -if test -n "$ac_prev"; then - { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } -fi - -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - -# File descriptor usage: -# 0 standard input -# 1 file creation -# 2 errors and warnings -# 3 some systems may open it to /dev/tty -# 4 used on the Kubota Titan -# 6 checking for... messages and results -# 5 compiler messages saved in config.log -if test "$silent" = yes; then - exec 6>/dev/null -else - exec 6>&1 -fi -exec 5>./config.log - -echo "\ -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. -" 1>&5 - -# Strip out --no-create and --no-recursion so they do not pile up. -# Also quote any args containing shell metacharacters. -ac_configure_args= -for ac_arg -do - case "$ac_arg" in - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) ;; - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) - ac_configure_args="$ac_configure_args '$ac_arg'" ;; - *) ac_configure_args="$ac_configure_args $ac_arg" ;; - esac -done - -# NLS nuisances. -# Only set LANG and LC_ALL to C if already set. -# These must not be set unconditionally because not all systems understand -# e.g. LANG=C (notably SCO). -if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi -if test "${LANG+set}" = set; then LANG=C; export LANG; fi - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo > confdefs.h - -# A filename unique to this package, relative to the directory that -# configure is in, which we can look for to find out if srcdir is correct. -ac_unique_file=sprintf.c - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then its parent. - ac_prog=$0 - ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` - test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. - srcdir=$ac_confdir - if test ! -r $srcdir/$ac_unique_file; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r $srcdir/$ac_unique_file; then - if test "$ac_srcdir_defaulted" = yes; then - { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } - else - { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } - fi -fi -srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` - -# Prefer explicitly selected file to automatically selected ones. -if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi -fi -for ac_site_file in $CONFIG_SITE; do - if test -r "$ac_site_file"; then - echo "loading site script $ac_site_file" - . "$ac_site_file" - fi -done - -if test -r "$cache_file"; then - echo "loading cache $cache_file" - . $cache_file -else - echo "creating cache $cache_file" - > $cache_file -fi - -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='echo $CPP $CPPFLAGS 1>&5; -$CPP $CPPFLAGS' -ac_compile='echo ${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5; -${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5' -ac_link='echo ${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5; -${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5' - -if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then - # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. - if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then - ac_n= ac_c=' -' ac_t=' ' - else - ac_n=-n ac_c= ac_t= - fi -else - ac_n= ac_c='\c' ac_t= -fi - - - -# Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="gcc" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc" -fi -fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - -echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.c <<EOF -#ifdef __GNUC__ - yes; -#endif -EOF -if ${CC-cc} -E conftest.c 2>&5 | egrep yes >/dev/null 2>&1; then - ac_cv_prog_gcc=yes -else - ac_cv_prog_gcc=no -fi -fi - -echo "$ac_t""$ac_cv_prog_gcc" 1>&6 -if test $ac_cv_prog_gcc = yes; then - GCC=yes - if test "${CFLAGS+set}" != set; then - echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - echo 'void f(){}' > conftest.c -if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then - ac_cv_prog_gcc_g=yes -else - ac_cv_prog_gcc_g=no -fi -rm -f conftest* - -fi - -echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6 - if test $ac_cv_prog_gcc_g = yes; then - CFLAGS="-g -O" - else - CFLAGS="-O" - fi - fi -else - GCC= - test "${CFLAGS+set}" = set || CFLAGS="-g" -fi - -# Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_RANLIB="ranlib" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" -fi -fi -RANLIB="$ac_cv_prog_RANLIB" -if test -n "$RANLIB"; then - echo "$ac_t""$RANLIB" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - - -trap '' 1 2 15 -cat > confcache <<\EOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs. It is not useful on other systems. -# If it contains results you don't want to keep, you may remove or edit it. -# -# By default, configure uses ./config.cache as the cache file, -# creating it if it does not exist already. You can give configure -# the --cache-file=FILE option to use a different cache file; that is -# what configure does when it calls configure scripts in -# subdirectories, so they share the cache. -# Giving --cache-file=/dev/null disables caching, for debugging configure. -# config.status only pays attention to the cache file if you give it the -# --recheck option to rerun configure. -# -EOF -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -(set) 2>&1 | - sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \ - >> confcache -if cmp -s $cache_file confcache; then - : -else - if test -w $cache_file; then - echo "updating cache $cache_file" - cat confcache > $cache_file - else - echo "not updating unwritable cache $cache_file" - fi -fi -rm -f confcache - -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -# Any assignment to VPATH causes Sun make to only execute -# the first set of double-colon rules, so remove it if not needed. -# If there is a colon in the path, we need to keep it. -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' -fi - -trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 - -# Transform confdefs.h into DEFS. -# Protect against shell expansion while executing Makefile rules. -# Protect against Makefile macro expansion. -cat > conftest.defs <<\EOF -s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%-D\1=\2%g -s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g -s%\[%\\&%g -s%\]%\\&%g -s%\$%$$%g -EOF -DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '` -rm -f conftest.defs - - -# Without the "./", some shells look in PATH for config.status. -: ${CONFIG_STATUS=./config.status} - -echo creating $CONFIG_STATUS -rm -f $CONFIG_STATUS -cat > $CONFIG_STATUS <<EOF -#! /bin/sh -# Generated automatically by configure. -# Run this file to recreate the current configuration. -# This directory was configured as follows, -# on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# -# $0 $ac_configure_args -# -# Compiler output produced by configure, useful for debugging -# configure, is in ./config.log if it exists. - -ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" -for ac_option -do - case "\$ac_option" in - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" - exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; - -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.7" - exit 0 ;; - -help | --help | --hel | --he | --h) - echo "\$ac_cs_usage"; exit 0 ;; - *) echo "\$ac_cs_usage"; exit 1 ;; - esac -done - -ac_given_srcdir=$srcdir - -trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 -EOF -cat >> $CONFIG_STATUS <<EOF - -# Protect against being on the right side of a sed subst in config.status. -sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; - s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF -$ac_vpsub -$extrasub -s%@CFLAGS@%$CFLAGS%g -s%@CPPFLAGS@%$CPPFLAGS%g -s%@CXXFLAGS@%$CXXFLAGS%g -s%@DEFS@%$DEFS%g -s%@LDFLAGS@%$LDFLAGS%g -s%@LIBS@%$LIBS%g -s%@exec_prefix@%$exec_prefix%g -s%@prefix@%$prefix%g -s%@program_transform_name@%$program_transform_name%g -s%@bindir@%$bindir%g -s%@sbindir@%$sbindir%g -s%@libexecdir@%$libexecdir%g -s%@datadir@%$datadir%g -s%@sysconfdir@%$sysconfdir%g -s%@sharedstatedir@%$sharedstatedir%g -s%@localstatedir@%$localstatedir%g -s%@libdir@%$libdir%g -s%@includedir@%$includedir%g -s%@oldincludedir@%$oldincludedir%g -s%@infodir@%$infodir%g -s%@mandir@%$mandir%g -s%@CC@%$CC%g -s%@RANLIB@%$RANLIB%g - -CEOF -EOF -cat >> $CONFIG_STATUS <<EOF - -CONFIG_FILES=\${CONFIG_FILES-"Makefile"} -EOF -cat >> $CONFIG_STATUS <<\EOF -for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then - # Support "outfile[:infile]", defaulting infile="outfile.in". - case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.in" ;; - esac - - # Adjust relative srcdir, etc. for subdirectories. - - # Remove last slash and all that follows it. Not all systems have dirname. - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" - ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" - # A "../" for each directory in $ac_dir_suffix. - ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` - else - ac_dir_suffix= ac_dots= - fi - - case "$ac_given_srcdir" in - .) srcdir=. - if test -z "$ac_dots"; then top_srcdir=. - else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; - /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; - *) # Relative path. - srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" - top_srcdir="$ac_dots$ac_given_srcdir" ;; - esac - - echo creating "$ac_file" - rm -f "$ac_file" - configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." - case "$ac_file" in - *Makefile*) ac_comsub="1i\\ -# $configure_input" ;; - *) ac_comsub= ;; - esac - sed -e "$ac_comsub -s%@configure_input@%$configure_input%g -s%@srcdir@%$srcdir%g -s%@top_srcdir@%$top_srcdir%g -" -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file -fi; done -rm -f conftest.subs - - -echo FOO >stamp-h -exit 0 -EOF -chmod +x $CONFIG_STATUS -rm -fr confdefs* $ac_clean_files -test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 - - - diff --git a/doc/sprintf/sprintf b/src/modules/sprintf/doc/sprintf similarity index 77% rename from doc/sprintf/sprintf rename to src/modules/sprintf/doc/sprintf index bc527401409781cc54d007187d0dfb7a54f8a628..3451c846979799fd098fbefc946ca2758da8d74a 100644 --- a/doc/sprintf/sprintf +++ b/src/modules/sprintf/doc/sprintf @@ -7,53 +7,55 @@ SYNTAX DESCRIPTION The format string is a string containing a description of how to output the data in the rest of the arguments. This string should - generally speaking have one %<modifyers><operator> (examples: + generally speaking have one %<modifiers><operator> (examples: %s, %0d, %-=20s) for each of the rest arguments. - Modifyers: - 0 Zero pad numbers (implies right justification) - ! Toggle truncation - ' ' (space) pad positive integers with a space - + pad positive integers with a plus sign - - left adjusted within field size (default is right) - | centered within field size - = column mode if strings are greater than field size - / Rough linebreak (break at exactly fieldsize instead of - between words) - # table mode, print a list of '\n' separated word - (top-to-bottom order) - $ Inverse table mode (left-to-right order) - n (where n is a number or *) a number specifies field size - .n set precision - :n set field size & precision - ;n Set column width - * if n is a * then next argument is used - 'X' Set a pad string. ' cannot be a part of the pad_string (yet) - < Use same arg again - ^ repeat this on every line produced - @ do this format for each entry in argument array - > Put the string at the bottom end of column instead of top - _ Set width to the length of data + Modifiers: + + 0 Zero pad numbers (implies right justification) + ! Toggle truncation + ' ' (space) pad positive integers with a space + + pad positive integers with a plus sign + - left adjusted within field size (default is right) + | centered within field size + = column mode if strings are greater than field size + / Rough linebreak (break at exactly fieldsize instead of + between words) + # table mode, print a list of '\n' separated word + (top-to-bottom order) + $ Inverse table mode (left-to-right order) + n (where n is a number or *) a number specifies field size + .n set precision + :n set field size & precision + ;n Set column width + * if n is a * then next argument is used + 'X' Set a pad string. ' cannot be a part of the pad_string (yet) + < Use same arg again + ^ repeat this on every line produced + @ do this format for each entry in argument array + > Put the string at the bottom end of column instead of top + _ Set width to the length of data Operators: - %% percent - %d signed decimal int - %u unsigned decimal int (doesn't really exist in lpc) - %o unsigned octal int - %x lowercase unsigned hexadecimal int - %X uppercase unsigned hexadecimal int - %c char - %f float - %g heruistically chosen representation of float - %e exponential notation float - %s string - %O any type (debug style) - %n nop - %t type of argument - %<modifyers>{format%} do a format for every index in an array. + + %% percent + %d signed decimal int + %u unsigned decimal int (doesn't really exist in Pike) + %o unsigned octal int + %x lowercase unsigned hexadecimal int + %X uppercase unsigned hexadecimal int + %c char (or short with %2c, %3c gives 3 bytes etc.) + %f float + %g heruistically chosen representation of float + %e exponential notation float + %s string + %O any type (debug style) + %n nop + %t type of argument + %<modifiers>{format%} do a format for every index in an array. EXAMPLES - uLPC v1.0E-95 Running Hilfe v1.2 (Hubbe's Incremental LPC FrontEnd) + Pike v0.1 Running Hilfe v1.2 (Incremental Pike Frontend) > int screen_width=70; Result: 70 > mixed sample; @@ -172,5 +174,8 @@ EXAMPLES > quit Exiting. +KEYWORDS + string + SEE ALSO sscanf diff --git a/src/modules/sprintf/sprintf.c b/src/modules/sprintf/sprintf.c index 7ad6f3a1d5a3973097e8ac84fef79229ddb9adb5..b65f852714c18ab3b8807168b22107e6e9ea7e60 100644 --- a/src/modules/sprintf/sprintf.c +++ b/src/modules/sprintf/sprintf.c @@ -1,21 +1,20 @@ /*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ /* - LPC Sprintf v2.0 By Fredrik Hubinette (Profezzorn@nannymud) + Pike Sprintf v2.0 By Fredrik Hubinette (Profezzorn@nannymud) Should be reasonably compatible and somewhat faster than v1.05+ of Lynscar's sprintf. It requires the buffering function provided in dynamic_buffer.c - It was originally written for lpc4, but should be pretty simple to adapt to - most lpc-drivers. Fail-safe memory-leak-protection is implemented through a - stack that can be deallocated at any time. If something fails horribly this - stack will be deallocated at next call of sprintf. Most operators doesn't - need this feature though as they allocate their buffers with alloca() or - simply use pointers into other strings. + Fail-safe memory-leak-protection is implemented through a stack that can + be deallocated at any time. If something fails horribly this stack will be + deallocated at next call of sprintf. Most operators doesn't need this + feature though as they allocate their buffers with alloca() or simply use + pointers into other strings. It also has a lot more features: - Modifyers: + Modifiers: 0 Zero pad numbers (implies right justification) ! Toggle truncation pad positive integers with a space @@ -53,7 +52,7 @@ %O any type (prettyprint) %n nop %t type of argument - %<modifyers>{format%} do a format for every index in an array. + %<modifiers>{format%} do a format for every index in an array. Most flags and operators are combinable in any fashion, but _really_ strange results can arise from things like: @@ -101,8 +100,8 @@ #include "svalue.h" #include "stralloc.h" #include "dynamic_buffer.h" -#include "lpc_types.h" -#include "add_efun.h" +#include "pike_types.h" +#include "constants.h" #include "interpret.h" #include "memory.h" @@ -189,7 +188,7 @@ INLINE static void fix_field(char *b, } } for(;width>len;width--) my_putchar('0'); - while(len--) my_putchar(*(b++)); + my_binary_strcat(b,len); return; } @@ -210,8 +209,13 @@ INLINE static void fix_field(char *b, { if(pos_pad && b[0]!='-') { my_putchar(pos_pad); width--; d++; } d+=MINIMUM(width,len); - while(len-- && width--) my_putchar(*(b++)); - for(d%=pad_length;width--;d++) + while(len && width) + { + my_putchar(*(b++)); + len--; + width--; + } + for(d%=pad_length;width;d++,width--) { if(d>=pad_length) d=0; my_putchar(pad_string[d]); @@ -235,7 +239,7 @@ INLINE static void fix_field(char *b, width--; } b+=len-width; - while(width--) my_putchar(*(b++)); + my_binary_strcat(b,width); } static struct svalue temp_svalue = { T_INT }; @@ -391,11 +395,11 @@ INLINE static int do_one(struct format_info *f) VAR=lastarg=argp++; \ } -#define GET(VAR,LPC_TYPE,TYPE_NAME,EXTENSION) \ +#define GET(VAR,PIKE_TYPE,TYPE_NAME,EXTENSION) \ { \ struct svalue *tmp_; \ GET_SVALUE(tmp_); \ - if(tmp_->type!=LPC_TYPE) \ + if(tmp_->type!=PIKE_TYPE) \ { \ sprintf_error("Expected %s, got %s.\n",TYPE_NAME, \ get_name_of_type(tmp_->type)); \ @@ -424,16 +428,16 @@ INLINE static int do_one(struct format_info *f) } -/* This is the main lpc_sprintf function, note that it calls itself +/* This is the main pike_sprintf function, note that it calls itself * recursively during the '%{ %}' parsing. The string is stored in * the buffer in save_objectII.c */ -static string low_lpc_sprintf(char *format, - int format_len, - struct svalue *argp, - int num_arg, - string prefix) +static string low_pike_sprintf(char *format, + int format_len, + struct svalue *argp, + int num_arg, + string prefix) { int tmp,setwhat,pos,d,e; char *a; @@ -477,7 +481,7 @@ static string low_lpc_sprintf(char *format, sprintf_error("Error in format string.\n"); fatal("Foo, you shouldn't be here!\n"); - /* First the modifyers */ + /* First the modifiers */ case '0': fsp->flags|=ZERO_PAD; continue; case '1': case '2': case '3': @@ -492,7 +496,7 @@ static string low_lpc_sprintf(char *format, got_arg: if(tmp<1) - sprintf_error("Illigal width.\n"); + sprintf_error("Illegal width.\n"); switch(setwhat) { case 0: fsp->width=tmp; break; @@ -588,7 +592,7 @@ static string low_lpc_sprintf(char *format, array_index_no_free(sp,w,tmp); sp++; } - b=low_lpc_sprintf(a+1,e-2,s,sp-s,b); + b=low_pike_sprintf(a+1,e-2,s,sp-s,b); pop_n_elems(sp-s); } fsp->b=b.str; @@ -621,11 +625,21 @@ static string low_lpc_sprintf(char *format, } case 'c': - DO_OP(); - fsp->b=(char *)alloca(1); - GET_INT(fsp->b[0]); - fsp->len=1; + { + INT32 l,tmp; + DO_OP(); + l=1; + if(fsp->width > 0) l=fsp->width; + fsp->b=(char *)alloca(l); + fsp->len=l; + GET_INT(tmp); + while(--l>=0) + { + fsp->b[l]=tmp & 0xff; + tmp>>=8; + } break; + } case 'o': case 'd': @@ -678,7 +692,7 @@ static string low_lpc_sprintf(char *format, case 's': { - struct lpc_string *s; + struct pike_string *s; DO_OP(); GET_STRING(s); fsp->b=s->str; @@ -760,8 +774,8 @@ static string low_lpc_sprintf(char *format, return complex_free_buf(); } -/* An C-callable lpc_sprintf */ -string lpc_sprintf(char *format,struct svalue *argp,int num_arg) +/* An C-callable pike_sprintf */ +string pike_sprintf(char *format,struct svalue *argp,int num_arg) { string prefix; prefix.str=0; @@ -769,7 +783,7 @@ string lpc_sprintf(char *format,struct svalue *argp,int num_arg) free_sprintf_strings(); fsp=format_info_stack-1; - return low_lpc_sprintf(format,strlen(format),argp,num_arg,prefix); + return low_pike_sprintf(format,strlen(format),argp,num_arg,prefix); } /* The efun */ @@ -787,7 +801,7 @@ static void f_sprintf(INT32 num_arg) if(argp[0].type != T_STRING) error("Bad argument 1 to sprintf.\n"); - s=low_lpc_sprintf(argp->u.string->str, + s=low_pike_sprintf(argp->u.string->str, argp->u.string->len, argp+1, num_arg-1, diff --git a/src/modules/sprintf/stamp-h b/src/modules/sprintf/stamp-h deleted file mode 100644 index b7d6715e2df11b9c32b2341423273c6b3ad9ae8a..0000000000000000000000000000000000000000 --- a/src/modules/sprintf/stamp-h +++ /dev/null @@ -1 +0,0 @@ -FOO diff --git a/src/multiset.c b/src/multiset.c new file mode 100644 index 0000000000000000000000000000000000000000..eda1ac0f635055718f5272fe2d6024e4f856af7c --- /dev/null +++ b/src/multiset.c @@ -0,0 +1,307 @@ +/*\ +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) +||| See the files COPYING and DISCLAIMER for more information. +\*/ +#include "global.h" +#include "array.h" +#include "types.h" +#include "multiset.h" +#include "svalue.h" +#include "macros.h" +#include "memory.h" +#include "error.h" +#include "dynamic_buffer.h" +#include "interpret.h" +#include "builtin_functions.h" +#include "gc.h" + +struct multiset *first_multiset; + +int multiset_member(struct multiset *l, struct svalue *ind) +{ + return set_lookup(l->ind, ind) >= 0; +} + +/* + * allocate and init a new multiset + */ +static struct multiset *allocate_multiset(struct array *ind) +{ + struct multiset *l; + GC_ALLOC(); + l=ALLOC_STRUCT(multiset); + l->next = first_multiset; + l->prev = 0; + l->refs = 1; + l->ind=ind; + if(first_multiset) first_multiset->prev = l; + first_multiset=l; + + return l; +} + +/* + * free a multiset + */ +void really_free_multiset(struct multiset *l) +{ +#ifdef DEBUG + if(l->refs) + fatal("really free multiset on multiset with nonzero refs.\n"); +#endif + + free_array(l->ind); + + if(l->prev) l->prev->next = l->next; + if(l->next) l->next->prev = l->prev; + if(first_multiset == l) first_multiset = 0; + + free((char *)l); + GC_FREE(); +} + +static void order_multiset(struct multiset *l) +{ + INT32 *order; + order = get_set_order(l->ind); + l->ind = order_array(l->ind, order); + free((char *)order); +} + +struct multiset *mkmultiset(struct array *ind) +{ + struct multiset *l; + l=allocate_multiset(copy_array(ind)); + order_multiset(l); + return l; +} + +void multiset_insert(struct multiset *l, + struct svalue *ind) +{ + INT32 i; + i=set_lookup(l->ind, ind); + if(i < 0) + { + l->ind=array_insert(l->ind, ind, ~i); + } +} + +#if 0 +struct array *multiset_indices(struct multiset *l) +{ + return l->ind; +} +#endif + +void multiset_delete(struct multiset *l,struct svalue *ind) +{ + INT32 i; + i=set_lookup(l->ind, ind); + + if(i >= 0) l->ind=array_remove(l->ind, i); +} + +void check_multiset_for_destruct(struct multiset *l) +{ +/* Horrifiying worst case!!!!! */ + INT32 i; + while( (i=array_find_destructed_object(l->ind)) >= 0) + l->ind=array_remove(l->ind, i); +} + +struct multiset *copy_multiset(struct multiset *tmp) +{ + check_multiset_for_destruct(tmp); + return allocate_multiset(copy_array(tmp->ind)); +} + +struct multiset *merge_multisets(struct multiset *a, + struct multiset *b, + INT32 operator) +{ + struct multiset *ret; + INT32 *zipper; + + check_multiset_for_destruct(a); + check_multiset_for_destruct(b); + + zipper=merge(a->ind,b->ind,operator); + ret=allocate_multiset(array_zip(a->ind,b->ind,zipper)); + free((char *)zipper); + return ret; +} + +struct multiset *add_multisets(struct svalue *argp,INT32 args) +{ + struct multiset *ret,*a,*b; + switch(args) + { + case 0: + ret=allocate_multiset(allocate_array_no_init(0,0)); + break; + + case 1: + ret=copy_multiset(argp->u.multiset); + break; + + case 2: + ret=merge_multisets(argp[0].u.multiset,argp[1].u.multiset,OP_ADD); + break; + + case 3: + a=merge_multisets(argp[0].u.multiset, argp[1].u.multiset, OP_ADD); + ret=merge_multisets(a, argp[2].u.multiset, OP_ADD); + free_multiset(a); + break; + + default: + a=add_multisets(argp,args/2); + b=add_multisets(argp+args/2,args-args/2); + ret=merge_multisets(a,b,OP_ADD); + free_multiset(a); + free_multiset(b); + break; + } + + return ret; +} + +int multiset_equal_p(struct multiset *a, struct multiset *b, struct processing *p) +{ + if(a == b) return 1; + check_multiset_for_destruct(a); + + return array_equal_p(a->ind, b->ind, p); +} + +void describe_multiset(struct multiset *l,struct processing *p,int indent) +{ + struct processing doing; + int e; + char buf[40]; + if(!l->ind->size) + { + my_strcat("(< >)"); + return; + } + + doing.next=p; + doing.pointer_a=(void *)l; + for(e=0;p;e++,p=p->next) + { + if(p->pointer_a == (void *)l) + { + sprintf(buf,"@%d",e); + my_strcat(buf); + return; + } + } + + sprintf(buf,"(< /* %ld elements */\n",(long)l->ind->size); + my_strcat(buf); + describe_array_low(l->ind,&doing,indent); + my_putchar('\n'); + for(e=2; e<indent; e++) my_putchar(' '); + my_strcat(">)"); +} + +node * make_node_from_multiset(struct multiset *l) +{ + if(check_that_array_is_constant(l->ind)) + { + struct svalue s; + s.type=T_MULTISET; + s.subtype=0; + s.u.multiset=l; + return mkconstantsvaluenode(&s); + }else{ + return mkefuncallnode("mkmultiset",make_node_from_array(l->ind)); + } +} + +void f_aggregate_multiset(INT32 args) +{ + struct multiset *l; + f_aggregate(args); + l=allocate_multiset(sp[-1].u.array); + order_multiset(l); + sp[-1].type=T_MULTISET; + sp[-1].u.multiset=l; +} + + +struct multiset *copy_multiset_recursively(struct multiset *l, + struct processing *p) +{ + struct processing doing; + struct multiset *ret; + + doing.next=p; + doing.pointer_a=(void *)l; + for(;p;p=p->next) + { + if(p->pointer_a == (void *)l) + { + ret=(struct multiset *)p->pointer_b; + ret->refs++; + return ret; + } + } + + ret=allocate_multiset( & empty_array ); + doing.pointer_b=(void *)ret; + + ret->ind=copy_array_recursively(l->ind,&doing); + + order_multiset(ret); + + return ret; +} + + +#ifdef GC2 + +void gc_mark_multiset_as_referenced(struct multiset *l) +{ + if(gc_mark(l)) + gc_mark_array_as_referenced(l->ind); +} + +void gc_check_all_multisets() +{ + struct multiset *l; + for(l=first_multiset;l;l=l->next) + gc_check(l->ind); +} + +void gc_mark_all_multisets() +{ + struct multiset *l; + for(l=first_multiset;l;l=l->next) + if(gc_is_referenced(l)) + gc_mark_multiset_as_referenced(l); +} + +void gc_free_all_unreferenced_multisets() +{ + struct multiset *l,*next; + + for(l=first_multiset;l;l=next) + { + if(gc_do_free(l)) + { + l->refs++; + free_svalues(ITEM(l->ind), l->ind->size, l->ind->type_field); + l->ind->size=0; + next=l->next; + + free_multiset(l); + }else{ + next=l->next; + } + } +} + +#endif /* GC2 */ diff --git a/src/multiset.h b/src/multiset.h new file mode 100644 index 0000000000000000000000000000000000000000..538b71431a11b3514b781249d989e78cea796fb8 --- /dev/null +++ b/src/multiset.h @@ -0,0 +1,48 @@ +/*\ +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) +||| See the files COPYING and DISCLAIMER for more information. +\*/ +#ifndef MULTISET_H +#define MULTISET_H + +#include "las.h" + +struct multiset +{ + INT32 refs; + struct multiset *next,*prev; + struct array *ind; +}; + +#define free_multiset(L) do{ struct multiset *l_=(L); if(!--l_->refs) really_free_multiset(l_); }while(0) + +#define l_sizeof(L) ((L)->ind->size) + +/* Prototypes begin here */ +int multiset_member(struct multiset *l, struct svalue *ind); +void really_free_multiset(struct multiset *l); +struct multiset *mkmultiset(struct array *ind); +void multiset_insert(struct multiset *l, + struct svalue *ind); +struct array *multiset_indices(struct multiset *l); +void multiset_delete(struct multiset *l,struct svalue *ind); +void check_multiset_for_destruct(struct multiset *l); +struct multiset *copy_multiset(struct multiset *tmp); +struct multiset *merge_multisets(struct multiset *a, + struct multiset *b, + INT32 operator); +struct multiset *add_multisets(struct svalue *argp,INT32 args); +int multiset_equal_p(struct multiset *a, struct multiset *b, struct processing *p); +void describe_multiset(struct multiset *l,struct processing *p,int indent); +node * make_node_from_multiset(struct multiset *l); +void f_aggregate_multiset(INT32 args); +struct multiset *copy_multiset_recursively(struct multiset *l, + struct processing *p); +void gc_mark_multiset_as_referenced(struct multiset *l); +void gc_check_all_multisets(); +void gc_mark_all_multisets(); +void gc_free_all_unreferenced_multisets(); +/* Prototypes end here */ + +#endif diff --git a/src/object.c b/src/object.c index 44883029eabef6e1a7afc6110e2d1ded6caaf19b..0cb3f49b1d62f541b087663835903a22fa2cc9e9 100644 --- a/src/object.c +++ b/src/object.c @@ -1,6 +1,6 @@ /*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ #include "global.h" @@ -15,6 +15,8 @@ #include "error.h" #include "main.h" #include "array.h" +#include "gc.h" +#include "backend.h" struct object *master_object = 0; struct object *first_object; @@ -34,6 +36,8 @@ struct object *clone(struct program *p, int args) struct object *o; struct frame frame; + GC_ALLOC(); + o=(struct object *)xalloc(sizeof(struct object)-1+p->storage_needed); o->prog=p; @@ -85,7 +89,7 @@ struct object *clone(struct program *p, int args) } if(frame.context.prog->init) - frame.context.prog->init(frame.current_storage,o); + frame.context.prog->init(o); free_program(frame.context.prog); } @@ -99,9 +103,9 @@ struct object *clone(struct program *p, int args) o->refs++; } - apply(o,"__INIT",0); + apply_lfun(o,LFUN___INIT,0); pop_stack(); - apply(o,"create",args); + apply_lfun(o,LFUN_CREATE,args); pop_stack(); return o; @@ -112,7 +116,7 @@ struct object *get_master() { extern char *master_file; struct program *master_prog; - struct lpc_string *master_name; + struct pike_string *master_name; static int inside=0; if(master_object && master_object->prog) @@ -151,12 +155,19 @@ void destruct(struct object *o) struct frame frame; struct program *p; +#ifdef DEBUG + if(d_flag > 20) do_debug(); +#endif + if(!o || !(p=o->prog)) return; /* Object already destructed */ o->refs++; - safe_apply(o, "destroy", 0); - pop_stack(); + if(o->prog->lfuns[LFUN_DESTROY] != -1) + { + safe_apply_low(o, o->prog->lfuns[LFUN_DESTROY], 0); + pop_stack(); + } /* destructed in destroy() */ if(!o->prog) @@ -184,7 +195,7 @@ void destruct(struct object *o) frame.current_storage=o->storage+frame.context.storage_offset; if(frame.context.prog->exit) - frame.context.prog->exit(frame.current_storage,o); + frame.context.prog->exit(o); for(d=0;d<(int)frame.context.prog->num_identifiers;d++) { @@ -213,81 +224,68 @@ void destruct(struct object *o) free_program(p); } + +struct object *objects_to_destruct = 0; + + +/* really_free_objects: + * This function is called when an object runs out of references. + * It frees the object if it is destructed, otherwise it moves it to + * a separate list of objects which will be destructed later. + */ + void really_free_object(struct object *o) { - if(o->prog) - { - /* prevent recursive calls to really_free_object */ - o->refs++; - destruct(o); - o->refs--; - } - if(o->prev) o->prev->next=o->next; else first_object=o->next; if(o->next) o->next->prev=o->prev; - - free((char *)o); + + if(o->prog) + { + o->next=objects_to_destruct; + o->prev=0; + objects_to_destruct=o; + } else { + free((char *)o); + GC_FREE(); + } } -void object_index_no_free(struct svalue *to, - struct object *o, - struct svalue *index) +/* This function destructs the objects that are scheduled to be + * destructed by really_free_object. It links the object back into the + * list of objects first. Adds a reference, destructs it and then frees it. + */ +void destruct_objects_to_destruct() { - struct program *p; - int f; - - if(!o || !(p=o->prog)) + struct object *o, *next; + while(o=objects_to_destruct) { - error("Lookup in destructed object.\n"); - return; /* make gcc happy */ - } + /* Link object back to list of objects */ + objects_to_destruct=o->next; + + if(first_object) + first_object->prev=o; - if(index->type != T_STRING) - error("Lookup on non-string value.\n"); + o->next=first_object; + first_object=o; + o->prev=0; - f=find_shared_string_identifier(index->u.string, p); - if(f < 0) - { - to->type=T_INT; - to->subtype=NUMBER_UNDEFINED; - to->u.integer=0; - }else{ - struct identifier *i; - i=ID_FROM_INT(p, f); + o->refs++; /* Don't free me now! */ - if(i->flags & IDENTIFIER_FUNCTION) - { - to->type=T_FUNCTION; - to->subtype=f; - to->u.object=o; - o->refs++; - } - else if(i->run_time_type == T_MIXED) - { - struct svalue *s; - s=(struct svalue *)(o->storage+ - INHERIT_FROM_INT(p, f)->storage_offset + - i->func.offset); - check_destructed(s); - assign_svalue_no_free(to,s); - } - else - { - union anything *u; - u=(union anything *)(o->storage+ - INHERIT_FROM_INT(p, f)->storage_offset + - i->func.offset); - check_short_destructed(u,i->run_time_type); - assign_from_short_svalue_no_free(to,u,i->run_time_type); - } + destruct(o); + + free_object(o); } + objects_to_destruct=0; } -static void low_object_index(struct svalue *to,struct object *o, INT32 f) + +static void low_object_index_no_free(struct svalue *to, + struct object *o, + INT32 f) { struct identifier *i; struct program *p=o->prog; @@ -304,26 +302,22 @@ static void low_object_index(struct svalue *to,struct object *o, INT32 f) else if(i->run_time_type == T_MIXED) { struct svalue *s; - s=(struct svalue *)(o->storage+ - INHERIT_FROM_INT(p, f)->storage_offset + - i->func.offset); + s=(struct svalue *)LOW_GET_GLOBAL(o,f,i); check_destructed(s); assign_svalue_no_free(to, s); } else { union anything *u; - u=(union anything *)(o->storage+ - INHERIT_FROM_INT(p, f)->storage_offset + - i->func.offset); + u=(union anything *)LOW_GET_GLOBAL(o,f,i); check_short_destructed(u,i->run_time_type); assign_from_short_svalue_no_free(to, u, i->run_time_type); } } -void object_index(struct svalue *to, - struct object *o, - struct svalue *index) +void object_index_no_free(struct svalue *to, + struct object *o, + struct svalue *index) { struct program *p; int f; @@ -340,19 +334,42 @@ void object_index(struct svalue *to, f=find_shared_string_identifier(index->u.string, p); if(f < 0) { - free_svalue(to); to->type=T_INT; to->subtype=NUMBER_UNDEFINED; to->u.integer=0; }else{ - free_svalue(to); - low_object_index(to, o, f); + low_object_index_no_free(to, o, f); } } -void object_low_set_index(struct object *o, - int f, - struct svalue *from) + +void object_index_no_free2(struct svalue *to, + struct object *o, + struct svalue *index) +{ + struct program *p; + + if(!o || !(p=o->prog)) + { + error("Lookup in destructed object.\n"); + return; /* make gcc happy */ + } + + if(p->lfuns[LFUN_INDEX] != -1) + { + push_svalue(index); + apply_lfun(o,LFUN_INDEX,1); + to=sp; + sp--; + } else { + object_index_no_free(to,o,index); + } +} + + +static void object_low_set_index(struct object *o, + int f, + struct svalue *from) { struct identifier *i; struct program *p; @@ -373,18 +390,12 @@ void object_low_set_index(struct object *o, } else if(i->run_time_type == T_MIXED) { - assign_svalue((struct svalue *) - (o->storage+ - INHERIT_FROM_INT(p, f)->storage_offset+ - i->func.offset), - from); + assign_svalue((struct svalue *)LOW_GET_GLOBAL(o,f,i),from); } else { assign_to_short_svalue((union anything *) - (o->storage+ - INHERIT_FROM_INT(p, f)->storage_offset+ - i->func.offset), + LOW_GET_GLOBAL(o,f,i), i->run_time_type, from); } @@ -415,10 +426,32 @@ void object_set_index(struct object *o, } } +void object_set_index2(struct object *o, + struct svalue *index, + struct svalue *from) +{ + struct program *p; -union anything *object_low_get_item_ptr(struct object *o, - int f, - TYPE_T type) + if(!o || !(p=o->prog)) + { + error("Lookup in destructed object.\n"); + return; /* make gcc happy */ + } + + if(p->lfuns[LFUN_ASSIGN_INDEX] != -1) + { + push_svalue(index); + push_svalue(from); + apply_lfun(o,LFUN_ASSIGN_INDEX,2); + pop_stack(); + } else { + object_set_index(o,index,from); + } +} + +static union anything *object_low_get_item_ptr(struct object *o, + int f, + TYPE_T type) { struct identifier *i; struct program *p; @@ -438,16 +471,12 @@ union anything *object_low_get_item_ptr(struct object *o, else if(i->run_time_type == T_MIXED) { struct svalue *s; - s=(struct svalue *)(o->storage+ - INHERIT_FROM_INT(p, f)->storage_offset + - i->func.offset); + s=(struct svalue *)LOW_GET_GLOBAL(o,f,i); if(s->type == type) return & s->u; } else if(i->run_time_type == type) { - return (union anything *) (o->storage+ - INHERIT_FROM_INT(p, f)->storage_offset + - i->func.offset); + return (union anything *) LOW_GET_GLOBAL(o,f,i); } return 0; } @@ -470,6 +499,9 @@ union anything *object_get_item_ptr(struct object *o, if(index->type != T_STRING) error("Lookup on non-string value.\n"); + if(p->lfuns[LFUN_ASSIGN_INDEX] != -1) + error("Cannot do incremental operations on overloaded index (yet).\n"); + f=find_shared_string_identifier(index->u.string, p); if(f < 0) { @@ -481,22 +513,13 @@ union anything *object_get_item_ptr(struct object *o, } #ifdef DEBUG -void verify_all_objects(int pass) +void verify_all_objects() { struct object *o; struct frame frame; for(o=first_object;o;o=o->next) { - if(pass) - { - if(checked((void *)o, 0) != o->refs) - { - fatal("Object has wrong number of refs.\n"); - } - continue; - } - if(o->next && o->next->prev !=o) fatal("Object check: o->next->prev != o\n"); @@ -512,7 +535,7 @@ void verify_all_objects(int pass) fatal("Object check: o->prev ==0 && first_object != o\n"); } - if(o->refs <=0) + if(o->refs <= 0) fatal("Object refs <= zero.\n"); if(o->prog) @@ -534,15 +557,9 @@ void verify_all_objects(int pass) if(i->run_time_type == T_MIXED) { - check_svalue((struct svalue *) - (o->storage+ - INHERIT_FROM_INT(o->prog, e)->storage_offset+ - i->func.offset)); + check_svalue((struct svalue *)LOW_GET_GLOBAL(o,e,i)); }else{ - check_short_svalue((union anything *) - (o->storage+ - INHERIT_FROM_INT(o->prog, e)->storage_offset+ - i->func.offset), + check_short_svalue((union anything *)LOW_GET_GLOBAL(o,e,i), i->run_time_type); } } @@ -561,9 +578,6 @@ void verify_all_objects(int pass) frame.context=o->prog->inherits[e]; frame.context.prog->refs++; frame.current_storage=o->storage+frame.context.storage_offset; - - if(frame.context.prog->checkrefs) - frame.context.prog->checkrefs(frame.current_storage,o,pass); } free_object(frame.current_object); @@ -601,25 +615,13 @@ int object_equal_p(struct object *a, struct object *b, struct processing *p) if(i->run_time_type == T_MIXED) { - if(!low_is_equal((struct svalue *) - (a->storage+ - INHERIT_FROM_INT(a->prog, e)->storage_offset+ - i->func.offset), - (struct svalue *) - (b->storage+ - INHERIT_FROM_INT(a->prog, e)->storage_offset+ - i->func.offset), - &curr)) + if(!low_is_equal((struct svalue *)LOW_GET_GLOBAL(a,e,i), + (struct svalue *)LOW_GET_GLOBAL(b,e,i), + &curr)) return 0; }else{ - if(!low_short_is_equal((union anything *) - (a->storage+ - INHERIT_FROM_INT(a->prog, e)->storage_offset+ - i->func.offset), - (union anything *) - (b->storage+ - INHERIT_FROM_INT(a->prog, e)->storage_offset+ - i->func.offset), + if(!low_short_is_equal((union anything *)LOW_GET_GLOBAL(a,e,i), + (union anything *)LOW_GET_GLOBAL(b,e,i), i->run_time_type, &curr)) return 0; @@ -640,6 +642,7 @@ void cleanup_objects() next=o->next; free_object(o); } + destruct_objects_to_destruct(); free_object(master_object); master_object=0; @@ -655,11 +658,12 @@ struct array *object_indices(struct object *o) if(!p) error("indices() on destructed object.\n"); - a=allocate_array_no_init(p->num_identifier_indexes,0, T_STRING); + a=allocate_array_no_init(p->num_identifier_indexes,0); for(e=0;e<(int)p->num_identifier_indexes;e++) { - copy_shared_string(SHORT_ITEM(a)[e].string, + copy_shared_string(ITEM(a)[e].u.string, ID_FROM_INT(p,p->identifier_index[e])->name); + ITEM(a)[e].type=T_STRING; } return a; } @@ -674,10 +678,99 @@ struct array *object_values(struct object *o) if(!p) error("values() on destructed object.\n"); - a=allocate_array_no_init(p->num_identifier_indexes,0, T_MIXED); + a=allocate_array_no_init(p->num_identifier_indexes,0); for(e=0;e<(int)p->num_identifier_indexes;e++) { - low_object_index(ITEM(a)+e, o, p->identifier_index[e]); + low_object_index_no_free(ITEM(a)+e, o, p->identifier_index[e]); } return a; } + +#ifdef GC2 + + +void gc_mark_object_as_referenced(struct object *o) +{ + if(gc_mark(o)) + { + if(o->prog) + { + INT32 e; + + for(e=0;e<(int)o->prog->num_identifier_indexes;e++) + { + struct identifier *i; + + i=ID_FROM_INT(o->prog, e); + + if(i->flags & IDENTIFIER_FUNCTION) continue; + + if(i->run_time_type == T_MIXED) + { + gc_mark_svalues((struct svalue *)LOW_GET_GLOBAL(o,e,i),1); + }else{ + gc_mark_short_svalue((union anything *)LOW_GET_GLOBAL(o,e,i), + i->run_time_type); + } + } + } + } +} + +void gc_check_all_objects() +{ + struct object *o; + for(o=first_object;o;o=o->next) + { + if(o->prog) + { + INT32 e; + + for(e=0;e<(int)o->prog->num_identifier_indexes;e++) + { + struct identifier *i; + + i=ID_FROM_INT(o->prog, e); + + if(i->flags & IDENTIFIER_FUNCTION) continue; + + if(i->run_time_type == T_MIXED) + { + gc_check_svalues((struct svalue *)LOW_GET_GLOBAL(o,e,i),1); + }else{ + gc_check_short_svalue((union anything *)LOW_GET_GLOBAL(o,e,i), + i->run_time_type); + } + } + } + } +} + +void gc_mark_all_objects() +{ + struct object *o; + for(o=first_object;o;o=o->next) + if(gc_is_referenced(o)) + gc_mark_object_as_referenced(o); +} + +void gc_free_all_unreferenced_objects() +{ + struct object *o,*next; + + for(o=first_object;o;o=next) + { + if(gc_do_free(o)) + { + o->refs++; + destruct(o); + next=o->next; + free_object(o); + }else{ + next=o->next; + } + } +} + +#endif /* GC2 */ + diff --git a/src/object.h b/src/object.h index 478e13b3eee1cda2b722f387bffe3cacc2e17206..bf424118ce4566fa388a4934150f44bfa2069770 100644 --- a/src/object.h +++ b/src/object.h @@ -1,6 +1,6 @@ /*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ #ifndef OBJECT_H @@ -22,9 +22,15 @@ struct object extern struct object fake_object; extern struct object *first_object; +extern struct object *objects_to_destruct; #define free_object(O) do{ struct object *o_=(O); if(!--o_->refs) really_free_object(o_); }while(0) -#define GLOBAL_FROM_INT(I) (fp->current_object->storage+INHERIT_FROM_INT(fp->current_object->prog,(I))->storage_offset+ID_FROM_INT(fp->current_object->prog,(I))->func.offset) + +#define LOW_GET_GLOBAL(O,I,ID) ((O)->storage+INHERIT_FROM_INT((O)->prog, (I))->storage_offset+(ID)->func.offset) +#define GET_GLOBAL(O,I) LOW_GET_GLOBAL(O,I,ID_FROM_INT((O)->prog,I)) +#define GLOBAL_FROM_INT(I) GET_GLOBAL(fp->current_object, I) + +#define this_object() (fp->current_object->refs++,fp->current_object) /* Prototypes begin here */ void setup_fake_object(); @@ -33,29 +39,31 @@ struct object *get_master(); struct object *master(); void destruct(struct object *o); void really_free_object(struct object *o); +void destruct_objects_to_destruct(); void object_index_no_free(struct svalue *to, struct object *o, struct svalue *index); -void object_index(struct svalue *to, - struct object *o, - struct svalue *index); -void object_low_set_index(struct object *o, - int f, - struct svalue *from); +void object_index_no_free2(struct svalue *to, + struct object *o, + struct svalue *index); void object_set_index(struct object *o, struct svalue *index, struct svalue *from); -union anything *object_low_get_item_ptr(struct object *o, - int f, - TYPE_T type); +void object_set_index2(struct object *o, + struct svalue *index, + struct svalue *from); union anything *object_get_item_ptr(struct object *o, struct svalue *index, TYPE_T type); -void verify_all_objects(int pass); +void verify_all_objects(); int object_equal_p(struct object *a, struct object *b, struct processing *p); void cleanup_objects(); struct array *object_indices(struct object *o); struct array *object_values(struct object *o); +void gc_mark_object_as_referenced(struct object *o); +void gc_check_all_objects(); +void gc_mark_all_objects(); +void gc_free_all_unreferenced_objects(); /* Prototypes end here */ #endif /* OBJECT_H */ diff --git a/src/opcodes.c b/src/opcodes.c index ed4690c8387c9e550de411ed38e9359382b9c1cb..17a81447a7e3b4973040d2177746c586f6457bc6 100644 --- a/src/opcodes.c +++ b/src/opcodes.c @@ -1,6 +1,6 @@ /*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ #include <math.h> @@ -11,11 +11,11 @@ #include "array.h" #include "stralloc.h" #include "mapping.h" -#include "list.h" +#include "multiset.h" #include "opcodes.h" #include "object.h" #include "error.h" -#include "lpc_types.h" +#include "pike_types.h" void index_no_free(struct svalue *to,struct svalue *what,struct svalue *ind) { @@ -34,8 +34,8 @@ void index_no_free(struct svalue *to,struct svalue *what,struct svalue *ind) object_index_no_free(to, what->u.object, ind); break; - case T_LIST: - i=list_member(what->u.list, ind); + case T_MULTISET: + i=multiset_member(what->u.multiset, ind); to->type=T_INT; to->subtype=i ? NUMBER_UNDEFINED : 0; to->u.integer=i; @@ -74,14 +74,176 @@ void f_index() pop_stack(); } +void cast(struct pike_string *s) +{ + INT32 i; + + i=compile_type_to_runtime_type(s); + + if(i != sp[-1].type) + { + if(i == T_MIXED) return; + + if(sp[-2].type == T_OBJECT) + { + push_string(describe_type(s)); + if(!sp[-2].u.object->prog) + error("Cast called on destructed object.\n"); + if(sp[-2].u.object->prog->lfuns[LFUN_CAST] == -1) + error("No cast method in object.\n"); + apply_lfun(sp[-2].u.object, LFUN_CAST, 1); + free_svalue(sp-2); + sp[-2]=sp[-1]; + sp--; + return; + } + + switch(i) + { + case T_MIXED: + break; + + case T_INT: + switch(sp[-1].type) + { + case T_FLOAT: + i=(int)(sp[-1].u.float_number); + break; + + case T_STRING: + i=STRTOL(sp[-1].u.string->str,0,0); + free_string(sp[-1].u.string); + break; + + default: + error("Cannot cast to int.\n"); + } + + sp[-1].type=T_INT; + sp[-1].u.integer=i; + break; + + case T_FLOAT: + { + FLOAT_TYPE f; + switch(sp[-1].type) + { + case T_INT: + f=(FLOAT_TYPE)(sp[-1].u.integer); + break; + + case T_STRING: + f=STRTOD(sp[-1].u.string->str,0); + free_string(sp[-1].u.string); + break; + + default: + error("Cannot cast to float.\n"); + f=0.0; + } + + sp[-1].type=T_FLOAT; + sp[-1].u.float_number=f; + break; + } + + case T_STRING: + { + char buf[200]; + switch(sp[-1].type) + { + case T_INT: + sprintf(buf,"%ld",(long)sp[-1].u.integer); + break; + + case T_FLOAT: + sprintf(buf,"%f",(double)sp[-1].u.float_number); + break; + + default: + error("Cannot cast to string.\n"); + } + + sp[-1].type=T_STRING; + sp[-1].u.string=make_shared_string(buf); + break; + } + + case T_OBJECT: + switch(sp[-1].type) + { + case T_STRING: + APPLY_MASTER("cast_to_object",1); + break; + + case T_FUNCTION: + sp[-1].type = T_OBJECT; + break; + } + break; + + case T_PROGRAM: + APPLY_MASTER("cast_to_program",1); + break; + + case T_FUNCTION: + { + INT32 i; + if(fp->current_object->prog) + error("Cast to function in destructed object.\n"); + i=find_shared_string_identifier(sp[-1].u.string,fp->current_object->prog); + free_string(sp[-1].u.string); + /* FIXME, check that it is a indeed a function */ + if(i==-1) + { + sp[-1].type=T_FUNCTION; + sp[-1].subtype=i; + sp[-1].u.object=fp->current_object; + fp->current_object->refs++; + }else{ + sp[-1].type=T_INT; + sp[-1].subtype=NUMBER_UNDEFINED; + sp[-1].u.integer=0; + } + break; + } + + } + } +} + void f_cast() { INT32 i; i=compile_type_to_runtime_type(sp[-1].u.string); - pop_stack(); - if(i != sp[-1].type) + + if(i != sp[-2].type) { + if(i == T_MIXED) + { + pop_stack(); + return; + } + + if(sp[-2].type == T_OBJECT) + { + struct pike_string *s; + s=describe_type(sp[-1].u.string); + pop_stack(); + push_string(s); + if(!sp[-2].u.object->prog) + error("Cast called on destructed object.\n"); + if(sp[-2].u.object->prog->lfuns[LFUN_CAST] == -1) + error("No cast method in object.\n"); + apply_lfun(sp[-2].u.object, LFUN_CAST, 1); + free_svalue(sp-2); + sp[-2]=sp[-1]; + sp--; + return; + } + + pop_stack(); switch(i) { case T_MIXED: @@ -95,7 +257,7 @@ void f_cast() break; case T_STRING: - i=strtol(sp[-1].u.string->str,0,0); + i=STRTOL(sp[-1].u.string->str,0,0); free_string(sp[-1].u.string); break; @@ -117,7 +279,7 @@ void f_cast() break; case T_STRING: - f=strtod(sp[-1].u.string->str,0); + f=STRTOD(sp[-1].u.string->str,0); free_string(sp[-1].u.string); break; @@ -193,6 +355,8 @@ void f_cast() } } + }else{ + pop_stack(); } } @@ -265,7 +429,7 @@ static INT32 low_sscanf(INT32 num_arg) int match_len; struct svalue sval; int e,cnt,matches,eye,arg; - int no_assign; + int no_assign,field_length; char set[256]; struct svalue *argp; @@ -309,188 +473,279 @@ static INT32 low_sscanf(INT32 num_arg) } #endif + no_assign=0; + field_length=-1; + cnt++; if(cnt>=match_len) error("Error in sscanf format string.\n"); - if(match[cnt]=='*') + while(1) { - no_assign=1; - cnt++; - if(cnt>=match_len) - error("Error in sscanf format string.\n"); - }else{ - no_assign=0; - } + switch(match[cnt]) + { + case '*': + no_assign=1; + cnt++; + if(cnt>=match_len) + error("Error in sscanf format string.\n"); + continue; + + case '0': case '1': case '2': case '3': case '4': + case '5': case '6': case '7': case '8': case '9': + { + char *t; + field_length=STRTOL(match+cnt,&t,10); + cnt=t-match; + continue; + } - switch(match[cnt]) - { - case 'c': - if(eye>=input_len) return matches; - sval.type=T_INT; - sval.subtype=NUMBER_NUMBER; - sval.u.integer=EXTRACT_UCHAR(input+eye); - eye++; - break; + case 'c': + if(field_length == -1) field_length = 1; + if(eye+field_length > input_len) return matches; + sval.type=T_INT; + sval.subtype=NUMBER_NUMBER; + sval.u.integer=0; + while(--field_length >= 0) + { + sval.u.integer<<=8; + sval.u.integer|=EXTRACT_UCHAR(input+eye); + eye++; + } + break; - case 'd': - { - char * t; - - if(eye>=input_len) return matches; - sval.u.integer=STRTOL(input+eye,&t,0); - if(input + eye == t) return matches; - eye=t-input; - sval.type=T_INT; - sval.subtype=NUMBER_NUMBER; - break; - } + case 'd': + { + char * t; + + if(eye>=input_len) return matches; + sval.u.integer=STRTOL(input+eye,&t,10); + if(input + eye == t) return matches; + eye=t-input; + sval.type=T_INT; + sval.subtype=NUMBER_NUMBER; + break; + } - case 'f': - { - char * t; + case 'x': + { + char * t; + + if(eye>=input_len) return matches; + sval.u.integer=STRTOL(input+eye,&t,16); + if(input + eye == t) return matches; + eye=t-input; + sval.type=T_INT; + sval.subtype=NUMBER_NUMBER; + break; + } - if(eye>=input_len) return matches; - sval.u.float_number=STRTOD(input+eye,&t); - if(input + eye == t) return matches; - eye=t-input; - sval.type=T_FLOAT; -#ifdef __CHECKER__ - sval.subtype=0; -#endif - break; - } + case 'o': + { + char * t; + + if(eye>=input_len) return matches; + sval.u.integer=STRTOL(input+eye,&t,8); + if(input + eye == t) return matches; + eye=t-input; + sval.type=T_INT; + sval.subtype=NUMBER_NUMBER; + break; + } - case 's': - if(cnt+1>=match_len) + case 'D': { - sval.type=T_STRING; + char * t; + + if(eye>=input_len) return matches; + sval.u.integer=STRTOL(input+eye,&t,0); + if(input + eye == t) return matches; + eye=t-input; + sval.type=T_INT; + sval.subtype=NUMBER_NUMBER; + break; + } + + case 'f': + { + char * t; + + if(eye>=input_len) return matches; + sval.u.float_number=STRTOD(input+eye,&t); + if(input + eye == t) return matches; + eye=t-input; + sval.type=T_FLOAT; #ifdef __CHECKER__ sval.subtype=0; #endif - sval.u.string=make_shared_binary_string(input+eye,input_len-eye); break; - }else{ - char *end_str_start; - char *end_str_end; - char *s=0; /* make gcc happy */ - char *p=0; /* make gcc happy */ - int start,contains_percent_percent, new_eye; - - start=eye; - end_str_start=match+cnt+1; - - s=match+cnt+1; - test_again: - if(*s=='%') + } + + case 's': + if(field_length != -1) { - s++; - if(*s=='*') s++; - switch(*s) + if(input_len - eye < field_length) + return matches; + + sval.type=T_STRING; +#ifdef __CHECKER__ + sval.subtype=0; +#endif + sval.u.string=make_shared_binary_string(input+eye,field_length); + eye+=field_length; + break; + } + + if(cnt+1>=match_len) + { + sval.type=T_STRING; +#ifdef __CHECKER__ + sval.subtype=0; +#endif + sval.u.string=make_shared_binary_string(input+eye,input_len-eye); + eye=input_len; + break; + }else{ + char *end_str_start; + char *end_str_end; + char *s=0; /* make gcc happy */ + char *p=0; /* make gcc happy */ + int start,contains_percent_percent, new_eye; + + start=eye; + end_str_start=match+cnt+1; + + s=match+cnt+1; + test_again: + if(*s=='%') { - case 'n': s++; - goto test_again; + if(*s=='*') s++; + switch(*s) + { + case 'n': + s++; + goto test_again; - case 's': - error("Illigal to have two adjecent %%s.\n"); - return 0; /* make gcc happy */ + case 's': + error("Illigal to have two adjecent %%s.\n"); + return 0; /* make gcc happy */ - /* sscanf("foo-bar","%s%d",a,b) might not work as expected */ - case 'd': - for(e=0;e<256;e++) set[e]=1; - for(e='0';e<='9';e++) set[e]=0; - set['-']=0; - goto match_set; - - case 'f': - for(e=0;e<256;e++) set[e]=1; - for(e='0';e<='9';e++) set[e]=0; - set['.']=set['-']=0; - goto match_set; - - case '[': /* oh dear */ - read_set(match,s-match+1,set,match_len); - for(e=0;e<256;e++) set[e]=!set[e]; - goto match_set; + /* sscanf("foo-bar","%s%d",a,b) might not work as expected */ + case 'd': + for(e=0;e<256;e++) set[e]=1; + for(e='0';e<='9';e++) set[e]=0; + set['-']=0; + goto match_set; + + case 'o': + for(e=0;e<256;e++) set[e]=1; + for(e='0';e<='7';e++) set[e]=0; + goto match_set; + + case 'x': + for(e=0;e<256;e++) set[e]=1; + for(e='0';e<='9';e++) set[e]=0; + for(e='a';e<='f';e++) set[e]=0; + goto match_set; + + case 'D': + for(e=0;e<256;e++) set[e]=1; + for(e='0';e<='9';e++) set[e]=0; + set['-']=0; + set['x']=0; + goto match_set; + + case 'f': + for(e=0;e<256;e++) set[e]=1; + for(e='0';e<='9';e++) set[e]=0; + set['.']=set['-']=0; + goto match_set; + + case '[': /* oh dear */ + read_set(match,s-match+1,set,match_len); + for(e=0;e<256;e++) set[e]=!set[e]; + goto match_set; + } } - } - contains_percent_percent=0; + contains_percent_percent=0; - for(e=cnt;e<match_len;e++) - { - if(match[e]=='%') + for(e=cnt;e<match_len;e++) { - if(match[e+1]=='%') + if(match[e]=='%') { - contains_percent_percent=1; - e++; - }else{ - break; + if(match[e+1]=='%') + { + contains_percent_percent=1; + e++; + }else{ + break; + } } } - } - end_str_end=match+e; + end_str_end=match+e; - if(!contains_percent_percent) - { - s=MEMMEM(end_str_start, - end_str_end-end_str_start, - input+eye, - input_len-eye); - if(!s) return matches; - eye=s-input; - new_eye=eye+end_str_end-end_str_start; - }else{ - for(;eye<input_len;eye++) + if(!contains_percent_percent) { - p=input+eye; - for(s=end_str_start;s<end_str_end;s++,p++) + s=my_memmem(end_str_start, + end_str_end-end_str_start, + input+eye, + input_len-eye); + if(!s) return matches; + eye=s-input; + new_eye=eye+end_str_end-end_str_start; + }else{ + for(;eye<input_len;eye++) { - if(*s!=*p) break; - if(*s=='%') s++; + p=input+eye; + for(s=end_str_start;s<end_str_end;s++,p++) + { + if(*s!=*p) break; + if(*s=='%') s++; + } + if(s==end_str_end) + break; } - if(s==end_str_end) - break; + if(eye==input_len) + return matches; + new_eye=p-input; } - if(eye==input_len) - return matches; - new_eye=p-input; - } - sval.type=T_STRING; + sval.type=T_STRING; #ifdef __CHECKER__ - sval.subtype=0; + sval.subtype=0; #endif - sval.u.string=make_shared_binary_string(input+start,eye-start); + sval.u.string=make_shared_binary_string(input+start,eye-start); - cnt=end_str_end-match-1; - eye=new_eye; - break; - } + cnt=end_str_end-match-1; + eye=new_eye; + break; + } - case '[': - cnt=read_set(match,cnt+1,set,match_len); + case '[': + cnt=read_set(match,cnt+1,set,match_len); - match_set: - for(e=eye;eye<input_len && set[EXTRACT_UCHAR(input+eye)];eye++); - sval.type=T_STRING; + match_set: + for(e=eye;eye<input_len && set[EXTRACT_UCHAR(input+eye)];eye++); + sval.type=T_STRING; #ifdef __CHECKER__ - sval.subtype=0; + sval.subtype=0; #endif - sval.u.string=make_shared_binary_string(input+e,eye-e); - break; + sval.u.string=make_shared_binary_string(input+e,eye-e); + break; - case 'n': - sval.type=T_INT; - sval.subtype=NUMBER_NUMBER; - sval.u.integer=eye; - break; + case 'n': + sval.type=T_INT; + sval.subtype=NUMBER_NUMBER; + sval.u.integer=eye; + break; - default: - error("Unknown sscanf token %%%c\n",match[cnt]); + default: + error("Unknown sscanf token %%%c\n",match[cnt]); + } + break; } matches++; diff --git a/src/opcodes.h b/src/opcodes.h index f577aba47dc34f219e58051448864fbf452a1f20..67e1db71fe63afc75f3c479b5ead795c2a34fba9 100644 --- a/src/opcodes.h +++ b/src/opcodes.h @@ -1,6 +1,6 @@ /*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ #ifndef OPCODES_H diff --git a/src/operators.c b/src/operators.c index 9b18904820fe0128210ac8d8ace88ab00cf4d78b..364302f42042bcc79e996d20ee0ab779e605f8ae 100644 --- a/src/operators.c +++ b/src/operators.c @@ -1,13 +1,13 @@ /*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ #include <math.h> #include "global.h" #include "interpret.h" #include "svalue.h" -#include "list.h" +#include "multiset.h" #include "mapping.h" #include "array.h" #include "stralloc.h" @@ -16,25 +16,46 @@ #include "language.h" #include "memory.h" #include "error.h" - -#define COMPARISON(ID,EXPR) \ -void ID() \ +#include "docode.h" +#include "constants.h" +#include "peep.h" +#include "lex.h" +#include "program.h" +#include "object.h" + +#define COMPARISON(ID,NAME,EXPR) \ +void ID(INT32 args) \ { \ - int i=EXPR; \ + int i; \ + if(args > 2) \ + pop_n_elems(args-2); \ + else if(args < 2) \ + error("Too few arguments to %s\n",NAME); \ + i=EXPR; \ pop_n_elems(2); \ - sp->type=T_INT; \ - sp->u.integer=i; \ - sp++; \ -} + push_int(i); \ +} + +COMPARISON(f_eq,"`==", is_eq(sp-2,sp-1)) +COMPARISON(f_ne,"`!=",!is_eq(sp-2,sp-1)) +COMPARISON(f_lt,"`<" , is_lt(sp-2,sp-1)) +COMPARISON(f_le,"`<=",!is_gt(sp-2,sp-1)) +COMPARISON(f_gt,"`>" , is_gt(sp-2,sp-1)) +COMPARISON(f_ge,"`>=",!is_lt(sp-2,sp-1)) + + +#define CALL_OPERATOR(OP, args) \ + if(!sp[-args].u.object->prog) \ + error("Operator %s called in destructed object.\n",lfun_names[OP]); \ + if(sp[-args].u.object->prog->lfuns[OP] == -1) \ + error("No operator %s in object.\n",lfun_names[OP]); \ + apply_lfun(sp[-args].u.object, OP, args-1); \ + free_svalue(sp-2); \ + sp[-2]=sp[-1]; \ + sp--; -COMPARISON(f_eq, is_eq(sp-2,sp-1)) -COMPARISON(f_ne,!is_eq(sp-2,sp-1)) -COMPARISON(f_lt, is_lt(sp-2,sp-1)) -COMPARISON(f_le,!is_gt(sp-2,sp-1)) -COMPARISON(f_gt, is_gt(sp-2,sp-1)) -COMPARISON(f_ge,!is_lt(sp-2,sp-1)) -void f_sum(INT32 args) +void f_add(INT32 args) { INT32 e,size; TYPE_FIELD types; @@ -50,6 +71,9 @@ void f_sum(INT32 args) switch(sp[-args].type) { case T_OBJECT: + CALL_OPERATOR(LFUN_ADD,args); + return; + case T_PROGRAM: case T_FUNCTION: error("Bad argument 1 to summation\n"); @@ -60,31 +84,33 @@ void f_sum(INT32 args) case BIT_STRING: { - struct lpc_string *r; + struct pike_string *r; char *buf; - if(args==1) return; - size=0; - - for(e=-args;e<0;e++) size+=sp[e].u.string->len; - - if(args==2) + switch(args) { - r=add_shared_strings(sp[-2].u.string,sp[-1].u.string); - }else{ + case 1: return; + default: + size=0; + for(e=-args;e<0;e++) size+=sp[e].u.string->len; + r=begin_shared_string(size); buf=r->str; for(e=-args;e<0;e++) { +#if 1 + int q; + for(q=0;q<sp[e].u.string->len;q++) + buf[q]=sp[e].u.string->str[q]; +#else MEMCPY(buf,sp[e].u.string->str,sp[e].u.string->len); +#endif buf+=sp[e].u.string->len; } r=end_shared_string(r); } - for(e=-args;e<0;e++) - { - free_string(sp[e].u.string); - } + + for(e=-args;e<0;e++) free_string(sp[e].u.string); sp-=args; push_string(r); break; @@ -94,7 +120,7 @@ void f_sum(INT32 args) case BIT_STRING | BIT_FLOAT: case BIT_STRING | BIT_FLOAT | BIT_INT: { - struct lpc_string *r; + struct pike_string *r; char *buf,*str; size=0; for(e=-args;e<0;e++) @@ -161,6 +187,25 @@ void f_sum(INT32 args) break; } + case BIT_FLOAT | BIT_INT: + { + FLOAT_TYPE sum; + sum=0.0; + for(e=-args; e<0; e++) + { + if(sp[e].type==T_FLOAT) + { + sum+=sp[e].u.float_number; + }else{ + sum+=(FLOAT_TYPE)sp[e].u.integer; + } + } + sp-=args-1; + sp[-1].type=T_FLOAT; + sp[-1].u.float_number=sum; + break; + } + case BIT_ARRAY: { struct array *a; @@ -180,27 +225,145 @@ void f_sum(INT32 args) break; } - case BIT_LIST: + case BIT_MULTISET: { - struct list *l; + struct multiset *l; - l = add_lists(sp - args, args); + l = add_multisets(sp - args, args); pop_n_elems(args); - push_list(l); + push_multiset(l); break; } } } -void f_add() { f_sum(2); } +static int generate_sum(node *n) +{ + switch(count_args(CDR(n))) + { + case 1: + do_docode(CDR(n),0); + return 1; + + case 2: + do_docode(CDR(n),DO_NOT_COPY); + emit2(F_ADD); + return 1; + + default: + return 0; + } +} + +static node *optimize_binary(node *n) +{ + node **first_arg, **second_arg, *ret; + if(count_args(CDR(n))==2) + { + first_arg=my_get_arg(&CDR(n), 0); + second_arg=my_get_arg(&CDR(n), 1); + +#ifdef DEBUG + if(!first_arg || !second_arg) + fatal("Couldn't find argument!\n"); +#endif + + if((*second_arg)->type == (*first_arg)->type && + compile_type_to_runtime_type((*second_arg)->type) != T_MIXED) + { + if((*first_arg)->token == F_APPLY && + CAR(*first_arg)->token == F_CONSTANT && + is_eq(& CAR(*first_arg)->u.sval, & CAR(n)->u.sval)) + { + ret=mknode(F_APPLY, + CAR(n), + mknode(F_ARG_LIST, + CDR(*first_arg), + *second_arg)); + CAR(n)=0; + CDR(*first_arg)=0; + *second_arg=0; + + return ret; + } + + if((*second_arg)->token == F_APPLY && + CAR(*second_arg)->token == F_CONSTANT && + is_eq(& CAR(*second_arg)->u.sval, & CAR(n)->u.sval)) + { + ret=mknode(F_APPLY, + CAR(n), + mknode(F_ARG_LIST, + *first_arg, + CDR(*second_arg))); + CAR(n)=0; + *first_arg=0; + CDR(*second_arg)=0; + + return ret; + } + } + } + return 0; +} + + +static int generate_comparison(node *n) +{ + if(count_args(CDR(n))==2) + { + if(do_docode(CDR(n),DO_NOT_COPY) != 2) + fatal("Count args was wrong in generate_comparison.\n"); + + if(CAR(n)->u.sval.u.efun->function == f_eq) + emit2(F_EQ); + else if(CAR(n)->u.sval.u.efun->function == f_ne) + emit2(F_NE); + else if(CAR(n)->u.sval.u.efun->function == f_lt) + emit2(F_LT); + else if(CAR(n)->u.sval.u.efun->function == f_le) + emit2(F_LE); + else if(CAR(n)->u.sval.u.efun->function == f_gt) + emit2(F_GT); + else if(CAR(n)->u.sval.u.efun->function == f_ge) + emit2(F_GE); + else + fatal("Couldn't generate comparison!\n"); + return 1; + } + return 0; +} + +static int float_promote() +{ + if(sp[-2].type==T_INT) + { + sp[-2].u.float_number=(FLOAT_TYPE)sp[-2].u.integer; + sp[-2].type=T_FLOAT; + } + + if(sp[-1].type==T_INT) + { + sp[-1].u.float_number=(FLOAT_TYPE)sp[-1].u.integer; + sp[-1].type=T_FLOAT; + } + + return sp[-2].type == sp[-1].type; +} -void f_subtract() +void o_subtract() { - if (sp[-2].type != sp[-1].type ) + if (sp[-2].type != sp[-1].type && + !float_promote() && + sp[-2].type != T_OBJECT) error("Subtract on different types.\n"); - switch(sp[-1].type) + switch(sp[-2].type) { + case T_OBJECT: + CALL_OPERATOR(LFUN_SUBTRACT,2); + break; + case T_ARRAY: { struct array *a; @@ -222,12 +385,12 @@ void f_subtract() return; } - case T_LIST: + case T_MULTISET: { - struct list *l; - l=merge_lists(sp[-2].u.list, sp[-1].u.list, OP_SUB); + struct multiset *l; + l=merge_multisets(sp[-2].u.multiset, sp[-1].u.multiset, OP_SUB); pop_n_elems(2); - push_list(l); + push_multiset(l); return; } @@ -243,14 +406,14 @@ void f_subtract() case T_STRING: { - struct lpc_string *s,*ret; - sp--; + struct pike_string *s,*ret; s=make_shared_string(""); - ret=string_replace(sp[-1].u.string,sp[0].u.string,s); + ret=string_replace(sp[-2].u.string,sp[-1].u.string,s); + free_string(sp[-2].u.string); free_string(sp[-1].u.string); - free_string(sp[0].u.string); free_string(s); - sp[-1].u.string=ret; + sp[-2].u.string=ret; + sp--; return; } @@ -259,13 +422,46 @@ void f_subtract() } } -void f_and() +void f_minus(INT32 args) +{ + switch(args) + { + case 0: error("Too few arguments to `-\n"); + case 1: o_negate(); break; + case 2: o_subtract(); break; + default: error("Too many arguments to `-\n"); + } +} + +static int generate_minus(node *n) { - if(sp[-1].type != sp[-2].type) + switch(count_args(CDR(n))) + { + case 1: + do_docode(CDR(n),DO_NOT_COPY); + emit2(F_NEGATE); + return 1; + + case 2: + do_docode(CDR(n),DO_NOT_COPY); + emit2(F_SUBTRACT); + return 1; + } + return 0; +} + +void o_and() +{ + if(sp[-1].type != sp[-2].type && + sp[-2].type != T_OBJECT) error("Bitwise and on different types.\n"); switch(sp[-2].type) { + case T_OBJECT: + CALL_OPERATOR(LFUN_AND,2); + break; + case T_INT: sp--; sp[-1].u.integer &= sp[0].u.integer; @@ -280,12 +476,12 @@ void f_and() return; } - case T_LIST: + case T_MULTISET: { - struct list *l; - l=merge_lists(sp[-2].u.list, sp[-1].u.list, OP_AND); + struct multiset *l; + l=merge_multisets(sp[-2].u.multiset, sp[-1].u.multiset, OP_AND); pop_n_elems(2); - push_list(l); + push_multiset(l); return; } @@ -302,13 +498,53 @@ void f_and() } } -void f_or() +void f_and(INT32 args) +{ + switch(args) + { + case 0: error("Too few arguments to `&\n"); + case 1: return; + case 2: o_and(); return; + default: + if(sp[-args].type == T_OBJECT) + { + CALL_OPERATOR(LFUN_AND, args); + }else{ + while(--args > 0) o_and(); + } + } +} + +static int generate_and(node *n) { - if(sp[-1].type != sp[-2].type) + switch(count_args(CDR(n))) + { + case 1: + do_docode(CDR(n),0); + return 1; + + case 2: + do_docode(CDR(n),0); + emit2(F_AND); + return 1; + + default: + return 0; + } +} + +void o_or() +{ + if(sp[-1].type != sp[-2].type && + sp[-2].type != T_OBJECT) error("Bitwise or on different types.\n"); switch(sp[-2].type) { + case T_OBJECT: + CALL_OPERATOR(LFUN_OR,2); + break; + case T_INT: sp--; sp[-1].u.integer |= sp[0].u.integer; @@ -323,12 +559,12 @@ void f_or() return; } - case T_LIST: + case T_MULTISET: { - struct list *l; - l=merge_lists(sp[-2].u.list, sp[-1].u.list, OP_OR); + struct multiset *l; + l=merge_multisets(sp[-2].u.multiset, sp[-1].u.multiset, OP_OR); pop_n_elems(2); - push_list(l); + push_multiset(l); return; } @@ -346,13 +582,54 @@ void f_or() } } -void f_xor() +void f_or(INT32 args) +{ + switch(args) + { + case 0: error("Too few arguments to `|\n"); + case 1: return; + case 2: o_or(); return; + default: + if(sp[-args].type==T_OBJECT) + { + CALL_OPERATOR(LFUN_OR, args); + } else { + while(--args > 0) o_or(); + } + } +} + +static int generate_or(node *n) { - if(sp[-1].type != sp[-2].type) + switch(count_args(CDR(n))) + { + case 1: + do_docode(CDR(n),0); + return 1; + + case 2: + do_docode(CDR(n),0); + emit2(F_OR); + return 1; + + default: + return 0; + } +} + + +void o_xor() +{ + if(sp[-1].type != sp[-2].type && + sp[-2].type != T_OBJECT) error("Bitwise xor on different types.\n"); switch(sp[-2].type) { + case T_OBJECT: + CALL_OPERATOR(LFUN_XOR,2); + break; + case T_INT: sp--; sp[-1].u.integer ^= sp[0].u.integer; @@ -367,12 +644,12 @@ void f_xor() return; } - case T_LIST: + case T_MULTISET: { - struct list *l; - l=merge_lists(sp[-2].u.list, sp[-1].u.list, OP_XOR); + struct multiset *l; + l=merge_multisets(sp[-2].u.multiset, sp[-1].u.multiset, OP_XOR); pop_n_elems(2); - push_list(l); + push_multiset(l); return; } @@ -389,74 +666,218 @@ void f_xor() } } -void f_lsh() +void f_xor(INT32 args) +{ + switch(args) + { + case 0: error("Too few arguments to `^\n"); + case 1: return; + case 2: o_xor(); return; + default: + if(sp[-args].type==T_OBJECT) + { + CALL_OPERATOR(LFUN_XOR, args); + } else { + while(--args > 0) o_xor(); + } + } +} + +static int generate_xor(node *n) +{ + switch(count_args(CDR(n))) + { + case 1: + do_docode(CDR(n),0); + return 1; + + case 2: + do_docode(CDR(n),0); + emit2(F_XOR); + return 1; + + default: + return 0; + } +} + +void o_lsh() { - if(sp[-2].type != T_INT) error("Bad argument 1 to <<\n"); + if(sp[-2].type != T_INT) + { + if(sp[-2].type == T_OBJECT) + { + CALL_OPERATOR(LFUN_LSH,2); + return; + } + + error("Bad argument 1 to <<\n"); + } if(sp[-1].type != T_INT) error("Bad argument 2 to <<\n"); sp--; - sp[-1].u.integer <<= sp[0].u.integer; + sp[-1].u.integer = sp[-1].u.integer << sp->u.integer; } -void f_rsh() +void f_lsh(INT32 args) { - if(sp[-2].type != T_INT) error("Bad argument 1 to >>\n"); + if(args != 2) + error("Bad number of args to `<<\n"); + o_lsh(); +} + +static int generate_lsh(node *n) +{ + if(count_args(CDR(n))==2) + { + do_docode(CDR(n),DO_NOT_COPY); + emit2(F_LSH); + return 1; + } + return 0; +} + +void o_rsh() +{ + if(sp[-2].type != T_INT) + { + if(sp[-2].type == T_OBJECT) + { + CALL_OPERATOR(LFUN_RSH,2); + return; + } + error("Bad argument 1 to >>\n"); + } if(sp[-1].type != T_INT) error("Bad argument 2 to >>\n"); sp--; - sp[-1].u.integer >>= sp[0].u.integer; + sp[-1].u.integer = sp[-1].u.integer >> sp->u.integer; } -void f_multiply() +void f_rsh(INT32 args) { - switch(sp[-2].type) + if(args != 2) + error("Bad number of args to `>>\n"); + o_rsh(); +} + +static int generate_rsh(node *n) +{ + if(count_args(CDR(n))==2) { - case T_ARRAY: - if(sp[-1].type!=T_STRING) + do_docode(CDR(n),DO_NOT_COPY); + emit2(F_RSH); + return 1; + } + return 0; +} + + +#define TWO_TYPES(X,Y) (((X)<<8)|(Y)) +void o_multiply() +{ + switch(TWO_TYPES(sp[-2].type,sp[-1].type)) + { + case TWO_TYPES(T_ARRAY,T_STRING): { - error("Bad argument 2 to multiply.\n"); - }else{ - struct lpc_string *ret; + struct pike_string *ret; + ret=implode(sp[-2].u.array,sp[-1].u.string); + free_string(sp[-1].u.string); + free_array(sp[-2].u.array); + sp[-2].type=T_STRING; + sp[-2].u.string=ret; sp--; - ret=implode(sp[-1].u.array,sp[0].u.string); - free_string(sp[0].u.string); - free_array(sp[-1].u.array); - sp[-1].type=T_STRING; - sp[-1].u.string=ret; return; } - case T_FLOAT: - if(sp[-1].type!=T_FLOAT) error("Bad argument 2 to multiply.\n"); + case TWO_TYPES(T_FLOAT,T_FLOAT): sp--; sp[-1].u.float_number *= sp[0].u.float_number; return; - case T_INT: - if(sp[-1].type!=T_INT) error("Bad argument 2 to multiply.\n"); + case TWO_TYPES(T_FLOAT,T_INT): + sp--; + sp[-1].u.float_number *= (FLOAT_TYPE)sp[0].u.integer; + return; + + case TWO_TYPES(T_INT,T_FLOAT): + sp--; + sp[-1].u.float_number= + (FLOAT_TYPE) sp[-1].u.integer * (FLOAT_TYPE)sp[0].u.float_number; + sp[-1].type=T_FLOAT; + return; + + case TWO_TYPES(T_INT,T_INT): sp--; sp[-1].u.integer *= sp[0].u.integer; return; default: - error("Bad argument 1 to multiply.\n"); + if(sp[-2].type == T_OBJECT) + { + CALL_OPERATOR(LFUN_MULTIPLY,2); + return; + } + + error("Bad arguments to multiply.\n"); + } +} + +void f_multiply(INT32 args) +{ + switch(args) + { + case 0: error("Too few arguments to `*\n"); + case 1: return; + case 2: o_multiply(); return; + default: + if(sp[-args].type==T_OBJECT) + { + CALL_OPERATOR(LFUN_MULTIPLY, args); + } else { + while(--args > 0) o_multiply(); + } + } +} + +static int generate_multiply(node *n) +{ + switch(count_args(CDR(n))) + { + case 1: + do_docode(CDR(n),0); + return 1; + + case 2: + do_docode(CDR(n),0); + emit2(F_MULTIPLY); + return 1; + + default: + return 0; } } -void f_divide() +void o_divide() { - if(sp[-2].type!=sp[-1].type) + if(sp[-2].type!=sp[-1].type && + !float_promote() && + sp[-2].type != T_OBJECT) error("Division on different types.\n"); switch(sp[-2].type) { + case T_OBJECT: + CALL_OPERATOR(LFUN_DIVIDE,2); + break; + case T_STRING: { struct array *ret; - sp--; - ret=explode(sp[-1].u.string,sp[0].u.string); + ret=explode(sp[-2].u.string,sp[-1].u.string); + free_string(sp[-2].u.string); free_string(sp[-1].u.string); - free_string(sp[0].u.string); - sp[-1].type=T_ARRAY; - sp[-1].u.array=ret; + sp[-2].type=T_ARRAY; + sp[-2].u.array=ret; + sp--; return; } @@ -479,13 +900,37 @@ void f_divide() } } -void f_mod() +void f_divide(INT32 args) +{ + if(args != 2) + error("Bad number of args to `/\n"); + o_divide(); +} + +static int generate_divide(node *n) +{ + if(count_args(CDR(n))==2) + { + do_docode(CDR(n),DO_NOT_COPY); + emit2(F_DIVIDE); + return 1; + } + return 0; +} + +void o_mod() { - if(sp[-2].type != sp[-1].type) + if(sp[-2].type != sp[-1].type && + !float_promote() && + sp[-2].type != T_OBJECT) error("Modulo on different types.\n"); - switch(sp[-1].type) + switch(sp[-2].type) { + case T_OBJECT: + CALL_OPERATOR(LFUN_MOD,2); + break; + case T_FLOAT: { FLOAT_TYPE foo; @@ -508,29 +953,114 @@ void f_mod() } } -void f_not() +void f_mod(INT32 args) { - if(sp[-1].type==T_INT) + if(args != 2) + error("Bad number of args to `%%\n"); + o_mod(); +} + +static int generate_mod(node *n) +{ + if(count_args(CDR(n))==2) { + do_docode(CDR(n),DO_NOT_COPY); + emit2(F_MOD); + return 1; + } + return 0; +} + +void o_not() +{ + switch(sp[-1].type) + { + case T_INT: sp[-1].u.integer = !sp[-1].u.integer; - }else{ - pop_stack(); - sp->type=T_INT; - sp->u.integer=0; - sp++; + break; + + case T_FUNCTION: + case T_OBJECT: + if(IS_ZERO(sp-1)) + { + pop_stack(); + push_int(1); + }else{ + pop_stack(); + push_int(0); + } + break; + + default: + free_svalue(sp-1); + sp[-1].type=T_INT; + sp[-1].u.integer=0; } } -void f_compl() +void f_not(INT32 args) +{ + if(args != 1) error("Bad number of args to `!\n"); + o_not(); +} + +static int generate_not(node *n) { - if (sp[-1].type != T_INT) error("Bad argument to ~\n"); - sp[-1].u.integer = ~ sp[-1].u.integer; + if(count_args(CDR(n))==1) + { + do_docode(CDR(n),DO_NOT_COPY); + emit2(F_NOT); + return 1; + } + return 0; } -void f_negate() +void o_compl() { switch(sp[-1].type) { + case T_OBJECT: + CALL_OPERATOR(LFUN_COMPL,1); + break; + + case T_INT: + sp[-1].u.integer = ~ sp[-1].u.integer; + break; + + case T_FLOAT: + sp[-1].u.float_number = -1.0 - sp[-1].u.float_number; + break; + + default: + error("Bad argument to ~\n"); + } +} + +void f_compl(INT32 args) +{ + if(args != 1) error("Bad number of args to `~\n"); + o_compl(); +} + +static int generate_compl(node *n) +{ + if(count_args(CDR(n))==1) + { + do_docode(CDR(n),DO_NOT_COPY); + emit2(F_COMPL); + return 1; + } + return 0; +} + +void o_negate() +{ + switch(sp[-1].type) + { + case T_OBJECT: + CALL_OPERATOR(LFUN_SUBTRACT,1); + break; + case T_FLOAT: sp[-1].u.float_number=-sp[-1].u.float_number; return; @@ -544,8 +1074,7 @@ void f_negate() } } - -void f_range() +void o_range() { INT32 from,to; if(sp[-2].type != T_INT) @@ -564,7 +1093,7 @@ void f_range() { case T_STRING: { - struct lpc_string *s; + struct pike_string *s; if(to>=sp[-1].u.string->len-1) { if(from==0) return; @@ -599,3 +1128,65 @@ void f_range() error("[ .. ] can only be done on strings and arrays.\n"); } } + +void f_sizeof(INT32 args) +{ + INT32 tmp; + if(args<1) + error("Too few arguments to sizeof()\n"); + + tmp=pike_sizeof(sp-args); + + pop_n_elems(args); + push_int(tmp); +} + +static int generate_sizeof(node *n) +{ + node **arg; + if(count_args(CDR(n)) != 1) return 0; + if(do_docode(CDR(n),DO_NOT_COPY) != 1) + fatal("Count args was wrong in sizeof().\n"); + emit2(F_SIZEOF); + return 1; +} + +void init_operators() +{ + add_efun2("`==",f_eq,"function(mixed,mixed:int)",OPT_TRY_OPTIMIZE,0,generate_comparison); + add_efun2("`!=",f_ne,"function(mixed,mixed:int)",OPT_TRY_OPTIMIZE,0,generate_comparison); + add_efun2("`!",f_not,"function(mixed:int)",OPT_TRY_OPTIMIZE,0,generate_not); + +#define CMP_TYPE "function(object,mixed:int)|function(mixed,object:int)|function(int|float,int|float:int)|function(string,string:int)" + add_efun2("`<", f_lt,CMP_TYPE,OPT_TRY_OPTIMIZE,0,generate_comparison); + add_efun2("`<=",f_le,CMP_TYPE,OPT_TRY_OPTIMIZE,0,generate_comparison); + add_efun2("`>", f_gt,CMP_TYPE,OPT_TRY_OPTIMIZE,0,generate_comparison); + add_efun2("`>=",f_ge,CMP_TYPE,OPT_TRY_OPTIMIZE,0,generate_comparison); + + add_efun2("`+",f_add,"function(object,mixed...:mixed)|function(int...:int)|!function(int...:mixed)&function(int|float...:float)|!function(int|float...:mixed)&function(string|int|float...:string)|function(array...:array)|function(mapping...:mapping)|function(multiset...:multiset)",OPT_TRY_OPTIMIZE,optimize_binary,generate_sum); + + add_efun2("`-",f_minus,"function(object,mixed...:mixed)|function(int:int)|function(float:float)|function(array,array:array)|function(mapping,mapping:mapping)|function(multiset,multiset:multiset)|function(float|int,float:float)|function(float,int:float)|function(int,int:int)|function(string,string:string)",OPT_TRY_OPTIMIZE,0,generate_minus); + +#define LOG_TYPE "function(object,mixed...:mixed)|function(int...:int)|function(mapping...:mapping)|function(multiset...:multiset)|function(array...:array)" + + add_efun2("`&",f_and,LOG_TYPE,OPT_TRY_OPTIMIZE,optimize_binary,generate_and); + + add_efun2("`|",f_or,LOG_TYPE,OPT_TRY_OPTIMIZE,optimize_binary,generate_or); + + add_efun2("`^",f_xor,LOG_TYPE,OPT_TRY_OPTIMIZE,optimize_binary,generate_xor); + + +#define SHIFT_TYPE "function(object,mixed:mixed)|function(int,int:int)" + + add_efun2("`<<",f_lsh,SHIFT_TYPE,OPT_TRY_OPTIMIZE,0,generate_lsh); + add_efun2("`>>",f_rsh,SHIFT_TYPE,OPT_TRY_OPTIMIZE,0,generate_rsh); + + add_efun2("`*",f_multiply,"function(object,mixed...:mixed)|function(int...:int)|!function(int...:mixed)&function(float|int...:float)|function(string*,string:string)",OPT_TRY_OPTIMIZE,optimize_binary,generate_multiply); + + add_efun2("`/",f_divide,"function(object,mixed:mixed)|function(int,int:int)|function(float|int,float:float)|function(float,int:float)|function(string,string:string*)",OPT_TRY_OPTIMIZE,0,generate_divide); + + add_efun2("`%",f_mod,"function(object,mixed:mixed)|function(int,int:int)|!function(int,int:mixed)&function(int|float,int|float:float)",OPT_TRY_OPTIMIZE,0,generate_mod); + + add_efun2("`~",f_compl,"function(object:mixed)|function(int:int)|function(float:float)",OPT_TRY_OPTIMIZE,0,generate_compl); + add_efun2("sizeof", f_sizeof, "function(string|multiset|array|mapping|object:int)",0,0,generate_sizeof); +} diff --git a/src/operators.h b/src/operators.h index a93a17f2b03a6457fbbeffa681f7c75f843ebbed..e42f3811151f8786b098b3a3146f57e0d732c865 100644 --- a/src/operators.h +++ b/src/operators.h @@ -1,36 +1,46 @@ /*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ #ifndef OPERATORS_H #define OPERATORS_H -#define COMPARISON(ID,X) void ID(void); +#define COMPARISON(ID,NAME,X) void ID(INT32 num_arg); /* Prototypes begin here */ -COMPARISON(f_eq, is_eq(sp-2,sp-1)) -COMPARISON(f_ne,!is_eq(sp-2,sp-1)) -COMPARISON(f_lt, is_lt(sp-2,sp-1)) -COMPARISON(f_le,!is_gt(sp-2,sp-1)) -COMPARISON(f_gt, is_gt(sp-2,sp-1)) -COMPARISON(f_ge,!is_lt(sp-2,sp-1)) -void f_sum(INT32 args); -void f_add(); -void f_subtract(); -void f_and(); -void f_or(); -void f_xor(); -void f_lsh(); -void f_rsh(); -void f_multiply(); -void f_divide(); -void f_mod(); -void f_not(); -void f_compl(); -void f_negate(); -void f_is_equal(int args,struct svalue *argp); -void f_range(); +COMPARISON(f_eq,"`==", is_eq(sp-2,sp-1)) +COMPARISON(f_ne,"`!=",!is_eq(sp-2,sp-1)) +COMPARISON(f_lt,"`<" , is_lt(sp-2,sp-1)) +COMPARISON(f_le,"`<=",!is_gt(sp-2,sp-1)) +COMPARISON(f_gt,"`>" , is_gt(sp-2,sp-1)) +COMPARISON(f_ge,"`>=",!is_lt(sp-2,sp-1)) +void f_add(INT32 args); +void o_subtract(); +void f_minus(INT32 args); +void o_and(); +void f_and(INT32 args); +void o_or(); +void f_or(INT32 args); +void o_xor(); +void f_xor(INT32 args); +void o_lsh(); +void f_lsh(INT32 args); +void o_rsh(); +void f_rsh(INT32 args); +void o_multiply(); +void f_multiply(INT32 args); +void o_divide(); +void f_divide(INT32 args); +void o_mod(); +void f_mod(INT32 args); +void o_not(); +void f_not(INT32 args); +void o_compl(); +void f_compl(INT32 args); +void o_negate(); +void o_range(); +void init_operators(); /* Prototypes end here */ #undef COMPARISON diff --git a/src/otable.h b/src/otable.h index d025ef120b63858e2b65384ecd3ed2ff396be0e6..53081c80dec37d07c0678aee2e17310dafe9b996 100644 --- a/src/otable.h +++ b/src/otable.h @@ -1,6 +1,6 @@ /*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ void enter_program_hash PROT((struct program *)); diff --git a/src/peep.c b/src/peep.c new file mode 100644 index 0000000000000000000000000000000000000000..b400ed017ba0576e516cd92b6a22db2e4ecd2cf2 --- /dev/null +++ b/src/peep.c @@ -0,0 +1,520 @@ +#include "global.h" +#include "types.h" +#include "language.h" +#include "stralloc.h" +#include "dynamic_buffer.h" +#include "program.h" +#include "las.h" +#include "docode.h" +#include "main.h" +#include "error.h" +#include "lex.h" + +struct p_instr_s +{ + short opcode; + short line; + struct pike_string *file; + INT32 arg; +}; + +typedef struct p_instr_s p_instr; + +dynamic_buffer instrbuf; + +static int hasarg(int opcode) +{ + switch(opcode) + { + case F_NUMBER: + case F_NEG_NUMBER: + case F_CALL_LFUN: + case F_CALL_LFUN_AND_POP: + case F_SSCANF: + case F_POP_N_ELEMS: + + case F_SIZEOF_LOCAL: + + case F_ASSIGN_GLOBAL: + case F_ASSIGN_GLOBAL_AND_POP: + case F_ASSIGN_LOCAL: + case F_ASSIGN_LOCAL_AND_POP: + case F_GLOBAL_LVALUE: + case F_LOCAL_LVALUE: + case F_CLEAR_LOCAL: + case F_LOCAL: + case F_GLOBAL: + + case F_INC_LOCAL: + case F_DEC_LOCAL: + case F_POST_INC_LOCAL: + case F_POST_DEC_LOCAL: + case F_INC_LOCAL_AND_POP: + case F_DEC_LOCAL_AND_POP: + + case F_LFUN: + case F_STRING: + case F_STRING_INDEX: + case F_LOCAL_INDEX: + case F_POS_INT_INDEX: + case F_NEG_INT_INDEX: + case F_CONSTANT: + case F_SWITCH: + case F_APPLY: + case F_CATCH: + + case F_BRANCH: + case F_BRANCH_WHEN_ZERO: + case F_BRANCH_WHEN_NON_ZERO: + + case F_BRANCH_WHEN_EQ: + case F_BRANCH_WHEN_NE: + case F_BRANCH_WHEN_LT: + case F_BRANCH_WHEN_LE: + case F_BRANCH_WHEN_GT: + case F_BRANCH_WHEN_GE: + + case F_FOREACH: + case F_INC_LOOP: + case F_DEC_LOOP: + case F_INC_NEQ_LOOP: + case F_DEC_NEQ_LOOP: + + case F_LAND: + case F_LOR: + + case F_ALIGN: + case F_POINTER: + case F_LABEL: + return 1; + + default: + return 0; + } +} + +void init_bytecode() +{ + low_init_buf(&instrbuf); +} + +void exit_bytecode() +{ + INT32 e,length; + p_instr *c; + + c=(p_instr *)instrbuf.s.str; + length=instrbuf.s.len / sizeof(p_instr); + + for(e=0;e<length;e++) free_string(c->file); + + toss_buffer(&instrbuf); +} + +int insert_opcode(unsigned int f, + INT32 b, + INT32 current_line, + struct pike_string *current_file) +{ + p_instr *p; + +#ifdef DEBUG + if(!hasarg(f) && b) + fatal("hasarg() is wrong!\n"); +#endif + + p=(p_instr *)low_make_buf_space(sizeof(p_instr), &instrbuf); + + +#ifdef DEBUG + if(!instrbuf.s.len) + fatal("Low make buf space failed!!!!!!\n"); +#endif + + p->opcode=f; + p->line=current_line; + copy_shared_string(p->file, current_file); + p->arg=b; + + return p - (p_instr *)instrbuf.s.str; +} + +int insert_opcode2(int f,int current_line, struct pike_string *current_file) +{ +#ifdef DEBUG + if(hasarg(f)) + fatal("hasarg() is wrong!\n"); +#endif + return insert_opcode(f,0,current_line, current_file); +} + +void update_arg(int instr,INT32 arg) +{ + p_instr *p; +#ifdef DEBUG + if(instr > (long)instrbuf.s.len / (long)sizeof(p_instr) || instr < 0) + fatal("update_arg outside known space.\n"); +#endif + p=(p_instr *)instrbuf.s.str; + p[instr].arg=arg; +} + + +/**** Bytecode Generator *****/ + +void ins_f_byte(unsigned int b) +{ + if(store_linenumbers && b<F_MAX_OPCODE) + ADD_COMPILED(b); + + b-=F_OFFSET; + if(b>255) + { + switch(b >> 8) + { + case 1: ins_f_byte(F_ADD_256); break; + case 2: ins_f_byte(F_ADD_512); break; + case 3: ins_f_byte(F_ADD_768); break; + case 4: ins_f_byte(F_ADD_1024); break; + default: + ins_f_byte(F_ADD_256X); + ins_byte(b/256,A_PROGRAM); + } + b&=255; + } + ins_byte((unsigned char)b,A_PROGRAM); +} + +static void ins_f_byte_with_arg(unsigned int a,unsigned INT32 b) +{ + switch(b >> 8) + { + case 0 : break; + case 1 : ins_f_byte(F_PREFIX_256); break; + case 2 : ins_f_byte(F_PREFIX_512); break; + case 3 : ins_f_byte(F_PREFIX_768); break; + case 4 : ins_f_byte(F_PREFIX_1024); break; + default: + if( b < 256*256) + { + ins_f_byte(F_PREFIX_CHARX256); + ins_byte(b>>8, A_PROGRAM); + }else if(b < 256*256*256) { + ins_f_byte(F_PREFIX_WORDX256); + ins_byte(b >> 16, A_PROGRAM); + ins_byte(b >> 8, A_PROGRAM); + }else{ + ins_f_byte(F_PREFIX_24BITX256); + ins_byte(b >> 24, A_PROGRAM); + ins_byte(b >> 16, A_PROGRAM); + ins_byte(b >> 8, A_PROGRAM); + } + } + ins_f_byte(a); + ins_byte(b, A_PROGRAM); +} + +void assemble() +{ + INT32 e,d,length,max_label,tmp; + INT32 *labels, *jumps, *point; + p_instr *c; + + c=(p_instr *)instrbuf.s.str; + length=instrbuf.s.len / sizeof(p_instr); + + max_label=0; + for(e=0;e<length;e++,c++) + if(c->opcode == F_LABEL) + if(c->arg > max_label) + max_label = c->arg; + + + labels=(INT32 *)xalloc(sizeof(INT32) * (max_label+1)); + jumps=(INT32 *)xalloc(sizeof(INT32) * (max_label+1)); + point=(INT32 *)xalloc(sizeof(INT32) * (max_label+1)); + + for(e=0;e<=max_label;e++) point[e]=labels[e]=jumps[e]=-1; + + c=(p_instr *)instrbuf.s.str; + for(e=0;e<length;e++) + { +#ifdef DEBUG + if(a_flag > 2 && store_linenumbers) + { + if(hasarg(c->opcode)) + fprintf(stderr,"===%3d %4x %s(%d)\n",c->line,PC,get_token_name(c->opcode),c->arg); + else + fprintf(stderr,"===%3d %4x %s\n",c->line,PC,get_token_name(c->opcode)); + } +#endif + + if(store_linenumbers) + store_linenumber(c->line, c->file); + + switch(c->opcode) + { + case F_ALIGN: + while(PC % c->arg) ins_byte(0, A_PROGRAM); + break; + + case F_LABEL: +#ifdef DEBUG + if(c->arg > max_label || c->arg < 0) + fatal("max_label calculation failed!\n"); + + if(labels[c->arg] != -1) + fatal("Duplicate label!\n"); +#endif + labels[c->arg]=PC; + + for(d=1;e+d<length;d++) + { + switch(c[d].opcode) + { + case F_LABEL: continue; + case F_BRANCH: point[c->arg]=c[d].arg; + } + break; + } + break; + + case F_BRANCH_WHEN_EQ: + case F_BRANCH_WHEN_NE: + case F_BRANCH_WHEN_LT: + case F_BRANCH_WHEN_LE: + case F_BRANCH_WHEN_GT: + case F_BRANCH_WHEN_GE: + case F_BRANCH_WHEN_ZERO: + case F_BRANCH_WHEN_NON_ZERO: + case F_BRANCH: + case F_INC_LOOP: + case F_DEC_LOOP: + case F_INC_NEQ_LOOP: + case F_DEC_NEQ_LOOP: + case F_LAND: + case F_LOR: + case F_CATCH: + case F_FOREACH: + ins_f_byte(c->opcode); + + case F_POINTER: +#ifdef DEBUG + if(c->arg > max_label || c->arg < 0) fatal("Jump to unknown label?\n"); +#endif + tmp=PC; + ins_int(jumps[c->arg],A_PROGRAM); + jumps[c->arg]=tmp; + break; + + case F_APPLY: + ins_f_byte(c->arg + F_MAX_OPCODE); + break; + + default: + if(hasarg(c->opcode)) + ins_f_byte_with_arg(c->opcode, c->arg); + else + ins_f_byte(c->opcode); + break; + } + + c++; + } + + for(e=0;e<=max_label;e++) + { + int tmp2; + tmp2=e; + while(point[tmp2]!=-1) tmp2=point[tmp2]; + tmp2=labels[tmp2]; + + while(jumps[e]!=-1) + { +#ifdef DEBUG + if(labels[e]==-1) + fatal("Hyperspace error: unknown jump point.\n"); +#endif + tmp=read_int(jumps[e]); + upd_int(jumps[e], tmp2 - jumps[e]); + jumps[e]=tmp; + } + } + + free((char *)labels); + free((char *)jumps); + free((char *)point); + + exit_bytecode(); +} + +/**** Peephole optimizer ****/ + +static int fifo_len, eye,len; +static p_instr *instructions; + +#ifdef DEBUG +static void debug() +{ + p_instr *p; + + if(fifo_len > (long)instrbuf.s.len / (long)sizeof(p_instr)) + fatal("Fifo too long.\n"); + + if(eye < 0) + fatal("Popped beyond start of code.\n"); + + if(instrbuf.s.len) + { + p=(p_instr *)low_make_buf_space(0, &instrbuf); + if(!p[-1].file) + fatal("No file name on last instruction!\n"); + } +} +#else +#define debug() +#endif + + +static p_instr *instr(int offset) +{ + p_instr *p; + + debug(); + + if(offset >= 0) + { + if(offset < fifo_len) + { + p=(p_instr *)low_make_buf_space(0, &instrbuf); + p-=fifo_len; + p+=offset; + return p; + }else{ + offset-=fifo_len; + offset+=eye; + if(offset >= len) return 0; + return instructions+offset; + } + }else{ + fatal("Can't handle negative offsets in peephole optimizer!\n"); + } +} + +static int opcode(int offset) +{ + p_instr *a; + a=instr(offset); + if(a) return a->opcode; + return -1; +} + +static int argument(int offset) +{ + p_instr *a; + a=instr(offset); + if(a) return a->arg; + return -1; +} + +static void advance() +{ + if(fifo_len) + { + fifo_len--; + }else{ + p_instr *p; + if(p=instr(0)) + insert_opcode(p->opcode, p->arg, p->line, p->file); + eye++; + } + debug(); +} + +static void pop_n_opcodes(int n) +{ + while(n>0) + { + if(fifo_len) + { + p_instr *p; + +#ifdef DEBUG + if(instrbuf.s.len <= 0) + fatal("Popping out of opcodes.\n"); +#endif + low_make_buf_space(-sizeof(p_instr), &instrbuf); + p=(p_instr *)low_make_buf_space(0, &instrbuf); + + free_string(p->file); + fifo_len--; + }else{ + eye++; + } + n--; + } +} + +#define insert(X,Y) insert_opcode((X),(Y),current_line, current_file),dofix() +#define insert2(X) insert_opcode2((X),current_line, current_file),dofix() + +static void dofix() +{ + p_instr *p,tmp; + int e; + + if(fifo_len) + { + p=(p_instr *)low_make_buf_space(0, &instrbuf); + tmp=p[-1]; + for(e=0;e<fifo_len;e++) + p[-1-e]=p[-2-e]; + p[-1-e]=tmp; + } +} + + +void asm_opt() +{ +#ifdef DEBUG + if(a_flag > 3) + { + p_instr *c; + INT32 e,length; + c=(p_instr *)instrbuf.s.str; + length=instrbuf.s.len / sizeof(p_instr); + + fprintf(stderr,"Optimization begins: \n"); + for(e=0;e<length;e++,c++) + { + if(hasarg(c->opcode)) + fprintf(stderr,"---%3d: %s(%d)\n",c->line,get_token_name(c->opcode),c->arg); + else + fprintf(stderr,"---%3d: %s\n",c->line,get_token_name(c->opcode)); + } + } +#endif + +#include "peep_engine.c" + + +#ifdef DEBUG + if(a_flag > 4) + { + p_instr *c; + INT32 e,length; + c=(p_instr *)instrbuf.s.str; + length=instrbuf.s.len / sizeof(p_instr); + + fprintf(stderr,"Optimization begins: \n"); + for(e=0;e<length;e++,c++) + { + if(hasarg(c->opcode)) + fprintf(stderr,">>>%3d: %s(%d)\n",c->line,get_token_name(c->opcode),c->arg); + else + fprintf(stderr,">>>%3d: %s\n",c->line,get_token_name(c->opcode)); + } + } +#endif +} + diff --git a/src/peep.h b/src/peep.h new file mode 100644 index 0000000000000000000000000000000000000000..bdeb3e946f2111b9c4f0cb39a2fd013e4fa64a13 --- /dev/null +++ b/src/peep.h @@ -0,0 +1,22 @@ +#ifndef PEEP_H +#define PEEP_H + +#include "dynamic_buffer.h" +extern dynamic_buffer instrbuf; + +/* Prototypes begin here */ +struct p_instr_s; +void init_bytecode(); +void exit_bytecode(); +int insert_opcode(unsigned int f, + INT32 b, + INT32 current_line, + struct pike_string *current_file); +int insert_opcode2(int f,int current_line, struct pike_string *current_file); +void update_arg(int instr,INT32 arg); +void ins_f_byte(unsigned int b); +void assemble(); +void asm_opt(); +/* Prototypes end here */ + +#endif diff --git a/src/peep.in b/src/peep.in new file mode 100644 index 0000000000000000000000000000000000000000..6358766217e624a3e9d7fe1ce783c9c8718235c5 --- /dev/null +++ b/src/peep.in @@ -0,0 +1,110 @@ +POP_N_ELEMS (0) : +POP_N_ELEMS POP_VALUE : POP_N_ELEMS ($1a + 1) +POP_VALUE POP_VALUE : POP_N_ELEMS (2) +POP_VALUE POP_N_ELEMS : POP_N_ELEMS ($2a + 1) +POP_N_ELEMS POP_N_ELEMS : POP_N_ELEMS ($1a + $2a) +POP_N_ELEMS(1) : POP_VALUE + +MARK MARK: MARK2 + +ASSIGN_GLOBAL POP_VALUE : ASSIGN_GLOBAL_AND_POP($1a) +ASSIGN_LOCAL POP_VALUE : ASSIGN_LOCAL_AND_POP($1a) +CALL_LFUN POP_VALUE : CALL_LFUN_AND_POP($1a) +NUMBER(0) : CONST0 +NUMBER(1) : CONST1 +NUMBER(-1) : CONST_1 +NUMBER (0x7fffffff) : BIGNUM +CONST0 NEGATE : CONST0 +CONST1 NEGATE : CONST_1 +CONST_1 NEGATE : CONST1 +NUMBER NEGATE : NEG_NUMBER($1a) +NUMBER [$1a < 0] : NEG_NUMBER (-$1a) +NEG_NUMBER NEGATE : NUMBER ($1a) +NEGATE CONST_1 ADD : COMPL +NEGATE CONST1 SUBTRACT : COMPL +CONST0 ASSIGN_LOCAL_AND_POP : CLEAR_LOCAL($2a) + +CONST_1 MULTIPLY : NEGATE +#CONST0 MULTIPLY : POP_VALUE CONST0 +CONST1 MULTIPLY : +#NUMBER MULTIPLY [count_bits($1a)==1]: NUMBER(my_log2($1a)) LSH + +CONST_1 DIVIDE : NEGATE +CONST1 DIVIDE : +#NUMBER DIVIDE [count_bits($1a)==1]: NUMBER(my_log2($1a)) RSH + +CONST0 SUBTRACT: +CONST0 XOR: +CONST_1 XOR: COMPL +EQ CONST0: NOT +CONST0 RETURN: RETURN_0 +INC POP_VALUE: INC_AND_POP +POST_INC POP_VALUE: INC_AND_POP +DEC POP_VALUE: DEC_AND_POP +POST_DEC POP_VALUE: DEC_AND_POP +NOT BRANCH_WHEN_NON_ZERO: BRANCH_WHEN_ZERO($2a) +NOT BRANCH_WHEN_ZERO: BRANCH_WHEN_NON_ZERO($2a) + +BRANCH !LABEL : BRANCH($1a) +RETURN !LABEL : RETURN +RETURN_0 !LABEL : RETURN_0 +BRANCH LABEL ($1a) : LABEL ($1a) + +LOCAL_LVALUE INC : INC_LOCAL ($1a) +LOCAL_LVALUE POST_INC : POST_INC_LOCAL ($1a) +LOCAL_LVALUE INC_AND_POP : INC_LOCAL_AND_POP ($1a) +INC_LOCAL POP_VALUE : INC_LOCAL_AND_POP ($1a) +POST_INC_LOCAL POP_VALUE : INC_LOCAL_AND_POP ($1a) + +LOCAL_LVALUE DEC : DEC_LOCAL ($1a) +LOCAL_LVALUE POST_DEC : POST_DEC_LOCAL ($1a) +LOCAL_LVALUE DEC_AND_POP : DEC_LOCAL_AND_POP ($1a) +DEC_LOCAL POP_VALUE : DEC_LOCAL_AND_POP ($1a) +POST_DEC_LOCAL POP_VALUE : DEC_LOCAL_AND_POP ($1a) + +ASSIGN_LOCAL_AND_POP LOCAL ($1a) : ASSIGN_LOCAL ($1a) +ASSIGN_LOCAL_AND_POP LOCAL ($1a) RETURN : RETURN +ASSIGN_GLOBAL_AND_POP GLOBAL ($1a) : ASSIGN_GLOBAL ($1a) +DEC_LOCAL_AND_POP LOCAL ($1a) : DEC_LOCAL ($1a) +INC_LOCAL_AND_POP LOCAL ($1a) : INC_LOCAL ($1a) + +GLOBAL_LVALUE INC_AND_POP GLOBAL($1a): GLOBAL_LVALUE($1a) INC +GLOBAL_LVALUE DEC_AND_POP GLOBAL($1a): GLOBAL_LVALUE($1a) DEC + +CONST1 BRANCH_WHEN_ZERO: +CONST0 BRANCH_WHEN_ZERO: BRANCH($2a) +CONST1 BRANCH_WHEN_NON_ZERO: BRANCH($2a) +CONST0 BRANCH_WHEN_NON_ZERO: + +EQ BRANCH_WHEN_NON_ZERO: BRANCH_WHEN_EQ ($2a) +NE BRANCH_WHEN_NON_ZERO: BRANCH_WHEN_NE ($2a) +LT BRANCH_WHEN_NON_ZERO: BRANCH_WHEN_LT ($2a) +GT BRANCH_WHEN_NON_ZERO: BRANCH_WHEN_GT ($2a) +LE BRANCH_WHEN_NON_ZERO: BRANCH_WHEN_LE ($2a) +GE BRANCH_WHEN_NON_ZERO: BRANCH_WHEN_GE ($2a) + +EQ BRANCH_WHEN_ZERO: BRANCH_WHEN_NE ($2a) +NE BRANCH_WHEN_ZERO: BRANCH_WHEN_EQ ($2a) +LT BRANCH_WHEN_ZERO: BRANCH_WHEN_GE ($2a) +GT BRANCH_WHEN_ZERO: BRANCH_WHEN_LE ($2a) +LE BRANCH_WHEN_ZERO: BRANCH_WHEN_GT ($2a) +GE BRANCH_WHEN_ZERO: BRANCH_WHEN_LT ($2a) + +EQ NOT: NE +NE NOT: EQ +LT NOT: GE +GT NOT: LE +LE NOT: GT +GE NOT: LT + +LOCAL SIZEOF: SIZEOF_LOCAL ($1a) + +STRING INDEX: STRING_INDEX ($1a) +LOCAL INDEX: LOCAL_INDEX ($1a) +CONST0 INDEX: POS_INT_INDEX (0) +CONST_1 INDEX: NEG_INT_INDEX (1) +CONST1 INDEX: POS_INT_INDEX (1) +NUMBER [$1a < 0] INDEX: NEG_INT_INDEX (-$1a) +NUMBER [$1a >= 0] INDEX: POS_INT_INDEX ($1a) +NEG_NUMBER [$1a >= 0] INDEX: NEG_INT_INDEX ($1a) +NEG_NUMBER [$1a < 0] INDEX: POS_INT_INDEX (-$1a) diff --git a/src/lpc_types.c b/src/pike_types.c similarity index 62% rename from src/lpc_types.c rename to src/pike_types.c index 004d90c47b75aea260ca8595362daf7911976e66..f6c1bfe55857c75b0e1375fafc1b81aab9060ceb 100644 --- a/src/lpc_types.c +++ b/src/pike_types.c @@ -1,23 +1,25 @@ /*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ #include "global.h" #include <ctype.h> #include "svalue.h" -#include "lpc_types.h" +#include "pike_types.h" #include "stralloc.h" #include "stuff.h" #include "array.h" #include "program.h" -#include "add_efun.h" +#include "constants.h" #include "object.h" -#include "list.h" +#include "multiset.h" #include "mapping.h" #include "macros.h" #include "error.h" +static void internal_parse_type(char **s); + /* * basic types are represented by just their value in a string * basic type are string, int, float, object and program @@ -27,7 +29,7 @@ * mappings are followed by two arguments, the first is the type * for the indices, and the second is the type of the data, ie: * T_MAPPING <indice type> <data type> - * list works similarly to arrays. + * multiset works similarly to arrays. * functions are _very_ special: * they are coded like this: * T_FUNCTION <arg type> <arg type> ... <arg type> T_MANY <arg type> <return type> @@ -36,18 +38,18 @@ * T_UNKNOWN only matches T_MIXED and T_UNKNOWN */ -struct lpc_string *string_type_string; -struct lpc_string *int_type_string; -struct lpc_string *float_type_string; -struct lpc_string *function_type_string; -struct lpc_string *object_type_string; -struct lpc_string *program_type_string; -struct lpc_string *array_type_string; -struct lpc_string *list_type_string; -struct lpc_string *mapping_type_string; -struct lpc_string *mixed_type_string; -struct lpc_string *void_type_string; -struct lpc_string *any_type_string; +struct pike_string *string_type_string; +struct pike_string *int_type_string; +struct pike_string *float_type_string; +struct pike_string *function_type_string; +struct pike_string *object_type_string; +struct pike_string *program_type_string; +struct pike_string *array_type_string; +struct pike_string *multiset_type_string; +struct pike_string *mapping_type_string; +struct pike_string *mixed_type_string; +struct pike_string *void_type_string; +struct pike_string *any_type_string; void init_types() { @@ -58,7 +60,7 @@ void init_types() float_type_string=parse_type("float"); mixed_type_string=parse_type("mixed"); array_type_string=parse_type("array"); - list_type_string=parse_type("list"); + multiset_type_string=parse_type("multiset"); mapping_type_string=parse_type("mapping"); function_type_string=parse_type("function"); void_type_string=parse_type("void"); @@ -80,10 +82,12 @@ static int type_length(char *t) case T_MAPPING: case T_OR: + case T_AND: t+=type_length(t); case T_ARRAY: - case T_LIST: + case T_MULTISET: + case T_NOT: t+=type_length(t); case T_INT: @@ -99,7 +103,102 @@ static int type_length(char *t) return t-q; } -static void internal_parse_type(char **s) + +#define STACK_SIZE 100000 +static unsigned char type_stack[STACK_SIZE]; +static unsigned char *type_stackp=type_stack; +static unsigned char *mark_stack[STACK_SIZE/4]; +static unsigned char **mark_stackp=mark_stack; + +void reset_type_stack() +{ + type_stackp=type_stack; + mark_stackp=mark_stack; +} + +void type_stack_mark() +{ + *mark_stackp=type_stackp; + mark_stackp++; + if(mark_stackp > mark_stack + NELEM(mark_stack)) + yyerror("Type mark stack overflow."); +} + +unsigned char *pop_stack_mark() +{ + mark_stackp--; + if(mark_stackp<mark_stack) + fatal("Type mark stack underflow\n"); + + return *mark_stackp; +} + +void pop_type_stack() +{ + type_stackp--; + if(type_stackp<type_stack) + fatal("Type stack underflow\n"); +} + +void type_stack_pop_to_mark() +{ + type_stackp=pop_stack_mark(); +} + +void type_stack_reverse() +{ + unsigned char *a,*b,tmp; + a=pop_stack_mark(); + b=type_stackp-1; + while(b>a) { tmp=*a; *a=*b; *b=tmp; b--; a++; } +} + +void push_type(unsigned char tmp) +{ + *type_stackp=tmp; + type_stackp++; + if(type_stackp > type_stack + sizeof(type_stack)) + yyerror("Type stack overflow."); +} + +void push_unfinished_type(char *s) +{ + int e; + e=type_length(s); + for(e--;e>=0;e--) push_type(s[e]); +} + +void push_finished_type(struct pike_string *type) +{ + int e; + for(e=type->len-1;e>=0;e--) push_type(type->str[e]); +} + +struct pike_string *pop_unfinished_type() +{ + int len,e; + struct pike_string *s; + len=type_stackp - pop_stack_mark(); + s=begin_shared_string(len); + for(e=0;e<len;e++) s->str[e] = *--type_stackp; + return end_shared_string(s); +} + +struct pike_string *pop_type() +{ + int len,e; + struct pike_string *s; + len=type_stackp - type_stack; + s=begin_shared_string(len); + for(e=0;e<len;e++) s->str[e] = *--type_stackp; + s=end_shared_string(s); + reset_type_stack(); + return s; +} + + + +static void internal_parse_typeA(char **s) { char buf[80]; unsigned int len; @@ -114,6 +213,7 @@ static void internal_parse_type(char **s) } buf[len]=0; *s += len; + if(!strcmp(buf,"int")) push_type(T_INT); else if(!strcmp(buf,"float")) push_type(T_FLOAT); else if(!strcmp(buf,"object")) push_type(T_OBJECT); @@ -168,8 +268,8 @@ static void internal_parse_type(char **s) type_stack_reverse(); if(**s != ')') error("Missing ')' in function type.\n"); ++*s; - type_stack_reverse(); - }else{ + type_stack_reverse(); + }else{ push_type(T_MIXED); push_type(T_MIXED); push_type(T_MANY); @@ -181,13 +281,19 @@ static void internal_parse_type(char **s) while(isspace(**s)) ++*s; if(**s == '(') { + type_stack_mark(); ++*s; + type_stack_mark(); internal_parse_type(s); + type_stack_reverse(); if(**s != ':') error("Expecting ':'.\n"); ++*s; + type_stack_mark(); internal_parse_type(s); + type_stack_reverse(); if(**s != ')') error("Expecting ')'.\n"); ++*s; + type_stack_reverse(); }else{ push_type(T_MIXED); push_type(T_MIXED); @@ -208,7 +314,7 @@ static void internal_parse_type(char **s) } push_type(T_ARRAY); } - else if(!strcmp(buf,"list")) + else if(!strcmp(buf,"multiset")) { while(isspace(**s)) ++*s; if(**s == '(') @@ -220,34 +326,96 @@ static void internal_parse_type(char **s) }else{ push_type(T_MIXED); } - push_type(T_LIST); + push_type(T_MULTISET); } else error("Couldn't parse type. (%s)\n",buf); while(isspace(**s)) ++*s; +} + + +static void internal_parse_typeB(char **s) +{ + while(isspace(**s)) ++*s; + switch(**s) + { + case '!': + ++*s; + internal_parse_typeB(s); + push_type(T_NOT); + break; + + case '(': + ++*s; + internal_parse_typeB(s); + while(isspace(**s)) ++*s; + if(**s != ')') error("Expecting ')'.\n"); + break; + + default: + + internal_parse_typeA(s); + } +} + +static void internal_parse_typeCC(char **s) +{ + internal_parse_typeB(s); + + while(isspace(**s)) ++*s; + while(**s == '*') { ++*s; - push_type(T_ARRAY); while(isspace(**s)) ++*s; + push_type(T_ARRAY); + } +} + +static void internal_parse_typeC(char **s) +{ + type_stack_mark(); + + type_stack_mark(); + internal_parse_typeCC(s); + type_stack_reverse(); + + while(isspace(**s)) ++*s; + + if(**s == '&') + { + ++*s; + type_stack_mark(); + internal_parse_typeC(s); + type_stack_reverse(); + type_stack_reverse(); + push_type(T_AND); + }else{ + type_stack_reverse(); } +} + +static void internal_parse_type(char **s) +{ + internal_parse_typeC(s); + while(isspace(**s)) ++*s; + while(**s == '|') { ++*s; - internal_parse_type(s); + internal_parse_typeC(s); push_type(T_OR); - while(isspace(**s)) ++*s; } } /* This function is used when adding simul efuns so that * the types for the functions can be easily stored in strings. - * It takes a string on the exact same format as uLPC and returns a type + * It takes a string on the exact same format as Pike and returns a type * struct. */ -struct lpc_string *parse_type(char *s) +struct pike_string *parse_type(char *s) { internal_parse_type(&s); @@ -274,11 +442,13 @@ void stupid_describe_type(char *a,INT32 len) case T_FUNCTION: printf("function"); break; case T_ARRAY: printf("array"); break; case T_MAPPING: printf("mapping"); break; - case T_LIST: printf("list"); break; + case T_MULTISET: printf("multiset"); break; case T_UNKNOWN: printf("unknown"); break; case T_MANY: printf("many"); break; case T_OR: printf("or"); break; + case T_AND: printf("and"); break; + case T_NOT: printf("not"); break; case T_VOID: printf("void"); break; case T_MIXED: printf("mixed"); break; @@ -288,7 +458,7 @@ void stupid_describe_type(char *a,INT32 len) printf("\n"); } -void simple_describe_type(struct lpc_string *s) +void simple_describe_type(struct pike_string *s) { stupid_describe_type(s->str,s->len); } @@ -298,33 +468,14 @@ char *low_describe_type(char *t) { switch(EXTRACT_UCHAR(t++)) { - case T_VOID: - my_strcat("void"); - break; - - case T_MIXED: - my_strcat("mixed"); - break; - - case T_UNKNOWN: - my_strcat("unknown"); - break; - - case T_INT: - my_strcat("int"); - break; - - case T_FLOAT: - my_strcat("float"); - break; - - case T_PROGRAM: - my_strcat("program"); - break; - - case T_OBJECT: - my_strcat("object"); - break; + case T_VOID: my_strcat("void"); break; + case T_MIXED: my_strcat("mixed"); break; + case T_UNKNOWN: my_strcat("unknown"); break; + case T_INT: my_strcat("int"); break; + case T_FLOAT: my_strcat("float"); break; + case T_PROGRAM: my_strcat("program"); break; + case T_OBJECT: my_strcat("object"); break; + case T_STRING: my_strcat("string"); break; case T_FUNCTION: { @@ -334,36 +485,49 @@ char *low_describe_type(char *t) while(EXTRACT_UCHAR(t) != T_MANY) { if(s++) my_strcat(", "); - low_describe_type(t); - t+=type_length(t); + t=low_describe_type(t); } t++; - if(EXTRACT_UCHAR(t) != T_VOID) + if(EXTRACT_UCHAR(t) == T_VOID) { + t++; + }else{ if(s++) my_strcat(", "); - low_describe_type(t); + t=low_describe_type(t); my_strcat(" ..."); } - t+=type_length(t); my_strcat(" : "); - low_describe_type(t); + t=low_describe_type(t); my_strcat(")"); break; } - case T_STRING: - my_strcat("string"); + case T_ARRAY: + if(EXTRACT_UCHAR(t)==T_MIXED) + { + my_strcat("array"); + t++; + }else{ + t=low_describe_type(t); + my_strcat("*"); + } break; - case T_ARRAY: - t=low_describe_type(t); - my_strcat("*"); + case T_MULTISET: + my_strcat("multiset"); + if(EXTRACT_UCHAR(t)!=T_MIXED) + { + my_strcat("("); + t=low_describe_type(t); + my_strcat(")"); + }else{ + t++; + } break; - case T_LIST: - my_strcat("list ("); + case T_NOT: + my_strcat("!"); t=low_describe_type(t); - my_strcat(")"); break; case T_OR: @@ -371,28 +535,53 @@ char *low_describe_type(char *t) my_strcat(" | "); t=low_describe_type(t); break; - - case T_MAPPING: - my_strcat("mapping ("); + + case T_AND: t=low_describe_type(t); - my_strcat(":"); + my_strcat(" & "); t=low_describe_type(t); - my_strcat(")"); + break; + + case T_MAPPING: + my_strcat("mapping"); + if(EXTRACT_UCHAR(t)==T_MIXED && EXTRACT_UCHAR(t+1)==T_MIXED) + { + t+=2; + }else{ + my_strcat("("); + t=low_describe_type(t); + my_strcat(":"); + t=low_describe_type(t); + my_strcat(")"); + } break; } return t; } -TYPE_T compile_type_to_runtime_type(struct lpc_string *s) +struct pike_string *describe_type(struct pike_string *type) { - char *t; - t=s->str; - + if(!type) return make_shared_string("mixed"); + init_buf(); + low_describe_type(type->str); + return free_buf(); +} + +static TYPE_T low_compile_type_to_runtime_type(char *t) +{ + TYPE_T tmp; switch(EXTRACT_UCHAR(t)) { case T_OR: + t++; + tmp=low_compile_type_to_runtime_type(t); + if(tmp == low_compile_type_to_runtime_type(t+type_length(t))) + return tmp; + case T_MANY: case T_UNKNOWN: + case T_AND: + case T_NOT: return T_MIXED; default: @@ -400,36 +589,70 @@ TYPE_T compile_type_to_runtime_type(struct lpc_string *s) } } +TYPE_T compile_type_to_runtime_type(struct pike_string *s) +{ + return low_compile_type_to_runtime_type(s->str); +} + +#define A_EXACT 1 +#define B_EXACT 2 + /* * match two type strings, return zero if they don't match, and return * the part of 'a' that _did_ match if it did. */ -static char *low_match_types(char *a,char *b) +static char *low_match_types(char *a,char *b, int flags) { char *ret; if(a == b) return a; - if(EXTRACT_UCHAR(a) == T_OR) + switch(EXTRACT_UCHAR(a)) { + case T_AND: + a++; + ret=low_match_types(a,b,flags); + if(!ret) return 0; + a+=type_length(a); + return low_match_types(a,b,flags); + + case T_OR: a++; - ret=low_match_types(a,b); + ret=low_match_types(a,b,flags); if(ret) return ret; a+=type_length(a); - return low_match_types(a,b); + return low_match_types(a,b,flags); + + case T_NOT: + if(low_match_types(a+1,b,flags | B_EXACT)) + return 0; + return a; } - if(EXTRACT_UCHAR(b) == T_OR) + switch(EXTRACT_UCHAR(b)) { + case T_AND: + b++; + ret=low_match_types(a,b,flags); + if(!ret) return 0; + b+=type_length(b); + return low_match_types(a,b,flags); + + case T_OR: b++; - ret=low_match_types(a,b); + ret=low_match_types(a,b,flags); if(ret) return ret; b+=type_length(b); - return low_match_types(a,b); + return low_match_types(a,b,flags); + + case T_NOT: + if(low_match_types(a,b+1, flags | A_EXACT)) + return 0; + return a; } /* 'mixed' matches anything */ - if(EXTRACT_UCHAR(a) == T_MIXED) return a; - if(EXTRACT_UCHAR(b) == T_MIXED) return a; + if(EXTRACT_UCHAR(a) == T_MIXED && !(flags & A_EXACT)) return a; + if(EXTRACT_UCHAR(b) == T_MIXED && !(flags & B_EXACT)) return a; if(EXTRACT_UCHAR(a) != EXTRACT_UCHAR(b)) return 0; ret=a; @@ -457,7 +680,7 @@ static char *low_match_types(char *a,char *b) b+=type_length(b); } - if(!low_match_types(a_tmp, b_tmp)) return 0; + if(!low_match_types(a_tmp, b_tmp, flags)) return 0; } /* check the 'many' type */ a++; @@ -467,20 +690,20 @@ static char *low_match_types(char *a,char *b) a+=type_length(a); b+=type_length(b); }else{ - if(!low_match_types(a,b)) return 0; + if(!low_match_types(a,b,flags)) return 0; } /* check the returntype */ - if(!low_match_types(a,b)) return 0; + if(!low_match_types(a,b,flags)) return 0; break; case T_MAPPING: - if(!low_match_types(++a,++b)) return 0; - if(!low_match_types(a+type_length(a),b+type_length(b))) return 0; + if(!low_match_types(++a,++b,flags)) return 0; + if(!low_match_types(a+type_length(a),b+type_length(b),flags)) return 0; break; - case T_LIST: + case T_MULTISET: case T_ARRAY: - if(!low_match_types(++a,++b)) return 0; + if(!low_match_types(++a,++b,flags)) return 0; case T_INT: case T_FLOAT: @@ -502,19 +725,62 @@ static char *low_match_types(char *a,char *b) */ static int low_get_return_type(char *a,char *b) { - if(EXTRACT_UCHAR(a) == T_OR) + int tmp; + switch(EXTRACT_UCHAR(a)) { - int tmp; + case T_OR: + { + struct pike_string *o1,*o2; + a++; + o1=o2=0; + + type_stack_mark(); + if(low_get_return_type(a,b)) + { + o1=pop_unfinished_type(); + type_stack_mark(); + } + + if(low_get_return_type(a+type_length(a),b)) + o2=pop_unfinished_type(); + else + pop_stack_mark(); + + if(o1 == o2) + { + if(!o1) + { + return 0; + }else{ + push_finished_type(o1); + } + } + else if(o1 == mixed_type_string || o2 == mixed_type_string) + { + push_type(T_MIXED); + } + else + { + if(o1) push_finished_type(o1); + if(o2) push_finished_type(o2); + if(o1 && o2) push_type(T_OR); + } + + if(o1) free_string(o1); + if(o2) free_string(o2); + + return 1; + } + + case T_AND: a++; + type_stack_mark(); tmp=low_get_return_type(a,b); - tmp+=low_get_return_type(a+type_length(a),b); - if(tmp==2) push_type(T_OR); - return tmp>0; - } + type_stack_pop_to_mark(); + if(!tmp) return 0; + return low_get_return_type(a+type_length(a),b); - if(EXTRACT_UCHAR(a) == T_ARRAY) - { - int tmp; + case T_ARRAY: a++; tmp=low_get_return_type(a,b); if(!tmp) return 0; @@ -522,7 +788,7 @@ static int low_get_return_type(char *a,char *b) return 1; } - a=low_match_types(a,b); + a=low_match_types(a,b,0); if(a) { switch(EXTRACT_UCHAR(a)) @@ -544,91 +810,15 @@ static int low_get_return_type(char *a,char *b) } -int match_types(struct lpc_string *a,struct lpc_string *b) +int match_types(struct pike_string *a,struct pike_string *b) { - return 0!=low_match_types(a->str, b->str); + return 0!=low_match_types(a->str, b->str,0); } -#define STACK_SIZE 100000 -static unsigned char type_stack[STACK_SIZE]; -static unsigned char *type_stackp=type_stack; -static unsigned char *mark_stack[STACK_SIZE/4]; -static unsigned char **mark_stackp=mark_stack; - -void reset_type_stack() -{ - type_stackp=type_stack; - mark_stackp=mark_stack; -} - -void type_stack_mark() -{ - *mark_stackp=type_stackp; - mark_stackp++; - if(mark_stackp > mark_stack + NELEM(mark_stack)) - yyerror("Type mark stack overflow."); -} - -void pop_stack_mark() -{ - mark_stackp--; - if(mark_stackp<mark_stack) - fatal("Type mark stack underflow\n"); -} - -void pop_type_stack() -{ - type_stackp--; - if(type_stackp<type_stack) - fatal("Type stack underflow\n"); -} - -void type_stack_reverse() -{ - unsigned char *a,*b,tmp; - a=mark_stackp[-1]; - b=type_stackp-1; - while(b>a) { tmp=*a; *a=*b; *b=tmp; b--; a++; } - pop_stack_mark(); -} - -void push_type(unsigned char tmp) -{ - *type_stackp=tmp; - type_stackp++; - if(type_stackp > type_stack + sizeof(type_stack)) - yyerror("Type stack overflow."); -} - -void push_unfinished_type(char *s) -{ - int e; - e=type_length(s); - for(e--;e>=0;e--) push_type(s[e]); -} - -void push_finished_type(struct lpc_string *type) -{ - int e; - for(e=type->len-1;e>=0;e--) push_type(type->str[e]); -} - - -struct lpc_string *pop_type() -{ - int len,e; - struct lpc_string *s; - len=type_stackp - type_stack; - s=begin_shared_string(len); - for(e=0;e<len;e++) s->str[e] = *--type_stackp; - s=end_shared_string(s); - reset_type_stack(); - return s; -} /* FIXME, add the index */ -static struct lpc_string *low_index_type(char *t) +static struct pike_string *low_index_type(char *t) { switch(EXTRACT_UCHAR(t++)) { @@ -638,7 +828,7 @@ static struct lpc_string *low_index_type(char *t) case T_OR: { - struct lpc_string *a,*b; + struct pike_string *a,*b; a=low_index_type(t); t+=type_length(t); b=low_index_type(t); @@ -650,9 +840,11 @@ static struct lpc_string *low_index_type(char *t) return pop_type(); } + case T_AND: + return low_index_type(t+type_length(t)); case T_STRING: /* always int */ - case T_LIST: /* always int */ + case T_MULTISET: /* always int */ reference_shared_string(int_type_string); return int_type_string; @@ -664,9 +856,9 @@ static struct lpc_string *low_index_type(char *t) } } -struct lpc_string *index_type(struct lpc_string *type) +struct pike_string *index_type(struct pike_string *type) { - struct lpc_string *t; + struct pike_string *t; t=low_index_type(type->str); if(!t) copy_shared_string(t,mixed_type_string); return t; @@ -679,17 +871,24 @@ static int low_check_indexing(char *type, char *index_type) case T_OR: return low_check_indexing(type,index_type) || low_check_indexing(type+type_length(type),index_type); - + + case T_AND: + return low_check_indexing(type,index_type) && + low_check_indexing(type+type_length(type),index_type); + + case T_NOT: + return !low_check_indexing(type,index_type); + case T_STRING: case T_ARRAY: - return !!low_match_types(int_type_string->str, index_type); + return !!low_match_types(int_type_string->str, index_type,0); case T_OBJECT: - return !!low_match_types(string_type_string->str, index_type); + return !!low_match_types(string_type_string->str, index_type,0); - case T_LIST: + case T_MULTISET: case T_MAPPING: - return !!low_match_types(type,index_type); + return !!low_match_types(type,index_type,0); case T_MIXED: return 1; @@ -699,8 +898,8 @@ static int low_check_indexing(char *type, char *index_type) } } -int check_indexing(struct lpc_string *type, - struct lpc_string *index_type) +int check_indexing(struct pike_string *type, + struct pike_string *index_type) { return low_check_indexing(type->str, index_type->str); } @@ -709,7 +908,7 @@ int check_indexing(struct lpc_string *type, * return -1-n if the function can take number of arguments * >= n (varargs) */ -int count_arguments(struct lpc_string *s) +int count_arguments(struct pike_string *s) { int num; char *q; @@ -728,8 +927,8 @@ int count_arguments(struct lpc_string *s) return num; } -struct lpc_string *check_call(struct lpc_string *args, - struct lpc_string *type) +struct pike_string *check_call(struct pike_string *args, + struct pike_string *type) { reset_type_stack(); if(low_get_return_type(type->str,args->str)) @@ -740,42 +939,14 @@ struct lpc_string *check_call(struct lpc_string *args, } } - void check_array_type(struct array *a) { - int t; - t=my_log2(a->array_type); - if( ( 1 << t ) == a->array_type ) - { - switch(t) - { - case T_ARRAY: - push_type(T_MIXED); - push_type(T_ARRAY); - break; - - case T_LIST: - push_type(T_MIXED); - push_type(T_LIST); - break; - - case T_MAPPING: - push_type(T_MIXED); - push_type(T_MIXED); - push_type(T_MAPPING); - break; - - default: - push_type(t); - } - }else{ - push_type(T_MIXED); - } + push_type(T_MIXED); } -struct lpc_string *get_type_of_svalue(struct svalue *s) +struct pike_string *get_type_of_svalue(struct svalue *s) { - struct lpc_string *ret; + struct pike_string *ret; switch(s->type) { case T_FUNCTION: @@ -801,14 +972,14 @@ struct lpc_string *get_type_of_svalue(struct svalue *s) push_type(T_ARRAY); return pop_type(); - case T_LIST: - check_array_type(s->u.list->ind); - push_type(T_LIST); + case T_MULTISET: + check_array_type(s->u.multiset->ind); + push_type(T_MULTISET); return pop_type(); case T_MAPPING: - check_array_type(s->u.mapping->ind); - check_array_type(s->u.mapping->val); + push_type(T_MIXED); + push_type(T_MIXED); push_type(T_MAPPING); return pop_type(); @@ -829,14 +1000,14 @@ char *get_name_of_type(int t) case T_ARRAY: return "array"; case T_OBJECT: return "object"; case T_MAPPING: return "mapping"; - case T_LIST: return "list"; + case T_MULTISET: return "multiset"; case T_FUNCTION: return "function"; case T_FLOAT: return "float"; default: return "unknown"; } } -void cleanup_lpc_types() +void cleanup_pike_types() { free_string(string_type_string); free_string(int_type_string); @@ -845,7 +1016,7 @@ void cleanup_lpc_types() free_string(object_type_string); free_string(program_type_string); free_string(array_type_string); - free_string(list_type_string); + free_string(multiset_type_string); free_string(mapping_type_string); free_string(mixed_type_string); free_string(void_type_string); diff --git a/src/pike_types.h b/src/pike_types.h new file mode 100644 index 0000000000000000000000000000000000000000..4af7abed7a76613add4930008054dfe7792dc2df --- /dev/null +++ b/src/pike_types.h @@ -0,0 +1,54 @@ +/*\ +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) +||| See the files COPYING and DISCLAIMER for more information. +\*/ +#ifndef PIKE_TYPES_H +#define PIKE_TYPES_H + +extern struct pike_string *string_type_string; +extern struct pike_string *int_type_string; +extern struct pike_string *float_type_string; +extern struct pike_string *object_type_string; +extern struct pike_string *function_type_string; +extern struct pike_string *program_type_string; +extern struct pike_string *array_type_string; +extern struct pike_string *list_type_string; +extern struct pike_string *mapping_type_string; +extern struct pike_string *mixed_type_string; +extern struct pike_string *void_type_string; +extern struct pike_string *any_type_string; + +/* Prototypes begin here */ +void init_types(); +void reset_type_stack(); +void type_stack_mark(); +unsigned char *pop_stack_mark(); +void pop_type_stack(); +void type_stack_pop_to_mark(); +void type_stack_reverse(); +void push_type(unsigned char tmp); +void push_unfinished_type(char *s); +void push_finished_type(struct pike_string *type); +struct pike_string *pop_unfinished_type(); +struct pike_string *pop_type(); +struct pike_string *parse_type(char *s); +void stupid_describe_type(char *a,INT32 len); +void simple_describe_type(struct pike_string *s); +char *low_describe_type(char *t); +struct pike_string *describe_type(struct pike_string *type); +TYPE_T compile_type_to_runtime_type(struct pike_string *s); +int match_types(struct pike_string *a,struct pike_string *b); +struct pike_string *index_type(struct pike_string *type); +int check_indexing(struct pike_string *type, + struct pike_string *index_type); +int count_arguments(struct pike_string *s); +struct pike_string *check_call(struct pike_string *args, + struct pike_string *type); +void check_array_type(struct array *a); +struct pike_string *get_type_of_svalue(struct svalue *s); +char *get_name_of_type(int t); +void cleanup_pike_types(); +/* Prototypes end here */ + +#endif diff --git a/src/port.c b/src/port.c index 325dc69657a9f7bf1fcb27dfa8fb64cc57b50453..caaa44824c731d07830ecd707f3893113870836c 100644 --- a/src/port.c +++ b/src/port.c @@ -1,10 +1,11 @@ /*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ #include "global.h" #include "macros.h" +#include "time_stuff.h" #include <ctype.h> #include <math.h> #include <sys/types.h> @@ -16,6 +17,24 @@ time_t time PROT((time_t *)); #endif +#ifndef HAVE_GETTIMEOFDAY +void GETTIMEOFDAY(struct timeval *t) +{ + t->tv_sec=(long)time(0); + t->tv_usec=0; +} +#endif + +#ifndef HAVE_TIME +time_t TIME(time_t *t) +{ + struct timeval tv; + GETTIMEOFDAY(&tv); + if(t) *t=tv.tv_sec; + return tv.tv_sec; +} +#endif + /* * This file defines things that may have to be changem when porting * LPmud to new environments. Hopefully, there are #ifdef's that will take @@ -41,8 +60,6 @@ void my_srand(int seed) my_rand(); } -long get_current_time(void) { return (long)time(0L); } - #ifndef HAVE_STRTOL #define DIGIT(x) (isdigit(x) ? (x) - '0' : \ @@ -166,145 +183,6 @@ char *MEMCHR(char *p,char c,int e) } #endif -#ifndef HAVE_MEMMEM - -/* - * a quick memmem - * Written by Fredrik Hubinette (hubbe@lysator.liu.se) - */ - -#define LINKS 1024 - -typedef struct link2_s -{ - struct link2_s *next; - INT32 key, offset; -} link2; - -char *MEMMEM(char *needle, SIZE_T needlelen, char *haystack, SIZE_T haystacklen) -{ - if(needlelen > haystacklen) return 0; - - switch(needlelen) - { - case 0: return haystack; - case 1: return MEMCHR(haystack,needle[0],haystacklen); - - default: - { - if(haystacklen > needlelen + 64) - { - static link2 links[LINKS], *set[LINKS]; - - INT32 tmp, h; - unsigned INT32 hsize, e, max; - char *q, *end; - link2 *ptr; - - hsize=52+(haystacklen >> 7) - (needlelen >> 8); - max =13+(haystacklen >> 4) - (needlelen >> 5); - - if(hsize > NELEM(set)) - { - hsize=NELEM(set); - }else{ - for(e=8;e<hsize;e+=e); - hsize=e; - } - - for(e=0;e<hsize;e++) set[e]=0; - hsize--; - - if(max > needlelen) max=needlelen; - max=(max-sizeof(INT32)+1) & -sizeof(INT32); - if(max > LINKS) max=LINKS; - - ptr=&links[0]; - - q=needle; - -#if BYTEORDER == 4321 - for(tmp=e=0;e<sizeof(INT32)-1;e++) - { - tmp<<=8; - tmp|=*(q++); - } -#endif - - for(e=0;e<max;e++) - { -#if BYTEORDER == 4321 - tmp<<=8; - tmp|=*(q++); -#else - tmp=EXTRACT_INT((unsigned char *)q); - q++; -#endif - h=tmp; - h+=h>>7; - h+=h>>17; - h&=hsize; - - ptr->offset=e; - ptr->key=tmp; - ptr->next=set[h]; - set[h]=ptr; - ptr++; - } - - end=haystack+haystacklen+1; - - q=haystack+max-sizeof(INT32); - q=(char *)( ((long)q) & -sizeof(INT32)); - for(;q<end-sizeof(INT32)+1;q+=max) - { - h=tmp=*(INT32 *)q; - - h+=h>>7; - h+=h>>17; - h&=hsize; - - for(ptr=set[h];ptr;ptr=ptr->next) - { - char *where; - - if(ptr->key != tmp) continue; - - where=q-ptr->offset; - if(where<haystack) continue; - if(where+needlelen>end) return 0; - - if(!MEMCMP(where,needle,needlelen)) - return where; - } - } - return 0; - } - } - - case 2: - case 3: - case 4: - case 5: - case 6: - { - char *end,c; - - end=haystack+haystacklen-needlelen+1; - c=needle[0]; - needle++; - needlelen--; - while((haystack=MEMCHR(haystack,c,end-haystack))) - if(!MEMCMP(++haystack,needle,needlelen)) - return haystack-1; - - return 0; - } - - } -} - -#endif #if !defined(HAVE_INDEX) && !defined(HAVE_STRCHR) char *STRCHR(char *s,char c) diff --git a/src/port.h b/src/port.h index 225d4faa62cc1c2f386bc9721447819764169ebe..765c4790bc76752a3ff3dbda3f09f6b37531ba78 100644 --- a/src/port.h +++ b/src/port.h @@ -1,6 +1,6 @@ /*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ #ifndef PORT_H @@ -8,6 +8,24 @@ #include "types.h" +struct timeval; + +#ifndef HAVE_GETTIMEOFDAY +void GETTIMEOFDAY(struct timeval *t); +#else +# ifdef GETTIMEOFDAY_TAKES_TWO_ARGS +# define GETTIMEOFDAY(X) gettimeofday((X),(void *)0) +# else +# define GETTIMEOFDAY gettimeofday +# endif +#endif + +#ifndef HAVE_TIME +time_t TIME(time_t *); +#else +# define TIME time +#endif + #ifndef HAVE_STRTOL long STRTOL(char *str,char **ptr,int base); #else @@ -68,15 +86,6 @@ char *MEMCHR(char *p,char c,int e); # define MEMCHR(X,Y,Z) ((char *)memchr(X,Y,Z)) #endif -#ifndef HAVE_MEMMEM -char *MEMMEM(char *needle, - SIZE_T needlelen, - char *haystack, - SIZE_T haystacklen); -#else -# define MEMMEM memmem -#endif - #ifndef HAVE_STRCHR # ifdef HAVE_INDEX # define STRCHR(X,Y) ((char *)index(X,Y)) @@ -174,7 +183,6 @@ static INLINE INT32 EXTRACT_INT(unsigned char *p) #endif #endif -long get_current_time(void); unsigned long my_rand(void); void my_srand(int seed); diff --git a/src/program.c b/src/program.c index 274f1e34a344ad1012fb2877674ea7e24a54480f..1c280c3caa34141af7a4d692baf2b690ef6f2c92 100644 --- a/src/program.c +++ b/src/program.c @@ -1,13 +1,13 @@ /*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ #include "global.h" #include "program.h" #include "object.h" #include "dynamic_buffer.h" -#include "lpc_types.h" +#include "pike_types.h" #include "stralloc.h" #include "las.h" #include "language.h" @@ -19,6 +19,7 @@ #include "interpret.h" #include "hashtable.h" #include "main.h" +#include "gc.h" #include <stdio.h> #include <fcntl.h> @@ -36,6 +37,32 @@ #undef FILE_STATE #undef PROGRAM_STATE + +char *lfun_names[] = { + "__INIT", + "create", + "destroy", + "`+", + "`-", + "`&", + "`|", + "`^", + "`<<", + "`>>", + "`*", + "`/", + "`%", + "`~", + "`==", + "`<", + "`>", + "__hash", + "cast", + "`!", + "`[]", + "`[]=", +}; + struct program *first_program = 0; struct program fake_program; @@ -43,7 +70,7 @@ struct program fake_program; static int current_program_id=0; static INT32 last_line = 0; static INT32 last_pc = 0; -static struct lpc_string *last_file = 0; +static struct pike_string *last_file = 0; dynamic_buffer inherit_names; #define HASH_ID_IS_LOCAL 1 @@ -69,7 +96,7 @@ void setup_fake_program() { fake_program.refs=0xffffff; SETUP(program, program_size, unsigned char, A_PROGRAM); - SETUP(strings, num_strings, struct lpc_string *, A_STRINGS); + SETUP(strings, num_strings, struct pike_string *, A_STRINGS); SETUP(inherits, num_inherits, struct inherit, A_INHERITS); SETUP(identifiers, num_identifiers, struct identifier, A_IDENTIFIERS); SETUP(identifier_references, num_identifier_references, struct reference, A_IDENTIFIER_REFERENCES); @@ -95,7 +122,7 @@ void start_new_program() { int e; struct inherit inherit; - struct lpc_string *name; + struct pike_string *name; #define PROGRAM_STATE #define PUSH @@ -156,6 +183,8 @@ void really_free_program(struct program *p) p->next->prev=p->prev; free((char *)p); + + GC_FREE(); } #ifdef DEBUG @@ -198,7 +227,7 @@ void dump_program_desc(struct program *p) */ void toss_current_program() { - struct lpc_string **names; + struct pike_string **names; int e; setup_fake_program(); @@ -207,26 +236,18 @@ void toss_current_program() for (e=0; e<NUM_AREAS; e++) toss_buffer(areas+e); - names=(struct lpc_string **)inherit_names.s.str; - e=inherit_names.s.len / sizeof(struct lpc_string *); + names=(struct pike_string **)inherit_names.s.str; + e=inherit_names.s.len / sizeof(struct pike_string *); for(e--;e>=0;e--) if(names[e]) free_string(names[e]); toss_buffer(& inherit_names); } #ifdef DEBUG -void check_program(struct program *p, int pass) +void check_program(struct program *p) { INT32 size,e; unsigned INT32 checksum; - if(pass) - { - if(checked((void *)p,0) != p->refs) - fatal("Program has wrong number of references.\n"); - - return; - } - if(p->refs <=0) fatal("Program has zero refs.\n"); @@ -252,7 +273,7 @@ void check_program(struct program *p, int pass) size+=MY_ALIGN(p->num_linenumbers); size+=MY_ALIGN(p->program_size); size+=MY_ALIGN(p->num_constants * sizeof(struct svalue)); - size+=MY_ALIGN(p->num_strings * sizeof(struct lpc_string *)); + size+=MY_ALIGN(p->num_strings * sizeof(struct pike_string *)); size+=MY_ALIGN(p->num_identifiers * sizeof(struct identifier)); size+=MY_ALIGN(p->num_identifier_references * sizeof(struct reference)); size+=MY_ALIGN(p->num_inherits * sizeof(struct inherit)); @@ -333,10 +354,7 @@ void check_program(struct program *p, int pass) { if(p->inherits[e].storage_offset < 0) fatal("Inherit->storage_offset is wrong.\n"); - - checked((void *)p->inherits[e].prog,1); } - checked((void *)p,-1); /* One too many were added above */ } #endif @@ -362,7 +380,7 @@ if((prog->PTRS = areas[AREA].s.len/sizeof(TYPE))) \ struct program *end_program() { - struct lpc_string **names; + struct pike_string **names; int size, i,e,t; char *p; struct program *prog; @@ -374,7 +392,7 @@ struct program *end_program() if (init_node) { union idptr tmp; - struct lpc_string *s; + struct pike_string *s; s=make_shared_string("__INIT"); tmp.offset=PC; ins_byte(0, A_PROGRAM); /* num args */ @@ -383,7 +401,7 @@ struct program *end_program() define_function(s, function_type_string, 0, /* ID_STATIC, */ - IDENTIFIER_LPC_FUNCTION, + IDENTIFIER_PIKE_FUNCTION, & tmp); free_string(s); } @@ -409,7 +427,7 @@ struct program *end_program() INS_BLOCK(linenumbers,num_linenumbers,char,A_LINENUMBERS); INS_BLOCK(identifiers,num_identifiers,struct identifier,A_IDENTIFIERS); INS_BLOCK(identifier_references,num_identifier_references,struct reference,A_IDENTIFIER_REFERENCES); - INS_BLOCK(strings,num_strings,struct lpc_string *,A_STRINGS); + INS_BLOCK(strings,num_strings,struct pike_string *,A_STRINGS); INS_BLOCK(inherits,num_inherits,struct inherit,A_INHERITS); INS_BLOCK(constants,num_constants,struct svalue,A_CONSTANTS); @@ -455,8 +473,8 @@ struct program *end_program() prog->inherits[0].prog=prog; - names=(struct lpc_string **)inherit_names.s.str; - e=inherit_names.s.len / sizeof(struct lpc_string *); + names=(struct pike_string **)inherit_names.s.str; + e=inherit_names.s.len / sizeof(struct pike_string *); for(e--;e>=0;e--) if(names[e]) free_string(names[e]); toss_buffer(& inherit_names); @@ -465,11 +483,16 @@ struct program *end_program() first_program->prev=prog; first_program=prog; + for(i=0;i<NUM_LFUNS;i++) + prog->lfuns[i]=find_identifier(lfun_names[i],prog); + #ifdef DEBUG - check_program(prog,0); + check_program(prog); if(l_flag) dump_program_desc(prog); #endif + + GC_ALLOC(); } /* Clean up */ @@ -526,7 +549,7 @@ SIZE_T add_storage(SIZE_T size) * set a callback used to initialize clones of this program * the init function is called at clone time */ -void set_init_callback(void (*init)(char *,struct object *)) +void set_init_callback(void (*init)(struct object *)) { fake_program.init=init; } @@ -535,13 +558,13 @@ void set_init_callback(void (*init)(char *,struct object *)) * set a callback used to de-initialize clones of this program * the exit function is called at destruct */ -void set_exit_callback(void (*exit)(char *,struct object *)) +void set_exit_callback(void (*exit)(struct object *)) { fake_program.exit=exit; } -int low_reference_inherited_identifier(int e,struct lpc_string *name) +int low_reference_inherited_identifier(int e,struct pike_string *name) { struct reference funp; struct program *p; @@ -575,10 +598,10 @@ int low_reference_inherited_identifier(int e,struct lpc_string *name) -int reference_inherited_identifier(struct lpc_string *super_name, - struct lpc_string *function_name) +int reference_inherited_identifier(struct pike_string *super_name, + struct pike_string *function_name) { - struct lpc_string **names; + struct pike_string **names; int e,i; #ifdef DEBUG @@ -586,7 +609,7 @@ int reference_inherited_identifier(struct lpc_string *super_name, fatal("reference_inherited_function on nonshared string.\n"); #endif - names=(struct lpc_string **)inherit_names.s.str; + names=(struct pike_string **)inherit_names.s.str; setup_fake_program(); for(e=fake_program.num_inherits-1;e>0;e--) @@ -612,12 +635,12 @@ int reference_inherited_identifier(struct lpc_string *super_name, return -1; } -void rename_last_inherit(struct lpc_string *n) +void rename_last_inherit(struct pike_string *n) { - struct lpc_string **names; + struct pike_string **names; int e; - names=(struct lpc_string **)inherit_names.s.str; - e=inherit_names.s.len / sizeof(struct lpc_string *); + names=(struct pike_string **)inherit_names.s.str; + e=inherit_names.s.len / sizeof(struct pike_string *); free_string(names[e-1]); copy_shared_string(names[e-1],n); } @@ -625,11 +648,11 @@ void rename_last_inherit(struct lpc_string *n) /* * make this program inherit another program */ -void do_inherit(struct program *p,INT32 flags, struct lpc_string *name) +void do_inherit(struct program *p,INT32 flags, struct pike_string *name) { int e, inherit_offset, storage_offset; struct inherit inherit; - struct lpc_string *s; + struct pike_string *s; setup_fake_program(); @@ -654,7 +677,7 @@ void do_inherit(struct program *p,INT32 flags, struct lpc_string *name) for (e=0; e < (int)p->num_identifier_references; e++) { struct reference fun; - struct lpc_string *name; + struct pike_string *name; fun = p->identifier_references[e]; /* Make a copy */ @@ -669,12 +692,13 @@ void do_inherit(struct program *p,INT32 flags, struct lpc_string *name) my_yyerror("Illegal to redefine 'nomask' function/variable \"%s\"",name->str); } + if(fun.flags & ID_PRIVATE) fun.flags|=ID_HIDDEN; + if (fun.flags & ID_PUBLIC) fun.flags |= flags & ~ID_PRIVATE; else fun.flags |= flags; - if(fun.flags & ID_PRIVATE) fun.flags|=ID_HIDDEN; fun.flags |= ID_INHERITED; add_to_mem_block(A_IDENTIFIER_REFERENCES, (char *)&fun, sizeof fun); } @@ -694,7 +718,7 @@ void do_inherit(struct program *p,INT32 flags, struct lpc_string *name) } } -void simple_do_inherit(struct lpc_string *s, INT32 flags,struct lpc_string *name) +void simple_do_inherit(struct pike_string *s, INT32 flags,struct pike_string *name) { reference_shared_string(s); push_string(s); @@ -721,7 +745,7 @@ void simple_do_inherit(struct lpc_string *s, INT32 flags,struct lpc_string *name /* * Return the index of the identifier found, otherwise -1. */ -int isidentifier(struct lpc_string *s) +int isidentifier(struct pike_string *s) { INT32 e; setup_fake_program(); @@ -736,8 +760,8 @@ int isidentifier(struct lpc_string *s) } /* argument must be a shared string */ -int define_variable(struct lpc_string *name, - struct lpc_string *type, +int define_variable(struct pike_string *name, + struct pike_string *type, INT32 flags) { int n; @@ -805,8 +829,8 @@ int define_variable(struct lpc_string *name, * define a new function * if func isn't given, it is supposed to be a prototype. */ -INT32 define_function(struct lpc_string *name, - struct lpc_string *type, +INT32 define_function(struct pike_string *name, + struct pike_string *type, INT16 flags, INT8 function_flags, union idptr *func) @@ -914,7 +938,7 @@ INT32 define_function(struct lpc_string *name, * lookup the number of a function in a program given the name in * a shared_string */ -static int low_find_shared_string_identifier(struct lpc_string *name, +static int low_find_shared_string_identifier(struct pike_string *name, struct program *prog) { int max,min,tst; @@ -973,7 +997,7 @@ static int low_find_shared_string_identifier(struct lpc_string *name, #ifdef FIND_FUNCTION_HASHSIZE struct ff_hash { - struct lpc_string *name; + struct pike_string *name; int id; int fun; }; @@ -981,7 +1005,7 @@ struct ff_hash static struct ff_hash cache[FIND_FUNCTION_HASHSIZE]; #endif -int find_shared_string_identifier(struct lpc_string *name, +int find_shared_string_identifier(struct pike_string *name, struct program *prog) { #ifdef FIND_FUNCTION_HASHSIZE @@ -1009,7 +1033,7 @@ int find_shared_string_identifier(struct lpc_string *name, int find_identifier(char *name,struct program *prog) { - struct lpc_string *n; + struct pike_string *n; if(!prog) error("Identifier lookup in destructed object.\n"); n=findstring(name); @@ -1017,12 +1041,12 @@ int find_identifier(char *name,struct program *prog) return find_shared_string_identifier(n,prog); } -int store_prog_string(struct lpc_string *str) +int store_prog_string(struct pike_string *str) { unsigned int i; - struct lpc_string **p; + struct pike_string **p; - p = (struct lpc_string **)areas[A_STRINGS].s.str; + p = (struct pike_string **)areas[A_STRINGS].s.str; for (i=0;i<areas[A_STRINGS].s.len / sizeof str;i++) if (p[i] == str) @@ -1087,11 +1111,11 @@ static void insert_small_number(int a,int area) ins_short(a,area); }else{ ins_signed_byte(-128,area); - ins_long(a,area); + ins_int(a,area); } } -void store_linenumber(void) +void store_linenumber(INT32 current_line, struct pike_string *current_file) { if(last_line!=current_line || last_file != current_file) { @@ -1162,7 +1186,7 @@ void my_yyerror(char *fmt,...) va_start(args,fmt); VSPRINTF(buf,fmt,args); - if(strlen(buf) >= sizeof(buf)) + if((long)strlen(buf) >= (long)sizeof(buf)) fatal("Buffer overflow in my_yyerror."); yyerror(buf); @@ -1170,7 +1194,7 @@ void my_yyerror(char *fmt,...) } /* - * Compile an LPC file. Input is supposed to be initalized already. + * Compile an PIKE file. Input is supposed to be initalized already. */ void compile() { @@ -1186,16 +1210,17 @@ void compile() free_all_local_names(); } -struct program *compile_file(struct lpc_string *file_name) +struct program *compile_file(struct pike_string *file_name) { int fd; struct program *p; - + fd=open(file_name->str,O_RDONLY); if(fd < 0) error("Couldn't open file '%s'.\n",file_name->str); + #define FILE_STATE #define PUSH #include "compilation.h" @@ -1216,8 +1241,8 @@ struct program *compile_file(struct lpc_string *file_name) return p; } -struct program *compile_string(struct lpc_string *prog, - struct lpc_string *name) +struct program *compile_string(struct pike_string *prog, + struct pike_string *name) { struct program *p; @@ -1255,7 +1280,7 @@ struct program *end_c_program(char *name) void add_function(char *name,void (*cfun)(INT32),char *type,INT16 flags) { - struct lpc_string *name_tmp,*type_tmp; + struct pike_string *name_tmp,*type_tmp; union idptr tmp; name_tmp=make_shared_string(name); @@ -1281,23 +1306,11 @@ void add_function(char *name,void (*cfun)(INT32),char *type,INT16 flags) } #ifdef DEBUG -void check_all_programs(int pass) +void check_all_programs() { struct program *p; for(p=first_program;p;p=p->next) - check_program(p,pass); - -#ifdef FIND_FUNCTION_HASHSIZE - if(!pass) - { - int e; - for(e=0;e<FIND_FUNCTION_HASHSIZE;e++) - { - if(cache[e].name) - checked((void *)cache[e].name,1); - } - } -#endif + check_program(p); } #endif @@ -1315,3 +1328,46 @@ void cleanup_program() } #endif } + +#ifdef GC2 + +void gc_mark_program_as_referenced(struct program *p) +{ + if(gc_mark(p)) + gc_mark_svalues(p->constants, p->num_constants); +} + +void gc_check_all_programs() +{ + struct program *p; + for(p=first_program;p;p=p->next) + gc_check_svalues(p->constants, p->num_constants); +} + +void gc_mark_all_programs() +{ + struct program *p; + for(p=first_program;p;p=p->next) + if(gc_is_referenced(p)) + gc_mark_program_as_referenced(p); +} + +void gc_free_all_unreferenced_programs() +{ + struct program *p,*next; + + for(p=first_program;p;p=next) + { + if(gc_do_free(p)) + { + p->refs++; + free_svalues(p->constants, p->num_constants, -1); + next=p->next; + free_program(p); + }else{ + next=p->next; + } + } +} + +#endif /* GC2 */ diff --git a/src/program.h b/src/program.h index 0204f525483e6c88de5ca4bee9f2cc9e00a432d0..04de1ccc1ba833ae0dbbe6abbf833e497b76fa2a 100644 --- a/src/program.h +++ b/src/program.h @@ -1,16 +1,43 @@ /*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ -#ifndef EXEC_H -#define EXEC_H +#ifndef PROGRAM_H +#define PROGRAM_H #include <stdarg.h> #include "config.h" #include "machine.h" #include "types.h" +#define LFUN___INIT 0 +#define LFUN_CREATE 1 +#define LFUN_DESTROY 2 +#define LFUN_ADD 3 +#define LFUN_SUBTRACT 4 +#define LFUN_AND 5 +#define LFUN_OR 6 +#define LFUN_XOR 7 +#define LFUN_LSH 8 +#define LFUN_RSH 9 +#define LFUN_MULTIPLY 10 +#define LFUN_DIVIDE 11 +#define LFUN_MOD 12 +#define LFUN_COMPL 13 +#define LFUN_EQ 14 +#define LFUN_LT 15 +#define LFUN_GT 16 +#define LFUN___HASH 17 +#define LFUN_CAST 18 +#define LFUN_NOT 19 +#define LFUN_INDEX 20 +#define LFUN_ASSIGN_INDEX 21 + +#define NUM_LFUNS 22 + +extern char *lfun_names[]; + struct svalue; struct module; struct object; @@ -21,7 +48,7 @@ struct object; * This can for instance be an svalue. * * b) one type that once the object/program is known can point - * to the C/LPC function body. + * to the C/PIKE function body. * * c) A number of flags to send to 'add_simul_efun' to specify side effects * and such. @@ -30,12 +57,11 @@ struct object; /* * Max program dimensions: - * 2^16 functions + * 2^16 functions + global variables * 2^16 inherits - * 2^16 arguments to lpc functions - * 2^32 to efuns and C functions + * 2^16 arguments to pike functions + * 2^32 efuns * 2^8 local variables (and arguments) - * 2^16 global variables */ union idptr @@ -44,15 +70,15 @@ union idptr INT32 offset; }; -#define IDENTIFIER_LPC_FUNCTION 1 +#define IDENTIFIER_PIKE_FUNCTION 1 #define IDENTIFIER_C_FUNCTION 2 #define IDENTIFIER_FUNCTION 3 #define IDENTIFIER_VARARGS 4 struct identifier { - struct lpc_string *name; - struct lpc_string *type; + struct pike_string *name; + struct pike_string *type; unsigned INT16 flags; /* IDENTIFIER_??? */ unsigned INT16 run_time_type; union idptr func; @@ -93,14 +119,13 @@ struct inherit struct program { INT32 refs; - INT32 flags; INT32 id; /* used to identify program in caches */ INT32 storage_needed; /* storage needed in the object struct */ struct program *next; struct program *prev; unsigned char *program; - struct lpc_string **strings; + struct pike_string **strings; struct inherit *inherits; struct reference *identifier_references; struct identifier *identifiers; @@ -108,10 +133,9 @@ struct program struct svalue *constants; char *linenumbers; struct module *from_module; - void (*init)(char *,struct object *); - void (*exit)(char *,struct object *); + void (*init)(struct object *); + void (*exit)(struct object *); #ifdef DEBUG - void (*checkrefs)(char *,struct object *,int pass); unsigned INT32 checksum; #endif @@ -124,6 +148,7 @@ struct program unsigned INT16 num_identifier_references; unsigned INT16 num_identifier_indexes; unsigned INT16 num_inherits; + INT16 lfuns[NUM_LFUNS]; }; #define INHERIT_FROM_PTR(P,X) ((P)->inherits + (X)->inherit_offset) @@ -145,44 +170,48 @@ void start_new_program(); void really_free_program(struct program *p); void dump_program_desc(struct program *p); void toss_current_program(); -void check_program(struct program *p, int pass); +void check_program(struct program *p); struct program *end_program(); SIZE_T add_storage(SIZE_T size); -void set_init_callback(void (*init)(char *,struct object *)); -void set_exit_callback(void (*exit)(char *,struct object *)); -int low_reference_inherited_identifier(int e,struct lpc_string *name); -int reference_inherited_identifier(struct lpc_string *super_name, - struct lpc_string *function_name); -void rename_last_inherit(struct lpc_string *n); -void do_inherit(struct program *p,INT32 flags, struct lpc_string *name); -void simple_do_inherit(struct lpc_string *s, INT32 flags,struct lpc_string *name); -int isidentifier(struct lpc_string *s); -int define_variable(struct lpc_string *name, - struct lpc_string *type, +void set_init_callback(void (*init)(struct object *)); +void set_exit_callback(void (*exit)(struct object *)); +int low_reference_inherited_identifier(int e,struct pike_string *name); +int reference_inherited_identifier(struct pike_string *super_name, + struct pike_string *function_name); +void rename_last_inherit(struct pike_string *n); +void do_inherit(struct program *p,INT32 flags, struct pike_string *name); +void simple_do_inherit(struct pike_string *s, INT32 flags,struct pike_string *name); +int isidentifier(struct pike_string *s); +int define_variable(struct pike_string *name, + struct pike_string *type, INT32 flags); -INT32 define_function(struct lpc_string *name, - struct lpc_string *type, +INT32 define_function(struct pike_string *name, + struct pike_string *type, INT16 flags, INT8 function_flags, union idptr *func); struct ff_hash; -int find_shared_string_identifier(struct lpc_string *name, +int find_shared_string_identifier(struct pike_string *name, struct program *prog); int find_identifier(char *name,struct program *prog); -int store_prog_string(struct lpc_string *str); +int store_prog_string(struct pike_string *str); int store_constant(struct svalue *foo, int equal); void start_line_numbering(void); -void store_linenumber(void); +void store_linenumber(INT32 current_line, struct pike_string *current_file); char *get_line(unsigned char *pc,struct program *prog,INT32 *linep); void my_yyerror(char *fmt,...); void compile(); -struct program *compile_file(struct lpc_string *file_name); -struct program *compile_string(struct lpc_string *prog, - struct lpc_string *name); +struct program *compile_file(struct pike_string *file_name); +struct program *compile_string(struct pike_string *prog, + struct pike_string *name); struct program *end_c_program(char *name); void add_function(char *name,void (*cfun)(INT32),char *type,INT16 flags); -void check_all_programs(int pass); +void check_all_programs(); void cleanup_program(); +void gc_mark_program_as_referenced(struct program *p); +void gc_check_all_programs(); +void gc_mark_all_programs(); +void gc_free_all_unreferenced_programs(); /* Prototypes end here */ diff --git a/src/run_autoconfig b/src/run_autoconfig new file mode 100755 index 0000000000000000000000000000000000000000..0fed0b518af02fec8ed6576877cc846a3e82be04 --- /dev/null +++ b/src/run_autoconfig @@ -0,0 +1,28 @@ +#!/bin/sh + +# Bootstrap script + +fix() +{ + if [ -d $1 ]; then + ( cd $1 ; autoconf ) + fi + + if [ ! -f $1/Makefile.in ]; then + cp $1/Makefile.src $1/Makefile.in + fi +} + + +fix . +fix modules +for a in modules/* +do + if test -d $a ; then + case $a in + */CVS) ;; + */RCS) ;; + *) fix $a ;; + esac + fi +done diff --git a/src/rusage.c b/src/rusage.c index 0a93495239009b310147bb546e93de60fc89bf27..ae7b796f51204b66c7dc355f0bc628d5fa8c94ac 100644 --- a/src/rusage.c +++ b/src/rusage.c @@ -1,18 +1,13 @@ /*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ #include "global.h" #include <sys/types.h> #include <sys/stat.h> -#ifdef HAVE_SYS_TIME_H -#include <sys/time.h> -#endif +#include "time_stuff.h" #include <fcntl.h> -#ifdef HAVE_TIME_H -#include <time.h> -#endif #include <errno.h> #include "types.h" #include "rusage.h" @@ -162,7 +157,6 @@ INT32 *low_rusage() #else /*HAVE_TIMES */ #if defined(HAVE_CLOCK) && defined(CLOCKS_PER_SECOND) - #define NEED_CONVERT_TIME static long convert_time(long t,long tick); INT32 *low_rusage() @@ -175,7 +169,10 @@ INT32 *low_rusage() INT32 *low_rusage() { - rusage_values[0]=get_current_time()*1000; /* Wrong, but who cares */ + /* This is totally wrong, but hey, if you can't do it _right_... */ + struct timeval tm; + GETTIMEOFDAY(&tm); + rusage_values[0]=tm.tv_sec*1000 + tm.tv_usec/1000; return rusage_values; } #endif /* HAVE_CLOCK */ @@ -189,6 +186,7 @@ INT32 *low_rusage() * Here's a trick to do t * 1000 / tick without * causing arethmic overflow */ +static long convert_time(long t,long tick) { return (t / tick) * 1000 + (t % tick) * 1000 / tick; } diff --git a/src/rusage.h b/src/rusage.h index 7f33ba2f7aafa57deb7dc51927c811f654392e66..f13084e124ad857ca503c1e624b29c601139c358 100644 --- a/src/rusage.h +++ b/src/rusage.h @@ -1,6 +1,6 @@ /*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ #ifndef RUSAGE_H diff --git a/src/lpc_signal.c b/src/signal_handler.c similarity index 80% rename from src/lpc_signal.c rename to src/signal_handler.c index fdbb2fea86a513166c3c8f706c35af27b5fab4cf..4968248b8f65d32066126d405cfb7823c4e51d6a 100644 --- a/src/lpc_signal.c +++ b/src/signal_handler.c @@ -1,18 +1,23 @@ /*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ #include "global.h" #include "svalue.h" #include "interpret.h" #include "stralloc.h" -#include "add_efun.h" +#include "constants.h" #include "macros.h" #include "backend.h" +#include "error.h" #include <signal.h> #include <sys/wait.h> +#ifdef HAVE_UNISTD_H +#include <unistd.h> +#endif + #ifdef NSIG #define MAX_SIGNALS NSIG #else @@ -169,9 +174,9 @@ static int my_signal(int sig, sigfunctype fun) #ifdef HAVE_SIGVEC { struct sigvec action; + MEMSET((char *)&action, 0, sizeof(action)); action.sv_handler= fun; action.sv_mask=-1; - action.sv_flags=0; #ifdef SA_INTERRUPT if(fun != SIG_IGN) action.sv_flags=SV_INTERRUPT; @@ -186,15 +191,20 @@ static int my_signal(int sig, sigfunctype fun) static RETSIGTYPE sig_child(int arg) { + /* We carefully reap what we saw */ #ifdef HAVE_WAITPID - waitpid(-1,0,WNOHANG); + while(waitpid(-1,0,WNOHANG) > 0); #else #ifdef HAVE_WAIT3 - wait3(-1,0,WNOHANG); + while( wait3(0,WNOHANG,0) > 0); +#else +#ifdef HAVE_WAIT4 + while( wait4(-1,0,WNOHANG,0) > 0); #else /* Leave'em hanging */ +#endif /* HAVE_WAIT4 */ #endif /* HAVE_WAIT3 */ #endif /* HAVE_WAITPID */ @@ -219,16 +229,24 @@ static RETSIGTYPE receive_signal(int signum) #endif } +static int signalling=0; + +static void unset_signalling(void *notused) { signalling=0; } + void check_signals() { + ONERROR ebuf; #ifdef DEBUG extern int d_flag; if(d_flag>5) do_debug(0); #endif - if(firstsig != lastsig) + if(firstsig != lastsig && !signalling) { int tmp=firstsig; + signalling=1; + + SET_ONERROR(ebuf,unset_signalling,0); while(lastsig != tmp) { @@ -238,6 +256,10 @@ void check_signals() apply_svalue(signal_callbacks + sigbuf[lastsig], 1); pop_stack(); } + + UNSET_ONERROR(ebuf); + + signalling=0; } } @@ -274,12 +296,6 @@ static void f_signal(int args) if(args < 1) error("Too few arguments to signal()\n"); - if(args == 1) - { - push_int(0); - args++; - } - if(sp[-args].type != T_INT) { error("Bad argument 1 to signal()\n"); @@ -291,9 +307,11 @@ static void f_signal(int args) error("Signal out of range.\n"); } - assign_svalue(signal_callbacks + signum, sp+1-args); - if(IS_ZERO(sp+1-args)) + if(args == 1) { + push_int(0); + args++; + switch(signum) { case SIGCHLD: @@ -307,9 +325,15 @@ static void f_signal(int args) default: func=(sigfunctype) SIG_DFL; } - }else{ - func=receive_signal; + } else { + if(IS_ZERO(sp+1-args)) + { + func=(sigfunctype) SIG_IGN; + }else{ + func=receive_signal; + } } + assign_svalue(signal_callbacks + signum, sp+1-args); my_signal(signum, func); pop_n_elems(args); } @@ -364,6 +388,44 @@ static void f_getpid(INT32 args) push_int(getpid()); } +static void f_alarm(INT32 args) +{ + long seconds; + + if(args < 1) + error("Too few arguments to signame()\n"); + + if(sp[-args].type != T_INT) + error("Bad argument 1 to signame()\n"); + + seconds=sp[-args].u.integer; + + pop_n_elems(args); + push_int(alarm(seconds)); +} + +#ifdef HAVE_UALARM +static void f_ualarm(INT32 args) +{ + long seconds; + + if(args < 1) + error("Too few arguments to signame()\n"); + + if(sp[-args].type != T_INT) + error("Bad argument 1 to signame()\n"); + + seconds=sp[-args].u.integer; + + pop_n_elems(args); +#ifdef UALARM_TAKES_TWO_ARGS + push_int(ualarm(seconds,0)); +#else + push_int(ualarm(seconds)); +#endif +} +#endif + void init_signals() { int e; @@ -381,6 +443,10 @@ void init_signals() add_efun("signame",f_signame,"function(int:string)",0); add_efun("signum",f_signum,"function(string:int)",0); add_efun("getpid",f_getpid,"function(:int)",0); + add_efun("alarm",f_alarm,"function(int:int)",OPT_SIDE_EFFECT); +#ifdef HAVE_UALARM + add_efun("ualarm",f_ualarm,"function(int:int)",OPT_SIDE_EFFECT); +#endif } void exit_signals() diff --git a/src/lpc_signal.h b/src/signal_handler.h similarity index 67% rename from src/lpc_signal.h rename to src/signal_handler.h index aa005e284454522e124dea20f12bd29c2a3bd29b..97d20daec416b4c512dcdbdf49e0a4937eb747d1 100644 --- a/src/lpc_signal.h +++ b/src/signal_handler.h @@ -1,6 +1,6 @@ /*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ #ifndef SIGNAL_H diff --git a/src/stralloc.c b/src/stralloc.c index c915693f90adc7e411e0686b517ec94177569e99..646a8897009b7018394d43739c93009a1952403e 100644 --- a/src/stralloc.c +++ b/src/stralloc.c @@ -1,6 +1,6 @@ /*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ #include "global.h" @@ -11,7 +11,7 @@ #include "memory.h" #include "error.h" -static struct lpc_string *base_table[HTABLE_SIZE]; +static struct pike_string *base_table[HTABLE_SIZE]; static unsigned INT32 full_hash_value; /* @@ -23,35 +23,29 @@ static unsigned int StrHash(const char *s,int len) } #ifdef DEBUG -void check_string(struct lpc_string *s) +void check_string(struct pike_string *s) { + StrHash(s->str, s->len); + if(full_hash_value != s->hval) + fatal("Hash value changed?\n"); + if(debug_findstring(s) !=s) fatal("Shared string not shared.\n"); if(s->str[s->len]) fatal("Shared string is not zero terminated properly.\n"); - - checked((void *)s,1); } -void verify_shared_strings_tables(int pass) +void verify_shared_strings_tables() { unsigned int e, h; - struct lpc_string *s; + struct pike_string *s; for(e=0;e<HTABLE_SIZE;e++) { h=0; for(s=base_table[e];s;s=s->next) { - if(pass) - { - if(checked((void *)s,0)!=s->refs) - { - fatal("Shared string has wrong number of refs '%s'.\n",s->str); - } - continue; - } h++; if(s->len < 0) fatal("Shared string shorter than zero bytes.\n"); @@ -70,7 +64,7 @@ void verify_shared_strings_tables(int pass) if(h>10000) { - struct lpc_string *s2; + struct pike_string *s2; for(s2=s;s2;s2=s2->next) if(s2 == s) fatal("Shared string table is cyclic.\n"); @@ -84,9 +78,9 @@ void verify_shared_strings_tables(int pass) /* * find a string in the shared string table. */ -static struct lpc_string *internal_findstring(const char *s,int len,int h) +static struct pike_string *internal_findstring(const char *s,int len,int h) { - struct lpc_string *curr,**prev, **base; + struct pike_string *curr,**prev, **base; for(base = prev = base_table + h;( curr=*prev ); prev=&curr->next) { @@ -108,7 +102,7 @@ static struct lpc_string *internal_findstring(const char *s,int len,int h) return 0; /* not found */ } -struct lpc_string *findstring(const char *foo) +struct pike_string *findstring(const char *foo) { int l; l=strlen(foo); @@ -119,9 +113,9 @@ struct lpc_string *findstring(const char *foo) * find a string that is already shared and move it to the head * of that list in the hastable */ -static struct lpc_string *propagate_shared_string(const struct lpc_string *s,int h) +static struct pike_string *propagate_shared_string(const struct pike_string *s,int h) { - struct lpc_string *curr, **prev, **base; + struct pike_string *curr, **prev, **base; for(base = prev = base_table + h;( curr=*prev ); prev=&curr->next) { @@ -141,27 +135,27 @@ static struct lpc_string *propagate_shared_string(const struct lpc_string *s,int } #ifdef DEBUG -struct lpc_string *debug_findstring(const struct lpc_string *foo) +struct pike_string *debug_findstring(const struct pike_string *foo) { - return propagate_shared_string(foo, StrHash(foo->str, foo->len)); + return propagate_shared_string(foo, foo->hval % HTABLE_SIZE); } #endif /* note that begin_shared_string expects the _exact_ size of the string, * not the maximum size */ -struct lpc_string *begin_shared_string(int len) +struct pike_string *begin_shared_string(int len) { - struct lpc_string *t; - t=(struct lpc_string *)xalloc(len + sizeof(struct lpc_string)); + struct pike_string *t; + t=(struct pike_string *)xalloc(len + sizeof(struct pike_string)); t->len=len; return t; } -struct lpc_string *end_shared_string(struct lpc_string *s) +struct pike_string *end_shared_string(struct pike_string *s) { int len,h; - struct lpc_string *s2; + struct pike_string *s2; len=s->len; h=StrHash(s->str,len); @@ -183,9 +177,9 @@ struct lpc_string *end_shared_string(struct lpc_string *s) return s; } -struct lpc_string * make_shared_binary_string(const char *str,int len) +struct pike_string * make_shared_binary_string(const char *str,int len) { - struct lpc_string *s; + struct pike_string *s; int h=StrHash(str,len); s = internal_findstring(str,len,h); @@ -205,7 +199,7 @@ struct lpc_string * make_shared_binary_string(const char *str,int len) return s; } -struct lpc_string *make_shared_string(const char *str) +struct pike_string *make_shared_string(const char *str) { return make_shared_binary_string(str, strlen(str)); } @@ -260,7 +254,7 @@ static int low_binary_strcmp(char *a,INT32 alen, #endif /* Does not take locale into account */ -int my_quick_strcmp(struct lpc_string *a,struct lpc_string *b) +int my_quick_strcmp(struct pike_string *a,struct pike_string *b) { if(a==b) return 0; @@ -268,14 +262,14 @@ int my_quick_strcmp(struct lpc_string *a,struct lpc_string *b) } /* Does take locale into account */ -int my_strcmp(struct lpc_string *a,struct lpc_string *b) +int my_strcmp(struct pike_string *a,struct pike_string *b) { if(a==b) return 0; return low_binary_strcmp(a->str,a->len,b->str,b->len); } -void really_free_string(struct lpc_string *s) +void really_free_string(struct pike_string *s) { int h; @@ -288,7 +282,7 @@ void really_free_string(struct lpc_string *s) /* * */ -struct lpc_string *add_string_status(int verbose) +struct pike_string *add_string_status(int verbose) { char b[200]; @@ -302,7 +296,7 @@ struct lpc_string *add_string_status(int verbose) int bytes_distinct_strings=0; int overhead_bytes=0; int e; - struct lpc_string *p; + struct pike_string *p; for(e=0;e<HTABLE_SIZE;e++) { for(p=base_table[e];p;p=p->next) @@ -314,7 +308,7 @@ struct lpc_string *add_string_status(int verbose) } } - overhead_bytes=(sizeof(struct lpc_string)-1)*num_distinct_strings; + overhead_bytes=(sizeof(struct pike_string)-1)*num_distinct_strings; my_strcat("\nShared string hash table:\n"); my_strcat("-------------------------\t Strings Bytes\n"); @@ -341,17 +335,17 @@ struct lpc_string *add_string_status(int verbose) void dump_stralloc_strings() { int e; - struct lpc_string *p; + struct pike_string *p; for(e=0;e<HTABLE_SIZE;e++) for(p=base_table[e];p;p=p->next) printf("%ld refs \"%s\"\n",(long)p->refs,p->str); } -struct lpc_string *add_shared_strings(struct lpc_string *a, - struct lpc_string *b) +struct pike_string *add_shared_strings(struct pike_string *a, + struct pike_string *b) { INT32 size; - struct lpc_string *ret; + struct pike_string *ret; char *buf; size = a->len + b->len; @@ -365,19 +359,22 @@ struct lpc_string *add_shared_strings(struct lpc_string *a, return ret; } -struct lpc_string *string_replace(struct lpc_string *str, - struct lpc_string *del, - struct lpc_string *to) +struct pike_string *string_replace(struct pike_string *str, + struct pike_string *del, + struct pike_string *to) { - struct lpc_string *ret; + struct pike_string *ret; INT32 delimeters; char *s,*tmp,*r,*end; + struct mem_searcher searcher; s=str->str; end=s+str->len; delimeters=0; - while((s=MEMMEM(del->str,del->len,s,end-s))) + init_memsearch(&searcher, del->str, del->len, str->len * 2); + + while((s=memory_search(&searcher,s,end-s))) { delimeters++; s+=del->len; @@ -393,7 +390,7 @@ struct lpc_string *string_replace(struct lpc_string *str, s=str->str; r=ret->str; - while((tmp=MEMMEM(del->str,del->len,s,end-s))) + while((tmp=memory_search(&searcher,s,end-s))) { MEMCPY(r,s,tmp-s); r+=tmp-s; @@ -409,7 +406,7 @@ struct lpc_string *string_replace(struct lpc_string *str, void cleanup_shared_string_table() { int e; - struct lpc_string *s,*next; + struct pike_string *s,*next; for(e=0;e<HTABLE_SIZE;e++) { for(s=base_table[e];s;s=next) diff --git a/src/stralloc.h b/src/stralloc.h index a2b626193549de54786fd04373525047918d3481..f6e63b2cb2e6eab37df953f2ebcaf46f0de5905c 100644 --- a/src/stralloc.h +++ b/src/stralloc.h @@ -1,6 +1,6 @@ /*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ #ifndef STRALLOC_H @@ -9,20 +9,20 @@ #define STRINGS_ARE_SHARED -struct lpc_string +struct pike_string { SIZE_T refs; INT32 len; unsigned INT32 hval; - struct lpc_string *next; + struct pike_string *next; char str[1]; }; #ifdef DEBUG -struct lpc_string *debug_findstring(const struct lpc_string *foo); +struct pike_string *debug_findstring(const struct pike_string *foo); #endif -#define free_string(s) do{ struct lpc_string *_=(s); if(!--_->refs) really_free_string(_); }while(0) +#define free_string(s) do{ struct pike_string *_=(s); if(!--_->refs) really_free_string(_); }while(0) #define my_hash_string(X) ((unsigned long)(X)) #define my_order_strcmp(X,Y) ((char *)(X)-(char *)(Y)) @@ -32,26 +32,26 @@ struct lpc_string *debug_findstring(const struct lpc_string *foo); #define copy_shared_string(to,s) ((to)=(s))->refs++ /* Prototypes begin here */ -void check_string(struct lpc_string *s); -void verify_shared_strings_tables(int pass); -struct lpc_string *findstring(const char *foo); -struct lpc_string *debug_findstring(const struct lpc_string *foo); -struct lpc_string *begin_shared_string(int len); -struct lpc_string *end_shared_string(struct lpc_string *s); -struct lpc_string * make_shared_binary_string(const char *str,int len); -struct lpc_string *make_shared_string(const char *str); +void check_string(struct pike_string *s); +void verify_shared_strings_tables(); +struct pike_string *findstring(const char *foo); +struct pike_string *debug_findstring(const struct pike_string *foo); +struct pike_string *begin_shared_string(int len); +struct pike_string *end_shared_string(struct pike_string *s); +struct pike_string * make_shared_binary_string(const char *str,int len); +struct pike_string *make_shared_string(const char *str); int low_quick_binary_strcmp(char *a,INT32 alen, char *b,INT32 blen); -int my_quick_strcmp(struct lpc_string *a,struct lpc_string *b); -int my_strcmp(struct lpc_string *a,struct lpc_string *b); -void really_free_string(struct lpc_string *s); -struct lpc_string *add_string_status(int verbose); +int my_quick_strcmp(struct pike_string *a,struct pike_string *b); +int my_strcmp(struct pike_string *a,struct pike_string *b); +void really_free_string(struct pike_string *s); +struct pike_string *add_string_status(int verbose); void dump_stralloc_strings(); -struct lpc_string *add_shared_strings(struct lpc_string *a, - struct lpc_string *b); -struct lpc_string *string_replace(struct lpc_string *str, - struct lpc_string *del, - struct lpc_string *to); +struct pike_string *add_shared_strings(struct pike_string *a, + struct pike_string *b); +struct pike_string *string_replace(struct pike_string *str, + struct pike_string *del, + struct pike_string *to); void cleanup_shared_string_table(); /* Prototypes end here */ diff --git a/src/stuff.c b/src/stuff.c index 699f5cc2e1d3747cb3a1ffe99c1f69e947292813..d399eb60f2e08e2a9860fe5f9f03eeb6567abc1a 100644 --- a/src/stuff.c +++ b/src/stuff.c @@ -1,6 +1,6 @@ /*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ #include "stuff.h" diff --git a/src/stuff.h b/src/stuff.h index 7ca419d861427ac8d3087df2a3cb51f068dfe865..fc0fe0dd89d2c5f5fa36a508095e46604a1493e0 100644 --- a/src/stuff.h +++ b/src/stuff.h @@ -1,6 +1,6 @@ /*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ #ifndef STUFF_H diff --git a/src/svalue.c b/src/svalue.c index d742cb186de35f3f99f551f7504f11e486584396..7a701d99eb6326295f2aca2ea3e748ffc4d12618 100644 --- a/src/svalue.c +++ b/src/svalue.c @@ -1,19 +1,25 @@ /*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ #include "global.h" +#include "main.h" #include "svalue.h" #include "stralloc.h" #include "array.h" #include "mapping.h" -#include "list.h" +#include "multiset.h" #include "object.h" #include "program.h" -#include "add_efun.h" +#include "constants.h" #include "error.h" #include "dynamic_buffer.h" +#include "interpret.h" + + +struct svalue dest_ob_zero = { T_INT, 0, 0 }; + /* * This routine frees a short svalue given a pointer to it and @@ -40,8 +46,8 @@ void free_short_svalue(union anything *s,TYPE_T type) really_free_mapping(tmp.mapping); break; - case T_LIST: - really_free_list(tmp.list); + case T_MULTISET: + really_free_multiset(tmp.multiset); break; case T_OBJECT: @@ -93,8 +99,8 @@ void free_svalue(struct svalue *s) #endif break; - case T_LIST: - really_free_list(s->u.list); + case T_MULTISET: + really_free_multiset(s->u.multiset); #ifdef DEBUG s->type = 99; #endif @@ -139,47 +145,41 @@ void free_svalue(struct svalue *s) * We put this routine here so the compiler can optimize the call * inside the loop if it wants to */ -void free_svalues(struct svalue *s,INT32 num) +void free_svalues(struct svalue *s,INT32 num, INT32 type_hint) { - while(--num >= 0) free_svalue(s++); -} - -void free_short_svalues(union anything *s,INT32 num,TYPE_T type) -{ - union anything tmp; -#ifdef DEBUG - int e; - for(e=0;e<num;e++) - check_refs2(s+e,type); -#endif - -#define PRE \ - for(;--num >= 0;s++) { \ - if(s->refs && --*(s->refs) <= 0) { \ - tmp=*s; \ - s->refs=0 - -#define POST }}break - - - - switch(type) + switch(type_hint) { - case T_ARRAY: PRE; really_free_array(tmp.array); POST; - case T_MAPPING: PRE; really_free_mapping(tmp.mapping); POST; - case T_LIST: PRE; really_free_list(tmp.list); POST; - case T_OBJECT: PRE; really_free_object(tmp.object); POST; - case T_PROGRAM: PRE; really_free_program(tmp.program); POST; - case T_STRING: PRE; really_free_string(tmp.string); POST; - - case T_INT: - case T_FLOAT: - break; + case 0: + case BIT_INT: + case BIT_FLOAT: + case BIT_FLOAT | BIT_INT: + return; + +#define DOTYPE(X,Y,Z) case X:while(--num>=0) { Y(s->u.Z); s++; }return + DOTYPE(BIT_STRING, free_string, string); + DOTYPE(BIT_ARRAY, free_array, array); + DOTYPE(BIT_MAPPING, free_mapping, mapping); + DOTYPE(BIT_MULTISET, free_multiset, multiset); + DOTYPE(BIT_OBJECT, free_object, object); + DOTYPE(BIT_PROGRAM, free_program, program); + + case BIT_FUNCTION: + while(--num>=0) + { + if(s->u.refs[0]--==0) + { + if(s->subtype == -1) + really_free_callable(s->u.efun); + else + really_free_object(s->u.object); + } + s++; + } + return; -#ifdef DEBUG - default: - fatal("Bad type in free_short_svalues.\n"); -#endif +#undef DOTYPE + default: + while(--num >= 0) free_svalue(s++); } } @@ -196,22 +196,43 @@ void assign_svalue_no_free(struct svalue *to, void assign_svalues_no_free(struct svalue *to, struct svalue *from, - INT32 num) + INT32 num, + INT32 type_hint) { + if((type_hint & ~(BIT_INT | BIT_FLOAT))==0) + { + MEMCPY((char *)to, (char *)from, sizeof(struct svalue) * num); + return; + } + + if((type_hint & (BIT_INT | BIT_FLOAT)==0)) + { + while(--num > 0) + { + struct svalue tmp; + tmp=*(from++); + *(to++)=tmp; + tmp.u.refs++; + } + return; + } + while(--num >= 0) assign_svalue_no_free(to++,from++); } - void assign_svalue(struct svalue *to, struct svalue *from) { free_svalue(to); assign_svalue_no_free(to,from); } -void assign_svalues(struct svalue *to, struct svalue *from, INT32 num) +void assign_svalues(struct svalue *to, + struct svalue *from, + INT32 num, + TYPE_FIELD types) { - free_svalues(to,num); - assign_svalues_no_free(to,from,num); + free_svalues(to,num,BIT_MIXED); + assign_svalues_no_free(to,from,num,types); } void assign_to_short_svalue(union anything *u, @@ -259,14 +280,6 @@ void assign_to_short_svalue_no_free(union anything *u, } } -void assign_to_short_svalues_no_free(union anything *u, - TYPE_T type, - struct svalue *s, - INT32 num) -{ - while(--num >= 0) assign_to_short_svalue_no_free(u++,type,s++); -} - void assign_from_short_svalue_no_free(struct svalue *s, union anything *u, @@ -292,44 +305,6 @@ void assign_from_short_svalue_no_free(struct svalue *s, } } -void assign_from_short_svalues_no_free(struct svalue *s, - union anything *u, - TYPE_T type, - INT32 num) -{ - check_type(type); - - if(type <= MAX_REF_TYPE) - { - while(--num >= 0) - { - check_refs2(u,type); - - s->u=*u; - if(u->refs) - { - s->type=type; - u->refs[0]++; - }else{ - s->type=T_INT; - s->subtype=NUMBER_NUMBER; - } - s++; - u++; - } - } - else - { - while(--num >= 0) - { - s->type=type; - s->u=*u; - s++; - u++; - } - } -} - void assign_short_svalue_no_free(union anything *to, union anything *from, TYPE_T type) @@ -360,26 +335,80 @@ void assign_short_svalue(union anything *to, } } -void assign_short_svalues_no_free(union anything *to, - union anything *from, - TYPE_T type, - INT32 num) +unsigned INT32 hash_svalue(struct svalue *s) { - union anything tmp; - check_type(type); + unsigned INT32 q; - if(type <= MAX_REF_TYPE) + check_type(s->type); + check_refs(s); + + switch(s->type) { - while(--num >= 0) + case T_OBJECT: + if(!s->u.object->prog) { - check_refs2(from,type); + q=0; + break; + } - *(to++) = tmp = *(from++); - if(tmp.refs) tmp.refs[0]++; + if(s->u.object->prog->lfuns[LFUN___HASH] != -1) + { + safe_apply_low(s->u.object, s->u.object->prog->lfuns[LFUN___HASH], 0); + if(sp[-1].type == T_INT) + { + q=sp[-1].u.integer; + }else{ + q=0; + } + pop_stack(); + break; } - }else{ - MEMCPY((char *)to, (char *)from, num*sizeof(union anything *)); + + default: q=(unsigned INT32)((long)s->u.refs >> 2); + case T_INT: q=s->u.integer; break; + case T_FLOAT: q=(unsigned INT32)(s->u.float_number * 16843009.731757771173); break; + } + q+=q % 997; + q+=((q + s->type) * 9248339); + + return q; +} + +int svalue_is_true(struct svalue *s) +{ + unsigned INT32 q; + check_type(s->type); + check_refs(s); + + switch(s->type) + { + case T_INT: + if(s->u.integer) return 1; + return 0; + + case T_FUNCTION: + if(!s->u.object->prog) return 0; + return 1; + + case T_OBJECT: + if(!s->u.object->prog) return 0; + + if(s->u.object->prog->lfuns[LFUN_NOT]!=-1) + { + safe_apply_low(s->u.object,s->u.object->prog->lfuns[LFUN_NOT],0); + if(sp[-1].type == T_INT && sp[-1].u.integer == 0) + { + pop_stack(); + return 1; + } else { + return 0; + } + } + + default: + return 1; } + } int is_eq(struct svalue *a, struct svalue *b) @@ -389,14 +418,61 @@ int is_eq(struct svalue *a, struct svalue *b) check_refs(a); check_refs(b); - check_destructed(a); - check_destructed(b); + safe_check_destructed(a); + safe_check_destructed(b); + + if (a->type != b->type) + { + if(a->type == T_OBJECT) + { + if(a->u.object->prog->lfuns[LFUN_EQ] != -1) + { + a_is_obj: + assign_svalue_no_free(sp, b); + sp++; + apply_lfun(a->u.object, LFUN_EQ, 1); + if(IS_ZERO(sp-1)) + { + pop_stack(); + return 0; + }else{ + pop_stack(); + return 1; + } + } + } + + if(b->type == T_OBJECT) + { + if(b->u.object->prog->lfuns[LFUN_EQ] != -1) + { + b_is_obj: + assign_svalue_no_free(sp, a); + sp++; + apply_lfun(b->u.object, LFUN_EQ, 1); + if(IS_ZERO(sp-1)) + { + pop_stack(); + return 0; + }else{ + pop_stack(); + return 1; + } + } + } - if (a->type != b->type) return 0; + return 0; + } switch(a->type) { - case T_LIST: case T_OBJECT: + if(a->u.object->prog->lfuns[LFUN_EQ] != -1) + goto a_is_obj; + + if(b->u.object->prog->lfuns[LFUN_EQ] != -1) + goto b_is_obj; + + case T_MULTISET: case T_PROGRAM: case T_ARRAY: case T_MAPPING: @@ -420,7 +496,6 @@ int is_eq(struct svalue *a, struct svalue *b) } } - int low_is_equal(struct svalue *a, struct svalue *b, struct processing *p) @@ -454,8 +529,8 @@ int low_is_equal(struct svalue *a, case T_MAPPING: return mapping_equal_p(a->u.mapping, b->u.mapping, p); - case T_LIST: - return list_equal_p(a->u.list, b->u.list, p); + case T_MULTISET: + return multiset_equal_p(a->u.multiset, b->u.multiset, p); default: fatal("Unknown type in is_equal.\n"); @@ -497,49 +572,72 @@ int is_equal(struct svalue *a,struct svalue *b) return low_is_equal(a,b,0); } - -int is_gt(const struct svalue *a,const struct svalue *b) +int is_lt(struct svalue *a,struct svalue *b) { check_type(a->type); check_type(b->type); check_refs(a); check_refs(b); + safe_check_destructed(a); + safe_check_destructed(b); + if (a->type != b->type) { - error("Cannot compare different types.\n"); - } - switch(a->type) - { - default: - error("Bad argument 1 to '>'.\n"); + if(a->type == T_FLOAT && b->type==T_INT) + return a->u.float_number < (FLOAT_TYPE)b->u.integer; - case T_INT: - return a->u.integer > b->u.integer; + if(a->type == T_INT && b->type==T_FLOAT) + return (FLOAT_TYPE)a->u.integer < b->u.float_number; - case T_STRING: - return my_strcmp(a->u.string, b->u.string) > 0; - - case T_FLOAT: - return a->u.float_number > b->u.float_number; - } -} - -int is_lt(const struct svalue *a,const struct svalue *b) -{ - check_type(a->type); - check_type(b->type); - check_refs(a); - check_refs(b); + if(a->type == T_OBJECT) + { + a_is_object: + if(!a->u.object->prog) + error("Comparison on destructed object.\n"); + if(a->u.object->prog->lfuns[LFUN_LT] == -1) + error("Object lacks '<\n"); + assign_svalue_no_free(sp, b); + sp++; + apply_lfun(a->u.object, LFUN_LT, 1); + if(IS_ZERO(sp-1)) + { + pop_stack(); + return 0; + }else{ + pop_stack(); + return 1; + } + } - if (a->type != b->type) - { + if(b->type == T_OBJECT) + { + if(!b->u.object->prog) + error("Comparison on destructed object.\n"); + if(b->u.object->prog->lfuns[LFUN_GT] == -1) + error("Object lacks '>\n"); + assign_svalue_no_free(sp, a); + sp++; + apply_lfun(b->u.object, LFUN_GT, 1); + if(IS_ZERO(sp-1)) + { + pop_stack(); + return 0; + }else{ + pop_stack(); + return 1; + } + } + error("Cannot compare different types.\n"); } switch(a->type) { + case T_OBJECT: + goto a_is_object; + default: - error("Bad arg 1 to '<'.\n"); + error("Bad type to comparison.\n"); case T_INT: return a->u.integer < b->u.integer; @@ -599,7 +697,7 @@ void describe_svalue(struct svalue *s,int indent,struct processing *p) }else{ if(s->u.object->prog) { - struct lpc_string *name; + struct pike_string *name; name=ID_FROM_INT(s->u.object->prog,s->subtype)->name; my_binary_strcat(name->str,name->len); }else{ @@ -625,8 +723,8 @@ void describe_svalue(struct svalue *s,int indent,struct processing *p) describe_array(s->u.array, p, indent); break; - case T_LIST: - describe_list(s->u.list, p, indent); + case T_MULTISET: + describe_multiset(s->u.multiset, p, indent); break; case T_MAPPING: @@ -676,9 +774,9 @@ void copy_svalues_recursively_no_free(struct svalue *to, to->type=T_MAPPING; break; - case T_LIST: - to->u.list=copy_list_recursively(from->u.list,p); - to->type=T_LIST; + case T_MULTISET: + to->u.multiset=copy_multiset_recursively(from->u.multiset,p); + to->type=T_MULTISET; break; } to++; @@ -686,76 +784,176 @@ void copy_svalues_recursively_no_free(struct svalue *to, } } - -void copy_short_svalues_recursively_no_free(union anything *to, - union anything *from, - TYPE_T type, - INT32 num, - struct processing *p) +#ifdef DEBUG +void check_short_svalue(union anything *u,TYPE_T type) { + static inside=0; + check_type(type); - check_refs2(from,type); + check_refs2(u,type); + if(!u->refs) return; switch(type) { - default: - assign_short_svalues_no_free(to,from,type,num); + case T_STRING: + if(!debug_findstring(u->string)) + fatal("Shared string not shared!\n"); break; - case T_ARRAY: - while(--num >= 0) + default: + if(d_flag > 50) { - to->array=from->array?copy_array_recursively(from->array,p):0; - from++; - to++; + if(inside) return; + inside=1; + + switch(type) + { + case T_MAPPING: check_mapping(u->mapping); break; + case T_ARRAY: check_array(u->array); break; + case T_PROGRAM: check_program(u->program); break; +/* case T_OBJECT: check_object(u->object); break; */ +/* case T_MULTISET: check_multiset(u->multiset); break; */ + } + inside=0; } - break; + } +} - case T_MAPPING: - while(--num >= 0) +void check_svalue(struct svalue *s) +{ + check_refs(s); + check_short_svalue(& s->u, s->type); +} + +#endif + +#ifdef GC2 +TYPE_FIELD gc_check_svalues(struct svalue *s, int num) +{ + INT32 e; + TYPE_FIELD f; + f=0; + for(e=0;e<num;e++,s++) + { + switch(s->type) { - to->mapping=from->mapping?copy_mapping_recursively(from->mapping,p):0; - from++; - to++; + case T_FUNCTION: + if(s->subtype == -1) break; + + case T_OBJECT: + if(s->u.object->prog) + { + gc_check(s->u.object); + }else{ + free_svalue(s); + s->type=T_INT; + s->u.integer=0; + } + break; + + case T_PROGRAM: + case T_ARRAY: + case T_MULTISET: + case T_MAPPING: + gc_check(s->u.refs); + break; } - break; + f|= 1 << s->type; + } - case T_LIST: - while(--num >= 0) + return f; +} + +void gc_check_short_svalue(union anything *u, TYPE_T type) +{ + if(!u->refs) return; + switch(type) + { + case T_OBJECT: + if(u->object->prog) { - to->list=from->list?copy_list_recursively(from->list,p):0; - from++; - to++; + gc_check(u->object); + }else{ + free_short_svalue(u,T_OBJECT); + u->object=0; } break; + + case T_ARRAY: + case T_MULTISET: + case T_MAPPING: + case T_PROGRAM: + gc_check(u->refs); + break; } } -#ifdef DEBUG -void check_short_svalue(union anything *u,TYPE_T type) +void gc_mark_svalues(struct svalue *s, int num) { - check_type(type); - check_refs2(u,type); - if(!u->refs) return; - - if(type <= MAX_REF_TYPE) + INT32 e; + for(e=0;e<num;e++,s++) { - checked((void *) u->refs,1); + switch(s->type) + { + case T_ARRAY: gc_mark_array_as_referenced(s->u.array); break; + case T_MULTISET: gc_mark_multiset_as_referenced(s->u.multiset); break; + case T_MAPPING: gc_mark_mapping_as_referenced(s->u.mapping); break; + case T_PROGRAM: gc_mark_program_as_referenced(s->u.program); break; + + case T_FUNCTION: + if(s->subtype == -1) break; + + case T_OBJECT: + if(s->u.object->prog) + { + gc_mark_object_as_referenced(s->u.object); + }else{ + free_svalue(s); + s->type=T_INT; + s->u.integer=0; + } + break; + } } +} +void gc_mark_short_svalue(union anything *u, TYPE_T type) +{ + if(!u->refs) return; switch(type) { - case T_STRING: - if(!debug_findstring(u->string)) - fatal("Shared string not shared!\n"); + case T_ARRAY: gc_mark_array_as_referenced(u->array); break; + case T_MULTISET: gc_mark_multiset_as_referenced(u->multiset); break; + case T_MAPPING: gc_mark_mapping_as_referenced(u->mapping); break; + case T_PROGRAM: gc_mark_program_as_referenced(u->program); break; + + case T_OBJECT: + if(u->object->prog) + { + gc_mark_object_as_referenced(u->object); + }else{ + free_short_svalue(u,T_OBJECT); + u->object=0; + } break; } } +#endif /* GC2 */ -void check_svalue(struct svalue *s) +INT32 pike_sizeof(struct svalue *s) { - check_refs(s); - check_short_svalue(& s->u, s->type); + switch(s->type) + { + case T_STRING: return s->u.string->len; + case T_ARRAY: return s->u.array->size; + case T_MAPPING: return m_sizeof(s->u.mapping); + case T_MULTISET: return l_sizeof(s->u.multiset); + case T_OBJECT: + if(!s->u.object->prog) + error("sizeof() on destructed object.\n"); + return s->u.object->prog->num_identifier_indexes; + default: + error("Bad argument 1 to sizeof().\n"); + return 0; /* make apcc happy */ + } } - -#endif diff --git a/src/svalue.h b/src/svalue.h index 1834145f0b39832737c712d28aa5d09659878eac..10333d17851304a446648e17fe831893651dca7d 100644 --- a/src/svalue.h +++ b/src/svalue.h @@ -1,6 +1,6 @@ /*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ #ifndef SVALUE_H @@ -10,10 +10,10 @@ struct array; struct mapping; -struct list; +struct multiset; struct object; struct program; -struct lpc_string; +struct pike_string; struct callable; struct processing @@ -27,10 +27,10 @@ union anything struct callable *efun; struct array *array; struct mapping *mapping; - struct list *list; + struct multiset *multiset; struct object *object; struct program *program; - struct lpc_string *string; + struct pike_string *string; INT32 *refs; INT32 integer; FLOAT_TYPE float_number; @@ -40,14 +40,14 @@ union anything struct svalue { - INT16 type; + unsigned INT16 type; INT16 subtype; union anything u; }; #define T_ARRAY 0 #define T_MAPPING 1 -#define T_LIST 2 +#define T_MULTISET 2 #define T_OBJECT 3 #define T_FUNCTION 4 #define T_PROGRAM 5 @@ -55,6 +55,9 @@ struct svalue #define T_FLOAT 7 #define T_INT 8 +#define T_DELETED 246 +#define T_NOT 247 +#define T_AND 248 #define T_UNKNOWN 249 #define T_MANY 250 #define T_OR 251 @@ -65,7 +68,7 @@ struct svalue #define BIT_ARRAY (1<<T_ARRAY) #define BIT_MAPPING (1<<T_MAPPING) -#define BIT_LIST (1<<T_LIST) +#define BIT_MULTISET (1<<T_MULTISET) #define BIT_OBJECT (1<<T_OBJECT) #define BIT_FUNCTION (1<<T_FUNCTION) #define BIT_PROGRAM (1<<T_PROGRAM) @@ -73,8 +76,15 @@ struct svalue #define BIT_INT (1<<T_INT) #define BIT_FLOAT (1<<T_FLOAT) +/* Used to signifiy that this array might not be finished yet */ +/* garbage collect uses this */ +#define BIT_UNFINISHED (1<<15) + #define BIT_NOTHING 0 -#define BIT_MIXED 0xffff +#define BIT_MIXED 0x7fff +#define BIT_BASIC (BIT_INT|BIT_FLOAT|BIT_STRING) +#define BIT_COMPLEX (BIT_ARRAY|BIT_MULTISET|BIT_OBJECT|BIT_PROGRAM|BIT_MAPPING) + /* Max type with ref count */ #define MAX_REF_TYPE T_STRING /* Max type handled by svalue primitives */ @@ -84,7 +94,8 @@ struct svalue #define NUMBER_UNDEFINED 1 #define NUMBER_DESTRUCTED 2 -#define IS_ZERO(X) ((X)->type==T_INT && (X)->u.integer==0) +#define is_gt(a,b) is_lt(b,a) +#define IS_ZERO(X) ((X)->type==T_INT?(X)->u.integer==0:(1<<(X)->type)&(BIT_OBJECT|BIT_FUNCTION)?!svalue_is_true(X):0) #define check_destructed(S) \ do{ \ @@ -97,6 +108,12 @@ do{ \ } \ }while(0) +/* var MUST be a variable!!! */ +#define safe_check_destructed(var) do{ \ + if((var->type == T_OBJECT || var->type==T_FUNCTION) && !var->u.object->prog) \ + var=&dest_ob_zero; \ +}while(0) + #define check_short_destructed(U,T) \ do{ \ union anything *_u=(U); \ @@ -108,7 +125,7 @@ do{ \ }while(0) #ifdef DEBUG -#define check_type(T) if(T > MAX_TYPE && T!=T_LVALUE && T!=T_SHORT_LVALUE && T!=T_VOID) fatal("Type error\n") +#define check_type(T) if(T > MAX_TYPE && T!=T_LVALUE && T!=T_SHORT_LVALUE && T!=T_VOID && T!=T_DELETED) fatal("Type error\n") #define check_refs(S) if((S)->type < MAX_REF_TYPE && (!(S)->u.refs || (S)->u.refs[0] < 0)) fatal("Svalue to object without references.\n") #define check_refs2(S,T) if((T) < MAX_REF_TYPE && (S)->refs && (S)->refs[0] <= 0) fatal("Svalue to object without references.\n") @@ -120,46 +137,40 @@ do{ \ #endif +extern struct svalue dest_ob_zero; /* Prototypes begin here */ void free_short_svalue(union anything *s,TYPE_T type); void free_svalue(struct svalue *s); -void free_svalues(struct svalue *s,INT32 num); -void free_short_svalues(union anything *s,INT32 num,TYPE_T type); +void free_svalues(struct svalue *s,INT32 num, INT32 type_hint); void assign_svalue_no_free(struct svalue *to, struct svalue *from); void assign_svalues_no_free(struct svalue *to, struct svalue *from, - INT32 num); + INT32 num, + INT32 type_hint); void assign_svalue(struct svalue *to, struct svalue *from); -void assign_svalues(struct svalue *to, struct svalue *from, INT32 num); +void assign_svalues(struct svalue *to, + struct svalue *from, + INT32 num, + TYPE_FIELD types); void assign_to_short_svalue(union anything *u, TYPE_T type, struct svalue *s); void assign_to_short_svalue_no_free(union anything *u, - TYPE_T type, - struct svalue *s); -void assign_to_short_svalues_no_free(union anything *u, - TYPE_T type, - struct svalue *s, - INT32 num); + TYPE_T type, + struct svalue *s); void assign_from_short_svalue_no_free(struct svalue *s, union anything *u, TYPE_T type); -void assign_from_short_svalues_no_free(struct svalue *s, - union anything *u, - TYPE_T type, - INT32 num); void assign_short_svalue_no_free(union anything *to, union anything *from, TYPE_T type); void assign_short_svalue(union anything *to, union anything *from, TYPE_T type); -void assign_short_svalues_no_free(union anything *to, - union anything *from, - TYPE_T type, - INT32 num); +unsigned INT32 hash_svalue(struct svalue *s); +int svalue_is_true(struct svalue *s); int is_eq(struct svalue *a, struct svalue *b); int low_is_equal(struct svalue *a, struct svalue *b, @@ -169,21 +180,20 @@ int low_short_is_equal(const union anything *a, TYPE_T type, struct processing *p); int is_equal(struct svalue *a,struct svalue *b); -int is_gt(const struct svalue *a,const struct svalue *b); -int is_lt(const struct svalue *a,const struct svalue *b); +int is_lt(struct svalue *a,struct svalue *b); void describe_svalue(struct svalue *s,int indent,struct processing *p); void clear_svalues(struct svalue *s, INT32 num); void copy_svalues_recursively_no_free(struct svalue *to, struct svalue *from, INT32 num, struct processing *p); -void copy_short_svalues_recursively_no_free(union anything *to, - union anything *from, - TYPE_T type, - INT32 num, - struct processing *p); void check_short_svalue(union anything *u,TYPE_T type); void check_svalue(struct svalue *s); +TYPE_FIELD gc_check_svalues(struct svalue *s, int num); +void gc_check_short_svalue(union anything *u, TYPE_T type); +void gc_mark_svalues(struct svalue *s, int num); +void gc_mark_short_svalue(union anything *u, TYPE_T type); +INT32 pike_sizeof(struct svalue *s); /* Prototypes end here */ #endif diff --git a/src/test/.cvsignore b/src/test/.cvsignore new file mode 100644 index 0000000000000000000000000000000000000000..e7895a9c9d634a97a2ac102bcce38907b387fd61 --- /dev/null +++ b/src/test/.cvsignore @@ -0,0 +1 @@ +testsuite diff --git a/src/test/.gitignore b/src/test/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..a1b232f7b33ed47f36a3e6a0b9d34d1697568827 --- /dev/null +++ b/src/test/.gitignore @@ -0,0 +1 @@ +/testsuite diff --git a/src/test/create_testsuite b/src/test/create_testsuite old mode 100755 new mode 100644 index 09756283dedf429ee3c4aed92795b9c7b0c4673e..bfd27e06e516216049e8ecfe129089a28e5432e7 --- a/src/test/create_testsuite +++ b/src/test/create_testsuite @@ -1,6 +1,6 @@ divert(-1) -dnl generates a script that is supposed to test uLPC +dnl generates a script that is supposed to test Pike dnl note that not everything is tested yet, you are welcome to dnl submit more tests. @@ -8,11 +8,12 @@ changequote([[,]]) changecom define(SEPARATOR,[[....]]) +define(CONDITION,[[]]) define(DOTEST,[[dnl divert(0)dnl define([[TESTNO]],incr(TESTNO))dnl -test TESTNO, expected result: [[$1]] +CONDITION()test TESTNO, expected result: [[$1]] [[$2]] SEPARATOR divert(-1)dnl]]) @@ -55,10 +56,349 @@ void a() { master()->add_precompiled_program("[[$1]]",class { define(test_program, [[DOTEST(TRUE,dnl [[$1]])]]) +define(cond,[[ +define([[CONDITION]],[[COND $1 +]]) +$2 +define([[CONDITION]],[[]]) +]]) +define(ifefun,[[cond([[all_efuns()->$1]],[[$2]])]]) + define(TESTNO,0) +// testing < > <= >= +define([[test_cmp]],[[ +test_true($1<$2) +test_false($1>$2) +test_true($2>$1) +test_false($2<$1) +test_true($1<=$2) +test_false($1>=$2) +test_true($2>=$1) +test_false($2<=$1) +test_true($2<=$2) +test_true($1>=$1) ]]) + +// mpz +cond( [[ master()->programs["/precompiled/mpz"] ]], +[[ + define([[MPZ]],[[(program)"/precompiled/mpz"]]) + test_true(programp(MPZ)) + test_false(clone(MPZ)) + test_do(destruct(clone(MPZ))) + test_eq(clone(MPZ,99)+1,100) + test_eq(clone(MPZ,100)*10,1000) + test_eq(clone(MPZ,"100")*10.0,1000) + test_eq(clone(MPZ,100.0)*clone(MPZ,3),300) + test_eq(clone(MPZ,100.0)/4,25) + test_eq(clone(MPZ,42)%10,2) + test_eq(clone(MPZ,10)<<1,20) + test_eq(clone(MPZ,10)>>1,5) + test_eq(clone(MPZ,66)+11,77) + test_eq(clone(MPZ,66)-11,55) + test_eq(clone(MPZ,17)&18,16) + test_eq(clone(MPZ,17)|7,31) + test_eq(-clone(MPZ,17),17) + test_eq((~clone(MPZ,17)) & 255,0xf0) + test_true(stringp((string)clone(MPZ,17))) + test_eq((string)clone(MPZ,17),"17") + test_true(intp((int)clone(MPZ,17))) + test_eq((int)clone(MPZ,17),17) + test_false(clone(MPZ,0)) + test_true(clone(MPZ,1)) + + define([[mpz_test_cmp]],[[ + test_cmp(clone(MPZ,$1), $2) + test_cmp($1, clone(MPZ,$2)) + test_cmp(clone(MPZ, $1), clone(MPZ, $2)) + ]]) + + define([[mpz_test_type1]],[[ + mpz_test_cmp($1,$2) + mpz_test_cmp($1.0,$2) + mpz_test_cmp("$1",$2) + ]]) + + define([[mpz_test_type2]],[[ + mpz_test_type1($1,$2) + mpz_test_type1($1,$2.0) + mpz_test_type1($1,"$2") + ]]) + + mpz_test_type2(1,2) + mpz_test_type2(-2,1) + +]]); + +// ++ +test_any([[int e; e++; return e;]],1) +test_any([[int e; ++e; return e;]],1) +test_any([[int e; return e++;]],0) +test_any([[int e; return ++e;]],1) +test_any([[int e; if(e++) return 0; return e;]],1) + +// -- +test_any([[int e; e--; return e;]],-1) +test_any([[int e; --e; return e;]],-1) +test_any([[int e; return e--;]],0) +test_any([[int e; return --e;]],-1) +test_any([[int e; if(e--) return 0; return e;]],-1) + test_compile_error_low(master()->add_precompiled_program(\"/test\",compile_string(\"int foo() { return 17; }\",\"62\"))) +test_any([[function f=random_seed; int t; foreach(allocate(1),t) f(t); return 1;]],1) +test_compile([[while(0)if(0)continue;else;]]) +test_program([[int b=1,c; int a() { c=b+2; return c==3; }]]) +test_true([[ ("foobar"/"o") & ({ "foo" }) ]]) +test_any([[ array a="foo bar"/" "; return sizeof(a & ({"foo"}))]],1) + +// glob +test_false(glob("foo","bar")) +test_true(glob("foo","foo")) +test_true(glob("f?o","foo")) +test_true(glob("f??","foo")) +test_true(glob("?o?","foo")) +test_true(glob("f*","foo")) +test_true(glob("*o","foo")) +test_false(glob("*f","foo")) +test_false(glob("o*","foo")) +test_false(glob("?f?","foo")) +test_equal([[glob("?f?",({"ff","ffff","off","fff",""}))]],[[({"off","fff"})]]) +test_equal([[glob("foo*bar",({"foobar","foobargazonk","","foofoobar","fobar","fooar"}))]],[[({"foobar","foofoobar"})]]) + +// localtime +cond([[all_efuns()->localtime]], +[[ +test_true(mappingp(localtime(0))) +]]) + +// strerror +cond([[all_efuns()->strerror]], +[[ +test_do(strerror(1)) +test_true(stringp(strerror(-2)||"")) +]]) + + +// sort +test_equal(sort(({1,3,2,4})),({1,2,3,4})) +test_equal(sort(({4,3,2,1})),({1,2,3,4})) +test_equal([[lambda() {string *a=({1,2,3,4}); sort(({4,3,2,1}),a); return a; }()]],[[({4,3,2,1})]] ) +test_equal([[lambda() {string *a=({1,2,3,4}),*b=a+({}); sort(({4,3,2,1}),a,b); return b; }()]],[[({4,3,2,1})]] ) + + +// m_delete +test_equal(([1:1]),m_delete(a(),0)) +test_equal(([1:1]),m_delete(([1:1,0:3]),0)) +test_any(mapping a=([1:1]); return a==m_delete(a,1),1) +test_any([[mapping m=([]); m[1]++; return m[1];]],1) +test_any([[mapping m=([1:1]); m[1]++; return m[1];]],2) +test_any([[mapping m=([]); m[1]++; m[1]++; return m[1];]],2) + +// mapping tests + +test_any([[mapping m=([]);int e; + for(e=0;e<1000;e++) m[e]=e; + for(e=0;e<1000;e++) if(m[e]!=e) return 0; + return 1; +]],1) + +test_any([[mapping m=([]);int e; + for(e=0;e<1000;e++) m[e]=e; + for(e=999;e>=0;e--) if(m[e]!=e) return 0; + return 1; +]],1) + + +test_any([[mapping m=([]);int e; + for(e=999;e>=0;e--) m[e]=e; + for(e=0;e<1000;e++) if(m[e]!=e) return 0; + return 1; +]],1) + +test_any([[mapping m=([]);int e; + for(e=999;e>=0;e--) m[e]=e; + for(e=999;e>=0;e--) if(m[e]!=e) return 0; + return 1; +]],1) + + +test_any([[mapping m=([]);int e; + for(e=0;e<1000;e++) m[reverse(e)]=e; + for(e=0;e<1000;e++) if(m[reverse(e)]!=e) return 0; + return 1; +]],1) + + +test_any([[mapping m=([]);int e; + for(e=999;e>=0;e--) m[reverse(e)]=e; + for(e=0;e<1000;e++) if(m[reverse(e)]!=e) return 0; + return 1; +]],1) + + +test_any([[mapping m=([]);int e; + for(e=0;e<1000;e++) m[reverse(e)]=e; + for(e=0;e<1000;e++) m_delete(m,reverse(e)); + return sizeof(m); +]],0) + +test_any([[mapping m=([]);int e; + for(e=0;e<1000;e++) m[reverse(e)]=e; + for(e=0;e<1000;e+=2) m_delete(m,reverse(e)); + for(e=0;e<1000;e+=2) if(m[reverse(e)]) return 0; + for(e=1;e<1000;e+=2) if(m[reverse(e)]!=e) return 0; + return 1; +]],1) + +test_any([[mapping m=([]);int e; + for(e=0;e<1000;e++) m[reverse(e)]=e; + for(e=0;e<1000;e++) m[reverse(e)]++; + for(e=0;e<1000;e++) if(m[reverse(e)]!=e+1) return 0; + return 1; +]],1) + +test_any([[mapping m=([]);int e; + mixed a,b; + a=allocate(1000); + b=allocate(1000); + for(e=0;e<1000;e++) + { + m[reverse(e)]=e; + a[e]=reverse(e); + b[e]=e; + } + add_efun("mtest_m",m); + add_efun("mtest_i",a); + add_efun("mtest_v",b); + return 1; +]],1) + + +test_eq([[sizeof(mtest_m)]],sizeof(mtest_i)) +test_equal(sort_array(indices(mtest_m)),sort_array(mtest_i)) +test_equal(sort_array(values(mtest_m)),sort_array(mtest_v)) +test_equal(mtest_m,copy_value(mtest_m)) +test_any([[int e; for(e=0;e<1000;e++) if(!equal(mtest_m[mtest_i[e] ],mtest_v[e])) return 0; return 1;]],1) + + +test_any([[mapping m=([]);int e; + mixed a,b; + a=allocate(100); + b=allocate(100); + for(e=0;e<100;e++) + { + m[reverse(e-50)]=e-50; + a[e]=reverse(e-50); + b[e]=reverse(e-50); + } + add_efun("mtest_m2",m); + add_efun("mtest_i2",a); + add_efun("mtest_v2",b); + return 1; +]],1) + +test_any([[int e;mapping q=([]),p=([]); for(e=0;e<1000;e++) { p[reverse(e)]=e; q+=([reverse(e):e]); if(!equal(sort(indices(p)),sort(indices(q)))) return 0; } return 1;]],1) +test_any([[mapping m=([]); m+=(["foo":"bar"]); m+=(["bar":"foo"]); m+=(["foo":"foo"]); if(sizeof(m)==3) return 1; return m["foo"]=="foo" && m["bar"]=="foo"]],1) + +test_equal(sort(indices(mtest_m|mtest_m2)),sort(mtest_i|mtest_i2)) +test_equal(sort(indices(mtest_m&mtest_m2)),sort(mtest_i&mtest_i2)) +test_equal(sort(indices(mtest_m-mtest_m2)),sort(mtest_i-mtest_i2)) +test_equal(sort(indices(mtest_m^mtest_m2)),sort(mtest_i^mtest_i2)) +test_equal(sort(indices(mtest_m2|mtest_m)),sort(mtest_i2|mtest_i)) +test_equal(sort(indices(mtest_m2&mtest_m)),sort(mtest_i2&mtest_i)) +test_equal(sort(indices(mtest_m2-mtest_m)),sort(mtest_i2-mtest_i)) +test_equal(sort(indices(mtest_m2^mtest_m)),sort(mtest_i2^mtest_i)) + +define(MTEST,[[test_equal([[mkmapping(indices(allocate($1)),reverse(indices(allocate($1))))]],[[mkmapping(reverse(indices(allocate($1))),indices(allocate($1)))]])]]) + +MTEST(0) +MTEST(1) +MTEST(2) +MTEST(3) +MTEST(5) +MTEST(8) +MTEST(13) +MTEST(21) +MTEST(34) +MTEST(55) + +define([[MTEST]]) + +test_do(add_efun("mtest_m"); add_efun("mtest_i"); add_efun("mtest_v");) +test_do(add_efun("mtest_m2"); add_efun("mtest_i2"); add_efun("mtest_v2");) + +// rows +test_equal([[rows(({1,2,3,4,5,6,7,8,9}),({6,7,2}))]],[[({7,8,3})]]) +test_equal([[rows(({1,2,3,4,5,6,7,8,9}),({0,4,1}))]],[[({1,5,2})]]) +test_equal([[rows(({1,2,3,4,5,6,7,8,9}),({8,3,5}))]],[[({9,4,6})]]) + +// column +test_equal([[column(({({1,2,3}),({5,6,7}),({8,9,0})}),0)]],[[({1,5,8})]]) +test_equal([[column(({({1,2,3}),({5,6,7}),({8,9,0})}),1)]],[[({2,6,9})]]) +test_equal([[column(({({1,2,3}),({5,6,7}),({8,9,0})}),2)]],[[({3,7,0})]]) + + +// gc +ifefun(gc, +[[ + test_true(intp(gc())); + test_any([[ gc(); array a=({0}); a[0]=a; a=0; return gc() > 0; ]],1); +]]) + +// gdbm +cond( [[ master()->programs["/precompiled/gdbm"] ]], +[[ + define([[GDBM]],[[ (program)"/precompiled/gdbm" ]]) + test_true(programp(GDBM)) + test_do(destruct(clone(GDBM))) + + define([[GDBMTESTS]], + [[ + test_do(rm("test.gdbm")) + test_do(add_efun("GDBMBASE",clone(GDBM,"test.gdbm"))) + test_true(file_stat("test.gdbm")) + + GDBMNULLTEST + test_true(GDBMBASE->store("foo","bar")) + GDBMNULLTEST + test_equal(GDBMBASE->fetch("foo"),"bar") + test_do([[int e; for(e=0;e<1000;e++) GDBMBASE->store("x"+e,"y"+e)]]) + GDBMNULLTEST + test_any(int e; for(e=0;e<1000;e++) if(GDBMBASE->fetch("x"+e)!="y"+e) return e; return -1,-1) + GDBMNULLTEST + test_true(GDBMBASE->store(sprintf("%'23'100000s",""),sprintf("%'32'100000s",""))) + test_true(GDBMBASE->fetch(sprintf("%'23'100000s",""))==sprintf("%'32'100000s","")) + GDBMNULLTEST + test_equal(GDBMBASE->fetch("foo"),"bar") + test_any(int e; for(e=0;e<1000;e++) if(GDBMBASE->fetch("x"+e)!="y"+e) return e; return -1,-1) + test_true(GDBMBASE->fetch(sprintf("%'23'100000s",""))==sprintf("%'32'100000s","")) + test_any(int e; string k; for(k=GDBMBASE->firstkey();k;k=GDBMBASE->nextkey(k)) e++; return e,1002) + + test_do(GDBMBASE->sync()) + test_do(GDBMBASE->reorganize()) + test_do(GDBMBASE->close()) + ]]) + + define([[GDBMNULLTEST]],[[ + test_false(GDBMBASE->fetch("slakjdfasdf")) + ]]) + + GDBMTESTS + + define([[GDBMNULLTEST]],[[ + test_false(GDBMBASE->fetch("slakjdfasdf")) + test_do(GDBMBASE->reorganize()) + test_do(GDBMBASE->sync()) + test_do(GDBMBASE->close()) + test_do(GDBMBASE->create("test.gdbm")) + ]]) + + GDBMTESTS + + test_do(rm("test.gdbm")) +]]) + test_eq("\377"[0],255) test_do(add_efun("foo",clone(class {int i;}))) test_eq(foo->i,0) @@ -83,8 +423,16 @@ test_do(signal(signum("SIGUSR1"),lambda() { add_efun("AFJLLAF",17); })) test_do(kill(getpid(),signum("SIGUSR1"))) test_eq(AFJLLAF,17) test_do(add_efun("AFJLLAF")) +test_do(signal(signum("SIGUSR1",0))) test_do(signal(signum("SIGUSR1"))) +// typeof +test_eq(typeof(1),"int") +test_eq(typeof(""),"string") +test_eq(typeof(""[0]),"int") +test_eq(typeof(0.0),"float") +test_eq(typeof(all_efuns()["all_efuns"]),"mixed") + // class test_true(programp(class {})) test_true(functionp(clone(class { int foo() { return 1; }})->foo)) @@ -112,7 +460,7 @@ test_equal(mkmapping( ({3,6,2}), ({"3","6","2"})), ([3:"3", 6:"6", 2:"2"])) test_equal(sum(([3:"3", 6:"6", 2:"2"])), ([3:"3", 6:"6", 2:"2"])) test_true(sum(([3:"3", 6:"6", 2:"2"])) != ([3:"3", 6:"6", 2:"2"])) -test_true(efun::stringp("")) +test_true(predef::stringp("")) test_equal([["a,b,4,7,8s,asfd,a,d,f" / ","]],[["a,b,4,7,8s,asfd,a,d,f" / ","]]) test_any([[string *a="a,b"/","; a[0]="c"; return equal(a,({"c","b"}))]],1) test_true(0||1) @@ -137,6 +485,11 @@ test_any(function bar=clone((program)"/test")->foo; return bar(),17) // sscanf test_any([[mixed a; return sscanf("11","%d",a)]],1) test_any([[mixed a; sscanf("11","%d",a); return a]],11) +test_any([[mixed a; sscanf("11","%o",a); return a]],011) +test_any([[mixed a; sscanf("11","%x",a); return a]],0x11) +test_any([[mixed a; sscanf("11","%D",a); return a]],11) +test_any([[mixed a; sscanf("0x11","%D",a); return a]],0x11) +test_any([[mixed a; sscanf("011","%D",a); return a]],011) test_any([[mixed a,b; return sscanf("11foo","%dfoo",a)]],1) test_any([[mixed a,b; sscanf("11foo","%dfoo",a); return a]],11) test_any([[mixed a,b; return sscanf("11foo","%d%s",a,b)]],2) @@ -152,6 +505,14 @@ test_any([[mixed a,b; sscanf("abcdeFGji","%[a-z]%s",a,b); return b]],"FGji") test_any([[mixed a,b; return sscanf("foo-%-bar","%s-%%-%s",a,b);]],2) test_any([[mixed a,b; sscanf("foo-%-bar","%s-%%-%s",a,b); return a]],"foo") test_any([[mixed a,b; sscanf("foo-%-bar","%s-%%-%s",a,b); return b]],"bar") +test_any([[mixed a; sscanf("ab","%2c",a); return a]],'a'*256+'b') +test_any([[mixed a; sscanf("abc","%3c",a); return a]],'a'*256*256+'b'*256+'c') +test_any([[mixed a; sscanf("abc","%2c",a); return a]],'a'*256+'b') +test_any([[mixed a; sscanf("ac","%3c",a); return a]],0) +test_any([[mixed a; sscanf("ab","%2s",a); return a]],"ab") +test_any([[mixed a; sscanf("abc","%3s",a); return a]],"abc") +test_any([[mixed a; sscanf("abc","%2s",a); return a]],"ab") +test_any([[mixed a; sscanf("ac","%3s",a); return a]],0) // Basics test_true(1) @@ -188,22 +549,10 @@ test_true(!(1==2)) test_true(!(""!="")) test_true(""!="foo") -// testing < > <= >= -define(test_cmp,[[ -test_true($1<$2) -test_true(!($1>$2)) -test_true($2>$1) -test_true(!($2<$1)) -test_true($1<=$2) -test_true(!($1>=$2)) -test_true($2>=$1) -test_true(!($2<=$1)) -test_true($2<=$2) -test_true($1>=$1) ]]) - - test_cmp(1,2) test_cmp(1.0,2.0) +test_cmp(1,2.0) +test_cmp(1.0,2) test_cmp("a","b") test_cmp("","b") @@ -246,6 +595,12 @@ test_eq("a"+"b"+"c"+"d"+"e"+"f"+"g"+"h"+"i"+"j"+"k"+"l"+"m"+"n"+"o"+"p"+"q"+"r"+ test_eq(1.0+1.0,2.0) test_eq(1.0+(-1.0),0.0) test_eq((-1.0)+(-1.0),-2.0) +test_eq(1.0+1,2.0) +test_eq(1+1.0,2.0) +test_eq(1+(-1.0),0.0) +test_eq(1.0+(-1),0.0) +test_eq((-1)+(-1.0),-2.0) +test_eq((-1.0)+(-1),-2.0) test_equal(({1,2,3})+({4,5,6}),({1,2,3,4,5,6})) test_equal((<1,2,3,4>)+(<4,5,6>),(<1,2,3,4,4,5,6>)) test_equal(([0:1,3:6])+([5:2,3:6]),([0:1,3:6,3:6,5:2])) @@ -256,6 +611,10 @@ test_eq(10-3,7) test_eq(3-10,-7) test_eq(10.0-3.0,7.0) test_eq(3.0-10.0,-7.0) +test_eq(10-3.0,7.0) +test_eq(3-10.0,-7.0) +test_eq(10.0-3,7.0) +test_eq(3.0-10,-7.0) test_eq("foobargazonk"-"o","fbargaznk") test_equal(({"foo","bar","gazonk"})-({"foo","gazonk"}),({"bar"})) test_equal(({"c","foo","bar","gazonk","a","b",})-({"foo","gazonk"}),({"c","bar","a","b"})) @@ -273,6 +632,12 @@ test_eq(2*2*2*2*2,32) test_eq(3.0*4.0,12.0) test_eq(4.0*3.0,12.0) test_eq(2.0*2.0*2.0*2.0*2.0,32.0) +test_eq(3*4.0,12.0) +test_eq(4*3.0,12.0) +test_eq(2*2.0*2.0*2.0*2.0,32.0) +test_eq(3.0*4,12.0) +test_eq(4.0*3,12.0) +test_eq(2.0*2*2.0*2*2.0,32.0) test_eq(({"foo","bar","gazonk"})*"-","foo-bar-gazonk") // testing / @@ -284,6 +649,12 @@ test_eval_error(return 15/0) test_eq(12.0/3.0,4.0) test_eq(14.0/4.0,3.5) test_eq(15.0/3.0,5.0) +test_eq(12/3.0,4.0) +test_eq(14/4.0,3.5) +test_eq(15/3.0,5.0) +test_eq(12.0/3,4.0) +test_eq(14.0/4,3.5) +test_eq(15.0/3,5.0) test_eval_error(return 15.0/0.0) test_equal("foo-bar-gazonk"/"-",({"foo","bar","gazonk"})) test_equal("foobargazonk"/"",({"f","o","o","b","a","r","g","a","z","o","n","k"})) @@ -299,6 +670,11 @@ test_eq(13.0 % 3.0,1.0) test_eq(14.0 % 3.0,2.0) test_eq(14.5 % 3.0,2.5) test_eq(15.0 % 3.0,0.0) +test_eq(13 % 3.0,1.0) +test_eq(14 % 3.0,2.0) +test_eq(13.0 % 3,1.0) +test_eq(14.0 % 3,2.0) +test_eq(14.5 % 3,2.5) test_eval_error(return 15.0 % 0.0) // testing && @@ -428,6 +804,11 @@ test_eq("foo"[-100..0],"f") test_eq("foo"[-100..100],"foo") test_eq("foo"[1..0],"") test_eq("foo"[0..-100],"") +test_eq("foobargazonk"[0..],"foobargazonk") +test_eq("foobargazonk"[1..],"oobargazonk") +test_eq("foobargazonk"[5..],"rgazonk") +test_eq("foobargazonk"[..2],"foo") +test_eq("foobargazonk"[..5],"foobar") test_equal(({1,2,3})[0..0],({1})) test_equal(({1,2,3})[1..2],({2,3})) test_equal(({1,2,3})[2..10],({3})) @@ -487,6 +868,11 @@ test_any(while(1) if(1) break; return 1,1) test_any(int e; for(e=0;e<10;e++) break; return e,0) test_any(int e; for(e=0;e<10;e++) continue; return e,10) test_any(int e;string t=""; for(e=0;e<10;e++) t+=e; return t,"0123456789") +test_any(int e;string t=""; for(e=0;e<=10;e++) t+=e; return t,"012345678910") +test_any(int e;string t=""; for(e=9;e>0;e--) t+=e; return t,"987654321") +test_any(int e;string t=""; for(e=9;e>=0;e--) t+=e; return t,"9876543210") +test_any(int e;string t=""; for(e=9;e!=0;e--) t+=e; return t,"987654321") +test_any(int e;string t=""; for(e=2;e!=10;e++) t+=e; return t,"23456789") test_any(int e;string t=""; for(e=0;e>-10;e--) t+=e; return t,"0-1-2-3-4-5-6-7-8-9") // foreach @@ -503,6 +889,8 @@ test_any(int e;string t=""; e=0; while(++e<6) t+=e; return t,"12345";) test_any(int e=1;string t=""; while(e<20){t+=e;e*=2;} return t,"124816";) // Switch +test_any(switch("") { case -1: case "gazonk": return 0; } return 1,1) +test_any(switch("") { case -2: case "gazonk": return 0; } return 1,1) test_any(switch("") { case 0: case "gazonk": return 0; } return 1,1) test_any(switch("") { case "gazonk": case 0: return 0; } return 1,1) test_any(switch(0) { case 0: case "gazonk": return 0; } return 1,0) @@ -534,30 +922,30 @@ test_any(switch('9') { case "a": return 1; case "b": return 2; case "c": return define(test_switch0,[[ -test_any(switch($1) { case $2: return $6; case $3: return $7; case $4: return $8; case $5: return $9; } return 0,$10) -test_any(switch($1) { default: return 0; case $2: return $6; case $3: return $7; case $4: return $8; case $5: return $9; } return -1,$10) -test_any(switch($1) { case $2: return $6; default: return 0; case $3: return $7; case $4: return $8; case $5: return $9; } return -1,$10) -test_any(switch($1) { case $2: return $6; case $3: return $7; default: return 0; case $4: return $8; case $5: return $9; } return -1,$10) -test_any(switch($1) { case $2: return $6; case $3: return $7; case $4: return $8; default: return 0; case $5: return $9; } return -1,$10) -test_any(switch($1) { case $2: return $6; case $3: return $7; case $4: return $8; case $5: return $9; default: return 0; } return -1,$10) +test_any(switch($1) { $2; $3; $4; $5; } return 0,$6) +test_any(switch($1) { default: return 0; $2; $3; $4; $5; } return -1,$6) +test_any(switch($1) { $2; default: return 0; $3; $4; $5; } return -1,$6) +test_any(switch($1) { $2; $3; default: return 0; $4; $5; } return -1,$6) +test_any(switch($1) { $2; $3; $4; default: return 0; $5; } return -1,$6) +test_any(switch($1) { $2; $3; $4; $5; default: return 0; } return -1,$6) ]]) define(test_switch1,[[ -test_switch0($1, $2,$3,$4,$5, $6,$7,$8,$9, $10) -test_switch0($1, $2,$3,$5,$4, $6,$7,$9,$8, $10) +test_switch0($1, $2,$3,$4,$5, $6) +test_switch0($1, $2,$3,$5,$4, $6) ]]) define(test_switch2,[[ -test_switch1($1, $2,$3,$4,$5, $6,$7,$8,$9, $10) -test_switch1($1, $2,$4,$3,$5, $6,$8,$7,$9, $10) -test_switch1($1, $2,$5,$4,$3, $6,$9,$8,$7, $10) +test_switch1($1, $2,$3,$4,$5, $6) +test_switch1($1, $2,$4,$3,$5, $6) +test_switch1($1, $2,$5,$4,$3, $6) ]]) define(test_switch3,[[ -test_switch2($1, $2,$3,$4,$5, 2,3,4,5, $6) -test_switch2($1, $3,$2,$4,$5, 3,2,4,5, $6) -test_switch2($1, $4,$3,$2,$5, 4,3,2,5, $6) -test_switch2($1, $5,$3,$4,$2, 5,3,4,2, $6) +test_switch2($1,case $2:return 2,case $3:return 3,case $4:return 4,case $5:return 5,$6) +test_switch2($1,case $3:return 3,case $2:return 2,case $4:return 4,case $5:return 5,$6) +test_switch2($1,case $4:return 4,case $3:return 3,case $2:return 2,case $5:return 5,$6) +test_switch2($1,case $5:return 5,case $3:return 3,case $4:return 4,case $2:return 2,$6) ]]) define(test_switch4,[[ @@ -582,9 +970,9 @@ test_any(int e; object o=clone((program)"/precompiled/file"); if(!o->open("conft test_any([[ #include "conftest.h" ]],17) -test_any([[ -#include <conftest.h> -]],17) +dnltest_any([[ +dnl#include <conftest.h> +dnl]],17) test_true(intp(__LINE__)) test_true(stringp(__FILE__)) test_true(stringp(__DATE__)) @@ -596,6 +984,12 @@ test_any([[ return FOOa; ]],1) +test_any([[ +#define FOOa array +FOOa(int) b; +return 1; +]],1) + test_any([[ #define FOOb 17 #undef FOOb @@ -1104,6 +1498,8 @@ test_eq(file_stat("conftest"),0) // - rm // - mkdir // - get_dir +test_true(arrayp(get_dir("."))) + // - cd // - getcwd test_true(stringp(getcwd())) @@ -1120,6 +1516,8 @@ test_eq(sprintf("%o",255),"377") test_eq(sprintf("%x",255),"ff") test_eq(sprintf("%X",255),"FF") test_eq(sprintf("%c",255),"\377") +test_eq(sprintf("%2c",65535),"\377\377") +test_eq(sprintf("%3c",0xffffff),"\377\377\377") test_true(stringp(sprintf("%f",255.0))) test_true(stringp(sprintf("%g",255.0))) test_true(stringp(sprintf("%e",255.0))) @@ -1180,6 +1578,12 @@ test_eq(clone((program)"/precompiled/regexp","^[^abc]$")->match("-"),1) test_eq(clone((program)"/precompiled/regexp","^[^abc]$")->match("a"),0) test_eq(clone((program)"/precompiled/regexp","^[^abc]$")->match("c"),0) test_eq(clone((program)"/precompiled/regexp","^a*$")->match("aaaa"),1) +test_eq(clone((program)"/precompiled/regexp","^(a|bb)*$")->match("aabbabb"),1) +test_eq(clone((program)"/precompiled/regexp","^(a|bb)*$")->match(""),1) +test_eq(clone((program)"/precompiled/regexp","^(a|bb)+$")->match(""),0) +test_eq(clone((program)"/precompiled/regexp","^(a|bb)+$")->match("aaa"),1) +test_eq(clone((program)"/precompiled/regexp","^(a|bb)+$")->match("bbb"),0) +test_eq(clone((program)"/precompiled/regexp","^(a|bb)+$")->match("bbaabba"),1) test_eq(clone((program)"/precompiled/regexp","^a|b$")->match("a"),1) test_eq(clone((program)"/precompiled/regexp","^a|b$")->match("b"),1) @@ -1253,7 +1657,7 @@ do_test_foop(objectp,3) do_test_foop(functionp,4) do_test_foop(arrayp,5) do_test_foop(mappingp,6) -do_test_foop(listp,7) +do_test_foop(multisetp,7) do_test_foop(programp,8) // add_efun @@ -1280,11 +1684,11 @@ test_true(arrayp(aggregate())) test_eq(sizeof(aggregate()),0) test_equal(aggregate(1,2,3,4),({1,2,3,4})) -// - aggregate_list -test_true(listp(aggregate_list())) +// - aggregate_multiset +test_true(multisetp(aggregate_multiset())) // - aggregate_mapping -test_true(listp(aggregate_list())) +test_true(multisetp(aggregate_multiset())) // - all_efuns test_true(mappingp(all_efuns())) @@ -1357,6 +1761,13 @@ test_true(stringp(ctime(0))) // - destruct // FIXME put tests for destruct here. +test_do(add_efun("PROG",compile_string("int foo() { return 1; }"))); +test_any([[object o=clone(PROG); destruct(o); return o]],0); +test_any([[object o=clone(PROG); destruct(o); return objectp(o)]],0); +test_any([[object *o=({clone(PROG)}); destruct(o[0]); return o-({0}) ]],({})); +test_any([[mapping o=(["foo":clone(PROG)]); destruct(o["foo"]); return o["foo"]; ]],0); +dnl test_any([[object t; mapping o=([t=clone(PROG):"foo"]); destruct(t); return sizeof(o)]],0); +test_do([[object t,*o=({}); o+=({t=clone(PROG)}); destruct(t); o=({});]]); // - equal // equl is already tested by this script @@ -1380,7 +1791,7 @@ test_eq(function_name(function_name),0) test_eq(function_object(a),this_object()) test_eq(function_name(function_object),0) -// - get_function (actually in simulate.lpc) +// - get_function (actually in simulate.pike) test_eq(a,get_function(this_object(),"a")) test_eq(a,this_object()->a) @@ -1398,14 +1809,14 @@ test_eq([[implode(explode("foo","o"),"o")]],"foo") test_eq([[implode(({"foo","bar"}),"-")]],"foo-bar") test_eq([[implode(({"foo",0,"bar"}),"-")]],"foo-bar") test_eq([[implode(({1.0,"foo",0,"bar",this_object(),([])}),"-")]],"foo-bar") -test_eq([[implode(({"f","o","o"}))]],"foo") +test_eq([[implode(({"f","o","o"}),"")]],"foo") // - indices test_equal(indices("foo"),({0,1,2})) test_equal(indices(({'f','o','o'})),({0,1,2})) test_equal(sort_array(indices(([7:3,8:9,99:12]))),({7,8,99})) test_equal(sort_array(indices((<7,8,99>))),({7,8,99})) -test_equal(mklist(indices(this_object())),(<"a","b">)) +test_equal(mkmultiset(indices(this_object())),(<"a","b">)) // - lower_case test_equal(lower_case("foo"),"foo") @@ -1508,7 +1919,7 @@ test_search3($1,($1[1..0x7fffffff])) test_search4("SUNE") test_search4("-------------------+") -test_search4("+-------------------") +test_search4("�-------------------") test_search4(sprintf("%'argel-bargel glop-glyf?'2000n")) // - sizeof @@ -1519,6 +1930,7 @@ test_eq(sizeof((<8,7,6,5,4,7>)),6) // - sleep test_do(sleep(1)) +test_do(sleep(0.5)) // - sum test_eq(sum(1,1),2) @@ -1561,7 +1973,7 @@ test_equal(values("foo"),({'f','o','o'})) test_equal(values(({'f','o','o'})),({'f','o','o'})) test_equal(sort_array(values(([7:3,8:9,99:12]))),({3,9,12})) test_equal(values((<7,8,99>)),({1,1,1})) -test_equal(mklist(values(this_object())),(<a,b>)) +test_equal(mkmultiset(values(this_object())),(<a,b>)) // - zero_type test_eq(zero_type(0),0) @@ -1569,6 +1981,10 @@ test_eq(zero_type(([])[7]),1) // - call_out, call_out_info, remove_call_out, find_call_out test_do(call_out(a,100000)) +test_true(call_out(lambda() {},1000.0)) +test_true(remove_call_out(call_out(lambda() {},1000.0)) != -1) +test_true(find_call_out(call_out(lambda() {},1000.0)) > 990) +test_false(zero_type(remove_call_out(call_out(lambda() {},1000.0)))) test_true(arrayp(call_out_info())) test_true(sizeof(call_out_info()) > 0) test_true(call_out_info()[-1][0] > 1) @@ -1578,11 +1994,6 @@ test_true(zero_type(find_call_out(a))) test_do(remove_call_out(call_out_info()[-1][2])) test_true(!sizeof(call_out_info()) || function_name(call_out_info()[-1][2])!="a") -// m_delete -test_equal(([1:1]),m_delete(a(),0)) -test_equal(([1:1]),m_delete(([1:1,0:3]),0)) -test_any(mapping a=([1:1]); return a==m_delete(a,1),1) - test_program(int b=10; mixed a() { return 1; }) test_program(mixed b=10; mixed a() { return 1;}) test_define_program(/test,[[int q,w,e,r,t; mixed foo() { return 10; }]]) diff --git a/src/test/test_lpc.lpc b/src/test/test_pike.pike similarity index 65% rename from src/test/test_lpc.lpc rename to src/test/test_pike.pike index 5a8419f0994feb8da799e609b565c44f20c739ba..c21a424d8f76391c254192a19952f28311702722 100755 --- a/src/test/test_lpc.lpc +++ b/src/test/test_pike.pike @@ -1,15 +1,32 @@ -#!/usr/local/bin/ulpc +#!/usr/local/bin/pike + +#include <simulate.h> + +#if !efun(_verify_internals) +#define _verify_internals() +#endif + int main(int argc, string *argv) { - int e, verbose, successes, errors, t; + int e, verbose, successes, errors, t, check; string *tests; program testprogram; int start, fail; for(e=1;e<argc;e++) { - switch(argv[e]) + string opt; + int arg; + arg=1; + if(sscanf(argv[e],"--%s=%d",opt,arg)==2) + opt="--"+opt; + else if(sscanf(argv[e],"-%s%d",opt,arg)==2) + opt="-"+opt; + else + opt=argv[e]; + + switch(opt) { case "-h": case "--help": @@ -18,50 +35,74 @@ int main(int argc, string *argv) case "-v": case "--verbose": - verbose++; + verbose+=arg; break; case "-s": case "--start-test": - sscanf(argv[++e],"%d",start); + start=arg; start--; break; case "-f": case "--fail": - fail++; + fail+=arg; break; - case "-t": case "--trace": - t++; + t+=arg; + break; + + case "-c": + case "--check": + check++; break; default: if(tests) { - perror("Uknown argument: "+argv[e]+".\n"); + perror("Uknown argument: "+opt+".\n"); exit(1); } tests=(read_bytes(argv[e])||"")/"\n....\n"; - tests=tests[0..sizeof(tests)-2]; - if(sizeof(tests) < 10) - { - perror("Failed to read test file!\n"); - exit(1); - } } } + if(!tests) + { + tests=(clone((program)"/precompiled/file","stdin")->read(0x7fffffff)||"")/"\n....\n"; + } + + if(!tests || sizeof(tests) < 10) + { + perror("Failed to read test file!\n"); + exit(1); + } + + tests=tests[0..sizeof(tests)-2]; for(e=start;e<sizeof(tests);e++) { - string test; + string test,condition; int type; object o; mixed a,b; - sscanf(tests[e],"%s\n%s",type,test); + if(check) _verify_internals(); + + test=tests[e]; + if(sscanf(test,"COND %s\n%s",condition,test)==2) + { + if(!clone(compile_string("mixed c() { return "+condition+"; }","Cond "+(e+1)))->c()) + { + if(verbose) + perror("Not doing test "+(e+1)+"\n"); + successes++; + continue; + } + } + + sscanf(test,"%s\n%s",type,test); sscanf(type,"%*s expected result: %s",type); if(verbose) @@ -71,6 +112,8 @@ int main(int argc, string *argv) perror(test+"\n"); } + if(check > 1) _verify_internals(); + switch(type) { case "COMPILE_ERROR": @@ -102,11 +145,16 @@ int main(int argc, string *argv) default: o=clone(compile_string(test,"Test "+(e+1))); + if(check > 1) _verify_internals(); + a=b=0; if(t) trace(t); if(functionp(o->a)) a=o->a(); if(functionp(o->b)) b=o->b(); if(t) trace(0); + + if(check > 1) _verify_internals(); + switch(type) { case "FALSE": @@ -158,6 +206,9 @@ int main(int argc, string *argv) errors++; } } + + if(check > 2) _verify_internals(); + if(fail && errors) exit(1); } @@ -167,6 +218,13 @@ int main(int argc, string *argv) perror("Errors + Successes != number of tests!\n"); errors++; } + + if(successes < 5000) + { + perror("Tests are missing!\n"); + errors++; + } + if(errors || verbose) { perror("Failed tests: "+errors+".\n"); diff --git a/src/test/testsuite b/src/test/testsuite deleted file mode 100644 index b705de7dd666fd92a73959172bad6994668cae52..0000000000000000000000000000000000000000 --- a/src/test/testsuite +++ /dev/null @@ -1,20767 +0,0 @@ -test 1, expected result: COMPILE_ERROR -master()->add_precompiled_program(\"/test\",compile_string(\"int foo() { return 17; }\",\"62\")) -.... -test 2, expected result: EQ -mixed a() { return "\377"[0]; } -mixed b() { return 255; } -.... -test 3, expected result: RUN -mixed a() { add_efun("foo",clone(class {int i;})); } -.... -test 4, expected result: EQ -mixed a() { return foo->i; } -mixed b() { return 0; } -.... -test 5, expected result: RUN -mixed a() { foo->i=17; } -.... -test 6, expected result: EQ -mixed a() { return foo->i; } -mixed b() { return 17; } -.... -test 7, expected result: RUN -mixed a() { add_efun("foo"); } -.... -test 8, expected result: RUN -mixed a() { add_efun("foo",clone(class {int *i=({0});})); } -.... -test 9, expected result: EQ -mixed a() { return foo->i[0]; } -mixed b() { return 0; } -.... -test 10, expected result: RUN -mixed a() { foo->i[0]=17; } -.... -test 11, expected result: EQ -mixed a() { return foo->i[0]; } -mixed b() { return 17; } -.... -test 12, expected result: RUN -mixed a() { add_efun("foo"); } -.... -test 13, expected result: EQ -mixed a() { return signum("SIGKILL"); } -mixed b() { return 9; } -.... -test 14, expected result: EQ -mixed a() { return signum("SIGINT"); } -mixed b() { return 2; } -.... -test 15, expected result: EQ -mixed a() { return signame(9); } -mixed b() { return "SIGKILL"; } -.... -test 16, expected result: EQ -mixed a() { return signame(2); } -mixed b() { return "SIGINT"; } -.... -test 17, expected result: TRUE -mixed a() { return intp(getpid()); } -.... -test 18, expected result: RUN -mixed a() { signal(signum("SIGUSR1"),lambda() { add_efun("AFJLLAF",17); }); } -.... -test 19, expected result: RUN -mixed a() { kill(getpid(),signum("SIGUSR1")); } -.... -test 20, expected result: EQ -mixed a() { return AFJLLAF; } -mixed b() { return 17; } -.... -test 21, expected result: RUN -mixed a() { add_efun("AFJLLAF"); } -.... -test 22, expected result: RUN -mixed a() { signal(signum("SIGUSR1")); } -.... -test 23, expected result: TRUE -mixed a() { return programp(class {}); } -.... -test 24, expected result: TRUE -mixed a() { return functionp(clone(class { int foo() { return 1; }})->foo); } -.... -test 25, expected result: TRUE -mixed a() { return clone(class { int foo() { return 1; }})->foo(); } -.... -test 26, expected result: TRUE -mixed a() { return clone(class { int i=1; })->i; } -.... -test 27, expected result: FALSE -mixed a() { return clone(class { int foo() { return 1; }})->bar; } -.... -test 28, expected result: EQ -mixed a() { return clone(clone(class { program foo=class { int i=20; }; })->foo)->i; } -mixed b() { return 20; } -.... -test 29, expected result: COMPILE_ERROR -mixed a() { } int foo() { return; } -.... -test 30, expected result: COMPILE_ERROR -mixed a() { } void foo() { return 1; } -.... -test 31, expected result: EQ -mixed a() { int i=10; { int i; } return i; } -mixed b() { return 10; } -.... -test 32, expected result: TRUE -void foo(int a ,int b); function(int,int:void) a() { return foo; } -.... -test 33, expected result: TRUE -void foo(int a, int ... b); function(int,int ...:void) a() { return foo; } -.... -test 34, expected result: TRUE -void foo(); function(:void) a() { return foo; } -.... -test 35, expected result: COMPILE_ERROR -mixed a() { } void foo(); function(:string) a() { return foo;; } -.... -test 36, expected result: RUN -mixed a() { lambda(){return;}(); } -.... -test 37, expected result: EQUAL -mixed a() { return ({ lambda() { return 3; } , lambda() { return 7; }, lambda() { return 9; } })(); } -mixed b() { return ({ 3,7,9 }); } -.... -test 38, expected result: EQ -mixed a() { int *a=({10}); a[0]++; return a[0]; } -mixed b() { return 11; } -.... -test 39, expected result: EQ -mixed a() { mapping a=([10:11]); a[10]++; return a[10]; } -mixed b() { return 12; } -.... -test 40, expected result: EQUAL -mixed a() { return mkmapping( ({3,6,2}), ({"3","6","2"})); } -mixed b() { return ([3:"3", 6:"6", 2:"2"]); } -.... -test 41, expected result: EQUAL -mixed a() { return sum(([3:"3", 6:"6", 2:"2"])); } -mixed b() { return ([3:"3", 6:"6", 2:"2"]); } -.... -test 42, expected result: TRUE -mixed a() { return sum(([3:"3", 6:"6", 2:"2"])) != ([3:"3", 6:"6", 2:"2"]); } -.... -test 43, expected result: TRUE -mixed a() { return efun::stringp(""); } -.... -test 44, expected result: EQUAL -mixed a() { return "a,b,4,7,8s,asfd,a,d,f" / ","; } -mixed b() { return "a,b,4,7,8s,asfd,a,d,f" / ","; } -.... -test 45, expected result: EQ -mixed a() { string *a="a,b"/","; a[0]="c"; return equal(a,({"c","b"})); } -mixed b() { return 1; } -.... -test 46, expected result: TRUE -mixed a() { return 0||1; } -.... -test 47, expected result: TRUE -mixed a() { return 1||0; } -.... -test 48, expected result: TRUE -mixed a() { return !0||!0; } -.... -test 49, expected result: TRUE -mixed a() { return !0&&!0; } -.... -test 50, expected result: EQ -mixed a() { mixed a=1; a+=1; return a; } -mixed b() { return 2; } -.... -test 51, expected result: EQ -mixed a() { mixed a=1; a-=1; return a; } -mixed b() { return 0; } -.... -test 52, expected result: EQUAL -mixed a() { return "abcd"/"" - indices("abcd"); } -mixed b() { return ({"a","b","c","d"}); } -.... -test 53, expected result: EQUAL -mixed a() { return "abcd"/"" & indices("abcd"); } -mixed b() { return ({}); } -.... -test 54, expected result: EQ -mixed a() { return sizeof("abcd"/"" & "de"/""); } -mixed b() { return 1; } -.... -test 55, expected result: EQUAL -mixed a() { return ({0,0,0,0,0}); } -mixed b() { return ({0,0,0,0,0}); } -.... -test 56, expected result: EQUAL -mixed a() { return ({0,0,0,0,0}); } -mixed b() { return allocate(5,"object"); } -.... -test 57, expected result: EQUAL -mixed a() { return mkmapping("abcd"/"","jklm"/"") | mkmapping("jclm"/"","alcd"/""); } -mixed b() { return mkmapping("abcdjlm"/"","jklmacd"/""); } -.... -test 58, expected result: TRUE -int foo() { return 17;} mixed a() { return foo() == 17; } -.... -test 59, expected result: EQ -mixed a() { mixed a; a=2; a=a*3; return a; } -mixed b() { return 6; } -.... -test 60, expected result: EQ -mixed a() { mixed a = ({1}); a=a+({2}); return equal(a,({1,2})); } -mixed b() { return 1; } -.... -test 61, expected result: RUN -void a() { master()->add_precompiled_program("/test",class { - int foo() { return 17; } -});} -.... -test 62, expected result: EQ -mixed a() { function bar=clone((program)"/test")->foo; return bar(); } -mixed b() { return 17; } -.... -test 63, expected result: EQ -mixed a() { mixed a; return sscanf("11","%d",a); } -mixed b() { return 1; } -.... -test 64, expected result: EQ -mixed a() { mixed a; sscanf("11","%d",a); return a; } -mixed b() { return 11; } -.... -test 65, expected result: EQ -mixed a() { mixed a,b; return sscanf("11foo","%dfoo",a); } -mixed b() { return 1; } -.... -test 66, expected result: EQ -mixed a() { mixed a,b; sscanf("11foo","%dfoo",a); return a; } -mixed b() { return 11; } -.... -test 67, expected result: EQ -mixed a() { mixed a,b; return sscanf("11foo","%d%s",a,b); } -mixed b() { return 2; } -.... -test 68, expected result: EQ -mixed a() { mixed a,b; sscanf("11foo","%d%s",a,b); return b; } -mixed b() { return "foo"; } -.... -test 69, expected result: EQ -mixed a() { mixed a,b; return sscanf("foo","%c%s",b,a); } -mixed b() { return 2; } -.... -test 70, expected result: EQ -mixed a() { mixed a,b; sscanf("foo","%c%s",b,a); return b; } -mixed b() { return 'f'; } -.... -test 71, expected result: EQ -mixed a() { mixed a,b; sscanf("foo","%c%s",b,a); return a; } -mixed b() { return "oo"; } -.... -test 72, expected result: EQ -mixed a() { mixed a,b; return sscanf("1.0","%f",a); } -mixed b() { return 1; } -.... -test 73, expected result: EQ -mixed a() { mixed a,b; sscanf("1.0","%f",a); return a; } -mixed b() { return 1.0; } -.... -test 74, expected result: EQ -mixed a() { mixed a,b; sscanf("abcdeFGji","%[a-z]%s",a,b); return a; } -mixed b() { return "abcde"; } -.... -test 75, expected result: EQ -mixed a() { mixed a,b; sscanf("abcdeFGji","%[a-z]%s",a,b); return b; } -mixed b() { return "FGji"; } -.... -test 76, expected result: EQ -mixed a() { mixed a,b; return sscanf("foo-%-bar","%s-%%-%s",a,b);; } -mixed b() { return 2; } -.... -test 77, expected result: EQ -mixed a() { mixed a,b; sscanf("foo-%-bar","%s-%%-%s",a,b); return a; } -mixed b() { return "foo"; } -.... -test 78, expected result: EQ -mixed a() { mixed a,b; sscanf("foo-%-bar","%s-%%-%s",a,b); return b; } -mixed b() { return "bar"; } -.... -test 79, expected result: TRUE -mixed a() { return 1; } -.... -test 80, expected result: TRUE -mixed a() { return ""; } -.... -test 81, expected result: TRUE -mixed a() { return !0; } -.... -test 82, expected result: TRUE -mixed a() { return !(!1); } -.... -test 83, expected result: TRUE -mixed a() { return this_object(); } -.... -test 84, expected result: TRUE -mixed a() { return a; } -.... -test 85, expected result: TRUE -mixed a() { return 0.0; } -.... -test 86, expected result: TRUE -mixed a() { return ([]); } -.... -test 87, expected result: TRUE -mixed a() { return ({}); } -.... -test 88, expected result: TRUE -mixed a() { return (<>); } -.... -test 89, expected result: TRUE -mixed a() { return object_program(this_object()); } -.... -test 90, expected result: EQUAL -mixed a() { return !""; } -mixed b() { return 0; } -.... -test 91, expected result: EQUAL -mixed a() { return !this_object(); } -mixed b() { return 0; } -.... -test 92, expected result: EQUAL -mixed a() { return !this_function(); } -mixed b() { return 0; } -.... -test 93, expected result: TRUE -mixed a() { return 1==1; } -.... -test 94, expected result: TRUE -mixed a() { return !(1==2); } -.... -test 95, expected result: TRUE -mixed a() { return ""==""; } -.... -test 96, expected result: TRUE -mixed a() { return !(""=="foo"); } -.... -test 97, expected result: TRUE -mixed a() { return this_object()==this_object(); } -.... -test 98, expected result: TRUE -mixed a() { return this_function()==a; } -.... -test 99, expected result: TRUE -mixed a() { return 2.0==2.0; } -.... -test 100, expected result: TRUE -mixed a() { return ({})==({}); } -.... -test 101, expected result: TRUE -mixed a() { return ({1})!=({1}); } -.... -test 102, expected result: TRUE -mixed a() { return 1!=2; } -.... -test 103, expected result: TRUE -mixed a() { return !(1==2); } -.... -test 104, expected result: TRUE -mixed a() { return !(""!=""); } -.... -test 105, expected result: TRUE -mixed a() { return ""!="foo"; } -.... -test 106, expected result: TRUE -mixed a() { return 1<2; } -.... -test 107, expected result: TRUE -mixed a() { return !(1>2); } -.... -test 108, expected result: TRUE -mixed a() { return 2>1; } -.... -test 109, expected result: TRUE -mixed a() { return !(2<1); } -.... -test 110, expected result: TRUE -mixed a() { return 1<=2; } -.... -test 111, expected result: TRUE -mixed a() { return !(1>=2); } -.... -test 112, expected result: TRUE -mixed a() { return 2>=1; } -.... -test 113, expected result: TRUE -mixed a() { return !(2<=1); } -.... -test 114, expected result: TRUE -mixed a() { return 2<=2; } -.... -test 115, expected result: TRUE -mixed a() { return 1>=1; } -.... -test 116, expected result: TRUE -mixed a() { return 1.0<2.0; } -.... -test 117, expected result: TRUE -mixed a() { return !(1.0>2.0); } -.... -test 118, expected result: TRUE -mixed a() { return 2.0>1.0; } -.... -test 119, expected result: TRUE -mixed a() { return !(2.0<1.0); } -.... -test 120, expected result: TRUE -mixed a() { return 1.0<=2.0; } -.... -test 121, expected result: TRUE -mixed a() { return !(1.0>=2.0); } -.... -test 122, expected result: TRUE -mixed a() { return 2.0>=1.0; } -.... -test 123, expected result: TRUE -mixed a() { return !(2.0<=1.0); } -.... -test 124, expected result: TRUE -mixed a() { return 2.0<=2.0; } -.... -test 125, expected result: TRUE -mixed a() { return 1.0>=1.0; } -.... -test 126, expected result: TRUE -mixed a() { return "a"<"b"; } -.... -test 127, expected result: TRUE -mixed a() { return !("a">"b"); } -.... -test 128, expected result: TRUE -mixed a() { return "b">"a"; } -.... -test 129, expected result: TRUE -mixed a() { return !("b"<"a"); } -.... -test 130, expected result: TRUE -mixed a() { return "a"<="b"; } -.... -test 131, expected result: TRUE -mixed a() { return !("a">="b"); } -.... -test 132, expected result: TRUE -mixed a() { return "b">="a"; } -.... -test 133, expected result: TRUE -mixed a() { return !("b"<="a"); } -.... -test 134, expected result: TRUE -mixed a() { return "b"<="b"; } -.... -test 135, expected result: TRUE -mixed a() { return "a">="a"; } -.... -test 136, expected result: TRUE -mixed a() { return ""<"b"; } -.... -test 137, expected result: TRUE -mixed a() { return !("">"b"); } -.... -test 138, expected result: TRUE -mixed a() { return "b">""; } -.... -test 139, expected result: TRUE -mixed a() { return !("b"<""); } -.... -test 140, expected result: TRUE -mixed a() { return ""<="b"; } -.... -test 141, expected result: TRUE -mixed a() { return !("">="b"); } -.... -test 142, expected result: TRUE -mixed a() { return "b">=""; } -.... -test 143, expected result: TRUE -mixed a() { return !("b"<=""); } -.... -test 144, expected result: TRUE -mixed a() { return "b"<="b"; } -.... -test 145, expected result: TRUE -mixed a() { return "">=""; } -.... -test 146, expected result: EQ -mixed a() { return 0; } -mixed b() { return 0x0; } -.... -test 147, expected result: EQ -mixed a() { return 1; } -mixed b() { return 0x1; } -.... -test 148, expected result: EQ -mixed a() { return 10; } -mixed b() { return 0xa; } -.... -test 149, expected result: EQ -mixed a() { return 16; } -mixed b() { return 0x10; } -.... -test 150, expected result: EQ -mixed a() { return 65535; } -mixed b() { return 0xffff; } -.... -test 151, expected result: EQ -mixed a() { return 17*257*65537; } -mixed b() { return 0x11111111; } -.... -test 152, expected result: EQ -mixed a() { return 0; } -mixed b() { return 00; } -.... -test 153, expected result: EQ -mixed a() { return 1; } -mixed b() { return 01; } -.... -test 154, expected result: EQ -mixed a() { return 8; } -mixed b() { return 010; } -.... -test 155, expected result: EQ -mixed a() { return 64; } -mixed b() { return 0100; } -.... -test 156, expected result: EQ -mixed a() { return 1073741824; } -mixed b() { return 010000000000; } -.... -test 157, expected result: EQ -mixed a() { return (8+1)*(8*8+1)*(8*8*8*8+1); } -mixed b() { return 011111111; } -.... -test 158, expected result: EQ -mixed a() { return 16; } -mixed b() { return "\20"[0]; } -.... -test 159, expected result: EQ -mixed a() { return 16; } -mixed b() { return "\020"[0]; } -.... -test 160, expected result: EQ -mixed a() { return 255; } -mixed b() { return "\377"[0]; } -.... -test 161, expected result: EQ -mixed a() { return 4; } -mixed b() { return '\4'; } -.... -test 162, expected result: TRUE -mixed a() { return "\r"[0]!='r'; } -.... -test 163, expected result: EQ -mixed a() { return "\r"[0]; } -mixed b() { return '\r'; } -.... -test 164, expected result: EQ -mixed a() { return "\n"[0]; } -mixed b() { return '\n'; } -.... -test 165, expected result: EQ -mixed a() { return 1+1; } -mixed b() { return 2; } -.... -test 166, expected result: EQ -mixed a() { return 1+(-2); } -mixed b() { return -1; } -.... -test 167, expected result: EQ -mixed a() { return (-2)+(-2); } -mixed b() { return -4; } -.... -test 168, expected result: EQ -mixed a() { return "hi"+"there"; } -mixed b() { return "hithere"; } -.... -test 169, expected result: EQ -mixed a() { return "human"+"number"+666; } -mixed b() { return "humannumber666"; } -.... -test 170, expected result: EQ -mixed a() { return "human"+("number"+666); } -mixed b() { return "humannumber666"; } -.... -test 171, expected result: EQ -mixed a() { return ("human"+"number")+666; } -mixed b() { return "humannumber666"; } -.... -test 172, expected result: EQ -mixed a() { return ("human"+"number")+666+111; } -mixed b() { return "humannumber666111"; } -.... -test 173, expected result: EQ -mixed a() { return "humannumber"+(666+111); } -mixed b() { return "humannumber777"; } -.... -test 174, expected result: EQ -mixed a() { return "a"+"b"+"c"+"d"+"e"+"f"+"g"+"h"+"i"+"j"+"k"+"l"+"m"+"n"+"o"+"p"+"q"+"r"+"s"+"t"+"u"+"v"+"x"+"y"; } -mixed b() { return "abcdefghijklmnopqrstuvxy"; } -.... -test 175, expected result: EQ -mixed a() { return 1.0+1.0; } -mixed b() { return 2.0; } -.... -test 176, expected result: EQ -mixed a() { return 1.0+(-1.0); } -mixed b() { return 0.0; } -.... -test 177, expected result: EQ -mixed a() { return (-1.0)+(-1.0); } -mixed b() { return -2.0; } -.... -test 178, expected result: EQUAL -mixed a() { return ({1,2,3})+({4,5,6}); } -mixed b() { return ({1,2,3,4,5,6}); } -.... -test 179, expected result: EQUAL -mixed a() { return (<1,2,3,4>)+(<4,5,6>); } -mixed b() { return (<1,2,3,4,4,5,6>); } -.... -test 180, expected result: EQUAL -mixed a() { return ([0:1,3:6])+([5:2,3:6]); } -mixed b() { return ([0:1,3:6,3:6,5:2]); } -.... -test 181, expected result: EVAL_ERROR -mixed a() { return this_object() + this_object(); } -.... -test 182, expected result: EQ -mixed a() { return 10-3; } -mixed b() { return 7; } -.... -test 183, expected result: EQ -mixed a() { return 3-10; } -mixed b() { return -7; } -.... -test 184, expected result: EQ -mixed a() { return 10.0-3.0; } -mixed b() { return 7.0; } -.... -test 185, expected result: EQ -mixed a() { return 3.0-10.0; } -mixed b() { return -7.0; } -.... -test 186, expected result: EQ -mixed a() { return "foobargazonk"-"o"; } -mixed b() { return "fbargaznk"; } -.... -test 187, expected result: EQUAL -mixed a() { return ({"foo","bar","gazonk"})-({"foo","gazonk"}); } -mixed b() { return ({"bar"}); } -.... -test 188, expected result: EQUAL -mixed a() { return ({"c","foo","bar","gazonk","a","b",})-({"foo","gazonk"}); } -mixed b() { return ({"c","bar","a","b"}); } -.... -test 189, expected result: EQUAL -mixed a() { return (<"foo","bar","gazonk">)-(<"foo","gazonk">); } -mixed b() { return (<"bar">); } -.... -test 190, expected result: EQUAL -mixed a() { return (["foo":3,"bar":4,"gazonk":5])-(["foo":3,"gazonk":8]); } -mixed b() { return (["bar":4]); } -.... -test 191, expected result: EQ -mixed a() { return -1-4; } -mixed b() { return ~4; } -.... -test 192, expected result: EQ -mixed a() { return -1-627893874; } -mixed b() { return ~627893874; } -.... -test 193, expected result: EQ -mixed a() { return 3*4; } -mixed b() { return 12; } -.... -test 194, expected result: EQ -mixed a() { return 4*3; } -mixed b() { return 12; } -.... -test 195, expected result: EQ -mixed a() { return 2*2*2*2*2; } -mixed b() { return 32; } -.... -test 196, expected result: EQ -mixed a() { return 3.0*4.0; } -mixed b() { return 12.0; } -.... -test 197, expected result: EQ -mixed a() { return 4.0*3.0; } -mixed b() { return 12.0; } -.... -test 198, expected result: EQ -mixed a() { return 2.0*2.0*2.0*2.0*2.0; } -mixed b() { return 32.0; } -.... -test 199, expected result: EQ -mixed a() { return ({"foo","bar","gazonk"})*"-"; } -mixed b() { return "foo-bar-gazonk"; } -.... -test 200, expected result: EQ -mixed a() { return 12/3; } -mixed b() { return 4; } -.... -test 201, expected result: EQ -mixed a() { return 13/3; } -mixed b() { return 4; } -.... -test 202, expected result: EQ -mixed a() { return 14/3; } -mixed b() { return 4; } -.... -test 203, expected result: EQ -mixed a() { return 15/3; } -mixed b() { return 5; } -.... -test 204, expected result: EVAL_ERROR -mixed a() { return 15/0; } -.... -test 205, expected result: EQ -mixed a() { return 12.0/3.0; } -mixed b() { return 4.0; } -.... -test 206, expected result: EQ -mixed a() { return 14.0/4.0; } -mixed b() { return 3.5; } -.... -test 207, expected result: EQ -mixed a() { return 15.0/3.0; } -mixed b() { return 5.0; } -.... -test 208, expected result: EVAL_ERROR -mixed a() { return 15.0/0.0; } -.... -test 209, expected result: EQUAL -mixed a() { return "foo-bar-gazonk"/"-"; } -mixed b() { return ({"foo","bar","gazonk"}); } -.... -test 210, expected result: EQUAL -mixed a() { return "foobargazonk"/""; } -mixed b() { return ({"f","o","o","b","a","r","g","a","z","o","n","k"}); } -.... -test 211, expected result: EQ -mixed a() { return 12%3; } -mixed b() { return 0; } -.... -test 212, expected result: EQ -mixed a() { return 13%3; } -mixed b() { return 1; } -.... -test 213, expected result: EQ -mixed a() { return 14%3; } -mixed b() { return 2; } -.... -test 214, expected result: EQ -mixed a() { return 15%3; } -mixed b() { return 0; } -.... -test 215, expected result: EVAL_ERROR -mixed a() { return 15 % 0; } -.... -test 216, expected result: EQ -mixed a() { return 12.0 % 3.0; } -mixed b() { return 0.0; } -.... -test 217, expected result: EQ -mixed a() { return 13.0 % 3.0; } -mixed b() { return 1.0; } -.... -test 218, expected result: EQ -mixed a() { return 14.0 % 3.0; } -mixed b() { return 2.0; } -.... -test 219, expected result: EQ -mixed a() { return 14.5 % 3.0; } -mixed b() { return 2.5; } -.... -test 220, expected result: EQ -mixed a() { return 15.0 % 3.0; } -mixed b() { return 0.0; } -.... -test 221, expected result: EVAL_ERROR -mixed a() { return 15.0 % 0.0; } -.... -test 222, expected result: EQ -mixed a() { return 0 && 1; } -mixed b() { return 0; } -.... -test 223, expected result: EQ -mixed a() { return 1 && 0; } -mixed b() { return 0; } -.... -test 224, expected result: EQ -mixed a() { return 0 && 0; } -mixed b() { return 0; } -.... -test 225, expected result: EQ -mixed a() { return 1 && 1; } -mixed b() { return 1; } -.... -test 226, expected result: EQ -mixed a() { return 78 && 1; } -mixed b() { return 1; } -.... -test 227, expected result: EQ -mixed a() { return 78 && 99; } -mixed b() { return 99; } -.... -test 228, expected result: EQ -mixed a() { return 78 && 99; } -mixed b() { return 99; } -.... -test 229, expected result: EQ -mixed a() { return 0 || 1; } -mixed b() { return 1; } -.... -test 230, expected result: EQ -mixed a() { return 1 || 0; } -mixed b() { return 1; } -.... -test 231, expected result: EQ -mixed a() { return 0 || 0; } -mixed b() { return 0; } -.... -test 232, expected result: EQ -mixed a() { return 1 || 1; } -mixed b() { return 1; } -.... -test 233, expected result: EQ -mixed a() { return 78 || 1; } -mixed b() { return 78; } -.... -test 234, expected result: EQ -mixed a() { return 78 || 0; } -mixed b() { return 78; } -.... -test 235, expected result: EQ -mixed a() { return 0 | 0; } -mixed b() { return 0; } -.... -test 236, expected result: EQ -mixed a() { return 1 | 1; } -mixed b() { return 1; } -.... -test 237, expected result: EQ -mixed a() { return 4 | 1; } -mixed b() { return 5; } -.... -test 238, expected result: EQ -mixed a() { return 1 | 9; } -mixed b() { return 9; } -.... -test 239, expected result: EQUAL -mixed a() { return sort_array(({1,2,3,4,4}) | ({3,5,6})); } -mixed b() { return ({1,2,3,4,4,5,6}); } -.... -test 240, expected result: EQUAL -mixed a() { return (<4,5,6>) | (<5,5,5>); } -mixed b() { return (<4,5,5,5,6>) ; } -.... -test 241, expected result: EQUAL -mixed a() { return ([-4:8,8:7]) | ([3:3,8:3]); } -mixed b() { return ([-4:8,8:3,3:3]) ; } -.... -test 242, expected result: EQ -mixed a() { return 0 & 0; } -mixed b() { return 0; } -.... -test 243, expected result: EQ -mixed a() { return 1 & 1; } -mixed b() { return 1; } -.... -test 244, expected result: EQ -mixed a() { return 4 & 1; } -mixed b() { return 0; } -.... -test 245, expected result: EQ -mixed a() { return 1 & 9; } -mixed b() { return 1; } -.... -test 246, expected result: EQUAL -mixed a() { return ({1,2,3,4,4}) & ({3,5,6}); } -mixed b() { return ({3}); } -.... -test 247, expected result: EQUAL -mixed a() { return (<4,5,6>) & (<5,5,5>); } -mixed b() { return (<5>) ; } -.... -test 248, expected result: EQUAL -mixed a() { return ([-4:8,8:7]) & ([3:3,8:3]); } -mixed b() { return ([8:3]) ; } -.... -test 249, expected result: EQ -mixed a() { return 0 ^ 0; } -mixed b() { return 0; } -.... -test 250, expected result: EQ -mixed a() { return 1 ^ 1; } -mixed b() { return 0; } -.... -test 251, expected result: EQ -mixed a() { return 4 ^ 1; } -mixed b() { return 5; } -.... -test 252, expected result: EQ -mixed a() { return 1 ^ 9; } -mixed b() { return 8; } -.... -test 253, expected result: EQUAL -mixed a() { return ({1,2,3,4,4}) ^ ({3,5,6}); } -mixed b() { return ({1,2,4,4,5,6}); } -.... -test 254, expected result: EQUAL -mixed a() { return (<4,5,6>) ^ (<5,5,5>); } -mixed b() { return (<4,5,5,6>) ; } -.... -test 255, expected result: EQUAL -mixed a() { return ([-4:8,8:7]) ^ ([3:3,8:3]); } -mixed b() { return ([-4:8,3:3]) ; } -.... -test 256, expected result: EQ -mixed a() { return 1<<0; } -mixed b() { return 1; } -.... -test 257, expected result: EQ -mixed a() { return 1<<1; } -mixed b() { return 2; } -.... -test 258, expected result: EQ -mixed a() { return 1<<10; } -mixed b() { return 1024; } -.... -test 259, expected result: EQ -mixed a() { return 5<<3; } -mixed b() { return 40; } -.... -test 260, expected result: EQ -mixed a() { return 9>>2; } -mixed b() { return 2; } -.... -test 261, expected result: EQ -mixed a() { return 1>>1; } -mixed b() { return 0; } -.... -test 262, expected result: EQ -mixed a() { return 1024>>10; } -mixed b() { return 1; } -.... -test 263, expected result: EQ -mixed a() { return 47>>3; } -mixed b() { return 5; } -.... -test 264, expected result: TRUE -mixed a() { return 0?0:1; } -.... -test 265, expected result: TRUE -mixed a() { return 1?1:0; } -.... -test 266, expected result: TRUE -mixed a() { return ""?1:0; } -.... -test 267, expected result: TRUE -mixed a() { return !0?1:0; } -.... -test 268, expected result: TRUE -mixed a() { return !(!1)?1:0; } -.... -test 269, expected result: TRUE -mixed a() { return this_object()?1:0; } -.... -test 270, expected result: TRUE -mixed a() { return a?1:0; } -.... -test 271, expected result: TRUE -mixed a() { return 0.0?1:0; } -.... -test 272, expected result: TRUE -mixed a() { return ([])?1:0; } -.... -test 273, expected result: TRUE -mixed a() { return ({})?1:0; } -.... -test 274, expected result: TRUE -mixed a() { return (<>)?1:0; } -.... -test 275, expected result: TRUE -mixed a() { return object_program(this_object())?1:0; } -.... -test 276, expected result: EQ -mixed a() { return "foo"[0]; } -mixed b() { return 'f'; } -.... -test 277, expected result: EQ -mixed a() { return "foo"[1]; } -mixed b() { return 'o'; } -.... -test 278, expected result: EQ -mixed a() { return "foo"[2]; } -mixed b() { return 'o'; } -.... -test 279, expected result: EQ -mixed a() { return "foo"[-1]; } -mixed b() { return 'o'; } -.... -test 280, expected result: EQ -mixed a() { return "foo"[-2]; } -mixed b() { return 'o'; } -.... -test 281, expected result: EQ -mixed a() { return "foo"[-3]; } -mixed b() { return 'f'; } -.... -test 282, expected result: EQ -mixed a() { return ({'f','o','o'})[0]; } -mixed b() { return 'f'; } -.... -test 283, expected result: EQ -mixed a() { return ({'f','o','o'})[1]; } -mixed b() { return 'o'; } -.... -test 284, expected result: EQ -mixed a() { return ({'f','o','o'})[2]; } -mixed b() { return 'o'; } -.... -test 285, expected result: EQ -mixed a() { return ({'f','o','o'})[-1]; } -mixed b() { return 'o'; } -.... -test 286, expected result: EQ -mixed a() { return ({'f','o','o'})[-2]; } -mixed b() { return 'o'; } -.... -test 287, expected result: EQ -mixed a() { return ({'f','o','o'})[-3]; } -mixed b() { return 'f'; } -.... -test 288, expected result: EQ -mixed a() { return ([0:'f',1:'o',2:'o'])[0]; } -mixed b() { return 'f'; } -.... -test 289, expected result: EQ -mixed a() { return ([0:'f',1:'o',2:'o'])[1]; } -mixed b() { return 'o'; } -.... -test 290, expected result: EQ -mixed a() { return ([0:'f',1:'o',2:'o'])[2]; } -mixed b() { return 'o'; } -.... -test 291, expected result: EQ -mixed a() { return ([0:'f',1:'o',2:'o'])[3]; } -mixed b() { return 0; } -.... -test 292, expected result: EQ -mixed a() { return ([0:'f',1:'o',2:'o'])[-1]; } -mixed b() { return 0; } -.... -test 293, expected result: EQ -mixed a() { return (<'f','o','o'>)['o']; } -mixed b() { return 1; } -.... -test 294, expected result: EQ -mixed a() { return (<'f','o','o'>)['f']; } -mixed b() { return 1; } -.... -test 295, expected result: EQ -mixed a() { return (<'f','o','o'>)['b']; } -mixed b() { return 0; } -.... -test 296, expected result: EQ -mixed a() { return (<'f','o','o'>)[-1]; } -mixed b() { return 0; } -.... -test 297, expected result: EQ -mixed a() { mixed a=({1}); a[0]=2; return equal(a,({2})); } -mixed b() { return 1; } -.... -test 298, expected result: EQ -mixed a() { mixed a=(<1>); a[1]=2; return equal(a,(<1>)); } -mixed b() { return 1; } -.... -test 299, expected result: EQ -mixed a() { mixed a=(<1>); a[0]=2; return equal(a,(<1,0>)); } -mixed b() { return 1; } -.... -test 300, expected result: EQ -mixed a() { mixed a=(<1>); a[1]=0; return equal(a,(<>)); } -mixed b() { return 1; } -.... -test 301, expected result: EQ -mixed a() { mixed a=(<1>); a[0]=0; return equal(a,(<1>)); } -mixed b() { return 1; } -.... -test 302, expected result: EQ -mixed a() { mixed a=([1:1]); a[0]=0; return equal(a,([1:1,0:0])); } -mixed b() { return 1; } -.... -test 303, expected result: EQ -mixed a() { mixed a=([1:1]); a[1]=0; return equal(a,([1:0])); } -mixed b() { return 1; } -.... -test 304, expected result: RUN -void a() { master()->add_precompiled_program("/test",class { - public int q,w,e,r; mixed t; mixed getw() { return w; } void setw(int _) { w=_; } -});} -.... -test 305, expected result: EQ -mixed a() { return clone((program)"/test")->q; } -mixed b() { return 0; } -.... -test 306, expected result: EQ -mixed a() { return clone((program)"/test")->w; } -mixed b() { return 0; } -.... -test 307, expected result: EQ -mixed a() { return clone((program)"/test")->e; } -mixed b() { return 0; } -.... -test 308, expected result: EQ -mixed a() { return clone((program)"/test")->r; } -mixed b() { return 0; } -.... -test 309, expected result: EQ -mixed a() { return clone((program)"/test")->getw(); } -mixed b() { return 0; } -.... -test 310, expected result: EQ -mixed a() { object o=clone((program)"/test"); o->setw(17); return o->w; } -mixed b() { return 17; } -.... -test 311, expected result: EQ -mixed a() { object o=clone((program)"/test"); o->w=17; return o->getw(); } -mixed b() { return 17; } -.... -test 312, expected result: EQ -mixed a() { return clone((program)"/test")["q"]; } -mixed b() { return 0; } -.... -test 313, expected result: EQ -mixed a() { return clone((program)"/test")["w"]; } -mixed b() { return 0; } -.... -test 314, expected result: EQ -mixed a() { return clone((program)"/test")["e"]; } -mixed b() { return 0; } -.... -test 315, expected result: EQ -mixed a() { return clone((program)"/test")["r"]; } -mixed b() { return 0; } -.... -test 316, expected result: EQ -mixed a() { return clone((program)"/test")["getw"](); } -mixed b() { return 0; } -.... -test 317, expected result: EQ -mixed a() { object o=clone((program)"/test"); o["setw"](17); return o["w"]; } -mixed b() { return 17; } -.... -test 318, expected result: EQ -mixed a() { object o=clone((program)"/test"); o["w"]=17; return o["getw"](); } -mixed b() { return 17; } -.... -test 319, expected result: EQ -mixed a() { return "foObar"[0..0]; } -mixed b() { return "f"; } -.... -test 320, expected result: EQ -mixed a() { return "foobargazonk"[3..5]; } -mixed b() { return "bar"; } -.... -test 321, expected result: EQ -mixed a() { return "foo"[1..10]; } -mixed b() { return "oo"; } -.... -test 322, expected result: EQ -mixed a() { return "foo"[-100..0]; } -mixed b() { return "f"; } -.... -test 323, expected result: EQ -mixed a() { return "foo"[-100..100]; } -mixed b() { return "foo"; } -.... -test 324, expected result: EQ -mixed a() { return "foo"[1..0]; } -mixed b() { return ""; } -.... -test 325, expected result: EQ -mixed a() { return "foo"[0..-100]; } -mixed b() { return ""; } -.... -test 326, expected result: EQUAL -mixed a() { return ({1,2,3})[0..0]; } -mixed b() { return ({1}); } -.... -test 327, expected result: EQUAL -mixed a() { return ({1,2,3})[1..2]; } -mixed b() { return ({2,3}); } -.... -test 328, expected result: EQUAL -mixed a() { return ({1,2,3})[2..10]; } -mixed b() { return ({3}); } -.... -test 329, expected result: EQUAL -mixed a() { return ({1,2,3})[-100..0]; } -mixed b() { return ({1}); } -.... -test 330, expected result: EQUAL -mixed a() { return ({1,2,3})[-100..100]; } -mixed b() { return ({1,2,3}); } -.... -test 331, expected result: EQUAL -mixed a() { return ({1,2,3})[1..0]; } -mixed b() { return ({}); } -.... -test 332, expected result: EQUAL -mixed a() { return ({1,2,3})[0..-100]; } -mixed b() { return ({}); } -.... -test 333, expected result: EQUAL -mixed a() { return ({1,2,3}); } -mixed b() { return lambda(mixed ... x) { return x; }(@a()); } -.... -test 334, expected result: EQUAL -mixed a() { return explode("foo",""); } -mixed b() { return lambda(mixed ... x) { return x; }(@a()); } -.... -test 335, expected result: EQ -mixed a() { mixed *a=({1,2,3}); return lambda(mixed ... x) { return x; }(@a) !=a; } -mixed b() { return 1; } -.... -test 336, expected result: EQ -mixed a() { int a=1; a+=10; return a; } -mixed b() { return 11; } -.... -test 337, expected result: EQ -mixed a() { int a=1; a-=10; return a; } -mixed b() { return -9; } -.... -test 338, expected result: EQ -mixed a() { int a=3; a&=10; return a; } -mixed b() { return 2; } -.... -test 339, expected result: EQ -mixed a() { int a=3; a|=10; return a; } -mixed b() { return 11; } -.... -test 340, expected result: EQ -mixed a() { int a=3; a^=10; return a; } -mixed b() { return 9; } -.... -test 341, expected result: EQ -mixed a() { int a=3; a<<=2; return a; } -mixed b() { return 12; } -.... -test 342, expected result: EQ -mixed a() { int a=12; a>>=2; return a; } -mixed b() { return 3; } -.... -test 343, expected result: EQ -mixed a() { int a=12; a*=2; return a; } -mixed b() { return 24; } -.... -test 344, expected result: EQ -mixed a() { int a=12; a/=2; return a; } -mixed b() { return 6; } -.... -test 345, expected result: EQ -mixed a() { int a=12; a%=7; return a; } -mixed b() { return 5; } -.... -test 346, expected result: EQ -mixed a() { return 1; } -mixed b() { return 1; } -.... -test 347, expected result: EQ -mixed a() { return lambda(){return 1;} (); } -mixed b() { return 1 ; } -.... -test 348, expected result: EQ -mixed a() { if(0) return 0; else return 1; } -mixed b() { return 1; } -.... -test 349, expected result: EQ -mixed a() { if(0) return 0; return 1; } -mixed b() { return 1; } -.... -test 350, expected result: EQ -mixed a() { if(1) return 1; else return 0; } -mixed b() { return 1; } -.... -test 351, expected result: EQ -mixed a() { if("") return 1; else return 0; } -mixed b() { return 1; } -.... -test 352, expected result: EQ -mixed a() { if(!0) return 1; else return 0; } -mixed b() { return 1; } -.... -test 353, expected result: EQ -mixed a() { if(!(!1)) return 1; else return 0; } -mixed b() { return 1; } -.... -test 354, expected result: EQ -mixed a() { if(this_object()) return 1; else return 0; } -mixed b() { return 1; } -.... -test 355, expected result: EQ -mixed a() { if(a) return 1; else return 0; } -mixed b() { return 1; } -.... -test 356, expected result: EQ -mixed a() { if(0.0) return 1; else return 0; } -mixed b() { return 1; } -.... -test 357, expected result: EQ -mixed a() { if(([])) return 1; else return 0; } -mixed b() { return 1; } -.... -test 358, expected result: EQ -mixed a() { if(({})) return 1; else return 0; } -mixed b() { return 1; } -.... -test 359, expected result: EQ -mixed a() { if((<>)) return 1; else return 0; } -mixed b() { return 1; } -.... -test 360, expected result: EQ -mixed a() { if(object_program(this_object())) return 1; else return 0; } -mixed b() { return 1; } -.... -test 361, expected result: EQ -mixed a() { while(1) break; return 1; } -mixed b() { return 1; } -.... -test 362, expected result: EQ -mixed a() { while(1) if(1) break; return 1; } -mixed b() { return 1; } -.... -test 363, expected result: EQ -mixed a() { int e; for(e=0;e<10;e++) break; return e; } -mixed b() { return 0; } -.... -test 364, expected result: EQ -mixed a() { int e; for(e=0;e<10;e++) continue; return e; } -mixed b() { return 10; } -.... -test 365, expected result: EQ -mixed a() { int e;string t=""; for(e=0;e<10;e++) t+=e; return t; } -mixed b() { return "0123456789"; } -.... -test 366, expected result: EQ -mixed a() { int e;string t=""; for(e=0;e>-10;e--) t+=e; return t; } -mixed b() { return "0-1-2-3-4-5-6-7-8-9"; } -.... -test 367, expected result: EQ -mixed a() { int e;string t=""; foreach(({7,6,3,8}),e) t+=e; return t; } -mixed b() { return "7638"; } -.... -test 368, expected result: EQ -mixed a() { string s;if(1) foreach(({}),s); else foreach(({}),s); return 1; } -mixed b() { return 1; } -.... -test 369, expected result: EQ -mixed a() { int e;string t=""; e=0; do{ t+=e; }while(++e<6); return t; } -mixed b() { return "012345";; } -.... -test 370, expected result: EQ -mixed a() { int e;string t=""; e=8; while(--e) t+=e; return t; } -mixed b() { return "7654321";; } -.... -test 371, expected result: EQ -mixed a() { int e;string t=""; e=8; while(e--) t+=e; return t; } -mixed b() { return "76543210";; } -.... -test 372, expected result: EQ -mixed a() { int e;string t=""; e=0; while(++e<6) t+=e; return t; } -mixed b() { return "12345";; } -.... -test 373, expected result: EQ -mixed a() { int e=1;string t=""; while(e<20){t+=e;e*=2;} return t; } -mixed b() { return "124816";; } -.... -test 374, expected result: EQ -mixed a() { switch("") { case 0: case "gazonk": return 0; } return 1; } -mixed b() { return 1; } -.... -test 375, expected result: EQ -mixed a() { switch("") { case "gazonk": case 0: return 0; } return 1; } -mixed b() { return 1; } -.... -test 376, expected result: EQ -mixed a() { switch(0) { case 0: case "gazonk": return 0; } return 1; } -mixed b() { return 0; } -.... -test 377, expected result: EQ -mixed a() { switch("gazonk") { case "gazonk": case 0: return 0; } return 1; } -mixed b() { return 0; } -.... -test 378, expected result: EQ -mixed a() { switch(0) { case "": } return 1; } -mixed b() { return 1; } -.... -test 379, expected result: EQ -mixed a() { switch(1) { case 1: return 1; default: } return 0; } -mixed b() { return 1; } -.... -test 380, expected result: EQ -mixed a() { switch(2) { case 1: return 0; default: return 1;} return 0; } -mixed b() { return 1; } -.... -test 381, expected result: EQ -mixed a() { switch(1) { default: return 0; case 1: return 1; } return 0; } -mixed b() { return 1; } -.... -test 382, expected result: EQ -mixed a() { switch(2) { default: return 1; case 1: return 0; } return 0; } -mixed b() { return 1; } -.... -test 383, expected result: EQ -mixed a() { switch(0) { case "apa": case 1.0: return 0; } return 1; } -mixed b() { return 1; } -.... -test 384, expected result: EQ -mixed a() { switch("apa") { case "apa": return 1; case 1.0: } return 0; } -mixed b() { return 1; } -.... -test 385, expected result: EQ -mixed a() { switch(1.0) { case "apa": return 0; case 1.0: return 1; } return 0; } -mixed b() { return 1; } -.... -test 386, expected result: EQ -mixed a() { switch("sune") { case "gunnel": return 0; case "gunnar": return 1; case "sune": case "gusten": return 0; } return 0; } -mixed b() { return 0; } -.... -test 387, expected result: EQ -mixed a() { switch("a") { case "a": return 1; case "b": case "c": case "d": case 'a': case '1': case '0': default: } return 0; } -mixed b() { return 1; } -.... -test 388, expected result: EQ -mixed a() { switch("b") { case "a": return 0; case "b": return 1; case "c": case "d": case 'a': case '1': case '0': default: } return 0; } -mixed b() { return 1; } -.... -test 389, expected result: EQ -mixed a() { switch("c") { case "a": case "b": return 0; case "c": return 1; case "d": case 'a': case '1': case '0': default: } return 0; } -mixed b() { return 1; } -.... -test 390, expected result: EQ -mixed a() { switch("d") { case "a": case "b": case "c": return 0; case "d": return 1; case 'a': case '1': case '0': default: } return 0; } -mixed b() { return 1; } -.... -test 391, expected result: EQ -mixed a() { switch('a') { case "a": case "b": case "c": case "d": return 0; case 'a': return 1; case '1': case '0': default: } return 0; } -mixed b() { return 1; } -.... -test 392, expected result: EQ -mixed a() { switch('1') { case "a": case "b": case "c": case "d": case 'a': return 0; case '1': return 1; case '0': default: } return 0; } -mixed b() { return 1; } -.... -test 393, expected result: EQ -mixed a() { switch('0') { case "a": case "b": case "c": case "d": case 'a': case '1': return 0; case '0': return 1; default: } return 0; } -mixed b() { return 1; } -.... -test 394, expected result: EQ -mixed a() { switch("a") { case "a": return 1; case "b": return 2; case "c": return 3; case "d": return 4; case 'a': return 5; case '1': return 6; case '0': return 7; default: return 8; } return 9; } -mixed b() { return 1; } -.... -test 395, expected result: EQ -mixed a() { switch("b") { case "a": return 1; case "b": return 2; case "c": return 3; case "d": return 4; case 'a': return 5; case '1': return 6; case '0': return 7; default: return 8; } return 9; } -mixed b() { return 2; } -.... -test 396, expected result: EQ -mixed a() { switch("c") { case "a": return 1; case "b": return 2; case "c": return 3; case "d": return 4; case 'a': return 5; case '1': return 6; case '0': return 7; default: return 8; } return 9; } -mixed b() { return 3; } -.... -test 397, expected result: EQ -mixed a() { switch("d") { case "a": return 1; case "b": return 2; case "c": return 3; case "d": return 4; case 'a': return 5; case '1': return 6; case '0': return 7; default: return 8; } return 9; } -mixed b() { return 4; } -.... -test 398, expected result: EQ -mixed a() { switch('a') { case "a": return 1; case "b": return 2; case "c": return 3; case "d": return 4; case 'a': return 5; case '1': return 6; case '0': return 7; default: return 8; } return 9; } -mixed b() { return 5; } -.... -test 399, expected result: EQ -mixed a() { switch('1') { case "a": return 1; case "b": return 2; case "c": return 3; case "d": return 4; case 'a': return 5; case '1': return 6; case '0': return 7; default: return 8; } return 9; } -mixed b() { return 6; } -.... -test 400, expected result: EQ -mixed a() { switch('0') { case "a": return 1; case "b": return 2; case "c": return 3; case "d": return 4; case 'a': return 5; case '1': return 6; case '0': return 7; default: return 8; } return 9; } -mixed b() { return 7; } -.... -test 401, expected result: EQ -mixed a() { switch('9') { case "a": return 1; case "b": return 2; case "c": return 3; case "d": return 4; case 'a': return 5; case '1': return 6; case '0': return 7; default: return 8; } return 9; } -mixed b() { return 8; } -.... -test 402, expected result: EQ -mixed a() { switch(17) { case 18: return 2; case 19: return 3; case 20: return 4; case 21: return 5; } return 0; } -mixed b() { return 0; } -.... -test 403, expected result: EQ -mixed a() { switch(17) { default: return 0; case 18: return 2; case 19: return 3; case 20: return 4; case 21: return 5; } return -1; } -mixed b() { return 0; } -.... -test 404, expected result: EQ -mixed a() { switch(17) { case 18: return 2; default: return 0; case 19: return 3; case 20: return 4; case 21: return 5; } return -1; } -mixed b() { return 0; } -.... -test 405, expected result: EQ -mixed a() { switch(17) { case 18: return 2; case 19: return 3; default: return 0; case 20: return 4; case 21: return 5; } return -1; } -mixed b() { return 0; } -.... -test 406, expected result: EQ -mixed a() { switch(17) { case 18: return 2; case 19: return 3; case 20: return 4; default: return 0; case 21: return 5; } return -1; } -mixed b() { return 0; } -.... -test 407, expected result: EQ -mixed a() { switch(17) { case 18: return 2; case 19: return 3; case 20: return 4; case 21: return 5; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 408, expected result: EQ -mixed a() { switch(17) { case 18: return 2; case 19: return 3; case 21: return 5; case 20: return 4; } return 0; } -mixed b() { return 0; } -.... -test 409, expected result: EQ -mixed a() { switch(17) { default: return 0; case 18: return 2; case 19: return 3; case 21: return 5; case 20: return 4; } return -1; } -mixed b() { return 0; } -.... -test 410, expected result: EQ -mixed a() { switch(17) { case 18: return 2; default: return 0; case 19: return 3; case 21: return 5; case 20: return 4; } return -1; } -mixed b() { return 0; } -.... -test 411, expected result: EQ -mixed a() { switch(17) { case 18: return 2; case 19: return 3; default: return 0; case 21: return 5; case 20: return 4; } return -1; } -mixed b() { return 0; } -.... -test 412, expected result: EQ -mixed a() { switch(17) { case 18: return 2; case 19: return 3; case 21: return 5; default: return 0; case 20: return 4; } return -1; } -mixed b() { return 0; } -.... -test 413, expected result: EQ -mixed a() { switch(17) { case 18: return 2; case 19: return 3; case 21: return 5; case 20: return 4; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 414, expected result: EQ -mixed a() { switch(17) { case 18: return 2; case 20: return 4; case 19: return 3; case 21: return 5; } return 0; } -mixed b() { return 0; } -.... -test 415, expected result: EQ -mixed a() { switch(17) { default: return 0; case 18: return 2; case 20: return 4; case 19: return 3; case 21: return 5; } return -1; } -mixed b() { return 0; } -.... -test 416, expected result: EQ -mixed a() { switch(17) { case 18: return 2; default: return 0; case 20: return 4; case 19: return 3; case 21: return 5; } return -1; } -mixed b() { return 0; } -.... -test 417, expected result: EQ -mixed a() { switch(17) { case 18: return 2; case 20: return 4; default: return 0; case 19: return 3; case 21: return 5; } return -1; } -mixed b() { return 0; } -.... -test 418, expected result: EQ -mixed a() { switch(17) { case 18: return 2; case 20: return 4; case 19: return 3; default: return 0; case 21: return 5; } return -1; } -mixed b() { return 0; } -.... -test 419, expected result: EQ -mixed a() { switch(17) { case 18: return 2; case 20: return 4; case 19: return 3; case 21: return 5; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 420, expected result: EQ -mixed a() { switch(17) { case 18: return 2; case 20: return 4; case 21: return 5; case 19: return 3; } return 0; } -mixed b() { return 0; } -.... -test 421, expected result: EQ -mixed a() { switch(17) { default: return 0; case 18: return 2; case 20: return 4; case 21: return 5; case 19: return 3; } return -1; } -mixed b() { return 0; } -.... -test 422, expected result: EQ -mixed a() { switch(17) { case 18: return 2; default: return 0; case 20: return 4; case 21: return 5; case 19: return 3; } return -1; } -mixed b() { return 0; } -.... -test 423, expected result: EQ -mixed a() { switch(17) { case 18: return 2; case 20: return 4; default: return 0; case 21: return 5; case 19: return 3; } return -1; } -mixed b() { return 0; } -.... -test 424, expected result: EQ -mixed a() { switch(17) { case 18: return 2; case 20: return 4; case 21: return 5; default: return 0; case 19: return 3; } return -1; } -mixed b() { return 0; } -.... -test 425, expected result: EQ -mixed a() { switch(17) { case 18: return 2; case 20: return 4; case 21: return 5; case 19: return 3; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 426, expected result: EQ -mixed a() { switch(17) { case 18: return 2; case 21: return 5; case 20: return 4; case 19: return 3; } return 0; } -mixed b() { return 0; } -.... -test 427, expected result: EQ -mixed a() { switch(17) { default: return 0; case 18: return 2; case 21: return 5; case 20: return 4; case 19: return 3; } return -1; } -mixed b() { return 0; } -.... -test 428, expected result: EQ -mixed a() { switch(17) { case 18: return 2; default: return 0; case 21: return 5; case 20: return 4; case 19: return 3; } return -1; } -mixed b() { return 0; } -.... -test 429, expected result: EQ -mixed a() { switch(17) { case 18: return 2; case 21: return 5; default: return 0; case 20: return 4; case 19: return 3; } return -1; } -mixed b() { return 0; } -.... -test 430, expected result: EQ -mixed a() { switch(17) { case 18: return 2; case 21: return 5; case 20: return 4; default: return 0; case 19: return 3; } return -1; } -mixed b() { return 0; } -.... -test 431, expected result: EQ -mixed a() { switch(17) { case 18: return 2; case 21: return 5; case 20: return 4; case 19: return 3; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 432, expected result: EQ -mixed a() { switch(17) { case 18: return 2; case 21: return 5; case 19: return 3; case 20: return 4; } return 0; } -mixed b() { return 0; } -.... -test 433, expected result: EQ -mixed a() { switch(17) { default: return 0; case 18: return 2; case 21: return 5; case 19: return 3; case 20: return 4; } return -1; } -mixed b() { return 0; } -.... -test 434, expected result: EQ -mixed a() { switch(17) { case 18: return 2; default: return 0; case 21: return 5; case 19: return 3; case 20: return 4; } return -1; } -mixed b() { return 0; } -.... -test 435, expected result: EQ -mixed a() { switch(17) { case 18: return 2; case 21: return 5; default: return 0; case 19: return 3; case 20: return 4; } return -1; } -mixed b() { return 0; } -.... -test 436, expected result: EQ -mixed a() { switch(17) { case 18: return 2; case 21: return 5; case 19: return 3; default: return 0; case 20: return 4; } return -1; } -mixed b() { return 0; } -.... -test 437, expected result: EQ -mixed a() { switch(17) { case 18: return 2; case 21: return 5; case 19: return 3; case 20: return 4; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 438, expected result: EQ -mixed a() { switch(17) { case 19: return 3; case 18: return 2; case 20: return 4; case 21: return 5; } return 0; } -mixed b() { return 0; } -.... -test 439, expected result: EQ -mixed a() { switch(17) { default: return 0; case 19: return 3; case 18: return 2; case 20: return 4; case 21: return 5; } return -1; } -mixed b() { return 0; } -.... -test 440, expected result: EQ -mixed a() { switch(17) { case 19: return 3; default: return 0; case 18: return 2; case 20: return 4; case 21: return 5; } return -1; } -mixed b() { return 0; } -.... -test 441, expected result: EQ -mixed a() { switch(17) { case 19: return 3; case 18: return 2; default: return 0; case 20: return 4; case 21: return 5; } return -1; } -mixed b() { return 0; } -.... -test 442, expected result: EQ -mixed a() { switch(17) { case 19: return 3; case 18: return 2; case 20: return 4; default: return 0; case 21: return 5; } return -1; } -mixed b() { return 0; } -.... -test 443, expected result: EQ -mixed a() { switch(17) { case 19: return 3; case 18: return 2; case 20: return 4; case 21: return 5; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 444, expected result: EQ -mixed a() { switch(17) { case 19: return 3; case 18: return 2; case 21: return 5; case 20: return 4; } return 0; } -mixed b() { return 0; } -.... -test 445, expected result: EQ -mixed a() { switch(17) { default: return 0; case 19: return 3; case 18: return 2; case 21: return 5; case 20: return 4; } return -1; } -mixed b() { return 0; } -.... -test 446, expected result: EQ -mixed a() { switch(17) { case 19: return 3; default: return 0; case 18: return 2; case 21: return 5; case 20: return 4; } return -1; } -mixed b() { return 0; } -.... -test 447, expected result: EQ -mixed a() { switch(17) { case 19: return 3; case 18: return 2; default: return 0; case 21: return 5; case 20: return 4; } return -1; } -mixed b() { return 0; } -.... -test 448, expected result: EQ -mixed a() { switch(17) { case 19: return 3; case 18: return 2; case 21: return 5; default: return 0; case 20: return 4; } return -1; } -mixed b() { return 0; } -.... -test 449, expected result: EQ -mixed a() { switch(17) { case 19: return 3; case 18: return 2; case 21: return 5; case 20: return 4; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 450, expected result: EQ -mixed a() { switch(17) { case 19: return 3; case 20: return 4; case 18: return 2; case 21: return 5; } return 0; } -mixed b() { return 0; } -.... -test 451, expected result: EQ -mixed a() { switch(17) { default: return 0; case 19: return 3; case 20: return 4; case 18: return 2; case 21: return 5; } return -1; } -mixed b() { return 0; } -.... -test 452, expected result: EQ -mixed a() { switch(17) { case 19: return 3; default: return 0; case 20: return 4; case 18: return 2; case 21: return 5; } return -1; } -mixed b() { return 0; } -.... -test 453, expected result: EQ -mixed a() { switch(17) { case 19: return 3; case 20: return 4; default: return 0; case 18: return 2; case 21: return 5; } return -1; } -mixed b() { return 0; } -.... -test 454, expected result: EQ -mixed a() { switch(17) { case 19: return 3; case 20: return 4; case 18: return 2; default: return 0; case 21: return 5; } return -1; } -mixed b() { return 0; } -.... -test 455, expected result: EQ -mixed a() { switch(17) { case 19: return 3; case 20: return 4; case 18: return 2; case 21: return 5; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 456, expected result: EQ -mixed a() { switch(17) { case 19: return 3; case 20: return 4; case 21: return 5; case 18: return 2; } return 0; } -mixed b() { return 0; } -.... -test 457, expected result: EQ -mixed a() { switch(17) { default: return 0; case 19: return 3; case 20: return 4; case 21: return 5; case 18: return 2; } return -1; } -mixed b() { return 0; } -.... -test 458, expected result: EQ -mixed a() { switch(17) { case 19: return 3; default: return 0; case 20: return 4; case 21: return 5; case 18: return 2; } return -1; } -mixed b() { return 0; } -.... -test 459, expected result: EQ -mixed a() { switch(17) { case 19: return 3; case 20: return 4; default: return 0; case 21: return 5; case 18: return 2; } return -1; } -mixed b() { return 0; } -.... -test 460, expected result: EQ -mixed a() { switch(17) { case 19: return 3; case 20: return 4; case 21: return 5; default: return 0; case 18: return 2; } return -1; } -mixed b() { return 0; } -.... -test 461, expected result: EQ -mixed a() { switch(17) { case 19: return 3; case 20: return 4; case 21: return 5; case 18: return 2; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 462, expected result: EQ -mixed a() { switch(17) { case 19: return 3; case 21: return 5; case 20: return 4; case 18: return 2; } return 0; } -mixed b() { return 0; } -.... -test 463, expected result: EQ -mixed a() { switch(17) { default: return 0; case 19: return 3; case 21: return 5; case 20: return 4; case 18: return 2; } return -1; } -mixed b() { return 0; } -.... -test 464, expected result: EQ -mixed a() { switch(17) { case 19: return 3; default: return 0; case 21: return 5; case 20: return 4; case 18: return 2; } return -1; } -mixed b() { return 0; } -.... -test 465, expected result: EQ -mixed a() { switch(17) { case 19: return 3; case 21: return 5; default: return 0; case 20: return 4; case 18: return 2; } return -1; } -mixed b() { return 0; } -.... -test 466, expected result: EQ -mixed a() { switch(17) { case 19: return 3; case 21: return 5; case 20: return 4; default: return 0; case 18: return 2; } return -1; } -mixed b() { return 0; } -.... -test 467, expected result: EQ -mixed a() { switch(17) { case 19: return 3; case 21: return 5; case 20: return 4; case 18: return 2; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 468, expected result: EQ -mixed a() { switch(17) { case 19: return 3; case 21: return 5; case 18: return 2; case 20: return 4; } return 0; } -mixed b() { return 0; } -.... -test 469, expected result: EQ -mixed a() { switch(17) { default: return 0; case 19: return 3; case 21: return 5; case 18: return 2; case 20: return 4; } return -1; } -mixed b() { return 0; } -.... -test 470, expected result: EQ -mixed a() { switch(17) { case 19: return 3; default: return 0; case 21: return 5; case 18: return 2; case 20: return 4; } return -1; } -mixed b() { return 0; } -.... -test 471, expected result: EQ -mixed a() { switch(17) { case 19: return 3; case 21: return 5; default: return 0; case 18: return 2; case 20: return 4; } return -1; } -mixed b() { return 0; } -.... -test 472, expected result: EQ -mixed a() { switch(17) { case 19: return 3; case 21: return 5; case 18: return 2; default: return 0; case 20: return 4; } return -1; } -mixed b() { return 0; } -.... -test 473, expected result: EQ -mixed a() { switch(17) { case 19: return 3; case 21: return 5; case 18: return 2; case 20: return 4; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 474, expected result: EQ -mixed a() { switch(17) { case 20: return 4; case 19: return 3; case 18: return 2; case 21: return 5; } return 0; } -mixed b() { return 0; } -.... -test 475, expected result: EQ -mixed a() { switch(17) { default: return 0; case 20: return 4; case 19: return 3; case 18: return 2; case 21: return 5; } return -1; } -mixed b() { return 0; } -.... -test 476, expected result: EQ -mixed a() { switch(17) { case 20: return 4; default: return 0; case 19: return 3; case 18: return 2; case 21: return 5; } return -1; } -mixed b() { return 0; } -.... -test 477, expected result: EQ -mixed a() { switch(17) { case 20: return 4; case 19: return 3; default: return 0; case 18: return 2; case 21: return 5; } return -1; } -mixed b() { return 0; } -.... -test 478, expected result: EQ -mixed a() { switch(17) { case 20: return 4; case 19: return 3; case 18: return 2; default: return 0; case 21: return 5; } return -1; } -mixed b() { return 0; } -.... -test 479, expected result: EQ -mixed a() { switch(17) { case 20: return 4; case 19: return 3; case 18: return 2; case 21: return 5; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 480, expected result: EQ -mixed a() { switch(17) { case 20: return 4; case 19: return 3; case 21: return 5; case 18: return 2; } return 0; } -mixed b() { return 0; } -.... -test 481, expected result: EQ -mixed a() { switch(17) { default: return 0; case 20: return 4; case 19: return 3; case 21: return 5; case 18: return 2; } return -1; } -mixed b() { return 0; } -.... -test 482, expected result: EQ -mixed a() { switch(17) { case 20: return 4; default: return 0; case 19: return 3; case 21: return 5; case 18: return 2; } return -1; } -mixed b() { return 0; } -.... -test 483, expected result: EQ -mixed a() { switch(17) { case 20: return 4; case 19: return 3; default: return 0; case 21: return 5; case 18: return 2; } return -1; } -mixed b() { return 0; } -.... -test 484, expected result: EQ -mixed a() { switch(17) { case 20: return 4; case 19: return 3; case 21: return 5; default: return 0; case 18: return 2; } return -1; } -mixed b() { return 0; } -.... -test 485, expected result: EQ -mixed a() { switch(17) { case 20: return 4; case 19: return 3; case 21: return 5; case 18: return 2; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 486, expected result: EQ -mixed a() { switch(17) { case 20: return 4; case 18: return 2; case 19: return 3; case 21: return 5; } return 0; } -mixed b() { return 0; } -.... -test 487, expected result: EQ -mixed a() { switch(17) { default: return 0; case 20: return 4; case 18: return 2; case 19: return 3; case 21: return 5; } return -1; } -mixed b() { return 0; } -.... -test 488, expected result: EQ -mixed a() { switch(17) { case 20: return 4; default: return 0; case 18: return 2; case 19: return 3; case 21: return 5; } return -1; } -mixed b() { return 0; } -.... -test 489, expected result: EQ -mixed a() { switch(17) { case 20: return 4; case 18: return 2; default: return 0; case 19: return 3; case 21: return 5; } return -1; } -mixed b() { return 0; } -.... -test 490, expected result: EQ -mixed a() { switch(17) { case 20: return 4; case 18: return 2; case 19: return 3; default: return 0; case 21: return 5; } return -1; } -mixed b() { return 0; } -.... -test 491, expected result: EQ -mixed a() { switch(17) { case 20: return 4; case 18: return 2; case 19: return 3; case 21: return 5; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 492, expected result: EQ -mixed a() { switch(17) { case 20: return 4; case 18: return 2; case 21: return 5; case 19: return 3; } return 0; } -mixed b() { return 0; } -.... -test 493, expected result: EQ -mixed a() { switch(17) { default: return 0; case 20: return 4; case 18: return 2; case 21: return 5; case 19: return 3; } return -1; } -mixed b() { return 0; } -.... -test 494, expected result: EQ -mixed a() { switch(17) { case 20: return 4; default: return 0; case 18: return 2; case 21: return 5; case 19: return 3; } return -1; } -mixed b() { return 0; } -.... -test 495, expected result: EQ -mixed a() { switch(17) { case 20: return 4; case 18: return 2; default: return 0; case 21: return 5; case 19: return 3; } return -1; } -mixed b() { return 0; } -.... -test 496, expected result: EQ -mixed a() { switch(17) { case 20: return 4; case 18: return 2; case 21: return 5; default: return 0; case 19: return 3; } return -1; } -mixed b() { return 0; } -.... -test 497, expected result: EQ -mixed a() { switch(17) { case 20: return 4; case 18: return 2; case 21: return 5; case 19: return 3; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 498, expected result: EQ -mixed a() { switch(17) { case 20: return 4; case 21: return 5; case 18: return 2; case 19: return 3; } return 0; } -mixed b() { return 0; } -.... -test 499, expected result: EQ -mixed a() { switch(17) { default: return 0; case 20: return 4; case 21: return 5; case 18: return 2; case 19: return 3; } return -1; } -mixed b() { return 0; } -.... -test 500, expected result: EQ -mixed a() { switch(17) { case 20: return 4; default: return 0; case 21: return 5; case 18: return 2; case 19: return 3; } return -1; } -mixed b() { return 0; } -.... -test 501, expected result: EQ -mixed a() { switch(17) { case 20: return 4; case 21: return 5; default: return 0; case 18: return 2; case 19: return 3; } return -1; } -mixed b() { return 0; } -.... -test 502, expected result: EQ -mixed a() { switch(17) { case 20: return 4; case 21: return 5; case 18: return 2; default: return 0; case 19: return 3; } return -1; } -mixed b() { return 0; } -.... -test 503, expected result: EQ -mixed a() { switch(17) { case 20: return 4; case 21: return 5; case 18: return 2; case 19: return 3; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 504, expected result: EQ -mixed a() { switch(17) { case 20: return 4; case 21: return 5; case 19: return 3; case 18: return 2; } return 0; } -mixed b() { return 0; } -.... -test 505, expected result: EQ -mixed a() { switch(17) { default: return 0; case 20: return 4; case 21: return 5; case 19: return 3; case 18: return 2; } return -1; } -mixed b() { return 0; } -.... -test 506, expected result: EQ -mixed a() { switch(17) { case 20: return 4; default: return 0; case 21: return 5; case 19: return 3; case 18: return 2; } return -1; } -mixed b() { return 0; } -.... -test 507, expected result: EQ -mixed a() { switch(17) { case 20: return 4; case 21: return 5; default: return 0; case 19: return 3; case 18: return 2; } return -1; } -mixed b() { return 0; } -.... -test 508, expected result: EQ -mixed a() { switch(17) { case 20: return 4; case 21: return 5; case 19: return 3; default: return 0; case 18: return 2; } return -1; } -mixed b() { return 0; } -.... -test 509, expected result: EQ -mixed a() { switch(17) { case 20: return 4; case 21: return 5; case 19: return 3; case 18: return 2; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 510, expected result: EQ -mixed a() { switch(17) { case 21: return 5; case 19: return 3; case 20: return 4; case 18: return 2; } return 0; } -mixed b() { return 0; } -.... -test 511, expected result: EQ -mixed a() { switch(17) { default: return 0; case 21: return 5; case 19: return 3; case 20: return 4; case 18: return 2; } return -1; } -mixed b() { return 0; } -.... -test 512, expected result: EQ -mixed a() { switch(17) { case 21: return 5; default: return 0; case 19: return 3; case 20: return 4; case 18: return 2; } return -1; } -mixed b() { return 0; } -.... -test 513, expected result: EQ -mixed a() { switch(17) { case 21: return 5; case 19: return 3; default: return 0; case 20: return 4; case 18: return 2; } return -1; } -mixed b() { return 0; } -.... -test 514, expected result: EQ -mixed a() { switch(17) { case 21: return 5; case 19: return 3; case 20: return 4; default: return 0; case 18: return 2; } return -1; } -mixed b() { return 0; } -.... -test 515, expected result: EQ -mixed a() { switch(17) { case 21: return 5; case 19: return 3; case 20: return 4; case 18: return 2; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 516, expected result: EQ -mixed a() { switch(17) { case 21: return 5; case 19: return 3; case 18: return 2; case 20: return 4; } return 0; } -mixed b() { return 0; } -.... -test 517, expected result: EQ -mixed a() { switch(17) { default: return 0; case 21: return 5; case 19: return 3; case 18: return 2; case 20: return 4; } return -1; } -mixed b() { return 0; } -.... -test 518, expected result: EQ -mixed a() { switch(17) { case 21: return 5; default: return 0; case 19: return 3; case 18: return 2; case 20: return 4; } return -1; } -mixed b() { return 0; } -.... -test 519, expected result: EQ -mixed a() { switch(17) { case 21: return 5; case 19: return 3; default: return 0; case 18: return 2; case 20: return 4; } return -1; } -mixed b() { return 0; } -.... -test 520, expected result: EQ -mixed a() { switch(17) { case 21: return 5; case 19: return 3; case 18: return 2; default: return 0; case 20: return 4; } return -1; } -mixed b() { return 0; } -.... -test 521, expected result: EQ -mixed a() { switch(17) { case 21: return 5; case 19: return 3; case 18: return 2; case 20: return 4; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 522, expected result: EQ -mixed a() { switch(17) { case 21: return 5; case 20: return 4; case 19: return 3; case 18: return 2; } return 0; } -mixed b() { return 0; } -.... -test 523, expected result: EQ -mixed a() { switch(17) { default: return 0; case 21: return 5; case 20: return 4; case 19: return 3; case 18: return 2; } return -1; } -mixed b() { return 0; } -.... -test 524, expected result: EQ -mixed a() { switch(17) { case 21: return 5; default: return 0; case 20: return 4; case 19: return 3; case 18: return 2; } return -1; } -mixed b() { return 0; } -.... -test 525, expected result: EQ -mixed a() { switch(17) { case 21: return 5; case 20: return 4; default: return 0; case 19: return 3; case 18: return 2; } return -1; } -mixed b() { return 0; } -.... -test 526, expected result: EQ -mixed a() { switch(17) { case 21: return 5; case 20: return 4; case 19: return 3; default: return 0; case 18: return 2; } return -1; } -mixed b() { return 0; } -.... -test 527, expected result: EQ -mixed a() { switch(17) { case 21: return 5; case 20: return 4; case 19: return 3; case 18: return 2; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 528, expected result: EQ -mixed a() { switch(17) { case 21: return 5; case 20: return 4; case 18: return 2; case 19: return 3; } return 0; } -mixed b() { return 0; } -.... -test 529, expected result: EQ -mixed a() { switch(17) { default: return 0; case 21: return 5; case 20: return 4; case 18: return 2; case 19: return 3; } return -1; } -mixed b() { return 0; } -.... -test 530, expected result: EQ -mixed a() { switch(17) { case 21: return 5; default: return 0; case 20: return 4; case 18: return 2; case 19: return 3; } return -1; } -mixed b() { return 0; } -.... -test 531, expected result: EQ -mixed a() { switch(17) { case 21: return 5; case 20: return 4; default: return 0; case 18: return 2; case 19: return 3; } return -1; } -mixed b() { return 0; } -.... -test 532, expected result: EQ -mixed a() { switch(17) { case 21: return 5; case 20: return 4; case 18: return 2; default: return 0; case 19: return 3; } return -1; } -mixed b() { return 0; } -.... -test 533, expected result: EQ -mixed a() { switch(17) { case 21: return 5; case 20: return 4; case 18: return 2; case 19: return 3; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 534, expected result: EQ -mixed a() { switch(17) { case 21: return 5; case 18: return 2; case 20: return 4; case 19: return 3; } return 0; } -mixed b() { return 0; } -.... -test 535, expected result: EQ -mixed a() { switch(17) { default: return 0; case 21: return 5; case 18: return 2; case 20: return 4; case 19: return 3; } return -1; } -mixed b() { return 0; } -.... -test 536, expected result: EQ -mixed a() { switch(17) { case 21: return 5; default: return 0; case 18: return 2; case 20: return 4; case 19: return 3; } return -1; } -mixed b() { return 0; } -.... -test 537, expected result: EQ -mixed a() { switch(17) { case 21: return 5; case 18: return 2; default: return 0; case 20: return 4; case 19: return 3; } return -1; } -mixed b() { return 0; } -.... -test 538, expected result: EQ -mixed a() { switch(17) { case 21: return 5; case 18: return 2; case 20: return 4; default: return 0; case 19: return 3; } return -1; } -mixed b() { return 0; } -.... -test 539, expected result: EQ -mixed a() { switch(17) { case 21: return 5; case 18: return 2; case 20: return 4; case 19: return 3; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 540, expected result: EQ -mixed a() { switch(17) { case 21: return 5; case 18: return 2; case 19: return 3; case 20: return 4; } return 0; } -mixed b() { return 0; } -.... -test 541, expected result: EQ -mixed a() { switch(17) { default: return 0; case 21: return 5; case 18: return 2; case 19: return 3; case 20: return 4; } return -1; } -mixed b() { return 0; } -.... -test 542, expected result: EQ -mixed a() { switch(17) { case 21: return 5; default: return 0; case 18: return 2; case 19: return 3; case 20: return 4; } return -1; } -mixed b() { return 0; } -.... -test 543, expected result: EQ -mixed a() { switch(17) { case 21: return 5; case 18: return 2; default: return 0; case 19: return 3; case 20: return 4; } return -1; } -mixed b() { return 0; } -.... -test 544, expected result: EQ -mixed a() { switch(17) { case 21: return 5; case 18: return 2; case 19: return 3; default: return 0; case 20: return 4; } return -1; } -mixed b() { return 0; } -.... -test 545, expected result: EQ -mixed a() { switch(17) { case 21: return 5; case 18: return 2; case 19: return 3; case 20: return 4; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 546, expected result: EQ -mixed a() { switch(18) { case 18: return 2; case 19: return 3; case 20: return 4; case 21: return 5; } return 0; } -mixed b() { return 2; } -.... -test 547, expected result: EQ -mixed a() { switch(18) { default: return 0; case 18: return 2; case 19: return 3; case 20: return 4; case 21: return 5; } return -1; } -mixed b() { return 2; } -.... -test 548, expected result: EQ -mixed a() { switch(18) { case 18: return 2; default: return 0; case 19: return 3; case 20: return 4; case 21: return 5; } return -1; } -mixed b() { return 2; } -.... -test 549, expected result: EQ -mixed a() { switch(18) { case 18: return 2; case 19: return 3; default: return 0; case 20: return 4; case 21: return 5; } return -1; } -mixed b() { return 2; } -.... -test 550, expected result: EQ -mixed a() { switch(18) { case 18: return 2; case 19: return 3; case 20: return 4; default: return 0; case 21: return 5; } return -1; } -mixed b() { return 2; } -.... -test 551, expected result: EQ -mixed a() { switch(18) { case 18: return 2; case 19: return 3; case 20: return 4; case 21: return 5; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 552, expected result: EQ -mixed a() { switch(18) { case 18: return 2; case 19: return 3; case 21: return 5; case 20: return 4; } return 0; } -mixed b() { return 2; } -.... -test 553, expected result: EQ -mixed a() { switch(18) { default: return 0; case 18: return 2; case 19: return 3; case 21: return 5; case 20: return 4; } return -1; } -mixed b() { return 2; } -.... -test 554, expected result: EQ -mixed a() { switch(18) { case 18: return 2; default: return 0; case 19: return 3; case 21: return 5; case 20: return 4; } return -1; } -mixed b() { return 2; } -.... -test 555, expected result: EQ -mixed a() { switch(18) { case 18: return 2; case 19: return 3; default: return 0; case 21: return 5; case 20: return 4; } return -1; } -mixed b() { return 2; } -.... -test 556, expected result: EQ -mixed a() { switch(18) { case 18: return 2; case 19: return 3; case 21: return 5; default: return 0; case 20: return 4; } return -1; } -mixed b() { return 2; } -.... -test 557, expected result: EQ -mixed a() { switch(18) { case 18: return 2; case 19: return 3; case 21: return 5; case 20: return 4; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 558, expected result: EQ -mixed a() { switch(18) { case 18: return 2; case 20: return 4; case 19: return 3; case 21: return 5; } return 0; } -mixed b() { return 2; } -.... -test 559, expected result: EQ -mixed a() { switch(18) { default: return 0; case 18: return 2; case 20: return 4; case 19: return 3; case 21: return 5; } return -1; } -mixed b() { return 2; } -.... -test 560, expected result: EQ -mixed a() { switch(18) { case 18: return 2; default: return 0; case 20: return 4; case 19: return 3; case 21: return 5; } return -1; } -mixed b() { return 2; } -.... -test 561, expected result: EQ -mixed a() { switch(18) { case 18: return 2; case 20: return 4; default: return 0; case 19: return 3; case 21: return 5; } return -1; } -mixed b() { return 2; } -.... -test 562, expected result: EQ -mixed a() { switch(18) { case 18: return 2; case 20: return 4; case 19: return 3; default: return 0; case 21: return 5; } return -1; } -mixed b() { return 2; } -.... -test 563, expected result: EQ -mixed a() { switch(18) { case 18: return 2; case 20: return 4; case 19: return 3; case 21: return 5; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 564, expected result: EQ -mixed a() { switch(18) { case 18: return 2; case 20: return 4; case 21: return 5; case 19: return 3; } return 0; } -mixed b() { return 2; } -.... -test 565, expected result: EQ -mixed a() { switch(18) { default: return 0; case 18: return 2; case 20: return 4; case 21: return 5; case 19: return 3; } return -1; } -mixed b() { return 2; } -.... -test 566, expected result: EQ -mixed a() { switch(18) { case 18: return 2; default: return 0; case 20: return 4; case 21: return 5; case 19: return 3; } return -1; } -mixed b() { return 2; } -.... -test 567, expected result: EQ -mixed a() { switch(18) { case 18: return 2; case 20: return 4; default: return 0; case 21: return 5; case 19: return 3; } return -1; } -mixed b() { return 2; } -.... -test 568, expected result: EQ -mixed a() { switch(18) { case 18: return 2; case 20: return 4; case 21: return 5; default: return 0; case 19: return 3; } return -1; } -mixed b() { return 2; } -.... -test 569, expected result: EQ -mixed a() { switch(18) { case 18: return 2; case 20: return 4; case 21: return 5; case 19: return 3; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 570, expected result: EQ -mixed a() { switch(18) { case 18: return 2; case 21: return 5; case 20: return 4; case 19: return 3; } return 0; } -mixed b() { return 2; } -.... -test 571, expected result: EQ -mixed a() { switch(18) { default: return 0; case 18: return 2; case 21: return 5; case 20: return 4; case 19: return 3; } return -1; } -mixed b() { return 2; } -.... -test 572, expected result: EQ -mixed a() { switch(18) { case 18: return 2; default: return 0; case 21: return 5; case 20: return 4; case 19: return 3; } return -1; } -mixed b() { return 2; } -.... -test 573, expected result: EQ -mixed a() { switch(18) { case 18: return 2; case 21: return 5; default: return 0; case 20: return 4; case 19: return 3; } return -1; } -mixed b() { return 2; } -.... -test 574, expected result: EQ -mixed a() { switch(18) { case 18: return 2; case 21: return 5; case 20: return 4; default: return 0; case 19: return 3; } return -1; } -mixed b() { return 2; } -.... -test 575, expected result: EQ -mixed a() { switch(18) { case 18: return 2; case 21: return 5; case 20: return 4; case 19: return 3; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 576, expected result: EQ -mixed a() { switch(18) { case 18: return 2; case 21: return 5; case 19: return 3; case 20: return 4; } return 0; } -mixed b() { return 2; } -.... -test 577, expected result: EQ -mixed a() { switch(18) { default: return 0; case 18: return 2; case 21: return 5; case 19: return 3; case 20: return 4; } return -1; } -mixed b() { return 2; } -.... -test 578, expected result: EQ -mixed a() { switch(18) { case 18: return 2; default: return 0; case 21: return 5; case 19: return 3; case 20: return 4; } return -1; } -mixed b() { return 2; } -.... -test 579, expected result: EQ -mixed a() { switch(18) { case 18: return 2; case 21: return 5; default: return 0; case 19: return 3; case 20: return 4; } return -1; } -mixed b() { return 2; } -.... -test 580, expected result: EQ -mixed a() { switch(18) { case 18: return 2; case 21: return 5; case 19: return 3; default: return 0; case 20: return 4; } return -1; } -mixed b() { return 2; } -.... -test 581, expected result: EQ -mixed a() { switch(18) { case 18: return 2; case 21: return 5; case 19: return 3; case 20: return 4; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 582, expected result: EQ -mixed a() { switch(18) { case 19: return 3; case 18: return 2; case 20: return 4; case 21: return 5; } return 0; } -mixed b() { return 2; } -.... -test 583, expected result: EQ -mixed a() { switch(18) { default: return 0; case 19: return 3; case 18: return 2; case 20: return 4; case 21: return 5; } return -1; } -mixed b() { return 2; } -.... -test 584, expected result: EQ -mixed a() { switch(18) { case 19: return 3; default: return 0; case 18: return 2; case 20: return 4; case 21: return 5; } return -1; } -mixed b() { return 2; } -.... -test 585, expected result: EQ -mixed a() { switch(18) { case 19: return 3; case 18: return 2; default: return 0; case 20: return 4; case 21: return 5; } return -1; } -mixed b() { return 2; } -.... -test 586, expected result: EQ -mixed a() { switch(18) { case 19: return 3; case 18: return 2; case 20: return 4; default: return 0; case 21: return 5; } return -1; } -mixed b() { return 2; } -.... -test 587, expected result: EQ -mixed a() { switch(18) { case 19: return 3; case 18: return 2; case 20: return 4; case 21: return 5; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 588, expected result: EQ -mixed a() { switch(18) { case 19: return 3; case 18: return 2; case 21: return 5; case 20: return 4; } return 0; } -mixed b() { return 2; } -.... -test 589, expected result: EQ -mixed a() { switch(18) { default: return 0; case 19: return 3; case 18: return 2; case 21: return 5; case 20: return 4; } return -1; } -mixed b() { return 2; } -.... -test 590, expected result: EQ -mixed a() { switch(18) { case 19: return 3; default: return 0; case 18: return 2; case 21: return 5; case 20: return 4; } return -1; } -mixed b() { return 2; } -.... -test 591, expected result: EQ -mixed a() { switch(18) { case 19: return 3; case 18: return 2; default: return 0; case 21: return 5; case 20: return 4; } return -1; } -mixed b() { return 2; } -.... -test 592, expected result: EQ -mixed a() { switch(18) { case 19: return 3; case 18: return 2; case 21: return 5; default: return 0; case 20: return 4; } return -1; } -mixed b() { return 2; } -.... -test 593, expected result: EQ -mixed a() { switch(18) { case 19: return 3; case 18: return 2; case 21: return 5; case 20: return 4; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 594, expected result: EQ -mixed a() { switch(18) { case 19: return 3; case 20: return 4; case 18: return 2; case 21: return 5; } return 0; } -mixed b() { return 2; } -.... -test 595, expected result: EQ -mixed a() { switch(18) { default: return 0; case 19: return 3; case 20: return 4; case 18: return 2; case 21: return 5; } return -1; } -mixed b() { return 2; } -.... -test 596, expected result: EQ -mixed a() { switch(18) { case 19: return 3; default: return 0; case 20: return 4; case 18: return 2; case 21: return 5; } return -1; } -mixed b() { return 2; } -.... -test 597, expected result: EQ -mixed a() { switch(18) { case 19: return 3; case 20: return 4; default: return 0; case 18: return 2; case 21: return 5; } return -1; } -mixed b() { return 2; } -.... -test 598, expected result: EQ -mixed a() { switch(18) { case 19: return 3; case 20: return 4; case 18: return 2; default: return 0; case 21: return 5; } return -1; } -mixed b() { return 2; } -.... -test 599, expected result: EQ -mixed a() { switch(18) { case 19: return 3; case 20: return 4; case 18: return 2; case 21: return 5; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 600, expected result: EQ -mixed a() { switch(18) { case 19: return 3; case 20: return 4; case 21: return 5; case 18: return 2; } return 0; } -mixed b() { return 2; } -.... -test 601, expected result: EQ -mixed a() { switch(18) { default: return 0; case 19: return 3; case 20: return 4; case 21: return 5; case 18: return 2; } return -1; } -mixed b() { return 2; } -.... -test 602, expected result: EQ -mixed a() { switch(18) { case 19: return 3; default: return 0; case 20: return 4; case 21: return 5; case 18: return 2; } return -1; } -mixed b() { return 2; } -.... -test 603, expected result: EQ -mixed a() { switch(18) { case 19: return 3; case 20: return 4; default: return 0; case 21: return 5; case 18: return 2; } return -1; } -mixed b() { return 2; } -.... -test 604, expected result: EQ -mixed a() { switch(18) { case 19: return 3; case 20: return 4; case 21: return 5; default: return 0; case 18: return 2; } return -1; } -mixed b() { return 2; } -.... -test 605, expected result: EQ -mixed a() { switch(18) { case 19: return 3; case 20: return 4; case 21: return 5; case 18: return 2; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 606, expected result: EQ -mixed a() { switch(18) { case 19: return 3; case 21: return 5; case 20: return 4; case 18: return 2; } return 0; } -mixed b() { return 2; } -.... -test 607, expected result: EQ -mixed a() { switch(18) { default: return 0; case 19: return 3; case 21: return 5; case 20: return 4; case 18: return 2; } return -1; } -mixed b() { return 2; } -.... -test 608, expected result: EQ -mixed a() { switch(18) { case 19: return 3; default: return 0; case 21: return 5; case 20: return 4; case 18: return 2; } return -1; } -mixed b() { return 2; } -.... -test 609, expected result: EQ -mixed a() { switch(18) { case 19: return 3; case 21: return 5; default: return 0; case 20: return 4; case 18: return 2; } return -1; } -mixed b() { return 2; } -.... -test 610, expected result: EQ -mixed a() { switch(18) { case 19: return 3; case 21: return 5; case 20: return 4; default: return 0; case 18: return 2; } return -1; } -mixed b() { return 2; } -.... -test 611, expected result: EQ -mixed a() { switch(18) { case 19: return 3; case 21: return 5; case 20: return 4; case 18: return 2; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 612, expected result: EQ -mixed a() { switch(18) { case 19: return 3; case 21: return 5; case 18: return 2; case 20: return 4; } return 0; } -mixed b() { return 2; } -.... -test 613, expected result: EQ -mixed a() { switch(18) { default: return 0; case 19: return 3; case 21: return 5; case 18: return 2; case 20: return 4; } return -1; } -mixed b() { return 2; } -.... -test 614, expected result: EQ -mixed a() { switch(18) { case 19: return 3; default: return 0; case 21: return 5; case 18: return 2; case 20: return 4; } return -1; } -mixed b() { return 2; } -.... -test 615, expected result: EQ -mixed a() { switch(18) { case 19: return 3; case 21: return 5; default: return 0; case 18: return 2; case 20: return 4; } return -1; } -mixed b() { return 2; } -.... -test 616, expected result: EQ -mixed a() { switch(18) { case 19: return 3; case 21: return 5; case 18: return 2; default: return 0; case 20: return 4; } return -1; } -mixed b() { return 2; } -.... -test 617, expected result: EQ -mixed a() { switch(18) { case 19: return 3; case 21: return 5; case 18: return 2; case 20: return 4; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 618, expected result: EQ -mixed a() { switch(18) { case 20: return 4; case 19: return 3; case 18: return 2; case 21: return 5; } return 0; } -mixed b() { return 2; } -.... -test 619, expected result: EQ -mixed a() { switch(18) { default: return 0; case 20: return 4; case 19: return 3; case 18: return 2; case 21: return 5; } return -1; } -mixed b() { return 2; } -.... -test 620, expected result: EQ -mixed a() { switch(18) { case 20: return 4; default: return 0; case 19: return 3; case 18: return 2; case 21: return 5; } return -1; } -mixed b() { return 2; } -.... -test 621, expected result: EQ -mixed a() { switch(18) { case 20: return 4; case 19: return 3; default: return 0; case 18: return 2; case 21: return 5; } return -1; } -mixed b() { return 2; } -.... -test 622, expected result: EQ -mixed a() { switch(18) { case 20: return 4; case 19: return 3; case 18: return 2; default: return 0; case 21: return 5; } return -1; } -mixed b() { return 2; } -.... -test 623, expected result: EQ -mixed a() { switch(18) { case 20: return 4; case 19: return 3; case 18: return 2; case 21: return 5; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 624, expected result: EQ -mixed a() { switch(18) { case 20: return 4; case 19: return 3; case 21: return 5; case 18: return 2; } return 0; } -mixed b() { return 2; } -.... -test 625, expected result: EQ -mixed a() { switch(18) { default: return 0; case 20: return 4; case 19: return 3; case 21: return 5; case 18: return 2; } return -1; } -mixed b() { return 2; } -.... -test 626, expected result: EQ -mixed a() { switch(18) { case 20: return 4; default: return 0; case 19: return 3; case 21: return 5; case 18: return 2; } return -1; } -mixed b() { return 2; } -.... -test 627, expected result: EQ -mixed a() { switch(18) { case 20: return 4; case 19: return 3; default: return 0; case 21: return 5; case 18: return 2; } return -1; } -mixed b() { return 2; } -.... -test 628, expected result: EQ -mixed a() { switch(18) { case 20: return 4; case 19: return 3; case 21: return 5; default: return 0; case 18: return 2; } return -1; } -mixed b() { return 2; } -.... -test 629, expected result: EQ -mixed a() { switch(18) { case 20: return 4; case 19: return 3; case 21: return 5; case 18: return 2; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 630, expected result: EQ -mixed a() { switch(18) { case 20: return 4; case 18: return 2; case 19: return 3; case 21: return 5; } return 0; } -mixed b() { return 2; } -.... -test 631, expected result: EQ -mixed a() { switch(18) { default: return 0; case 20: return 4; case 18: return 2; case 19: return 3; case 21: return 5; } return -1; } -mixed b() { return 2; } -.... -test 632, expected result: EQ -mixed a() { switch(18) { case 20: return 4; default: return 0; case 18: return 2; case 19: return 3; case 21: return 5; } return -1; } -mixed b() { return 2; } -.... -test 633, expected result: EQ -mixed a() { switch(18) { case 20: return 4; case 18: return 2; default: return 0; case 19: return 3; case 21: return 5; } return -1; } -mixed b() { return 2; } -.... -test 634, expected result: EQ -mixed a() { switch(18) { case 20: return 4; case 18: return 2; case 19: return 3; default: return 0; case 21: return 5; } return -1; } -mixed b() { return 2; } -.... -test 635, expected result: EQ -mixed a() { switch(18) { case 20: return 4; case 18: return 2; case 19: return 3; case 21: return 5; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 636, expected result: EQ -mixed a() { switch(18) { case 20: return 4; case 18: return 2; case 21: return 5; case 19: return 3; } return 0; } -mixed b() { return 2; } -.... -test 637, expected result: EQ -mixed a() { switch(18) { default: return 0; case 20: return 4; case 18: return 2; case 21: return 5; case 19: return 3; } return -1; } -mixed b() { return 2; } -.... -test 638, expected result: EQ -mixed a() { switch(18) { case 20: return 4; default: return 0; case 18: return 2; case 21: return 5; case 19: return 3; } return -1; } -mixed b() { return 2; } -.... -test 639, expected result: EQ -mixed a() { switch(18) { case 20: return 4; case 18: return 2; default: return 0; case 21: return 5; case 19: return 3; } return -1; } -mixed b() { return 2; } -.... -test 640, expected result: EQ -mixed a() { switch(18) { case 20: return 4; case 18: return 2; case 21: return 5; default: return 0; case 19: return 3; } return -1; } -mixed b() { return 2; } -.... -test 641, expected result: EQ -mixed a() { switch(18) { case 20: return 4; case 18: return 2; case 21: return 5; case 19: return 3; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 642, expected result: EQ -mixed a() { switch(18) { case 20: return 4; case 21: return 5; case 18: return 2; case 19: return 3; } return 0; } -mixed b() { return 2; } -.... -test 643, expected result: EQ -mixed a() { switch(18) { default: return 0; case 20: return 4; case 21: return 5; case 18: return 2; case 19: return 3; } return -1; } -mixed b() { return 2; } -.... -test 644, expected result: EQ -mixed a() { switch(18) { case 20: return 4; default: return 0; case 21: return 5; case 18: return 2; case 19: return 3; } return -1; } -mixed b() { return 2; } -.... -test 645, expected result: EQ -mixed a() { switch(18) { case 20: return 4; case 21: return 5; default: return 0; case 18: return 2; case 19: return 3; } return -1; } -mixed b() { return 2; } -.... -test 646, expected result: EQ -mixed a() { switch(18) { case 20: return 4; case 21: return 5; case 18: return 2; default: return 0; case 19: return 3; } return -1; } -mixed b() { return 2; } -.... -test 647, expected result: EQ -mixed a() { switch(18) { case 20: return 4; case 21: return 5; case 18: return 2; case 19: return 3; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 648, expected result: EQ -mixed a() { switch(18) { case 20: return 4; case 21: return 5; case 19: return 3; case 18: return 2; } return 0; } -mixed b() { return 2; } -.... -test 649, expected result: EQ -mixed a() { switch(18) { default: return 0; case 20: return 4; case 21: return 5; case 19: return 3; case 18: return 2; } return -1; } -mixed b() { return 2; } -.... -test 650, expected result: EQ -mixed a() { switch(18) { case 20: return 4; default: return 0; case 21: return 5; case 19: return 3; case 18: return 2; } return -1; } -mixed b() { return 2; } -.... -test 651, expected result: EQ -mixed a() { switch(18) { case 20: return 4; case 21: return 5; default: return 0; case 19: return 3; case 18: return 2; } return -1; } -mixed b() { return 2; } -.... -test 652, expected result: EQ -mixed a() { switch(18) { case 20: return 4; case 21: return 5; case 19: return 3; default: return 0; case 18: return 2; } return -1; } -mixed b() { return 2; } -.... -test 653, expected result: EQ -mixed a() { switch(18) { case 20: return 4; case 21: return 5; case 19: return 3; case 18: return 2; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 654, expected result: EQ -mixed a() { switch(18) { case 21: return 5; case 19: return 3; case 20: return 4; case 18: return 2; } return 0; } -mixed b() { return 2; } -.... -test 655, expected result: EQ -mixed a() { switch(18) { default: return 0; case 21: return 5; case 19: return 3; case 20: return 4; case 18: return 2; } return -1; } -mixed b() { return 2; } -.... -test 656, expected result: EQ -mixed a() { switch(18) { case 21: return 5; default: return 0; case 19: return 3; case 20: return 4; case 18: return 2; } return -1; } -mixed b() { return 2; } -.... -test 657, expected result: EQ -mixed a() { switch(18) { case 21: return 5; case 19: return 3; default: return 0; case 20: return 4; case 18: return 2; } return -1; } -mixed b() { return 2; } -.... -test 658, expected result: EQ -mixed a() { switch(18) { case 21: return 5; case 19: return 3; case 20: return 4; default: return 0; case 18: return 2; } return -1; } -mixed b() { return 2; } -.... -test 659, expected result: EQ -mixed a() { switch(18) { case 21: return 5; case 19: return 3; case 20: return 4; case 18: return 2; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 660, expected result: EQ -mixed a() { switch(18) { case 21: return 5; case 19: return 3; case 18: return 2; case 20: return 4; } return 0; } -mixed b() { return 2; } -.... -test 661, expected result: EQ -mixed a() { switch(18) { default: return 0; case 21: return 5; case 19: return 3; case 18: return 2; case 20: return 4; } return -1; } -mixed b() { return 2; } -.... -test 662, expected result: EQ -mixed a() { switch(18) { case 21: return 5; default: return 0; case 19: return 3; case 18: return 2; case 20: return 4; } return -1; } -mixed b() { return 2; } -.... -test 663, expected result: EQ -mixed a() { switch(18) { case 21: return 5; case 19: return 3; default: return 0; case 18: return 2; case 20: return 4; } return -1; } -mixed b() { return 2; } -.... -test 664, expected result: EQ -mixed a() { switch(18) { case 21: return 5; case 19: return 3; case 18: return 2; default: return 0; case 20: return 4; } return -1; } -mixed b() { return 2; } -.... -test 665, expected result: EQ -mixed a() { switch(18) { case 21: return 5; case 19: return 3; case 18: return 2; case 20: return 4; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 666, expected result: EQ -mixed a() { switch(18) { case 21: return 5; case 20: return 4; case 19: return 3; case 18: return 2; } return 0; } -mixed b() { return 2; } -.... -test 667, expected result: EQ -mixed a() { switch(18) { default: return 0; case 21: return 5; case 20: return 4; case 19: return 3; case 18: return 2; } return -1; } -mixed b() { return 2; } -.... -test 668, expected result: EQ -mixed a() { switch(18) { case 21: return 5; default: return 0; case 20: return 4; case 19: return 3; case 18: return 2; } return -1; } -mixed b() { return 2; } -.... -test 669, expected result: EQ -mixed a() { switch(18) { case 21: return 5; case 20: return 4; default: return 0; case 19: return 3; case 18: return 2; } return -1; } -mixed b() { return 2; } -.... -test 670, expected result: EQ -mixed a() { switch(18) { case 21: return 5; case 20: return 4; case 19: return 3; default: return 0; case 18: return 2; } return -1; } -mixed b() { return 2; } -.... -test 671, expected result: EQ -mixed a() { switch(18) { case 21: return 5; case 20: return 4; case 19: return 3; case 18: return 2; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 672, expected result: EQ -mixed a() { switch(18) { case 21: return 5; case 20: return 4; case 18: return 2; case 19: return 3; } return 0; } -mixed b() { return 2; } -.... -test 673, expected result: EQ -mixed a() { switch(18) { default: return 0; case 21: return 5; case 20: return 4; case 18: return 2; case 19: return 3; } return -1; } -mixed b() { return 2; } -.... -test 674, expected result: EQ -mixed a() { switch(18) { case 21: return 5; default: return 0; case 20: return 4; case 18: return 2; case 19: return 3; } return -1; } -mixed b() { return 2; } -.... -test 675, expected result: EQ -mixed a() { switch(18) { case 21: return 5; case 20: return 4; default: return 0; case 18: return 2; case 19: return 3; } return -1; } -mixed b() { return 2; } -.... -test 676, expected result: EQ -mixed a() { switch(18) { case 21: return 5; case 20: return 4; case 18: return 2; default: return 0; case 19: return 3; } return -1; } -mixed b() { return 2; } -.... -test 677, expected result: EQ -mixed a() { switch(18) { case 21: return 5; case 20: return 4; case 18: return 2; case 19: return 3; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 678, expected result: EQ -mixed a() { switch(18) { case 21: return 5; case 18: return 2; case 20: return 4; case 19: return 3; } return 0; } -mixed b() { return 2; } -.... -test 679, expected result: EQ -mixed a() { switch(18) { default: return 0; case 21: return 5; case 18: return 2; case 20: return 4; case 19: return 3; } return -1; } -mixed b() { return 2; } -.... -test 680, expected result: EQ -mixed a() { switch(18) { case 21: return 5; default: return 0; case 18: return 2; case 20: return 4; case 19: return 3; } return -1; } -mixed b() { return 2; } -.... -test 681, expected result: EQ -mixed a() { switch(18) { case 21: return 5; case 18: return 2; default: return 0; case 20: return 4; case 19: return 3; } return -1; } -mixed b() { return 2; } -.... -test 682, expected result: EQ -mixed a() { switch(18) { case 21: return 5; case 18: return 2; case 20: return 4; default: return 0; case 19: return 3; } return -1; } -mixed b() { return 2; } -.... -test 683, expected result: EQ -mixed a() { switch(18) { case 21: return 5; case 18: return 2; case 20: return 4; case 19: return 3; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 684, expected result: EQ -mixed a() { switch(18) { case 21: return 5; case 18: return 2; case 19: return 3; case 20: return 4; } return 0; } -mixed b() { return 2; } -.... -test 685, expected result: EQ -mixed a() { switch(18) { default: return 0; case 21: return 5; case 18: return 2; case 19: return 3; case 20: return 4; } return -1; } -mixed b() { return 2; } -.... -test 686, expected result: EQ -mixed a() { switch(18) { case 21: return 5; default: return 0; case 18: return 2; case 19: return 3; case 20: return 4; } return -1; } -mixed b() { return 2; } -.... -test 687, expected result: EQ -mixed a() { switch(18) { case 21: return 5; case 18: return 2; default: return 0; case 19: return 3; case 20: return 4; } return -1; } -mixed b() { return 2; } -.... -test 688, expected result: EQ -mixed a() { switch(18) { case 21: return 5; case 18: return 2; case 19: return 3; default: return 0; case 20: return 4; } return -1; } -mixed b() { return 2; } -.... -test 689, expected result: EQ -mixed a() { switch(18) { case 21: return 5; case 18: return 2; case 19: return 3; case 20: return 4; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 690, expected result: EQ -mixed a() { switch(19) { case 18: return 2; case 19: return 3; case 20: return 4; case 21: return 5; } return 0; } -mixed b() { return 3; } -.... -test 691, expected result: EQ -mixed a() { switch(19) { default: return 0; case 18: return 2; case 19: return 3; case 20: return 4; case 21: return 5; } return -1; } -mixed b() { return 3; } -.... -test 692, expected result: EQ -mixed a() { switch(19) { case 18: return 2; default: return 0; case 19: return 3; case 20: return 4; case 21: return 5; } return -1; } -mixed b() { return 3; } -.... -test 693, expected result: EQ -mixed a() { switch(19) { case 18: return 2; case 19: return 3; default: return 0; case 20: return 4; case 21: return 5; } return -1; } -mixed b() { return 3; } -.... -test 694, expected result: EQ -mixed a() { switch(19) { case 18: return 2; case 19: return 3; case 20: return 4; default: return 0; case 21: return 5; } return -1; } -mixed b() { return 3; } -.... -test 695, expected result: EQ -mixed a() { switch(19) { case 18: return 2; case 19: return 3; case 20: return 4; case 21: return 5; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 696, expected result: EQ -mixed a() { switch(19) { case 18: return 2; case 19: return 3; case 21: return 5; case 20: return 4; } return 0; } -mixed b() { return 3; } -.... -test 697, expected result: EQ -mixed a() { switch(19) { default: return 0; case 18: return 2; case 19: return 3; case 21: return 5; case 20: return 4; } return -1; } -mixed b() { return 3; } -.... -test 698, expected result: EQ -mixed a() { switch(19) { case 18: return 2; default: return 0; case 19: return 3; case 21: return 5; case 20: return 4; } return -1; } -mixed b() { return 3; } -.... -test 699, expected result: EQ -mixed a() { switch(19) { case 18: return 2; case 19: return 3; default: return 0; case 21: return 5; case 20: return 4; } return -1; } -mixed b() { return 3; } -.... -test 700, expected result: EQ -mixed a() { switch(19) { case 18: return 2; case 19: return 3; case 21: return 5; default: return 0; case 20: return 4; } return -1; } -mixed b() { return 3; } -.... -test 701, expected result: EQ -mixed a() { switch(19) { case 18: return 2; case 19: return 3; case 21: return 5; case 20: return 4; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 702, expected result: EQ -mixed a() { switch(19) { case 18: return 2; case 20: return 4; case 19: return 3; case 21: return 5; } return 0; } -mixed b() { return 3; } -.... -test 703, expected result: EQ -mixed a() { switch(19) { default: return 0; case 18: return 2; case 20: return 4; case 19: return 3; case 21: return 5; } return -1; } -mixed b() { return 3; } -.... -test 704, expected result: EQ -mixed a() { switch(19) { case 18: return 2; default: return 0; case 20: return 4; case 19: return 3; case 21: return 5; } return -1; } -mixed b() { return 3; } -.... -test 705, expected result: EQ -mixed a() { switch(19) { case 18: return 2; case 20: return 4; default: return 0; case 19: return 3; case 21: return 5; } return -1; } -mixed b() { return 3; } -.... -test 706, expected result: EQ -mixed a() { switch(19) { case 18: return 2; case 20: return 4; case 19: return 3; default: return 0; case 21: return 5; } return -1; } -mixed b() { return 3; } -.... -test 707, expected result: EQ -mixed a() { switch(19) { case 18: return 2; case 20: return 4; case 19: return 3; case 21: return 5; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 708, expected result: EQ -mixed a() { switch(19) { case 18: return 2; case 20: return 4; case 21: return 5; case 19: return 3; } return 0; } -mixed b() { return 3; } -.... -test 709, expected result: EQ -mixed a() { switch(19) { default: return 0; case 18: return 2; case 20: return 4; case 21: return 5; case 19: return 3; } return -1; } -mixed b() { return 3; } -.... -test 710, expected result: EQ -mixed a() { switch(19) { case 18: return 2; default: return 0; case 20: return 4; case 21: return 5; case 19: return 3; } return -1; } -mixed b() { return 3; } -.... -test 711, expected result: EQ -mixed a() { switch(19) { case 18: return 2; case 20: return 4; default: return 0; case 21: return 5; case 19: return 3; } return -1; } -mixed b() { return 3; } -.... -test 712, expected result: EQ -mixed a() { switch(19) { case 18: return 2; case 20: return 4; case 21: return 5; default: return 0; case 19: return 3; } return -1; } -mixed b() { return 3; } -.... -test 713, expected result: EQ -mixed a() { switch(19) { case 18: return 2; case 20: return 4; case 21: return 5; case 19: return 3; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 714, expected result: EQ -mixed a() { switch(19) { case 18: return 2; case 21: return 5; case 20: return 4; case 19: return 3; } return 0; } -mixed b() { return 3; } -.... -test 715, expected result: EQ -mixed a() { switch(19) { default: return 0; case 18: return 2; case 21: return 5; case 20: return 4; case 19: return 3; } return -1; } -mixed b() { return 3; } -.... -test 716, expected result: EQ -mixed a() { switch(19) { case 18: return 2; default: return 0; case 21: return 5; case 20: return 4; case 19: return 3; } return -1; } -mixed b() { return 3; } -.... -test 717, expected result: EQ -mixed a() { switch(19) { case 18: return 2; case 21: return 5; default: return 0; case 20: return 4; case 19: return 3; } return -1; } -mixed b() { return 3; } -.... -test 718, expected result: EQ -mixed a() { switch(19) { case 18: return 2; case 21: return 5; case 20: return 4; default: return 0; case 19: return 3; } return -1; } -mixed b() { return 3; } -.... -test 719, expected result: EQ -mixed a() { switch(19) { case 18: return 2; case 21: return 5; case 20: return 4; case 19: return 3; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 720, expected result: EQ -mixed a() { switch(19) { case 18: return 2; case 21: return 5; case 19: return 3; case 20: return 4; } return 0; } -mixed b() { return 3; } -.... -test 721, expected result: EQ -mixed a() { switch(19) { default: return 0; case 18: return 2; case 21: return 5; case 19: return 3; case 20: return 4; } return -1; } -mixed b() { return 3; } -.... -test 722, expected result: EQ -mixed a() { switch(19) { case 18: return 2; default: return 0; case 21: return 5; case 19: return 3; case 20: return 4; } return -1; } -mixed b() { return 3; } -.... -test 723, expected result: EQ -mixed a() { switch(19) { case 18: return 2; case 21: return 5; default: return 0; case 19: return 3; case 20: return 4; } return -1; } -mixed b() { return 3; } -.... -test 724, expected result: EQ -mixed a() { switch(19) { case 18: return 2; case 21: return 5; case 19: return 3; default: return 0; case 20: return 4; } return -1; } -mixed b() { return 3; } -.... -test 725, expected result: EQ -mixed a() { switch(19) { case 18: return 2; case 21: return 5; case 19: return 3; case 20: return 4; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 726, expected result: EQ -mixed a() { switch(19) { case 19: return 3; case 18: return 2; case 20: return 4; case 21: return 5; } return 0; } -mixed b() { return 3; } -.... -test 727, expected result: EQ -mixed a() { switch(19) { default: return 0; case 19: return 3; case 18: return 2; case 20: return 4; case 21: return 5; } return -1; } -mixed b() { return 3; } -.... -test 728, expected result: EQ -mixed a() { switch(19) { case 19: return 3; default: return 0; case 18: return 2; case 20: return 4; case 21: return 5; } return -1; } -mixed b() { return 3; } -.... -test 729, expected result: EQ -mixed a() { switch(19) { case 19: return 3; case 18: return 2; default: return 0; case 20: return 4; case 21: return 5; } return -1; } -mixed b() { return 3; } -.... -test 730, expected result: EQ -mixed a() { switch(19) { case 19: return 3; case 18: return 2; case 20: return 4; default: return 0; case 21: return 5; } return -1; } -mixed b() { return 3; } -.... -test 731, expected result: EQ -mixed a() { switch(19) { case 19: return 3; case 18: return 2; case 20: return 4; case 21: return 5; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 732, expected result: EQ -mixed a() { switch(19) { case 19: return 3; case 18: return 2; case 21: return 5; case 20: return 4; } return 0; } -mixed b() { return 3; } -.... -test 733, expected result: EQ -mixed a() { switch(19) { default: return 0; case 19: return 3; case 18: return 2; case 21: return 5; case 20: return 4; } return -1; } -mixed b() { return 3; } -.... -test 734, expected result: EQ -mixed a() { switch(19) { case 19: return 3; default: return 0; case 18: return 2; case 21: return 5; case 20: return 4; } return -1; } -mixed b() { return 3; } -.... -test 735, expected result: EQ -mixed a() { switch(19) { case 19: return 3; case 18: return 2; default: return 0; case 21: return 5; case 20: return 4; } return -1; } -mixed b() { return 3; } -.... -test 736, expected result: EQ -mixed a() { switch(19) { case 19: return 3; case 18: return 2; case 21: return 5; default: return 0; case 20: return 4; } return -1; } -mixed b() { return 3; } -.... -test 737, expected result: EQ -mixed a() { switch(19) { case 19: return 3; case 18: return 2; case 21: return 5; case 20: return 4; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 738, expected result: EQ -mixed a() { switch(19) { case 19: return 3; case 20: return 4; case 18: return 2; case 21: return 5; } return 0; } -mixed b() { return 3; } -.... -test 739, expected result: EQ -mixed a() { switch(19) { default: return 0; case 19: return 3; case 20: return 4; case 18: return 2; case 21: return 5; } return -1; } -mixed b() { return 3; } -.... -test 740, expected result: EQ -mixed a() { switch(19) { case 19: return 3; default: return 0; case 20: return 4; case 18: return 2; case 21: return 5; } return -1; } -mixed b() { return 3; } -.... -test 741, expected result: EQ -mixed a() { switch(19) { case 19: return 3; case 20: return 4; default: return 0; case 18: return 2; case 21: return 5; } return -1; } -mixed b() { return 3; } -.... -test 742, expected result: EQ -mixed a() { switch(19) { case 19: return 3; case 20: return 4; case 18: return 2; default: return 0; case 21: return 5; } return -1; } -mixed b() { return 3; } -.... -test 743, expected result: EQ -mixed a() { switch(19) { case 19: return 3; case 20: return 4; case 18: return 2; case 21: return 5; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 744, expected result: EQ -mixed a() { switch(19) { case 19: return 3; case 20: return 4; case 21: return 5; case 18: return 2; } return 0; } -mixed b() { return 3; } -.... -test 745, expected result: EQ -mixed a() { switch(19) { default: return 0; case 19: return 3; case 20: return 4; case 21: return 5; case 18: return 2; } return -1; } -mixed b() { return 3; } -.... -test 746, expected result: EQ -mixed a() { switch(19) { case 19: return 3; default: return 0; case 20: return 4; case 21: return 5; case 18: return 2; } return -1; } -mixed b() { return 3; } -.... -test 747, expected result: EQ -mixed a() { switch(19) { case 19: return 3; case 20: return 4; default: return 0; case 21: return 5; case 18: return 2; } return -1; } -mixed b() { return 3; } -.... -test 748, expected result: EQ -mixed a() { switch(19) { case 19: return 3; case 20: return 4; case 21: return 5; default: return 0; case 18: return 2; } return -1; } -mixed b() { return 3; } -.... -test 749, expected result: EQ -mixed a() { switch(19) { case 19: return 3; case 20: return 4; case 21: return 5; case 18: return 2; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 750, expected result: EQ -mixed a() { switch(19) { case 19: return 3; case 21: return 5; case 20: return 4; case 18: return 2; } return 0; } -mixed b() { return 3; } -.... -test 751, expected result: EQ -mixed a() { switch(19) { default: return 0; case 19: return 3; case 21: return 5; case 20: return 4; case 18: return 2; } return -1; } -mixed b() { return 3; } -.... -test 752, expected result: EQ -mixed a() { switch(19) { case 19: return 3; default: return 0; case 21: return 5; case 20: return 4; case 18: return 2; } return -1; } -mixed b() { return 3; } -.... -test 753, expected result: EQ -mixed a() { switch(19) { case 19: return 3; case 21: return 5; default: return 0; case 20: return 4; case 18: return 2; } return -1; } -mixed b() { return 3; } -.... -test 754, expected result: EQ -mixed a() { switch(19) { case 19: return 3; case 21: return 5; case 20: return 4; default: return 0; case 18: return 2; } return -1; } -mixed b() { return 3; } -.... -test 755, expected result: EQ -mixed a() { switch(19) { case 19: return 3; case 21: return 5; case 20: return 4; case 18: return 2; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 756, expected result: EQ -mixed a() { switch(19) { case 19: return 3; case 21: return 5; case 18: return 2; case 20: return 4; } return 0; } -mixed b() { return 3; } -.... -test 757, expected result: EQ -mixed a() { switch(19) { default: return 0; case 19: return 3; case 21: return 5; case 18: return 2; case 20: return 4; } return -1; } -mixed b() { return 3; } -.... -test 758, expected result: EQ -mixed a() { switch(19) { case 19: return 3; default: return 0; case 21: return 5; case 18: return 2; case 20: return 4; } return -1; } -mixed b() { return 3; } -.... -test 759, expected result: EQ -mixed a() { switch(19) { case 19: return 3; case 21: return 5; default: return 0; case 18: return 2; case 20: return 4; } return -1; } -mixed b() { return 3; } -.... -test 760, expected result: EQ -mixed a() { switch(19) { case 19: return 3; case 21: return 5; case 18: return 2; default: return 0; case 20: return 4; } return -1; } -mixed b() { return 3; } -.... -test 761, expected result: EQ -mixed a() { switch(19) { case 19: return 3; case 21: return 5; case 18: return 2; case 20: return 4; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 762, expected result: EQ -mixed a() { switch(19) { case 20: return 4; case 19: return 3; case 18: return 2; case 21: return 5; } return 0; } -mixed b() { return 3; } -.... -test 763, expected result: EQ -mixed a() { switch(19) { default: return 0; case 20: return 4; case 19: return 3; case 18: return 2; case 21: return 5; } return -1; } -mixed b() { return 3; } -.... -test 764, expected result: EQ -mixed a() { switch(19) { case 20: return 4; default: return 0; case 19: return 3; case 18: return 2; case 21: return 5; } return -1; } -mixed b() { return 3; } -.... -test 765, expected result: EQ -mixed a() { switch(19) { case 20: return 4; case 19: return 3; default: return 0; case 18: return 2; case 21: return 5; } return -1; } -mixed b() { return 3; } -.... -test 766, expected result: EQ -mixed a() { switch(19) { case 20: return 4; case 19: return 3; case 18: return 2; default: return 0; case 21: return 5; } return -1; } -mixed b() { return 3; } -.... -test 767, expected result: EQ -mixed a() { switch(19) { case 20: return 4; case 19: return 3; case 18: return 2; case 21: return 5; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 768, expected result: EQ -mixed a() { switch(19) { case 20: return 4; case 19: return 3; case 21: return 5; case 18: return 2; } return 0; } -mixed b() { return 3; } -.... -test 769, expected result: EQ -mixed a() { switch(19) { default: return 0; case 20: return 4; case 19: return 3; case 21: return 5; case 18: return 2; } return -1; } -mixed b() { return 3; } -.... -test 770, expected result: EQ -mixed a() { switch(19) { case 20: return 4; default: return 0; case 19: return 3; case 21: return 5; case 18: return 2; } return -1; } -mixed b() { return 3; } -.... -test 771, expected result: EQ -mixed a() { switch(19) { case 20: return 4; case 19: return 3; default: return 0; case 21: return 5; case 18: return 2; } return -1; } -mixed b() { return 3; } -.... -test 772, expected result: EQ -mixed a() { switch(19) { case 20: return 4; case 19: return 3; case 21: return 5; default: return 0; case 18: return 2; } return -1; } -mixed b() { return 3; } -.... -test 773, expected result: EQ -mixed a() { switch(19) { case 20: return 4; case 19: return 3; case 21: return 5; case 18: return 2; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 774, expected result: EQ -mixed a() { switch(19) { case 20: return 4; case 18: return 2; case 19: return 3; case 21: return 5; } return 0; } -mixed b() { return 3; } -.... -test 775, expected result: EQ -mixed a() { switch(19) { default: return 0; case 20: return 4; case 18: return 2; case 19: return 3; case 21: return 5; } return -1; } -mixed b() { return 3; } -.... -test 776, expected result: EQ -mixed a() { switch(19) { case 20: return 4; default: return 0; case 18: return 2; case 19: return 3; case 21: return 5; } return -1; } -mixed b() { return 3; } -.... -test 777, expected result: EQ -mixed a() { switch(19) { case 20: return 4; case 18: return 2; default: return 0; case 19: return 3; case 21: return 5; } return -1; } -mixed b() { return 3; } -.... -test 778, expected result: EQ -mixed a() { switch(19) { case 20: return 4; case 18: return 2; case 19: return 3; default: return 0; case 21: return 5; } return -1; } -mixed b() { return 3; } -.... -test 779, expected result: EQ -mixed a() { switch(19) { case 20: return 4; case 18: return 2; case 19: return 3; case 21: return 5; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 780, expected result: EQ -mixed a() { switch(19) { case 20: return 4; case 18: return 2; case 21: return 5; case 19: return 3; } return 0; } -mixed b() { return 3; } -.... -test 781, expected result: EQ -mixed a() { switch(19) { default: return 0; case 20: return 4; case 18: return 2; case 21: return 5; case 19: return 3; } return -1; } -mixed b() { return 3; } -.... -test 782, expected result: EQ -mixed a() { switch(19) { case 20: return 4; default: return 0; case 18: return 2; case 21: return 5; case 19: return 3; } return -1; } -mixed b() { return 3; } -.... -test 783, expected result: EQ -mixed a() { switch(19) { case 20: return 4; case 18: return 2; default: return 0; case 21: return 5; case 19: return 3; } return -1; } -mixed b() { return 3; } -.... -test 784, expected result: EQ -mixed a() { switch(19) { case 20: return 4; case 18: return 2; case 21: return 5; default: return 0; case 19: return 3; } return -1; } -mixed b() { return 3; } -.... -test 785, expected result: EQ -mixed a() { switch(19) { case 20: return 4; case 18: return 2; case 21: return 5; case 19: return 3; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 786, expected result: EQ -mixed a() { switch(19) { case 20: return 4; case 21: return 5; case 18: return 2; case 19: return 3; } return 0; } -mixed b() { return 3; } -.... -test 787, expected result: EQ -mixed a() { switch(19) { default: return 0; case 20: return 4; case 21: return 5; case 18: return 2; case 19: return 3; } return -1; } -mixed b() { return 3; } -.... -test 788, expected result: EQ -mixed a() { switch(19) { case 20: return 4; default: return 0; case 21: return 5; case 18: return 2; case 19: return 3; } return -1; } -mixed b() { return 3; } -.... -test 789, expected result: EQ -mixed a() { switch(19) { case 20: return 4; case 21: return 5; default: return 0; case 18: return 2; case 19: return 3; } return -1; } -mixed b() { return 3; } -.... -test 790, expected result: EQ -mixed a() { switch(19) { case 20: return 4; case 21: return 5; case 18: return 2; default: return 0; case 19: return 3; } return -1; } -mixed b() { return 3; } -.... -test 791, expected result: EQ -mixed a() { switch(19) { case 20: return 4; case 21: return 5; case 18: return 2; case 19: return 3; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 792, expected result: EQ -mixed a() { switch(19) { case 20: return 4; case 21: return 5; case 19: return 3; case 18: return 2; } return 0; } -mixed b() { return 3; } -.... -test 793, expected result: EQ -mixed a() { switch(19) { default: return 0; case 20: return 4; case 21: return 5; case 19: return 3; case 18: return 2; } return -1; } -mixed b() { return 3; } -.... -test 794, expected result: EQ -mixed a() { switch(19) { case 20: return 4; default: return 0; case 21: return 5; case 19: return 3; case 18: return 2; } return -1; } -mixed b() { return 3; } -.... -test 795, expected result: EQ -mixed a() { switch(19) { case 20: return 4; case 21: return 5; default: return 0; case 19: return 3; case 18: return 2; } return -1; } -mixed b() { return 3; } -.... -test 796, expected result: EQ -mixed a() { switch(19) { case 20: return 4; case 21: return 5; case 19: return 3; default: return 0; case 18: return 2; } return -1; } -mixed b() { return 3; } -.... -test 797, expected result: EQ -mixed a() { switch(19) { case 20: return 4; case 21: return 5; case 19: return 3; case 18: return 2; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 798, expected result: EQ -mixed a() { switch(19) { case 21: return 5; case 19: return 3; case 20: return 4; case 18: return 2; } return 0; } -mixed b() { return 3; } -.... -test 799, expected result: EQ -mixed a() { switch(19) { default: return 0; case 21: return 5; case 19: return 3; case 20: return 4; case 18: return 2; } return -1; } -mixed b() { return 3; } -.... -test 800, expected result: EQ -mixed a() { switch(19) { case 21: return 5; default: return 0; case 19: return 3; case 20: return 4; case 18: return 2; } return -1; } -mixed b() { return 3; } -.... -test 801, expected result: EQ -mixed a() { switch(19) { case 21: return 5; case 19: return 3; default: return 0; case 20: return 4; case 18: return 2; } return -1; } -mixed b() { return 3; } -.... -test 802, expected result: EQ -mixed a() { switch(19) { case 21: return 5; case 19: return 3; case 20: return 4; default: return 0; case 18: return 2; } return -1; } -mixed b() { return 3; } -.... -test 803, expected result: EQ -mixed a() { switch(19) { case 21: return 5; case 19: return 3; case 20: return 4; case 18: return 2; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 804, expected result: EQ -mixed a() { switch(19) { case 21: return 5; case 19: return 3; case 18: return 2; case 20: return 4; } return 0; } -mixed b() { return 3; } -.... -test 805, expected result: EQ -mixed a() { switch(19) { default: return 0; case 21: return 5; case 19: return 3; case 18: return 2; case 20: return 4; } return -1; } -mixed b() { return 3; } -.... -test 806, expected result: EQ -mixed a() { switch(19) { case 21: return 5; default: return 0; case 19: return 3; case 18: return 2; case 20: return 4; } return -1; } -mixed b() { return 3; } -.... -test 807, expected result: EQ -mixed a() { switch(19) { case 21: return 5; case 19: return 3; default: return 0; case 18: return 2; case 20: return 4; } return -1; } -mixed b() { return 3; } -.... -test 808, expected result: EQ -mixed a() { switch(19) { case 21: return 5; case 19: return 3; case 18: return 2; default: return 0; case 20: return 4; } return -1; } -mixed b() { return 3; } -.... -test 809, expected result: EQ -mixed a() { switch(19) { case 21: return 5; case 19: return 3; case 18: return 2; case 20: return 4; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 810, expected result: EQ -mixed a() { switch(19) { case 21: return 5; case 20: return 4; case 19: return 3; case 18: return 2; } return 0; } -mixed b() { return 3; } -.... -test 811, expected result: EQ -mixed a() { switch(19) { default: return 0; case 21: return 5; case 20: return 4; case 19: return 3; case 18: return 2; } return -1; } -mixed b() { return 3; } -.... -test 812, expected result: EQ -mixed a() { switch(19) { case 21: return 5; default: return 0; case 20: return 4; case 19: return 3; case 18: return 2; } return -1; } -mixed b() { return 3; } -.... -test 813, expected result: EQ -mixed a() { switch(19) { case 21: return 5; case 20: return 4; default: return 0; case 19: return 3; case 18: return 2; } return -1; } -mixed b() { return 3; } -.... -test 814, expected result: EQ -mixed a() { switch(19) { case 21: return 5; case 20: return 4; case 19: return 3; default: return 0; case 18: return 2; } return -1; } -mixed b() { return 3; } -.... -test 815, expected result: EQ -mixed a() { switch(19) { case 21: return 5; case 20: return 4; case 19: return 3; case 18: return 2; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 816, expected result: EQ -mixed a() { switch(19) { case 21: return 5; case 20: return 4; case 18: return 2; case 19: return 3; } return 0; } -mixed b() { return 3; } -.... -test 817, expected result: EQ -mixed a() { switch(19) { default: return 0; case 21: return 5; case 20: return 4; case 18: return 2; case 19: return 3; } return -1; } -mixed b() { return 3; } -.... -test 818, expected result: EQ -mixed a() { switch(19) { case 21: return 5; default: return 0; case 20: return 4; case 18: return 2; case 19: return 3; } return -1; } -mixed b() { return 3; } -.... -test 819, expected result: EQ -mixed a() { switch(19) { case 21: return 5; case 20: return 4; default: return 0; case 18: return 2; case 19: return 3; } return -1; } -mixed b() { return 3; } -.... -test 820, expected result: EQ -mixed a() { switch(19) { case 21: return 5; case 20: return 4; case 18: return 2; default: return 0; case 19: return 3; } return -1; } -mixed b() { return 3; } -.... -test 821, expected result: EQ -mixed a() { switch(19) { case 21: return 5; case 20: return 4; case 18: return 2; case 19: return 3; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 822, expected result: EQ -mixed a() { switch(19) { case 21: return 5; case 18: return 2; case 20: return 4; case 19: return 3; } return 0; } -mixed b() { return 3; } -.... -test 823, expected result: EQ -mixed a() { switch(19) { default: return 0; case 21: return 5; case 18: return 2; case 20: return 4; case 19: return 3; } return -1; } -mixed b() { return 3; } -.... -test 824, expected result: EQ -mixed a() { switch(19) { case 21: return 5; default: return 0; case 18: return 2; case 20: return 4; case 19: return 3; } return -1; } -mixed b() { return 3; } -.... -test 825, expected result: EQ -mixed a() { switch(19) { case 21: return 5; case 18: return 2; default: return 0; case 20: return 4; case 19: return 3; } return -1; } -mixed b() { return 3; } -.... -test 826, expected result: EQ -mixed a() { switch(19) { case 21: return 5; case 18: return 2; case 20: return 4; default: return 0; case 19: return 3; } return -1; } -mixed b() { return 3; } -.... -test 827, expected result: EQ -mixed a() { switch(19) { case 21: return 5; case 18: return 2; case 20: return 4; case 19: return 3; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 828, expected result: EQ -mixed a() { switch(19) { case 21: return 5; case 18: return 2; case 19: return 3; case 20: return 4; } return 0; } -mixed b() { return 3; } -.... -test 829, expected result: EQ -mixed a() { switch(19) { default: return 0; case 21: return 5; case 18: return 2; case 19: return 3; case 20: return 4; } return -1; } -mixed b() { return 3; } -.... -test 830, expected result: EQ -mixed a() { switch(19) { case 21: return 5; default: return 0; case 18: return 2; case 19: return 3; case 20: return 4; } return -1; } -mixed b() { return 3; } -.... -test 831, expected result: EQ -mixed a() { switch(19) { case 21: return 5; case 18: return 2; default: return 0; case 19: return 3; case 20: return 4; } return -1; } -mixed b() { return 3; } -.... -test 832, expected result: EQ -mixed a() { switch(19) { case 21: return 5; case 18: return 2; case 19: return 3; default: return 0; case 20: return 4; } return -1; } -mixed b() { return 3; } -.... -test 833, expected result: EQ -mixed a() { switch(19) { case 21: return 5; case 18: return 2; case 19: return 3; case 20: return 4; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 834, expected result: EQ -mixed a() { switch(20) { case 18: return 2; case 19: return 3; case 20: return 4; case 21: return 5; } return 0; } -mixed b() { return 4; } -.... -test 835, expected result: EQ -mixed a() { switch(20) { default: return 0; case 18: return 2; case 19: return 3; case 20: return 4; case 21: return 5; } return -1; } -mixed b() { return 4; } -.... -test 836, expected result: EQ -mixed a() { switch(20) { case 18: return 2; default: return 0; case 19: return 3; case 20: return 4; case 21: return 5; } return -1; } -mixed b() { return 4; } -.... -test 837, expected result: EQ -mixed a() { switch(20) { case 18: return 2; case 19: return 3; default: return 0; case 20: return 4; case 21: return 5; } return -1; } -mixed b() { return 4; } -.... -test 838, expected result: EQ -mixed a() { switch(20) { case 18: return 2; case 19: return 3; case 20: return 4; default: return 0; case 21: return 5; } return -1; } -mixed b() { return 4; } -.... -test 839, expected result: EQ -mixed a() { switch(20) { case 18: return 2; case 19: return 3; case 20: return 4; case 21: return 5; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 840, expected result: EQ -mixed a() { switch(20) { case 18: return 2; case 19: return 3; case 21: return 5; case 20: return 4; } return 0; } -mixed b() { return 4; } -.... -test 841, expected result: EQ -mixed a() { switch(20) { default: return 0; case 18: return 2; case 19: return 3; case 21: return 5; case 20: return 4; } return -1; } -mixed b() { return 4; } -.... -test 842, expected result: EQ -mixed a() { switch(20) { case 18: return 2; default: return 0; case 19: return 3; case 21: return 5; case 20: return 4; } return -1; } -mixed b() { return 4; } -.... -test 843, expected result: EQ -mixed a() { switch(20) { case 18: return 2; case 19: return 3; default: return 0; case 21: return 5; case 20: return 4; } return -1; } -mixed b() { return 4; } -.... -test 844, expected result: EQ -mixed a() { switch(20) { case 18: return 2; case 19: return 3; case 21: return 5; default: return 0; case 20: return 4; } return -1; } -mixed b() { return 4; } -.... -test 845, expected result: EQ -mixed a() { switch(20) { case 18: return 2; case 19: return 3; case 21: return 5; case 20: return 4; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 846, expected result: EQ -mixed a() { switch(20) { case 18: return 2; case 20: return 4; case 19: return 3; case 21: return 5; } return 0; } -mixed b() { return 4; } -.... -test 847, expected result: EQ -mixed a() { switch(20) { default: return 0; case 18: return 2; case 20: return 4; case 19: return 3; case 21: return 5; } return -1; } -mixed b() { return 4; } -.... -test 848, expected result: EQ -mixed a() { switch(20) { case 18: return 2; default: return 0; case 20: return 4; case 19: return 3; case 21: return 5; } return -1; } -mixed b() { return 4; } -.... -test 849, expected result: EQ -mixed a() { switch(20) { case 18: return 2; case 20: return 4; default: return 0; case 19: return 3; case 21: return 5; } return -1; } -mixed b() { return 4; } -.... -test 850, expected result: EQ -mixed a() { switch(20) { case 18: return 2; case 20: return 4; case 19: return 3; default: return 0; case 21: return 5; } return -1; } -mixed b() { return 4; } -.... -test 851, expected result: EQ -mixed a() { switch(20) { case 18: return 2; case 20: return 4; case 19: return 3; case 21: return 5; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 852, expected result: EQ -mixed a() { switch(20) { case 18: return 2; case 20: return 4; case 21: return 5; case 19: return 3; } return 0; } -mixed b() { return 4; } -.... -test 853, expected result: EQ -mixed a() { switch(20) { default: return 0; case 18: return 2; case 20: return 4; case 21: return 5; case 19: return 3; } return -1; } -mixed b() { return 4; } -.... -test 854, expected result: EQ -mixed a() { switch(20) { case 18: return 2; default: return 0; case 20: return 4; case 21: return 5; case 19: return 3; } return -1; } -mixed b() { return 4; } -.... -test 855, expected result: EQ -mixed a() { switch(20) { case 18: return 2; case 20: return 4; default: return 0; case 21: return 5; case 19: return 3; } return -1; } -mixed b() { return 4; } -.... -test 856, expected result: EQ -mixed a() { switch(20) { case 18: return 2; case 20: return 4; case 21: return 5; default: return 0; case 19: return 3; } return -1; } -mixed b() { return 4; } -.... -test 857, expected result: EQ -mixed a() { switch(20) { case 18: return 2; case 20: return 4; case 21: return 5; case 19: return 3; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 858, expected result: EQ -mixed a() { switch(20) { case 18: return 2; case 21: return 5; case 20: return 4; case 19: return 3; } return 0; } -mixed b() { return 4; } -.... -test 859, expected result: EQ -mixed a() { switch(20) { default: return 0; case 18: return 2; case 21: return 5; case 20: return 4; case 19: return 3; } return -1; } -mixed b() { return 4; } -.... -test 860, expected result: EQ -mixed a() { switch(20) { case 18: return 2; default: return 0; case 21: return 5; case 20: return 4; case 19: return 3; } return -1; } -mixed b() { return 4; } -.... -test 861, expected result: EQ -mixed a() { switch(20) { case 18: return 2; case 21: return 5; default: return 0; case 20: return 4; case 19: return 3; } return -1; } -mixed b() { return 4; } -.... -test 862, expected result: EQ -mixed a() { switch(20) { case 18: return 2; case 21: return 5; case 20: return 4; default: return 0; case 19: return 3; } return -1; } -mixed b() { return 4; } -.... -test 863, expected result: EQ -mixed a() { switch(20) { case 18: return 2; case 21: return 5; case 20: return 4; case 19: return 3; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 864, expected result: EQ -mixed a() { switch(20) { case 18: return 2; case 21: return 5; case 19: return 3; case 20: return 4; } return 0; } -mixed b() { return 4; } -.... -test 865, expected result: EQ -mixed a() { switch(20) { default: return 0; case 18: return 2; case 21: return 5; case 19: return 3; case 20: return 4; } return -1; } -mixed b() { return 4; } -.... -test 866, expected result: EQ -mixed a() { switch(20) { case 18: return 2; default: return 0; case 21: return 5; case 19: return 3; case 20: return 4; } return -1; } -mixed b() { return 4; } -.... -test 867, expected result: EQ -mixed a() { switch(20) { case 18: return 2; case 21: return 5; default: return 0; case 19: return 3; case 20: return 4; } return -1; } -mixed b() { return 4; } -.... -test 868, expected result: EQ -mixed a() { switch(20) { case 18: return 2; case 21: return 5; case 19: return 3; default: return 0; case 20: return 4; } return -1; } -mixed b() { return 4; } -.... -test 869, expected result: EQ -mixed a() { switch(20) { case 18: return 2; case 21: return 5; case 19: return 3; case 20: return 4; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 870, expected result: EQ -mixed a() { switch(20) { case 19: return 3; case 18: return 2; case 20: return 4; case 21: return 5; } return 0; } -mixed b() { return 4; } -.... -test 871, expected result: EQ -mixed a() { switch(20) { default: return 0; case 19: return 3; case 18: return 2; case 20: return 4; case 21: return 5; } return -1; } -mixed b() { return 4; } -.... -test 872, expected result: EQ -mixed a() { switch(20) { case 19: return 3; default: return 0; case 18: return 2; case 20: return 4; case 21: return 5; } return -1; } -mixed b() { return 4; } -.... -test 873, expected result: EQ -mixed a() { switch(20) { case 19: return 3; case 18: return 2; default: return 0; case 20: return 4; case 21: return 5; } return -1; } -mixed b() { return 4; } -.... -test 874, expected result: EQ -mixed a() { switch(20) { case 19: return 3; case 18: return 2; case 20: return 4; default: return 0; case 21: return 5; } return -1; } -mixed b() { return 4; } -.... -test 875, expected result: EQ -mixed a() { switch(20) { case 19: return 3; case 18: return 2; case 20: return 4; case 21: return 5; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 876, expected result: EQ -mixed a() { switch(20) { case 19: return 3; case 18: return 2; case 21: return 5; case 20: return 4; } return 0; } -mixed b() { return 4; } -.... -test 877, expected result: EQ -mixed a() { switch(20) { default: return 0; case 19: return 3; case 18: return 2; case 21: return 5; case 20: return 4; } return -1; } -mixed b() { return 4; } -.... -test 878, expected result: EQ -mixed a() { switch(20) { case 19: return 3; default: return 0; case 18: return 2; case 21: return 5; case 20: return 4; } return -1; } -mixed b() { return 4; } -.... -test 879, expected result: EQ -mixed a() { switch(20) { case 19: return 3; case 18: return 2; default: return 0; case 21: return 5; case 20: return 4; } return -1; } -mixed b() { return 4; } -.... -test 880, expected result: EQ -mixed a() { switch(20) { case 19: return 3; case 18: return 2; case 21: return 5; default: return 0; case 20: return 4; } return -1; } -mixed b() { return 4; } -.... -test 881, expected result: EQ -mixed a() { switch(20) { case 19: return 3; case 18: return 2; case 21: return 5; case 20: return 4; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 882, expected result: EQ -mixed a() { switch(20) { case 19: return 3; case 20: return 4; case 18: return 2; case 21: return 5; } return 0; } -mixed b() { return 4; } -.... -test 883, expected result: EQ -mixed a() { switch(20) { default: return 0; case 19: return 3; case 20: return 4; case 18: return 2; case 21: return 5; } return -1; } -mixed b() { return 4; } -.... -test 884, expected result: EQ -mixed a() { switch(20) { case 19: return 3; default: return 0; case 20: return 4; case 18: return 2; case 21: return 5; } return -1; } -mixed b() { return 4; } -.... -test 885, expected result: EQ -mixed a() { switch(20) { case 19: return 3; case 20: return 4; default: return 0; case 18: return 2; case 21: return 5; } return -1; } -mixed b() { return 4; } -.... -test 886, expected result: EQ -mixed a() { switch(20) { case 19: return 3; case 20: return 4; case 18: return 2; default: return 0; case 21: return 5; } return -1; } -mixed b() { return 4; } -.... -test 887, expected result: EQ -mixed a() { switch(20) { case 19: return 3; case 20: return 4; case 18: return 2; case 21: return 5; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 888, expected result: EQ -mixed a() { switch(20) { case 19: return 3; case 20: return 4; case 21: return 5; case 18: return 2; } return 0; } -mixed b() { return 4; } -.... -test 889, expected result: EQ -mixed a() { switch(20) { default: return 0; case 19: return 3; case 20: return 4; case 21: return 5; case 18: return 2; } return -1; } -mixed b() { return 4; } -.... -test 890, expected result: EQ -mixed a() { switch(20) { case 19: return 3; default: return 0; case 20: return 4; case 21: return 5; case 18: return 2; } return -1; } -mixed b() { return 4; } -.... -test 891, expected result: EQ -mixed a() { switch(20) { case 19: return 3; case 20: return 4; default: return 0; case 21: return 5; case 18: return 2; } return -1; } -mixed b() { return 4; } -.... -test 892, expected result: EQ -mixed a() { switch(20) { case 19: return 3; case 20: return 4; case 21: return 5; default: return 0; case 18: return 2; } return -1; } -mixed b() { return 4; } -.... -test 893, expected result: EQ -mixed a() { switch(20) { case 19: return 3; case 20: return 4; case 21: return 5; case 18: return 2; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 894, expected result: EQ -mixed a() { switch(20) { case 19: return 3; case 21: return 5; case 20: return 4; case 18: return 2; } return 0; } -mixed b() { return 4; } -.... -test 895, expected result: EQ -mixed a() { switch(20) { default: return 0; case 19: return 3; case 21: return 5; case 20: return 4; case 18: return 2; } return -1; } -mixed b() { return 4; } -.... -test 896, expected result: EQ -mixed a() { switch(20) { case 19: return 3; default: return 0; case 21: return 5; case 20: return 4; case 18: return 2; } return -1; } -mixed b() { return 4; } -.... -test 897, expected result: EQ -mixed a() { switch(20) { case 19: return 3; case 21: return 5; default: return 0; case 20: return 4; case 18: return 2; } return -1; } -mixed b() { return 4; } -.... -test 898, expected result: EQ -mixed a() { switch(20) { case 19: return 3; case 21: return 5; case 20: return 4; default: return 0; case 18: return 2; } return -1; } -mixed b() { return 4; } -.... -test 899, expected result: EQ -mixed a() { switch(20) { case 19: return 3; case 21: return 5; case 20: return 4; case 18: return 2; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 900, expected result: EQ -mixed a() { switch(20) { case 19: return 3; case 21: return 5; case 18: return 2; case 20: return 4; } return 0; } -mixed b() { return 4; } -.... -test 901, expected result: EQ -mixed a() { switch(20) { default: return 0; case 19: return 3; case 21: return 5; case 18: return 2; case 20: return 4; } return -1; } -mixed b() { return 4; } -.... -test 902, expected result: EQ -mixed a() { switch(20) { case 19: return 3; default: return 0; case 21: return 5; case 18: return 2; case 20: return 4; } return -1; } -mixed b() { return 4; } -.... -test 903, expected result: EQ -mixed a() { switch(20) { case 19: return 3; case 21: return 5; default: return 0; case 18: return 2; case 20: return 4; } return -1; } -mixed b() { return 4; } -.... -test 904, expected result: EQ -mixed a() { switch(20) { case 19: return 3; case 21: return 5; case 18: return 2; default: return 0; case 20: return 4; } return -1; } -mixed b() { return 4; } -.... -test 905, expected result: EQ -mixed a() { switch(20) { case 19: return 3; case 21: return 5; case 18: return 2; case 20: return 4; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 906, expected result: EQ -mixed a() { switch(20) { case 20: return 4; case 19: return 3; case 18: return 2; case 21: return 5; } return 0; } -mixed b() { return 4; } -.... -test 907, expected result: EQ -mixed a() { switch(20) { default: return 0; case 20: return 4; case 19: return 3; case 18: return 2; case 21: return 5; } return -1; } -mixed b() { return 4; } -.... -test 908, expected result: EQ -mixed a() { switch(20) { case 20: return 4; default: return 0; case 19: return 3; case 18: return 2; case 21: return 5; } return -1; } -mixed b() { return 4; } -.... -test 909, expected result: EQ -mixed a() { switch(20) { case 20: return 4; case 19: return 3; default: return 0; case 18: return 2; case 21: return 5; } return -1; } -mixed b() { return 4; } -.... -test 910, expected result: EQ -mixed a() { switch(20) { case 20: return 4; case 19: return 3; case 18: return 2; default: return 0; case 21: return 5; } return -1; } -mixed b() { return 4; } -.... -test 911, expected result: EQ -mixed a() { switch(20) { case 20: return 4; case 19: return 3; case 18: return 2; case 21: return 5; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 912, expected result: EQ -mixed a() { switch(20) { case 20: return 4; case 19: return 3; case 21: return 5; case 18: return 2; } return 0; } -mixed b() { return 4; } -.... -test 913, expected result: EQ -mixed a() { switch(20) { default: return 0; case 20: return 4; case 19: return 3; case 21: return 5; case 18: return 2; } return -1; } -mixed b() { return 4; } -.... -test 914, expected result: EQ -mixed a() { switch(20) { case 20: return 4; default: return 0; case 19: return 3; case 21: return 5; case 18: return 2; } return -1; } -mixed b() { return 4; } -.... -test 915, expected result: EQ -mixed a() { switch(20) { case 20: return 4; case 19: return 3; default: return 0; case 21: return 5; case 18: return 2; } return -1; } -mixed b() { return 4; } -.... -test 916, expected result: EQ -mixed a() { switch(20) { case 20: return 4; case 19: return 3; case 21: return 5; default: return 0; case 18: return 2; } return -1; } -mixed b() { return 4; } -.... -test 917, expected result: EQ -mixed a() { switch(20) { case 20: return 4; case 19: return 3; case 21: return 5; case 18: return 2; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 918, expected result: EQ -mixed a() { switch(20) { case 20: return 4; case 18: return 2; case 19: return 3; case 21: return 5; } return 0; } -mixed b() { return 4; } -.... -test 919, expected result: EQ -mixed a() { switch(20) { default: return 0; case 20: return 4; case 18: return 2; case 19: return 3; case 21: return 5; } return -1; } -mixed b() { return 4; } -.... -test 920, expected result: EQ -mixed a() { switch(20) { case 20: return 4; default: return 0; case 18: return 2; case 19: return 3; case 21: return 5; } return -1; } -mixed b() { return 4; } -.... -test 921, expected result: EQ -mixed a() { switch(20) { case 20: return 4; case 18: return 2; default: return 0; case 19: return 3; case 21: return 5; } return -1; } -mixed b() { return 4; } -.... -test 922, expected result: EQ -mixed a() { switch(20) { case 20: return 4; case 18: return 2; case 19: return 3; default: return 0; case 21: return 5; } return -1; } -mixed b() { return 4; } -.... -test 923, expected result: EQ -mixed a() { switch(20) { case 20: return 4; case 18: return 2; case 19: return 3; case 21: return 5; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 924, expected result: EQ -mixed a() { switch(20) { case 20: return 4; case 18: return 2; case 21: return 5; case 19: return 3; } return 0; } -mixed b() { return 4; } -.... -test 925, expected result: EQ -mixed a() { switch(20) { default: return 0; case 20: return 4; case 18: return 2; case 21: return 5; case 19: return 3; } return -1; } -mixed b() { return 4; } -.... -test 926, expected result: EQ -mixed a() { switch(20) { case 20: return 4; default: return 0; case 18: return 2; case 21: return 5; case 19: return 3; } return -1; } -mixed b() { return 4; } -.... -test 927, expected result: EQ -mixed a() { switch(20) { case 20: return 4; case 18: return 2; default: return 0; case 21: return 5; case 19: return 3; } return -1; } -mixed b() { return 4; } -.... -test 928, expected result: EQ -mixed a() { switch(20) { case 20: return 4; case 18: return 2; case 21: return 5; default: return 0; case 19: return 3; } return -1; } -mixed b() { return 4; } -.... -test 929, expected result: EQ -mixed a() { switch(20) { case 20: return 4; case 18: return 2; case 21: return 5; case 19: return 3; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 930, expected result: EQ -mixed a() { switch(20) { case 20: return 4; case 21: return 5; case 18: return 2; case 19: return 3; } return 0; } -mixed b() { return 4; } -.... -test 931, expected result: EQ -mixed a() { switch(20) { default: return 0; case 20: return 4; case 21: return 5; case 18: return 2; case 19: return 3; } return -1; } -mixed b() { return 4; } -.... -test 932, expected result: EQ -mixed a() { switch(20) { case 20: return 4; default: return 0; case 21: return 5; case 18: return 2; case 19: return 3; } return -1; } -mixed b() { return 4; } -.... -test 933, expected result: EQ -mixed a() { switch(20) { case 20: return 4; case 21: return 5; default: return 0; case 18: return 2; case 19: return 3; } return -1; } -mixed b() { return 4; } -.... -test 934, expected result: EQ -mixed a() { switch(20) { case 20: return 4; case 21: return 5; case 18: return 2; default: return 0; case 19: return 3; } return -1; } -mixed b() { return 4; } -.... -test 935, expected result: EQ -mixed a() { switch(20) { case 20: return 4; case 21: return 5; case 18: return 2; case 19: return 3; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 936, expected result: EQ -mixed a() { switch(20) { case 20: return 4; case 21: return 5; case 19: return 3; case 18: return 2; } return 0; } -mixed b() { return 4; } -.... -test 937, expected result: EQ -mixed a() { switch(20) { default: return 0; case 20: return 4; case 21: return 5; case 19: return 3; case 18: return 2; } return -1; } -mixed b() { return 4; } -.... -test 938, expected result: EQ -mixed a() { switch(20) { case 20: return 4; default: return 0; case 21: return 5; case 19: return 3; case 18: return 2; } return -1; } -mixed b() { return 4; } -.... -test 939, expected result: EQ -mixed a() { switch(20) { case 20: return 4; case 21: return 5; default: return 0; case 19: return 3; case 18: return 2; } return -1; } -mixed b() { return 4; } -.... -test 940, expected result: EQ -mixed a() { switch(20) { case 20: return 4; case 21: return 5; case 19: return 3; default: return 0; case 18: return 2; } return -1; } -mixed b() { return 4; } -.... -test 941, expected result: EQ -mixed a() { switch(20) { case 20: return 4; case 21: return 5; case 19: return 3; case 18: return 2; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 942, expected result: EQ -mixed a() { switch(20) { case 21: return 5; case 19: return 3; case 20: return 4; case 18: return 2; } return 0; } -mixed b() { return 4; } -.... -test 943, expected result: EQ -mixed a() { switch(20) { default: return 0; case 21: return 5; case 19: return 3; case 20: return 4; case 18: return 2; } return -1; } -mixed b() { return 4; } -.... -test 944, expected result: EQ -mixed a() { switch(20) { case 21: return 5; default: return 0; case 19: return 3; case 20: return 4; case 18: return 2; } return -1; } -mixed b() { return 4; } -.... -test 945, expected result: EQ -mixed a() { switch(20) { case 21: return 5; case 19: return 3; default: return 0; case 20: return 4; case 18: return 2; } return -1; } -mixed b() { return 4; } -.... -test 946, expected result: EQ -mixed a() { switch(20) { case 21: return 5; case 19: return 3; case 20: return 4; default: return 0; case 18: return 2; } return -1; } -mixed b() { return 4; } -.... -test 947, expected result: EQ -mixed a() { switch(20) { case 21: return 5; case 19: return 3; case 20: return 4; case 18: return 2; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 948, expected result: EQ -mixed a() { switch(20) { case 21: return 5; case 19: return 3; case 18: return 2; case 20: return 4; } return 0; } -mixed b() { return 4; } -.... -test 949, expected result: EQ -mixed a() { switch(20) { default: return 0; case 21: return 5; case 19: return 3; case 18: return 2; case 20: return 4; } return -1; } -mixed b() { return 4; } -.... -test 950, expected result: EQ -mixed a() { switch(20) { case 21: return 5; default: return 0; case 19: return 3; case 18: return 2; case 20: return 4; } return -1; } -mixed b() { return 4; } -.... -test 951, expected result: EQ -mixed a() { switch(20) { case 21: return 5; case 19: return 3; default: return 0; case 18: return 2; case 20: return 4; } return -1; } -mixed b() { return 4; } -.... -test 952, expected result: EQ -mixed a() { switch(20) { case 21: return 5; case 19: return 3; case 18: return 2; default: return 0; case 20: return 4; } return -1; } -mixed b() { return 4; } -.... -test 953, expected result: EQ -mixed a() { switch(20) { case 21: return 5; case 19: return 3; case 18: return 2; case 20: return 4; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 954, expected result: EQ -mixed a() { switch(20) { case 21: return 5; case 20: return 4; case 19: return 3; case 18: return 2; } return 0; } -mixed b() { return 4; } -.... -test 955, expected result: EQ -mixed a() { switch(20) { default: return 0; case 21: return 5; case 20: return 4; case 19: return 3; case 18: return 2; } return -1; } -mixed b() { return 4; } -.... -test 956, expected result: EQ -mixed a() { switch(20) { case 21: return 5; default: return 0; case 20: return 4; case 19: return 3; case 18: return 2; } return -1; } -mixed b() { return 4; } -.... -test 957, expected result: EQ -mixed a() { switch(20) { case 21: return 5; case 20: return 4; default: return 0; case 19: return 3; case 18: return 2; } return -1; } -mixed b() { return 4; } -.... -test 958, expected result: EQ -mixed a() { switch(20) { case 21: return 5; case 20: return 4; case 19: return 3; default: return 0; case 18: return 2; } return -1; } -mixed b() { return 4; } -.... -test 959, expected result: EQ -mixed a() { switch(20) { case 21: return 5; case 20: return 4; case 19: return 3; case 18: return 2; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 960, expected result: EQ -mixed a() { switch(20) { case 21: return 5; case 20: return 4; case 18: return 2; case 19: return 3; } return 0; } -mixed b() { return 4; } -.... -test 961, expected result: EQ -mixed a() { switch(20) { default: return 0; case 21: return 5; case 20: return 4; case 18: return 2; case 19: return 3; } return -1; } -mixed b() { return 4; } -.... -test 962, expected result: EQ -mixed a() { switch(20) { case 21: return 5; default: return 0; case 20: return 4; case 18: return 2; case 19: return 3; } return -1; } -mixed b() { return 4; } -.... -test 963, expected result: EQ -mixed a() { switch(20) { case 21: return 5; case 20: return 4; default: return 0; case 18: return 2; case 19: return 3; } return -1; } -mixed b() { return 4; } -.... -test 964, expected result: EQ -mixed a() { switch(20) { case 21: return 5; case 20: return 4; case 18: return 2; default: return 0; case 19: return 3; } return -1; } -mixed b() { return 4; } -.... -test 965, expected result: EQ -mixed a() { switch(20) { case 21: return 5; case 20: return 4; case 18: return 2; case 19: return 3; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 966, expected result: EQ -mixed a() { switch(20) { case 21: return 5; case 18: return 2; case 20: return 4; case 19: return 3; } return 0; } -mixed b() { return 4; } -.... -test 967, expected result: EQ -mixed a() { switch(20) { default: return 0; case 21: return 5; case 18: return 2; case 20: return 4; case 19: return 3; } return -1; } -mixed b() { return 4; } -.... -test 968, expected result: EQ -mixed a() { switch(20) { case 21: return 5; default: return 0; case 18: return 2; case 20: return 4; case 19: return 3; } return -1; } -mixed b() { return 4; } -.... -test 969, expected result: EQ -mixed a() { switch(20) { case 21: return 5; case 18: return 2; default: return 0; case 20: return 4; case 19: return 3; } return -1; } -mixed b() { return 4; } -.... -test 970, expected result: EQ -mixed a() { switch(20) { case 21: return 5; case 18: return 2; case 20: return 4; default: return 0; case 19: return 3; } return -1; } -mixed b() { return 4; } -.... -test 971, expected result: EQ -mixed a() { switch(20) { case 21: return 5; case 18: return 2; case 20: return 4; case 19: return 3; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 972, expected result: EQ -mixed a() { switch(20) { case 21: return 5; case 18: return 2; case 19: return 3; case 20: return 4; } return 0; } -mixed b() { return 4; } -.... -test 973, expected result: EQ -mixed a() { switch(20) { default: return 0; case 21: return 5; case 18: return 2; case 19: return 3; case 20: return 4; } return -1; } -mixed b() { return 4; } -.... -test 974, expected result: EQ -mixed a() { switch(20) { case 21: return 5; default: return 0; case 18: return 2; case 19: return 3; case 20: return 4; } return -1; } -mixed b() { return 4; } -.... -test 975, expected result: EQ -mixed a() { switch(20) { case 21: return 5; case 18: return 2; default: return 0; case 19: return 3; case 20: return 4; } return -1; } -mixed b() { return 4; } -.... -test 976, expected result: EQ -mixed a() { switch(20) { case 21: return 5; case 18: return 2; case 19: return 3; default: return 0; case 20: return 4; } return -1; } -mixed b() { return 4; } -.... -test 977, expected result: EQ -mixed a() { switch(20) { case 21: return 5; case 18: return 2; case 19: return 3; case 20: return 4; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 978, expected result: EQ -mixed a() { switch(21) { case 18: return 2; case 19: return 3; case 20: return 4; case 21: return 5; } return 0; } -mixed b() { return 5; } -.... -test 979, expected result: EQ -mixed a() { switch(21) { default: return 0; case 18: return 2; case 19: return 3; case 20: return 4; case 21: return 5; } return -1; } -mixed b() { return 5; } -.... -test 980, expected result: EQ -mixed a() { switch(21) { case 18: return 2; default: return 0; case 19: return 3; case 20: return 4; case 21: return 5; } return -1; } -mixed b() { return 5; } -.... -test 981, expected result: EQ -mixed a() { switch(21) { case 18: return 2; case 19: return 3; default: return 0; case 20: return 4; case 21: return 5; } return -1; } -mixed b() { return 5; } -.... -test 982, expected result: EQ -mixed a() { switch(21) { case 18: return 2; case 19: return 3; case 20: return 4; default: return 0; case 21: return 5; } return -1; } -mixed b() { return 5; } -.... -test 983, expected result: EQ -mixed a() { switch(21) { case 18: return 2; case 19: return 3; case 20: return 4; case 21: return 5; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 984, expected result: EQ -mixed a() { switch(21) { case 18: return 2; case 19: return 3; case 21: return 5; case 20: return 4; } return 0; } -mixed b() { return 5; } -.... -test 985, expected result: EQ -mixed a() { switch(21) { default: return 0; case 18: return 2; case 19: return 3; case 21: return 5; case 20: return 4; } return -1; } -mixed b() { return 5; } -.... -test 986, expected result: EQ -mixed a() { switch(21) { case 18: return 2; default: return 0; case 19: return 3; case 21: return 5; case 20: return 4; } return -1; } -mixed b() { return 5; } -.... -test 987, expected result: EQ -mixed a() { switch(21) { case 18: return 2; case 19: return 3; default: return 0; case 21: return 5; case 20: return 4; } return -1; } -mixed b() { return 5; } -.... -test 988, expected result: EQ -mixed a() { switch(21) { case 18: return 2; case 19: return 3; case 21: return 5; default: return 0; case 20: return 4; } return -1; } -mixed b() { return 5; } -.... -test 989, expected result: EQ -mixed a() { switch(21) { case 18: return 2; case 19: return 3; case 21: return 5; case 20: return 4; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 990, expected result: EQ -mixed a() { switch(21) { case 18: return 2; case 20: return 4; case 19: return 3; case 21: return 5; } return 0; } -mixed b() { return 5; } -.... -test 991, expected result: EQ -mixed a() { switch(21) { default: return 0; case 18: return 2; case 20: return 4; case 19: return 3; case 21: return 5; } return -1; } -mixed b() { return 5; } -.... -test 992, expected result: EQ -mixed a() { switch(21) { case 18: return 2; default: return 0; case 20: return 4; case 19: return 3; case 21: return 5; } return -1; } -mixed b() { return 5; } -.... -test 993, expected result: EQ -mixed a() { switch(21) { case 18: return 2; case 20: return 4; default: return 0; case 19: return 3; case 21: return 5; } return -1; } -mixed b() { return 5; } -.... -test 994, expected result: EQ -mixed a() { switch(21) { case 18: return 2; case 20: return 4; case 19: return 3; default: return 0; case 21: return 5; } return -1; } -mixed b() { return 5; } -.... -test 995, expected result: EQ -mixed a() { switch(21) { case 18: return 2; case 20: return 4; case 19: return 3; case 21: return 5; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 996, expected result: EQ -mixed a() { switch(21) { case 18: return 2; case 20: return 4; case 21: return 5; case 19: return 3; } return 0; } -mixed b() { return 5; } -.... -test 997, expected result: EQ -mixed a() { switch(21) { default: return 0; case 18: return 2; case 20: return 4; case 21: return 5; case 19: return 3; } return -1; } -mixed b() { return 5; } -.... -test 998, expected result: EQ -mixed a() { switch(21) { case 18: return 2; default: return 0; case 20: return 4; case 21: return 5; case 19: return 3; } return -1; } -mixed b() { return 5; } -.... -test 999, expected result: EQ -mixed a() { switch(21) { case 18: return 2; case 20: return 4; default: return 0; case 21: return 5; case 19: return 3; } return -1; } -mixed b() { return 5; } -.... -test 1000, expected result: EQ -mixed a() { switch(21) { case 18: return 2; case 20: return 4; case 21: return 5; default: return 0; case 19: return 3; } return -1; } -mixed b() { return 5; } -.... -test 1001, expected result: EQ -mixed a() { switch(21) { case 18: return 2; case 20: return 4; case 21: return 5; case 19: return 3; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 1002, expected result: EQ -mixed a() { switch(21) { case 18: return 2; case 21: return 5; case 20: return 4; case 19: return 3; } return 0; } -mixed b() { return 5; } -.... -test 1003, expected result: EQ -mixed a() { switch(21) { default: return 0; case 18: return 2; case 21: return 5; case 20: return 4; case 19: return 3; } return -1; } -mixed b() { return 5; } -.... -test 1004, expected result: EQ -mixed a() { switch(21) { case 18: return 2; default: return 0; case 21: return 5; case 20: return 4; case 19: return 3; } return -1; } -mixed b() { return 5; } -.... -test 1005, expected result: EQ -mixed a() { switch(21) { case 18: return 2; case 21: return 5; default: return 0; case 20: return 4; case 19: return 3; } return -1; } -mixed b() { return 5; } -.... -test 1006, expected result: EQ -mixed a() { switch(21) { case 18: return 2; case 21: return 5; case 20: return 4; default: return 0; case 19: return 3; } return -1; } -mixed b() { return 5; } -.... -test 1007, expected result: EQ -mixed a() { switch(21) { case 18: return 2; case 21: return 5; case 20: return 4; case 19: return 3; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 1008, expected result: EQ -mixed a() { switch(21) { case 18: return 2; case 21: return 5; case 19: return 3; case 20: return 4; } return 0; } -mixed b() { return 5; } -.... -test 1009, expected result: EQ -mixed a() { switch(21) { default: return 0; case 18: return 2; case 21: return 5; case 19: return 3; case 20: return 4; } return -1; } -mixed b() { return 5; } -.... -test 1010, expected result: EQ -mixed a() { switch(21) { case 18: return 2; default: return 0; case 21: return 5; case 19: return 3; case 20: return 4; } return -1; } -mixed b() { return 5; } -.... -test 1011, expected result: EQ -mixed a() { switch(21) { case 18: return 2; case 21: return 5; default: return 0; case 19: return 3; case 20: return 4; } return -1; } -mixed b() { return 5; } -.... -test 1012, expected result: EQ -mixed a() { switch(21) { case 18: return 2; case 21: return 5; case 19: return 3; default: return 0; case 20: return 4; } return -1; } -mixed b() { return 5; } -.... -test 1013, expected result: EQ -mixed a() { switch(21) { case 18: return 2; case 21: return 5; case 19: return 3; case 20: return 4; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 1014, expected result: EQ -mixed a() { switch(21) { case 19: return 3; case 18: return 2; case 20: return 4; case 21: return 5; } return 0; } -mixed b() { return 5; } -.... -test 1015, expected result: EQ -mixed a() { switch(21) { default: return 0; case 19: return 3; case 18: return 2; case 20: return 4; case 21: return 5; } return -1; } -mixed b() { return 5; } -.... -test 1016, expected result: EQ -mixed a() { switch(21) { case 19: return 3; default: return 0; case 18: return 2; case 20: return 4; case 21: return 5; } return -1; } -mixed b() { return 5; } -.... -test 1017, expected result: EQ -mixed a() { switch(21) { case 19: return 3; case 18: return 2; default: return 0; case 20: return 4; case 21: return 5; } return -1; } -mixed b() { return 5; } -.... -test 1018, expected result: EQ -mixed a() { switch(21) { case 19: return 3; case 18: return 2; case 20: return 4; default: return 0; case 21: return 5; } return -1; } -mixed b() { return 5; } -.... -test 1019, expected result: EQ -mixed a() { switch(21) { case 19: return 3; case 18: return 2; case 20: return 4; case 21: return 5; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 1020, expected result: EQ -mixed a() { switch(21) { case 19: return 3; case 18: return 2; case 21: return 5; case 20: return 4; } return 0; } -mixed b() { return 5; } -.... -test 1021, expected result: EQ -mixed a() { switch(21) { default: return 0; case 19: return 3; case 18: return 2; case 21: return 5; case 20: return 4; } return -1; } -mixed b() { return 5; } -.... -test 1022, expected result: EQ -mixed a() { switch(21) { case 19: return 3; default: return 0; case 18: return 2; case 21: return 5; case 20: return 4; } return -1; } -mixed b() { return 5; } -.... -test 1023, expected result: EQ -mixed a() { switch(21) { case 19: return 3; case 18: return 2; default: return 0; case 21: return 5; case 20: return 4; } return -1; } -mixed b() { return 5; } -.... -test 1024, expected result: EQ -mixed a() { switch(21) { case 19: return 3; case 18: return 2; case 21: return 5; default: return 0; case 20: return 4; } return -1; } -mixed b() { return 5; } -.... -test 1025, expected result: EQ -mixed a() { switch(21) { case 19: return 3; case 18: return 2; case 21: return 5; case 20: return 4; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 1026, expected result: EQ -mixed a() { switch(21) { case 19: return 3; case 20: return 4; case 18: return 2; case 21: return 5; } return 0; } -mixed b() { return 5; } -.... -test 1027, expected result: EQ -mixed a() { switch(21) { default: return 0; case 19: return 3; case 20: return 4; case 18: return 2; case 21: return 5; } return -1; } -mixed b() { return 5; } -.... -test 1028, expected result: EQ -mixed a() { switch(21) { case 19: return 3; default: return 0; case 20: return 4; case 18: return 2; case 21: return 5; } return -1; } -mixed b() { return 5; } -.... -test 1029, expected result: EQ -mixed a() { switch(21) { case 19: return 3; case 20: return 4; default: return 0; case 18: return 2; case 21: return 5; } return -1; } -mixed b() { return 5; } -.... -test 1030, expected result: EQ -mixed a() { switch(21) { case 19: return 3; case 20: return 4; case 18: return 2; default: return 0; case 21: return 5; } return -1; } -mixed b() { return 5; } -.... -test 1031, expected result: EQ -mixed a() { switch(21) { case 19: return 3; case 20: return 4; case 18: return 2; case 21: return 5; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 1032, expected result: EQ -mixed a() { switch(21) { case 19: return 3; case 20: return 4; case 21: return 5; case 18: return 2; } return 0; } -mixed b() { return 5; } -.... -test 1033, expected result: EQ -mixed a() { switch(21) { default: return 0; case 19: return 3; case 20: return 4; case 21: return 5; case 18: return 2; } return -1; } -mixed b() { return 5; } -.... -test 1034, expected result: EQ -mixed a() { switch(21) { case 19: return 3; default: return 0; case 20: return 4; case 21: return 5; case 18: return 2; } return -1; } -mixed b() { return 5; } -.... -test 1035, expected result: EQ -mixed a() { switch(21) { case 19: return 3; case 20: return 4; default: return 0; case 21: return 5; case 18: return 2; } return -1; } -mixed b() { return 5; } -.... -test 1036, expected result: EQ -mixed a() { switch(21) { case 19: return 3; case 20: return 4; case 21: return 5; default: return 0; case 18: return 2; } return -1; } -mixed b() { return 5; } -.... -test 1037, expected result: EQ -mixed a() { switch(21) { case 19: return 3; case 20: return 4; case 21: return 5; case 18: return 2; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 1038, expected result: EQ -mixed a() { switch(21) { case 19: return 3; case 21: return 5; case 20: return 4; case 18: return 2; } return 0; } -mixed b() { return 5; } -.... -test 1039, expected result: EQ -mixed a() { switch(21) { default: return 0; case 19: return 3; case 21: return 5; case 20: return 4; case 18: return 2; } return -1; } -mixed b() { return 5; } -.... -test 1040, expected result: EQ -mixed a() { switch(21) { case 19: return 3; default: return 0; case 21: return 5; case 20: return 4; case 18: return 2; } return -1; } -mixed b() { return 5; } -.... -test 1041, expected result: EQ -mixed a() { switch(21) { case 19: return 3; case 21: return 5; default: return 0; case 20: return 4; case 18: return 2; } return -1; } -mixed b() { return 5; } -.... -test 1042, expected result: EQ -mixed a() { switch(21) { case 19: return 3; case 21: return 5; case 20: return 4; default: return 0; case 18: return 2; } return -1; } -mixed b() { return 5; } -.... -test 1043, expected result: EQ -mixed a() { switch(21) { case 19: return 3; case 21: return 5; case 20: return 4; case 18: return 2; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 1044, expected result: EQ -mixed a() { switch(21) { case 19: return 3; case 21: return 5; case 18: return 2; case 20: return 4; } return 0; } -mixed b() { return 5; } -.... -test 1045, expected result: EQ -mixed a() { switch(21) { default: return 0; case 19: return 3; case 21: return 5; case 18: return 2; case 20: return 4; } return -1; } -mixed b() { return 5; } -.... -test 1046, expected result: EQ -mixed a() { switch(21) { case 19: return 3; default: return 0; case 21: return 5; case 18: return 2; case 20: return 4; } return -1; } -mixed b() { return 5; } -.... -test 1047, expected result: EQ -mixed a() { switch(21) { case 19: return 3; case 21: return 5; default: return 0; case 18: return 2; case 20: return 4; } return -1; } -mixed b() { return 5; } -.... -test 1048, expected result: EQ -mixed a() { switch(21) { case 19: return 3; case 21: return 5; case 18: return 2; default: return 0; case 20: return 4; } return -1; } -mixed b() { return 5; } -.... -test 1049, expected result: EQ -mixed a() { switch(21) { case 19: return 3; case 21: return 5; case 18: return 2; case 20: return 4; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 1050, expected result: EQ -mixed a() { switch(21) { case 20: return 4; case 19: return 3; case 18: return 2; case 21: return 5; } return 0; } -mixed b() { return 5; } -.... -test 1051, expected result: EQ -mixed a() { switch(21) { default: return 0; case 20: return 4; case 19: return 3; case 18: return 2; case 21: return 5; } return -1; } -mixed b() { return 5; } -.... -test 1052, expected result: EQ -mixed a() { switch(21) { case 20: return 4; default: return 0; case 19: return 3; case 18: return 2; case 21: return 5; } return -1; } -mixed b() { return 5; } -.... -test 1053, expected result: EQ -mixed a() { switch(21) { case 20: return 4; case 19: return 3; default: return 0; case 18: return 2; case 21: return 5; } return -1; } -mixed b() { return 5; } -.... -test 1054, expected result: EQ -mixed a() { switch(21) { case 20: return 4; case 19: return 3; case 18: return 2; default: return 0; case 21: return 5; } return -1; } -mixed b() { return 5; } -.... -test 1055, expected result: EQ -mixed a() { switch(21) { case 20: return 4; case 19: return 3; case 18: return 2; case 21: return 5; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 1056, expected result: EQ -mixed a() { switch(21) { case 20: return 4; case 19: return 3; case 21: return 5; case 18: return 2; } return 0; } -mixed b() { return 5; } -.... -test 1057, expected result: EQ -mixed a() { switch(21) { default: return 0; case 20: return 4; case 19: return 3; case 21: return 5; case 18: return 2; } return -1; } -mixed b() { return 5; } -.... -test 1058, expected result: EQ -mixed a() { switch(21) { case 20: return 4; default: return 0; case 19: return 3; case 21: return 5; case 18: return 2; } return -1; } -mixed b() { return 5; } -.... -test 1059, expected result: EQ -mixed a() { switch(21) { case 20: return 4; case 19: return 3; default: return 0; case 21: return 5; case 18: return 2; } return -1; } -mixed b() { return 5; } -.... -test 1060, expected result: EQ -mixed a() { switch(21) { case 20: return 4; case 19: return 3; case 21: return 5; default: return 0; case 18: return 2; } return -1; } -mixed b() { return 5; } -.... -test 1061, expected result: EQ -mixed a() { switch(21) { case 20: return 4; case 19: return 3; case 21: return 5; case 18: return 2; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 1062, expected result: EQ -mixed a() { switch(21) { case 20: return 4; case 18: return 2; case 19: return 3; case 21: return 5; } return 0; } -mixed b() { return 5; } -.... -test 1063, expected result: EQ -mixed a() { switch(21) { default: return 0; case 20: return 4; case 18: return 2; case 19: return 3; case 21: return 5; } return -1; } -mixed b() { return 5; } -.... -test 1064, expected result: EQ -mixed a() { switch(21) { case 20: return 4; default: return 0; case 18: return 2; case 19: return 3; case 21: return 5; } return -1; } -mixed b() { return 5; } -.... -test 1065, expected result: EQ -mixed a() { switch(21) { case 20: return 4; case 18: return 2; default: return 0; case 19: return 3; case 21: return 5; } return -1; } -mixed b() { return 5; } -.... -test 1066, expected result: EQ -mixed a() { switch(21) { case 20: return 4; case 18: return 2; case 19: return 3; default: return 0; case 21: return 5; } return -1; } -mixed b() { return 5; } -.... -test 1067, expected result: EQ -mixed a() { switch(21) { case 20: return 4; case 18: return 2; case 19: return 3; case 21: return 5; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 1068, expected result: EQ -mixed a() { switch(21) { case 20: return 4; case 18: return 2; case 21: return 5; case 19: return 3; } return 0; } -mixed b() { return 5; } -.... -test 1069, expected result: EQ -mixed a() { switch(21) { default: return 0; case 20: return 4; case 18: return 2; case 21: return 5; case 19: return 3; } return -1; } -mixed b() { return 5; } -.... -test 1070, expected result: EQ -mixed a() { switch(21) { case 20: return 4; default: return 0; case 18: return 2; case 21: return 5; case 19: return 3; } return -1; } -mixed b() { return 5; } -.... -test 1071, expected result: EQ -mixed a() { switch(21) { case 20: return 4; case 18: return 2; default: return 0; case 21: return 5; case 19: return 3; } return -1; } -mixed b() { return 5; } -.... -test 1072, expected result: EQ -mixed a() { switch(21) { case 20: return 4; case 18: return 2; case 21: return 5; default: return 0; case 19: return 3; } return -1; } -mixed b() { return 5; } -.... -test 1073, expected result: EQ -mixed a() { switch(21) { case 20: return 4; case 18: return 2; case 21: return 5; case 19: return 3; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 1074, expected result: EQ -mixed a() { switch(21) { case 20: return 4; case 21: return 5; case 18: return 2; case 19: return 3; } return 0; } -mixed b() { return 5; } -.... -test 1075, expected result: EQ -mixed a() { switch(21) { default: return 0; case 20: return 4; case 21: return 5; case 18: return 2; case 19: return 3; } return -1; } -mixed b() { return 5; } -.... -test 1076, expected result: EQ -mixed a() { switch(21) { case 20: return 4; default: return 0; case 21: return 5; case 18: return 2; case 19: return 3; } return -1; } -mixed b() { return 5; } -.... -test 1077, expected result: EQ -mixed a() { switch(21) { case 20: return 4; case 21: return 5; default: return 0; case 18: return 2; case 19: return 3; } return -1; } -mixed b() { return 5; } -.... -test 1078, expected result: EQ -mixed a() { switch(21) { case 20: return 4; case 21: return 5; case 18: return 2; default: return 0; case 19: return 3; } return -1; } -mixed b() { return 5; } -.... -test 1079, expected result: EQ -mixed a() { switch(21) { case 20: return 4; case 21: return 5; case 18: return 2; case 19: return 3; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 1080, expected result: EQ -mixed a() { switch(21) { case 20: return 4; case 21: return 5; case 19: return 3; case 18: return 2; } return 0; } -mixed b() { return 5; } -.... -test 1081, expected result: EQ -mixed a() { switch(21) { default: return 0; case 20: return 4; case 21: return 5; case 19: return 3; case 18: return 2; } return -1; } -mixed b() { return 5; } -.... -test 1082, expected result: EQ -mixed a() { switch(21) { case 20: return 4; default: return 0; case 21: return 5; case 19: return 3; case 18: return 2; } return -1; } -mixed b() { return 5; } -.... -test 1083, expected result: EQ -mixed a() { switch(21) { case 20: return 4; case 21: return 5; default: return 0; case 19: return 3; case 18: return 2; } return -1; } -mixed b() { return 5; } -.... -test 1084, expected result: EQ -mixed a() { switch(21) { case 20: return 4; case 21: return 5; case 19: return 3; default: return 0; case 18: return 2; } return -1; } -mixed b() { return 5; } -.... -test 1085, expected result: EQ -mixed a() { switch(21) { case 20: return 4; case 21: return 5; case 19: return 3; case 18: return 2; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 1086, expected result: EQ -mixed a() { switch(21) { case 21: return 5; case 19: return 3; case 20: return 4; case 18: return 2; } return 0; } -mixed b() { return 5; } -.... -test 1087, expected result: EQ -mixed a() { switch(21) { default: return 0; case 21: return 5; case 19: return 3; case 20: return 4; case 18: return 2; } return -1; } -mixed b() { return 5; } -.... -test 1088, expected result: EQ -mixed a() { switch(21) { case 21: return 5; default: return 0; case 19: return 3; case 20: return 4; case 18: return 2; } return -1; } -mixed b() { return 5; } -.... -test 1089, expected result: EQ -mixed a() { switch(21) { case 21: return 5; case 19: return 3; default: return 0; case 20: return 4; case 18: return 2; } return -1; } -mixed b() { return 5; } -.... -test 1090, expected result: EQ -mixed a() { switch(21) { case 21: return 5; case 19: return 3; case 20: return 4; default: return 0; case 18: return 2; } return -1; } -mixed b() { return 5; } -.... -test 1091, expected result: EQ -mixed a() { switch(21) { case 21: return 5; case 19: return 3; case 20: return 4; case 18: return 2; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 1092, expected result: EQ -mixed a() { switch(21) { case 21: return 5; case 19: return 3; case 18: return 2; case 20: return 4; } return 0; } -mixed b() { return 5; } -.... -test 1093, expected result: EQ -mixed a() { switch(21) { default: return 0; case 21: return 5; case 19: return 3; case 18: return 2; case 20: return 4; } return -1; } -mixed b() { return 5; } -.... -test 1094, expected result: EQ -mixed a() { switch(21) { case 21: return 5; default: return 0; case 19: return 3; case 18: return 2; case 20: return 4; } return -1; } -mixed b() { return 5; } -.... -test 1095, expected result: EQ -mixed a() { switch(21) { case 21: return 5; case 19: return 3; default: return 0; case 18: return 2; case 20: return 4; } return -1; } -mixed b() { return 5; } -.... -test 1096, expected result: EQ -mixed a() { switch(21) { case 21: return 5; case 19: return 3; case 18: return 2; default: return 0; case 20: return 4; } return -1; } -mixed b() { return 5; } -.... -test 1097, expected result: EQ -mixed a() { switch(21) { case 21: return 5; case 19: return 3; case 18: return 2; case 20: return 4; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 1098, expected result: EQ -mixed a() { switch(21) { case 21: return 5; case 20: return 4; case 19: return 3; case 18: return 2; } return 0; } -mixed b() { return 5; } -.... -test 1099, expected result: EQ -mixed a() { switch(21) { default: return 0; case 21: return 5; case 20: return 4; case 19: return 3; case 18: return 2; } return -1; } -mixed b() { return 5; } -.... -test 1100, expected result: EQ -mixed a() { switch(21) { case 21: return 5; default: return 0; case 20: return 4; case 19: return 3; case 18: return 2; } return -1; } -mixed b() { return 5; } -.... -test 1101, expected result: EQ -mixed a() { switch(21) { case 21: return 5; case 20: return 4; default: return 0; case 19: return 3; case 18: return 2; } return -1; } -mixed b() { return 5; } -.... -test 1102, expected result: EQ -mixed a() { switch(21) { case 21: return 5; case 20: return 4; case 19: return 3; default: return 0; case 18: return 2; } return -1; } -mixed b() { return 5; } -.... -test 1103, expected result: EQ -mixed a() { switch(21) { case 21: return 5; case 20: return 4; case 19: return 3; case 18: return 2; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 1104, expected result: EQ -mixed a() { switch(21) { case 21: return 5; case 20: return 4; case 18: return 2; case 19: return 3; } return 0; } -mixed b() { return 5; } -.... -test 1105, expected result: EQ -mixed a() { switch(21) { default: return 0; case 21: return 5; case 20: return 4; case 18: return 2; case 19: return 3; } return -1; } -mixed b() { return 5; } -.... -test 1106, expected result: EQ -mixed a() { switch(21) { case 21: return 5; default: return 0; case 20: return 4; case 18: return 2; case 19: return 3; } return -1; } -mixed b() { return 5; } -.... -test 1107, expected result: EQ -mixed a() { switch(21) { case 21: return 5; case 20: return 4; default: return 0; case 18: return 2; case 19: return 3; } return -1; } -mixed b() { return 5; } -.... -test 1108, expected result: EQ -mixed a() { switch(21) { case 21: return 5; case 20: return 4; case 18: return 2; default: return 0; case 19: return 3; } return -1; } -mixed b() { return 5; } -.... -test 1109, expected result: EQ -mixed a() { switch(21) { case 21: return 5; case 20: return 4; case 18: return 2; case 19: return 3; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 1110, expected result: EQ -mixed a() { switch(21) { case 21: return 5; case 18: return 2; case 20: return 4; case 19: return 3; } return 0; } -mixed b() { return 5; } -.... -test 1111, expected result: EQ -mixed a() { switch(21) { default: return 0; case 21: return 5; case 18: return 2; case 20: return 4; case 19: return 3; } return -1; } -mixed b() { return 5; } -.... -test 1112, expected result: EQ -mixed a() { switch(21) { case 21: return 5; default: return 0; case 18: return 2; case 20: return 4; case 19: return 3; } return -1; } -mixed b() { return 5; } -.... -test 1113, expected result: EQ -mixed a() { switch(21) { case 21: return 5; case 18: return 2; default: return 0; case 20: return 4; case 19: return 3; } return -1; } -mixed b() { return 5; } -.... -test 1114, expected result: EQ -mixed a() { switch(21) { case 21: return 5; case 18: return 2; case 20: return 4; default: return 0; case 19: return 3; } return -1; } -mixed b() { return 5; } -.... -test 1115, expected result: EQ -mixed a() { switch(21) { case 21: return 5; case 18: return 2; case 20: return 4; case 19: return 3; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 1116, expected result: EQ -mixed a() { switch(21) { case 21: return 5; case 18: return 2; case 19: return 3; case 20: return 4; } return 0; } -mixed b() { return 5; } -.... -test 1117, expected result: EQ -mixed a() { switch(21) { default: return 0; case 21: return 5; case 18: return 2; case 19: return 3; case 20: return 4; } return -1; } -mixed b() { return 5; } -.... -test 1118, expected result: EQ -mixed a() { switch(21) { case 21: return 5; default: return 0; case 18: return 2; case 19: return 3; case 20: return 4; } return -1; } -mixed b() { return 5; } -.... -test 1119, expected result: EQ -mixed a() { switch(21) { case 21: return 5; case 18: return 2; default: return 0; case 19: return 3; case 20: return 4; } return -1; } -mixed b() { return 5; } -.... -test 1120, expected result: EQ -mixed a() { switch(21) { case 21: return 5; case 18: return 2; case 19: return 3; default: return 0; case 20: return 4; } return -1; } -mixed b() { return 5; } -.... -test 1121, expected result: EQ -mixed a() { switch(21) { case 21: return 5; case 18: return 2; case 19: return 3; case 20: return 4; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 1122, expected result: EQ -mixed a() { switch("a") { case "b": return 2; case "c": return 3; case "d": return 4; case "e": return 5; } return 0; } -mixed b() { return 0; } -.... -test 1123, expected result: EQ -mixed a() { switch("a") { default: return 0; case "b": return 2; case "c": return 3; case "d": return 4; case "e": return 5; } return -1; } -mixed b() { return 0; } -.... -test 1124, expected result: EQ -mixed a() { switch("a") { case "b": return 2; default: return 0; case "c": return 3; case "d": return 4; case "e": return 5; } return -1; } -mixed b() { return 0; } -.... -test 1125, expected result: EQ -mixed a() { switch("a") { case "b": return 2; case "c": return 3; default: return 0; case "d": return 4; case "e": return 5; } return -1; } -mixed b() { return 0; } -.... -test 1126, expected result: EQ -mixed a() { switch("a") { case "b": return 2; case "c": return 3; case "d": return 4; default: return 0; case "e": return 5; } return -1; } -mixed b() { return 0; } -.... -test 1127, expected result: EQ -mixed a() { switch("a") { case "b": return 2; case "c": return 3; case "d": return 4; case "e": return 5; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 1128, expected result: EQ -mixed a() { switch("a") { case "b": return 2; case "c": return 3; case "e": return 5; case "d": return 4; } return 0; } -mixed b() { return 0; } -.... -test 1129, expected result: EQ -mixed a() { switch("a") { default: return 0; case "b": return 2; case "c": return 3; case "e": return 5; case "d": return 4; } return -1; } -mixed b() { return 0; } -.... -test 1130, expected result: EQ -mixed a() { switch("a") { case "b": return 2; default: return 0; case "c": return 3; case "e": return 5; case "d": return 4; } return -1; } -mixed b() { return 0; } -.... -test 1131, expected result: EQ -mixed a() { switch("a") { case "b": return 2; case "c": return 3; default: return 0; case "e": return 5; case "d": return 4; } return -1; } -mixed b() { return 0; } -.... -test 1132, expected result: EQ -mixed a() { switch("a") { case "b": return 2; case "c": return 3; case "e": return 5; default: return 0; case "d": return 4; } return -1; } -mixed b() { return 0; } -.... -test 1133, expected result: EQ -mixed a() { switch("a") { case "b": return 2; case "c": return 3; case "e": return 5; case "d": return 4; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 1134, expected result: EQ -mixed a() { switch("a") { case "b": return 2; case "d": return 4; case "c": return 3; case "e": return 5; } return 0; } -mixed b() { return 0; } -.... -test 1135, expected result: EQ -mixed a() { switch("a") { default: return 0; case "b": return 2; case "d": return 4; case "c": return 3; case "e": return 5; } return -1; } -mixed b() { return 0; } -.... -test 1136, expected result: EQ -mixed a() { switch("a") { case "b": return 2; default: return 0; case "d": return 4; case "c": return 3; case "e": return 5; } return -1; } -mixed b() { return 0; } -.... -test 1137, expected result: EQ -mixed a() { switch("a") { case "b": return 2; case "d": return 4; default: return 0; case "c": return 3; case "e": return 5; } return -1; } -mixed b() { return 0; } -.... -test 1138, expected result: EQ -mixed a() { switch("a") { case "b": return 2; case "d": return 4; case "c": return 3; default: return 0; case "e": return 5; } return -1; } -mixed b() { return 0; } -.... -test 1139, expected result: EQ -mixed a() { switch("a") { case "b": return 2; case "d": return 4; case "c": return 3; case "e": return 5; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 1140, expected result: EQ -mixed a() { switch("a") { case "b": return 2; case "d": return 4; case "e": return 5; case "c": return 3; } return 0; } -mixed b() { return 0; } -.... -test 1141, expected result: EQ -mixed a() { switch("a") { default: return 0; case "b": return 2; case "d": return 4; case "e": return 5; case "c": return 3; } return -1; } -mixed b() { return 0; } -.... -test 1142, expected result: EQ -mixed a() { switch("a") { case "b": return 2; default: return 0; case "d": return 4; case "e": return 5; case "c": return 3; } return -1; } -mixed b() { return 0; } -.... -test 1143, expected result: EQ -mixed a() { switch("a") { case "b": return 2; case "d": return 4; default: return 0; case "e": return 5; case "c": return 3; } return -1; } -mixed b() { return 0; } -.... -test 1144, expected result: EQ -mixed a() { switch("a") { case "b": return 2; case "d": return 4; case "e": return 5; default: return 0; case "c": return 3; } return -1; } -mixed b() { return 0; } -.... -test 1145, expected result: EQ -mixed a() { switch("a") { case "b": return 2; case "d": return 4; case "e": return 5; case "c": return 3; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 1146, expected result: EQ -mixed a() { switch("a") { case "b": return 2; case "e": return 5; case "d": return 4; case "c": return 3; } return 0; } -mixed b() { return 0; } -.... -test 1147, expected result: EQ -mixed a() { switch("a") { default: return 0; case "b": return 2; case "e": return 5; case "d": return 4; case "c": return 3; } return -1; } -mixed b() { return 0; } -.... -test 1148, expected result: EQ -mixed a() { switch("a") { case "b": return 2; default: return 0; case "e": return 5; case "d": return 4; case "c": return 3; } return -1; } -mixed b() { return 0; } -.... -test 1149, expected result: EQ -mixed a() { switch("a") { case "b": return 2; case "e": return 5; default: return 0; case "d": return 4; case "c": return 3; } return -1; } -mixed b() { return 0; } -.... -test 1150, expected result: EQ -mixed a() { switch("a") { case "b": return 2; case "e": return 5; case "d": return 4; default: return 0; case "c": return 3; } return -1; } -mixed b() { return 0; } -.... -test 1151, expected result: EQ -mixed a() { switch("a") { case "b": return 2; case "e": return 5; case "d": return 4; case "c": return 3; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 1152, expected result: EQ -mixed a() { switch("a") { case "b": return 2; case "e": return 5; case "c": return 3; case "d": return 4; } return 0; } -mixed b() { return 0; } -.... -test 1153, expected result: EQ -mixed a() { switch("a") { default: return 0; case "b": return 2; case "e": return 5; case "c": return 3; case "d": return 4; } return -1; } -mixed b() { return 0; } -.... -test 1154, expected result: EQ -mixed a() { switch("a") { case "b": return 2; default: return 0; case "e": return 5; case "c": return 3; case "d": return 4; } return -1; } -mixed b() { return 0; } -.... -test 1155, expected result: EQ -mixed a() { switch("a") { case "b": return 2; case "e": return 5; default: return 0; case "c": return 3; case "d": return 4; } return -1; } -mixed b() { return 0; } -.... -test 1156, expected result: EQ -mixed a() { switch("a") { case "b": return 2; case "e": return 5; case "c": return 3; default: return 0; case "d": return 4; } return -1; } -mixed b() { return 0; } -.... -test 1157, expected result: EQ -mixed a() { switch("a") { case "b": return 2; case "e": return 5; case "c": return 3; case "d": return 4; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 1158, expected result: EQ -mixed a() { switch("a") { case "c": return 3; case "b": return 2; case "d": return 4; case "e": return 5; } return 0; } -mixed b() { return 0; } -.... -test 1159, expected result: EQ -mixed a() { switch("a") { default: return 0; case "c": return 3; case "b": return 2; case "d": return 4; case "e": return 5; } return -1; } -mixed b() { return 0; } -.... -test 1160, expected result: EQ -mixed a() { switch("a") { case "c": return 3; default: return 0; case "b": return 2; case "d": return 4; case "e": return 5; } return -1; } -mixed b() { return 0; } -.... -test 1161, expected result: EQ -mixed a() { switch("a") { case "c": return 3; case "b": return 2; default: return 0; case "d": return 4; case "e": return 5; } return -1; } -mixed b() { return 0; } -.... -test 1162, expected result: EQ -mixed a() { switch("a") { case "c": return 3; case "b": return 2; case "d": return 4; default: return 0; case "e": return 5; } return -1; } -mixed b() { return 0; } -.... -test 1163, expected result: EQ -mixed a() { switch("a") { case "c": return 3; case "b": return 2; case "d": return 4; case "e": return 5; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 1164, expected result: EQ -mixed a() { switch("a") { case "c": return 3; case "b": return 2; case "e": return 5; case "d": return 4; } return 0; } -mixed b() { return 0; } -.... -test 1165, expected result: EQ -mixed a() { switch("a") { default: return 0; case "c": return 3; case "b": return 2; case "e": return 5; case "d": return 4; } return -1; } -mixed b() { return 0; } -.... -test 1166, expected result: EQ -mixed a() { switch("a") { case "c": return 3; default: return 0; case "b": return 2; case "e": return 5; case "d": return 4; } return -1; } -mixed b() { return 0; } -.... -test 1167, expected result: EQ -mixed a() { switch("a") { case "c": return 3; case "b": return 2; default: return 0; case "e": return 5; case "d": return 4; } return -1; } -mixed b() { return 0; } -.... -test 1168, expected result: EQ -mixed a() { switch("a") { case "c": return 3; case "b": return 2; case "e": return 5; default: return 0; case "d": return 4; } return -1; } -mixed b() { return 0; } -.... -test 1169, expected result: EQ -mixed a() { switch("a") { case "c": return 3; case "b": return 2; case "e": return 5; case "d": return 4; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 1170, expected result: EQ -mixed a() { switch("a") { case "c": return 3; case "d": return 4; case "b": return 2; case "e": return 5; } return 0; } -mixed b() { return 0; } -.... -test 1171, expected result: EQ -mixed a() { switch("a") { default: return 0; case "c": return 3; case "d": return 4; case "b": return 2; case "e": return 5; } return -1; } -mixed b() { return 0; } -.... -test 1172, expected result: EQ -mixed a() { switch("a") { case "c": return 3; default: return 0; case "d": return 4; case "b": return 2; case "e": return 5; } return -1; } -mixed b() { return 0; } -.... -test 1173, expected result: EQ -mixed a() { switch("a") { case "c": return 3; case "d": return 4; default: return 0; case "b": return 2; case "e": return 5; } return -1; } -mixed b() { return 0; } -.... -test 1174, expected result: EQ -mixed a() { switch("a") { case "c": return 3; case "d": return 4; case "b": return 2; default: return 0; case "e": return 5; } return -1; } -mixed b() { return 0; } -.... -test 1175, expected result: EQ -mixed a() { switch("a") { case "c": return 3; case "d": return 4; case "b": return 2; case "e": return 5; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 1176, expected result: EQ -mixed a() { switch("a") { case "c": return 3; case "d": return 4; case "e": return 5; case "b": return 2; } return 0; } -mixed b() { return 0; } -.... -test 1177, expected result: EQ -mixed a() { switch("a") { default: return 0; case "c": return 3; case "d": return 4; case "e": return 5; case "b": return 2; } return -1; } -mixed b() { return 0; } -.... -test 1178, expected result: EQ -mixed a() { switch("a") { case "c": return 3; default: return 0; case "d": return 4; case "e": return 5; case "b": return 2; } return -1; } -mixed b() { return 0; } -.... -test 1179, expected result: EQ -mixed a() { switch("a") { case "c": return 3; case "d": return 4; default: return 0; case "e": return 5; case "b": return 2; } return -1; } -mixed b() { return 0; } -.... -test 1180, expected result: EQ -mixed a() { switch("a") { case "c": return 3; case "d": return 4; case "e": return 5; default: return 0; case "b": return 2; } return -1; } -mixed b() { return 0; } -.... -test 1181, expected result: EQ -mixed a() { switch("a") { case "c": return 3; case "d": return 4; case "e": return 5; case "b": return 2; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 1182, expected result: EQ -mixed a() { switch("a") { case "c": return 3; case "e": return 5; case "d": return 4; case "b": return 2; } return 0; } -mixed b() { return 0; } -.... -test 1183, expected result: EQ -mixed a() { switch("a") { default: return 0; case "c": return 3; case "e": return 5; case "d": return 4; case "b": return 2; } return -1; } -mixed b() { return 0; } -.... -test 1184, expected result: EQ -mixed a() { switch("a") { case "c": return 3; default: return 0; case "e": return 5; case "d": return 4; case "b": return 2; } return -1; } -mixed b() { return 0; } -.... -test 1185, expected result: EQ -mixed a() { switch("a") { case "c": return 3; case "e": return 5; default: return 0; case "d": return 4; case "b": return 2; } return -1; } -mixed b() { return 0; } -.... -test 1186, expected result: EQ -mixed a() { switch("a") { case "c": return 3; case "e": return 5; case "d": return 4; default: return 0; case "b": return 2; } return -1; } -mixed b() { return 0; } -.... -test 1187, expected result: EQ -mixed a() { switch("a") { case "c": return 3; case "e": return 5; case "d": return 4; case "b": return 2; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 1188, expected result: EQ -mixed a() { switch("a") { case "c": return 3; case "e": return 5; case "b": return 2; case "d": return 4; } return 0; } -mixed b() { return 0; } -.... -test 1189, expected result: EQ -mixed a() { switch("a") { default: return 0; case "c": return 3; case "e": return 5; case "b": return 2; case "d": return 4; } return -1; } -mixed b() { return 0; } -.... -test 1190, expected result: EQ -mixed a() { switch("a") { case "c": return 3; default: return 0; case "e": return 5; case "b": return 2; case "d": return 4; } return -1; } -mixed b() { return 0; } -.... -test 1191, expected result: EQ -mixed a() { switch("a") { case "c": return 3; case "e": return 5; default: return 0; case "b": return 2; case "d": return 4; } return -1; } -mixed b() { return 0; } -.... -test 1192, expected result: EQ -mixed a() { switch("a") { case "c": return 3; case "e": return 5; case "b": return 2; default: return 0; case "d": return 4; } return -1; } -mixed b() { return 0; } -.... -test 1193, expected result: EQ -mixed a() { switch("a") { case "c": return 3; case "e": return 5; case "b": return 2; case "d": return 4; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 1194, expected result: EQ -mixed a() { switch("a") { case "d": return 4; case "c": return 3; case "b": return 2; case "e": return 5; } return 0; } -mixed b() { return 0; } -.... -test 1195, expected result: EQ -mixed a() { switch("a") { default: return 0; case "d": return 4; case "c": return 3; case "b": return 2; case "e": return 5; } return -1; } -mixed b() { return 0; } -.... -test 1196, expected result: EQ -mixed a() { switch("a") { case "d": return 4; default: return 0; case "c": return 3; case "b": return 2; case "e": return 5; } return -1; } -mixed b() { return 0; } -.... -test 1197, expected result: EQ -mixed a() { switch("a") { case "d": return 4; case "c": return 3; default: return 0; case "b": return 2; case "e": return 5; } return -1; } -mixed b() { return 0; } -.... -test 1198, expected result: EQ -mixed a() { switch("a") { case "d": return 4; case "c": return 3; case "b": return 2; default: return 0; case "e": return 5; } return -1; } -mixed b() { return 0; } -.... -test 1199, expected result: EQ -mixed a() { switch("a") { case "d": return 4; case "c": return 3; case "b": return 2; case "e": return 5; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 1200, expected result: EQ -mixed a() { switch("a") { case "d": return 4; case "c": return 3; case "e": return 5; case "b": return 2; } return 0; } -mixed b() { return 0; } -.... -test 1201, expected result: EQ -mixed a() { switch("a") { default: return 0; case "d": return 4; case "c": return 3; case "e": return 5; case "b": return 2; } return -1; } -mixed b() { return 0; } -.... -test 1202, expected result: EQ -mixed a() { switch("a") { case "d": return 4; default: return 0; case "c": return 3; case "e": return 5; case "b": return 2; } return -1; } -mixed b() { return 0; } -.... -test 1203, expected result: EQ -mixed a() { switch("a") { case "d": return 4; case "c": return 3; default: return 0; case "e": return 5; case "b": return 2; } return -1; } -mixed b() { return 0; } -.... -test 1204, expected result: EQ -mixed a() { switch("a") { case "d": return 4; case "c": return 3; case "e": return 5; default: return 0; case "b": return 2; } return -1; } -mixed b() { return 0; } -.... -test 1205, expected result: EQ -mixed a() { switch("a") { case "d": return 4; case "c": return 3; case "e": return 5; case "b": return 2; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 1206, expected result: EQ -mixed a() { switch("a") { case "d": return 4; case "b": return 2; case "c": return 3; case "e": return 5; } return 0; } -mixed b() { return 0; } -.... -test 1207, expected result: EQ -mixed a() { switch("a") { default: return 0; case "d": return 4; case "b": return 2; case "c": return 3; case "e": return 5; } return -1; } -mixed b() { return 0; } -.... -test 1208, expected result: EQ -mixed a() { switch("a") { case "d": return 4; default: return 0; case "b": return 2; case "c": return 3; case "e": return 5; } return -1; } -mixed b() { return 0; } -.... -test 1209, expected result: EQ -mixed a() { switch("a") { case "d": return 4; case "b": return 2; default: return 0; case "c": return 3; case "e": return 5; } return -1; } -mixed b() { return 0; } -.... -test 1210, expected result: EQ -mixed a() { switch("a") { case "d": return 4; case "b": return 2; case "c": return 3; default: return 0; case "e": return 5; } return -1; } -mixed b() { return 0; } -.... -test 1211, expected result: EQ -mixed a() { switch("a") { case "d": return 4; case "b": return 2; case "c": return 3; case "e": return 5; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 1212, expected result: EQ -mixed a() { switch("a") { case "d": return 4; case "b": return 2; case "e": return 5; case "c": return 3; } return 0; } -mixed b() { return 0; } -.... -test 1213, expected result: EQ -mixed a() { switch("a") { default: return 0; case "d": return 4; case "b": return 2; case "e": return 5; case "c": return 3; } return -1; } -mixed b() { return 0; } -.... -test 1214, expected result: EQ -mixed a() { switch("a") { case "d": return 4; default: return 0; case "b": return 2; case "e": return 5; case "c": return 3; } return -1; } -mixed b() { return 0; } -.... -test 1215, expected result: EQ -mixed a() { switch("a") { case "d": return 4; case "b": return 2; default: return 0; case "e": return 5; case "c": return 3; } return -1; } -mixed b() { return 0; } -.... -test 1216, expected result: EQ -mixed a() { switch("a") { case "d": return 4; case "b": return 2; case "e": return 5; default: return 0; case "c": return 3; } return -1; } -mixed b() { return 0; } -.... -test 1217, expected result: EQ -mixed a() { switch("a") { case "d": return 4; case "b": return 2; case "e": return 5; case "c": return 3; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 1218, expected result: EQ -mixed a() { switch("a") { case "d": return 4; case "e": return 5; case "b": return 2; case "c": return 3; } return 0; } -mixed b() { return 0; } -.... -test 1219, expected result: EQ -mixed a() { switch("a") { default: return 0; case "d": return 4; case "e": return 5; case "b": return 2; case "c": return 3; } return -1; } -mixed b() { return 0; } -.... -test 1220, expected result: EQ -mixed a() { switch("a") { case "d": return 4; default: return 0; case "e": return 5; case "b": return 2; case "c": return 3; } return -1; } -mixed b() { return 0; } -.... -test 1221, expected result: EQ -mixed a() { switch("a") { case "d": return 4; case "e": return 5; default: return 0; case "b": return 2; case "c": return 3; } return -1; } -mixed b() { return 0; } -.... -test 1222, expected result: EQ -mixed a() { switch("a") { case "d": return 4; case "e": return 5; case "b": return 2; default: return 0; case "c": return 3; } return -1; } -mixed b() { return 0; } -.... -test 1223, expected result: EQ -mixed a() { switch("a") { case "d": return 4; case "e": return 5; case "b": return 2; case "c": return 3; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 1224, expected result: EQ -mixed a() { switch("a") { case "d": return 4; case "e": return 5; case "c": return 3; case "b": return 2; } return 0; } -mixed b() { return 0; } -.... -test 1225, expected result: EQ -mixed a() { switch("a") { default: return 0; case "d": return 4; case "e": return 5; case "c": return 3; case "b": return 2; } return -1; } -mixed b() { return 0; } -.... -test 1226, expected result: EQ -mixed a() { switch("a") { case "d": return 4; default: return 0; case "e": return 5; case "c": return 3; case "b": return 2; } return -1; } -mixed b() { return 0; } -.... -test 1227, expected result: EQ -mixed a() { switch("a") { case "d": return 4; case "e": return 5; default: return 0; case "c": return 3; case "b": return 2; } return -1; } -mixed b() { return 0; } -.... -test 1228, expected result: EQ -mixed a() { switch("a") { case "d": return 4; case "e": return 5; case "c": return 3; default: return 0; case "b": return 2; } return -1; } -mixed b() { return 0; } -.... -test 1229, expected result: EQ -mixed a() { switch("a") { case "d": return 4; case "e": return 5; case "c": return 3; case "b": return 2; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 1230, expected result: EQ -mixed a() { switch("a") { case "e": return 5; case "c": return 3; case "d": return 4; case "b": return 2; } return 0; } -mixed b() { return 0; } -.... -test 1231, expected result: EQ -mixed a() { switch("a") { default: return 0; case "e": return 5; case "c": return 3; case "d": return 4; case "b": return 2; } return -1; } -mixed b() { return 0; } -.... -test 1232, expected result: EQ -mixed a() { switch("a") { case "e": return 5; default: return 0; case "c": return 3; case "d": return 4; case "b": return 2; } return -1; } -mixed b() { return 0; } -.... -test 1233, expected result: EQ -mixed a() { switch("a") { case "e": return 5; case "c": return 3; default: return 0; case "d": return 4; case "b": return 2; } return -1; } -mixed b() { return 0; } -.... -test 1234, expected result: EQ -mixed a() { switch("a") { case "e": return 5; case "c": return 3; case "d": return 4; default: return 0; case "b": return 2; } return -1; } -mixed b() { return 0; } -.... -test 1235, expected result: EQ -mixed a() { switch("a") { case "e": return 5; case "c": return 3; case "d": return 4; case "b": return 2; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 1236, expected result: EQ -mixed a() { switch("a") { case "e": return 5; case "c": return 3; case "b": return 2; case "d": return 4; } return 0; } -mixed b() { return 0; } -.... -test 1237, expected result: EQ -mixed a() { switch("a") { default: return 0; case "e": return 5; case "c": return 3; case "b": return 2; case "d": return 4; } return -1; } -mixed b() { return 0; } -.... -test 1238, expected result: EQ -mixed a() { switch("a") { case "e": return 5; default: return 0; case "c": return 3; case "b": return 2; case "d": return 4; } return -1; } -mixed b() { return 0; } -.... -test 1239, expected result: EQ -mixed a() { switch("a") { case "e": return 5; case "c": return 3; default: return 0; case "b": return 2; case "d": return 4; } return -1; } -mixed b() { return 0; } -.... -test 1240, expected result: EQ -mixed a() { switch("a") { case "e": return 5; case "c": return 3; case "b": return 2; default: return 0; case "d": return 4; } return -1; } -mixed b() { return 0; } -.... -test 1241, expected result: EQ -mixed a() { switch("a") { case "e": return 5; case "c": return 3; case "b": return 2; case "d": return 4; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 1242, expected result: EQ -mixed a() { switch("a") { case "e": return 5; case "d": return 4; case "c": return 3; case "b": return 2; } return 0; } -mixed b() { return 0; } -.... -test 1243, expected result: EQ -mixed a() { switch("a") { default: return 0; case "e": return 5; case "d": return 4; case "c": return 3; case "b": return 2; } return -1; } -mixed b() { return 0; } -.... -test 1244, expected result: EQ -mixed a() { switch("a") { case "e": return 5; default: return 0; case "d": return 4; case "c": return 3; case "b": return 2; } return -1; } -mixed b() { return 0; } -.... -test 1245, expected result: EQ -mixed a() { switch("a") { case "e": return 5; case "d": return 4; default: return 0; case "c": return 3; case "b": return 2; } return -1; } -mixed b() { return 0; } -.... -test 1246, expected result: EQ -mixed a() { switch("a") { case "e": return 5; case "d": return 4; case "c": return 3; default: return 0; case "b": return 2; } return -1; } -mixed b() { return 0; } -.... -test 1247, expected result: EQ -mixed a() { switch("a") { case "e": return 5; case "d": return 4; case "c": return 3; case "b": return 2; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 1248, expected result: EQ -mixed a() { switch("a") { case "e": return 5; case "d": return 4; case "b": return 2; case "c": return 3; } return 0; } -mixed b() { return 0; } -.... -test 1249, expected result: EQ -mixed a() { switch("a") { default: return 0; case "e": return 5; case "d": return 4; case "b": return 2; case "c": return 3; } return -1; } -mixed b() { return 0; } -.... -test 1250, expected result: EQ -mixed a() { switch("a") { case "e": return 5; default: return 0; case "d": return 4; case "b": return 2; case "c": return 3; } return -1; } -mixed b() { return 0; } -.... -test 1251, expected result: EQ -mixed a() { switch("a") { case "e": return 5; case "d": return 4; default: return 0; case "b": return 2; case "c": return 3; } return -1; } -mixed b() { return 0; } -.... -test 1252, expected result: EQ -mixed a() { switch("a") { case "e": return 5; case "d": return 4; case "b": return 2; default: return 0; case "c": return 3; } return -1; } -mixed b() { return 0; } -.... -test 1253, expected result: EQ -mixed a() { switch("a") { case "e": return 5; case "d": return 4; case "b": return 2; case "c": return 3; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 1254, expected result: EQ -mixed a() { switch("a") { case "e": return 5; case "b": return 2; case "d": return 4; case "c": return 3; } return 0; } -mixed b() { return 0; } -.... -test 1255, expected result: EQ -mixed a() { switch("a") { default: return 0; case "e": return 5; case "b": return 2; case "d": return 4; case "c": return 3; } return -1; } -mixed b() { return 0; } -.... -test 1256, expected result: EQ -mixed a() { switch("a") { case "e": return 5; default: return 0; case "b": return 2; case "d": return 4; case "c": return 3; } return -1; } -mixed b() { return 0; } -.... -test 1257, expected result: EQ -mixed a() { switch("a") { case "e": return 5; case "b": return 2; default: return 0; case "d": return 4; case "c": return 3; } return -1; } -mixed b() { return 0; } -.... -test 1258, expected result: EQ -mixed a() { switch("a") { case "e": return 5; case "b": return 2; case "d": return 4; default: return 0; case "c": return 3; } return -1; } -mixed b() { return 0; } -.... -test 1259, expected result: EQ -mixed a() { switch("a") { case "e": return 5; case "b": return 2; case "d": return 4; case "c": return 3; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 1260, expected result: EQ -mixed a() { switch("a") { case "e": return 5; case "b": return 2; case "c": return 3; case "d": return 4; } return 0; } -mixed b() { return 0; } -.... -test 1261, expected result: EQ -mixed a() { switch("a") { default: return 0; case "e": return 5; case "b": return 2; case "c": return 3; case "d": return 4; } return -1; } -mixed b() { return 0; } -.... -test 1262, expected result: EQ -mixed a() { switch("a") { case "e": return 5; default: return 0; case "b": return 2; case "c": return 3; case "d": return 4; } return -1; } -mixed b() { return 0; } -.... -test 1263, expected result: EQ -mixed a() { switch("a") { case "e": return 5; case "b": return 2; default: return 0; case "c": return 3; case "d": return 4; } return -1; } -mixed b() { return 0; } -.... -test 1264, expected result: EQ -mixed a() { switch("a") { case "e": return 5; case "b": return 2; case "c": return 3; default: return 0; case "d": return 4; } return -1; } -mixed b() { return 0; } -.... -test 1265, expected result: EQ -mixed a() { switch("a") { case "e": return 5; case "b": return 2; case "c": return 3; case "d": return 4; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 1266, expected result: EQ -mixed a() { switch("b") { case "b": return 2; case "c": return 3; case "d": return 4; case "e": return 5; } return 0; } -mixed b() { return 2; } -.... -test 1267, expected result: EQ -mixed a() { switch("b") { default: return 0; case "b": return 2; case "c": return 3; case "d": return 4; case "e": return 5; } return -1; } -mixed b() { return 2; } -.... -test 1268, expected result: EQ -mixed a() { switch("b") { case "b": return 2; default: return 0; case "c": return 3; case "d": return 4; case "e": return 5; } return -1; } -mixed b() { return 2; } -.... -test 1269, expected result: EQ -mixed a() { switch("b") { case "b": return 2; case "c": return 3; default: return 0; case "d": return 4; case "e": return 5; } return -1; } -mixed b() { return 2; } -.... -test 1270, expected result: EQ -mixed a() { switch("b") { case "b": return 2; case "c": return 3; case "d": return 4; default: return 0; case "e": return 5; } return -1; } -mixed b() { return 2; } -.... -test 1271, expected result: EQ -mixed a() { switch("b") { case "b": return 2; case "c": return 3; case "d": return 4; case "e": return 5; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 1272, expected result: EQ -mixed a() { switch("b") { case "b": return 2; case "c": return 3; case "e": return 5; case "d": return 4; } return 0; } -mixed b() { return 2; } -.... -test 1273, expected result: EQ -mixed a() { switch("b") { default: return 0; case "b": return 2; case "c": return 3; case "e": return 5; case "d": return 4; } return -1; } -mixed b() { return 2; } -.... -test 1274, expected result: EQ -mixed a() { switch("b") { case "b": return 2; default: return 0; case "c": return 3; case "e": return 5; case "d": return 4; } return -1; } -mixed b() { return 2; } -.... -test 1275, expected result: EQ -mixed a() { switch("b") { case "b": return 2; case "c": return 3; default: return 0; case "e": return 5; case "d": return 4; } return -1; } -mixed b() { return 2; } -.... -test 1276, expected result: EQ -mixed a() { switch("b") { case "b": return 2; case "c": return 3; case "e": return 5; default: return 0; case "d": return 4; } return -1; } -mixed b() { return 2; } -.... -test 1277, expected result: EQ -mixed a() { switch("b") { case "b": return 2; case "c": return 3; case "e": return 5; case "d": return 4; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 1278, expected result: EQ -mixed a() { switch("b") { case "b": return 2; case "d": return 4; case "c": return 3; case "e": return 5; } return 0; } -mixed b() { return 2; } -.... -test 1279, expected result: EQ -mixed a() { switch("b") { default: return 0; case "b": return 2; case "d": return 4; case "c": return 3; case "e": return 5; } return -1; } -mixed b() { return 2; } -.... -test 1280, expected result: EQ -mixed a() { switch("b") { case "b": return 2; default: return 0; case "d": return 4; case "c": return 3; case "e": return 5; } return -1; } -mixed b() { return 2; } -.... -test 1281, expected result: EQ -mixed a() { switch("b") { case "b": return 2; case "d": return 4; default: return 0; case "c": return 3; case "e": return 5; } return -1; } -mixed b() { return 2; } -.... -test 1282, expected result: EQ -mixed a() { switch("b") { case "b": return 2; case "d": return 4; case "c": return 3; default: return 0; case "e": return 5; } return -1; } -mixed b() { return 2; } -.... -test 1283, expected result: EQ -mixed a() { switch("b") { case "b": return 2; case "d": return 4; case "c": return 3; case "e": return 5; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 1284, expected result: EQ -mixed a() { switch("b") { case "b": return 2; case "d": return 4; case "e": return 5; case "c": return 3; } return 0; } -mixed b() { return 2; } -.... -test 1285, expected result: EQ -mixed a() { switch("b") { default: return 0; case "b": return 2; case "d": return 4; case "e": return 5; case "c": return 3; } return -1; } -mixed b() { return 2; } -.... -test 1286, expected result: EQ -mixed a() { switch("b") { case "b": return 2; default: return 0; case "d": return 4; case "e": return 5; case "c": return 3; } return -1; } -mixed b() { return 2; } -.... -test 1287, expected result: EQ -mixed a() { switch("b") { case "b": return 2; case "d": return 4; default: return 0; case "e": return 5; case "c": return 3; } return -1; } -mixed b() { return 2; } -.... -test 1288, expected result: EQ -mixed a() { switch("b") { case "b": return 2; case "d": return 4; case "e": return 5; default: return 0; case "c": return 3; } return -1; } -mixed b() { return 2; } -.... -test 1289, expected result: EQ -mixed a() { switch("b") { case "b": return 2; case "d": return 4; case "e": return 5; case "c": return 3; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 1290, expected result: EQ -mixed a() { switch("b") { case "b": return 2; case "e": return 5; case "d": return 4; case "c": return 3; } return 0; } -mixed b() { return 2; } -.... -test 1291, expected result: EQ -mixed a() { switch("b") { default: return 0; case "b": return 2; case "e": return 5; case "d": return 4; case "c": return 3; } return -1; } -mixed b() { return 2; } -.... -test 1292, expected result: EQ -mixed a() { switch("b") { case "b": return 2; default: return 0; case "e": return 5; case "d": return 4; case "c": return 3; } return -1; } -mixed b() { return 2; } -.... -test 1293, expected result: EQ -mixed a() { switch("b") { case "b": return 2; case "e": return 5; default: return 0; case "d": return 4; case "c": return 3; } return -1; } -mixed b() { return 2; } -.... -test 1294, expected result: EQ -mixed a() { switch("b") { case "b": return 2; case "e": return 5; case "d": return 4; default: return 0; case "c": return 3; } return -1; } -mixed b() { return 2; } -.... -test 1295, expected result: EQ -mixed a() { switch("b") { case "b": return 2; case "e": return 5; case "d": return 4; case "c": return 3; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 1296, expected result: EQ -mixed a() { switch("b") { case "b": return 2; case "e": return 5; case "c": return 3; case "d": return 4; } return 0; } -mixed b() { return 2; } -.... -test 1297, expected result: EQ -mixed a() { switch("b") { default: return 0; case "b": return 2; case "e": return 5; case "c": return 3; case "d": return 4; } return -1; } -mixed b() { return 2; } -.... -test 1298, expected result: EQ -mixed a() { switch("b") { case "b": return 2; default: return 0; case "e": return 5; case "c": return 3; case "d": return 4; } return -1; } -mixed b() { return 2; } -.... -test 1299, expected result: EQ -mixed a() { switch("b") { case "b": return 2; case "e": return 5; default: return 0; case "c": return 3; case "d": return 4; } return -1; } -mixed b() { return 2; } -.... -test 1300, expected result: EQ -mixed a() { switch("b") { case "b": return 2; case "e": return 5; case "c": return 3; default: return 0; case "d": return 4; } return -1; } -mixed b() { return 2; } -.... -test 1301, expected result: EQ -mixed a() { switch("b") { case "b": return 2; case "e": return 5; case "c": return 3; case "d": return 4; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 1302, expected result: EQ -mixed a() { switch("b") { case "c": return 3; case "b": return 2; case "d": return 4; case "e": return 5; } return 0; } -mixed b() { return 2; } -.... -test 1303, expected result: EQ -mixed a() { switch("b") { default: return 0; case "c": return 3; case "b": return 2; case "d": return 4; case "e": return 5; } return -1; } -mixed b() { return 2; } -.... -test 1304, expected result: EQ -mixed a() { switch("b") { case "c": return 3; default: return 0; case "b": return 2; case "d": return 4; case "e": return 5; } return -1; } -mixed b() { return 2; } -.... -test 1305, expected result: EQ -mixed a() { switch("b") { case "c": return 3; case "b": return 2; default: return 0; case "d": return 4; case "e": return 5; } return -1; } -mixed b() { return 2; } -.... -test 1306, expected result: EQ -mixed a() { switch("b") { case "c": return 3; case "b": return 2; case "d": return 4; default: return 0; case "e": return 5; } return -1; } -mixed b() { return 2; } -.... -test 1307, expected result: EQ -mixed a() { switch("b") { case "c": return 3; case "b": return 2; case "d": return 4; case "e": return 5; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 1308, expected result: EQ -mixed a() { switch("b") { case "c": return 3; case "b": return 2; case "e": return 5; case "d": return 4; } return 0; } -mixed b() { return 2; } -.... -test 1309, expected result: EQ -mixed a() { switch("b") { default: return 0; case "c": return 3; case "b": return 2; case "e": return 5; case "d": return 4; } return -1; } -mixed b() { return 2; } -.... -test 1310, expected result: EQ -mixed a() { switch("b") { case "c": return 3; default: return 0; case "b": return 2; case "e": return 5; case "d": return 4; } return -1; } -mixed b() { return 2; } -.... -test 1311, expected result: EQ -mixed a() { switch("b") { case "c": return 3; case "b": return 2; default: return 0; case "e": return 5; case "d": return 4; } return -1; } -mixed b() { return 2; } -.... -test 1312, expected result: EQ -mixed a() { switch("b") { case "c": return 3; case "b": return 2; case "e": return 5; default: return 0; case "d": return 4; } return -1; } -mixed b() { return 2; } -.... -test 1313, expected result: EQ -mixed a() { switch("b") { case "c": return 3; case "b": return 2; case "e": return 5; case "d": return 4; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 1314, expected result: EQ -mixed a() { switch("b") { case "c": return 3; case "d": return 4; case "b": return 2; case "e": return 5; } return 0; } -mixed b() { return 2; } -.... -test 1315, expected result: EQ -mixed a() { switch("b") { default: return 0; case "c": return 3; case "d": return 4; case "b": return 2; case "e": return 5; } return -1; } -mixed b() { return 2; } -.... -test 1316, expected result: EQ -mixed a() { switch("b") { case "c": return 3; default: return 0; case "d": return 4; case "b": return 2; case "e": return 5; } return -1; } -mixed b() { return 2; } -.... -test 1317, expected result: EQ -mixed a() { switch("b") { case "c": return 3; case "d": return 4; default: return 0; case "b": return 2; case "e": return 5; } return -1; } -mixed b() { return 2; } -.... -test 1318, expected result: EQ -mixed a() { switch("b") { case "c": return 3; case "d": return 4; case "b": return 2; default: return 0; case "e": return 5; } return -1; } -mixed b() { return 2; } -.... -test 1319, expected result: EQ -mixed a() { switch("b") { case "c": return 3; case "d": return 4; case "b": return 2; case "e": return 5; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 1320, expected result: EQ -mixed a() { switch("b") { case "c": return 3; case "d": return 4; case "e": return 5; case "b": return 2; } return 0; } -mixed b() { return 2; } -.... -test 1321, expected result: EQ -mixed a() { switch("b") { default: return 0; case "c": return 3; case "d": return 4; case "e": return 5; case "b": return 2; } return -1; } -mixed b() { return 2; } -.... -test 1322, expected result: EQ -mixed a() { switch("b") { case "c": return 3; default: return 0; case "d": return 4; case "e": return 5; case "b": return 2; } return -1; } -mixed b() { return 2; } -.... -test 1323, expected result: EQ -mixed a() { switch("b") { case "c": return 3; case "d": return 4; default: return 0; case "e": return 5; case "b": return 2; } return -1; } -mixed b() { return 2; } -.... -test 1324, expected result: EQ -mixed a() { switch("b") { case "c": return 3; case "d": return 4; case "e": return 5; default: return 0; case "b": return 2; } return -1; } -mixed b() { return 2; } -.... -test 1325, expected result: EQ -mixed a() { switch("b") { case "c": return 3; case "d": return 4; case "e": return 5; case "b": return 2; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 1326, expected result: EQ -mixed a() { switch("b") { case "c": return 3; case "e": return 5; case "d": return 4; case "b": return 2; } return 0; } -mixed b() { return 2; } -.... -test 1327, expected result: EQ -mixed a() { switch("b") { default: return 0; case "c": return 3; case "e": return 5; case "d": return 4; case "b": return 2; } return -1; } -mixed b() { return 2; } -.... -test 1328, expected result: EQ -mixed a() { switch("b") { case "c": return 3; default: return 0; case "e": return 5; case "d": return 4; case "b": return 2; } return -1; } -mixed b() { return 2; } -.... -test 1329, expected result: EQ -mixed a() { switch("b") { case "c": return 3; case "e": return 5; default: return 0; case "d": return 4; case "b": return 2; } return -1; } -mixed b() { return 2; } -.... -test 1330, expected result: EQ -mixed a() { switch("b") { case "c": return 3; case "e": return 5; case "d": return 4; default: return 0; case "b": return 2; } return -1; } -mixed b() { return 2; } -.... -test 1331, expected result: EQ -mixed a() { switch("b") { case "c": return 3; case "e": return 5; case "d": return 4; case "b": return 2; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 1332, expected result: EQ -mixed a() { switch("b") { case "c": return 3; case "e": return 5; case "b": return 2; case "d": return 4; } return 0; } -mixed b() { return 2; } -.... -test 1333, expected result: EQ -mixed a() { switch("b") { default: return 0; case "c": return 3; case "e": return 5; case "b": return 2; case "d": return 4; } return -1; } -mixed b() { return 2; } -.... -test 1334, expected result: EQ -mixed a() { switch("b") { case "c": return 3; default: return 0; case "e": return 5; case "b": return 2; case "d": return 4; } return -1; } -mixed b() { return 2; } -.... -test 1335, expected result: EQ -mixed a() { switch("b") { case "c": return 3; case "e": return 5; default: return 0; case "b": return 2; case "d": return 4; } return -1; } -mixed b() { return 2; } -.... -test 1336, expected result: EQ -mixed a() { switch("b") { case "c": return 3; case "e": return 5; case "b": return 2; default: return 0; case "d": return 4; } return -1; } -mixed b() { return 2; } -.... -test 1337, expected result: EQ -mixed a() { switch("b") { case "c": return 3; case "e": return 5; case "b": return 2; case "d": return 4; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 1338, expected result: EQ -mixed a() { switch("b") { case "d": return 4; case "c": return 3; case "b": return 2; case "e": return 5; } return 0; } -mixed b() { return 2; } -.... -test 1339, expected result: EQ -mixed a() { switch("b") { default: return 0; case "d": return 4; case "c": return 3; case "b": return 2; case "e": return 5; } return -1; } -mixed b() { return 2; } -.... -test 1340, expected result: EQ -mixed a() { switch("b") { case "d": return 4; default: return 0; case "c": return 3; case "b": return 2; case "e": return 5; } return -1; } -mixed b() { return 2; } -.... -test 1341, expected result: EQ -mixed a() { switch("b") { case "d": return 4; case "c": return 3; default: return 0; case "b": return 2; case "e": return 5; } return -1; } -mixed b() { return 2; } -.... -test 1342, expected result: EQ -mixed a() { switch("b") { case "d": return 4; case "c": return 3; case "b": return 2; default: return 0; case "e": return 5; } return -1; } -mixed b() { return 2; } -.... -test 1343, expected result: EQ -mixed a() { switch("b") { case "d": return 4; case "c": return 3; case "b": return 2; case "e": return 5; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 1344, expected result: EQ -mixed a() { switch("b") { case "d": return 4; case "c": return 3; case "e": return 5; case "b": return 2; } return 0; } -mixed b() { return 2; } -.... -test 1345, expected result: EQ -mixed a() { switch("b") { default: return 0; case "d": return 4; case "c": return 3; case "e": return 5; case "b": return 2; } return -1; } -mixed b() { return 2; } -.... -test 1346, expected result: EQ -mixed a() { switch("b") { case "d": return 4; default: return 0; case "c": return 3; case "e": return 5; case "b": return 2; } return -1; } -mixed b() { return 2; } -.... -test 1347, expected result: EQ -mixed a() { switch("b") { case "d": return 4; case "c": return 3; default: return 0; case "e": return 5; case "b": return 2; } return -1; } -mixed b() { return 2; } -.... -test 1348, expected result: EQ -mixed a() { switch("b") { case "d": return 4; case "c": return 3; case "e": return 5; default: return 0; case "b": return 2; } return -1; } -mixed b() { return 2; } -.... -test 1349, expected result: EQ -mixed a() { switch("b") { case "d": return 4; case "c": return 3; case "e": return 5; case "b": return 2; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 1350, expected result: EQ -mixed a() { switch("b") { case "d": return 4; case "b": return 2; case "c": return 3; case "e": return 5; } return 0; } -mixed b() { return 2; } -.... -test 1351, expected result: EQ -mixed a() { switch("b") { default: return 0; case "d": return 4; case "b": return 2; case "c": return 3; case "e": return 5; } return -1; } -mixed b() { return 2; } -.... -test 1352, expected result: EQ -mixed a() { switch("b") { case "d": return 4; default: return 0; case "b": return 2; case "c": return 3; case "e": return 5; } return -1; } -mixed b() { return 2; } -.... -test 1353, expected result: EQ -mixed a() { switch("b") { case "d": return 4; case "b": return 2; default: return 0; case "c": return 3; case "e": return 5; } return -1; } -mixed b() { return 2; } -.... -test 1354, expected result: EQ -mixed a() { switch("b") { case "d": return 4; case "b": return 2; case "c": return 3; default: return 0; case "e": return 5; } return -1; } -mixed b() { return 2; } -.... -test 1355, expected result: EQ -mixed a() { switch("b") { case "d": return 4; case "b": return 2; case "c": return 3; case "e": return 5; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 1356, expected result: EQ -mixed a() { switch("b") { case "d": return 4; case "b": return 2; case "e": return 5; case "c": return 3; } return 0; } -mixed b() { return 2; } -.... -test 1357, expected result: EQ -mixed a() { switch("b") { default: return 0; case "d": return 4; case "b": return 2; case "e": return 5; case "c": return 3; } return -1; } -mixed b() { return 2; } -.... -test 1358, expected result: EQ -mixed a() { switch("b") { case "d": return 4; default: return 0; case "b": return 2; case "e": return 5; case "c": return 3; } return -1; } -mixed b() { return 2; } -.... -test 1359, expected result: EQ -mixed a() { switch("b") { case "d": return 4; case "b": return 2; default: return 0; case "e": return 5; case "c": return 3; } return -1; } -mixed b() { return 2; } -.... -test 1360, expected result: EQ -mixed a() { switch("b") { case "d": return 4; case "b": return 2; case "e": return 5; default: return 0; case "c": return 3; } return -1; } -mixed b() { return 2; } -.... -test 1361, expected result: EQ -mixed a() { switch("b") { case "d": return 4; case "b": return 2; case "e": return 5; case "c": return 3; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 1362, expected result: EQ -mixed a() { switch("b") { case "d": return 4; case "e": return 5; case "b": return 2; case "c": return 3; } return 0; } -mixed b() { return 2; } -.... -test 1363, expected result: EQ -mixed a() { switch("b") { default: return 0; case "d": return 4; case "e": return 5; case "b": return 2; case "c": return 3; } return -1; } -mixed b() { return 2; } -.... -test 1364, expected result: EQ -mixed a() { switch("b") { case "d": return 4; default: return 0; case "e": return 5; case "b": return 2; case "c": return 3; } return -1; } -mixed b() { return 2; } -.... -test 1365, expected result: EQ -mixed a() { switch("b") { case "d": return 4; case "e": return 5; default: return 0; case "b": return 2; case "c": return 3; } return -1; } -mixed b() { return 2; } -.... -test 1366, expected result: EQ -mixed a() { switch("b") { case "d": return 4; case "e": return 5; case "b": return 2; default: return 0; case "c": return 3; } return -1; } -mixed b() { return 2; } -.... -test 1367, expected result: EQ -mixed a() { switch("b") { case "d": return 4; case "e": return 5; case "b": return 2; case "c": return 3; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 1368, expected result: EQ -mixed a() { switch("b") { case "d": return 4; case "e": return 5; case "c": return 3; case "b": return 2; } return 0; } -mixed b() { return 2; } -.... -test 1369, expected result: EQ -mixed a() { switch("b") { default: return 0; case "d": return 4; case "e": return 5; case "c": return 3; case "b": return 2; } return -1; } -mixed b() { return 2; } -.... -test 1370, expected result: EQ -mixed a() { switch("b") { case "d": return 4; default: return 0; case "e": return 5; case "c": return 3; case "b": return 2; } return -1; } -mixed b() { return 2; } -.... -test 1371, expected result: EQ -mixed a() { switch("b") { case "d": return 4; case "e": return 5; default: return 0; case "c": return 3; case "b": return 2; } return -1; } -mixed b() { return 2; } -.... -test 1372, expected result: EQ -mixed a() { switch("b") { case "d": return 4; case "e": return 5; case "c": return 3; default: return 0; case "b": return 2; } return -1; } -mixed b() { return 2; } -.... -test 1373, expected result: EQ -mixed a() { switch("b") { case "d": return 4; case "e": return 5; case "c": return 3; case "b": return 2; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 1374, expected result: EQ -mixed a() { switch("b") { case "e": return 5; case "c": return 3; case "d": return 4; case "b": return 2; } return 0; } -mixed b() { return 2; } -.... -test 1375, expected result: EQ -mixed a() { switch("b") { default: return 0; case "e": return 5; case "c": return 3; case "d": return 4; case "b": return 2; } return -1; } -mixed b() { return 2; } -.... -test 1376, expected result: EQ -mixed a() { switch("b") { case "e": return 5; default: return 0; case "c": return 3; case "d": return 4; case "b": return 2; } return -1; } -mixed b() { return 2; } -.... -test 1377, expected result: EQ -mixed a() { switch("b") { case "e": return 5; case "c": return 3; default: return 0; case "d": return 4; case "b": return 2; } return -1; } -mixed b() { return 2; } -.... -test 1378, expected result: EQ -mixed a() { switch("b") { case "e": return 5; case "c": return 3; case "d": return 4; default: return 0; case "b": return 2; } return -1; } -mixed b() { return 2; } -.... -test 1379, expected result: EQ -mixed a() { switch("b") { case "e": return 5; case "c": return 3; case "d": return 4; case "b": return 2; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 1380, expected result: EQ -mixed a() { switch("b") { case "e": return 5; case "c": return 3; case "b": return 2; case "d": return 4; } return 0; } -mixed b() { return 2; } -.... -test 1381, expected result: EQ -mixed a() { switch("b") { default: return 0; case "e": return 5; case "c": return 3; case "b": return 2; case "d": return 4; } return -1; } -mixed b() { return 2; } -.... -test 1382, expected result: EQ -mixed a() { switch("b") { case "e": return 5; default: return 0; case "c": return 3; case "b": return 2; case "d": return 4; } return -1; } -mixed b() { return 2; } -.... -test 1383, expected result: EQ -mixed a() { switch("b") { case "e": return 5; case "c": return 3; default: return 0; case "b": return 2; case "d": return 4; } return -1; } -mixed b() { return 2; } -.... -test 1384, expected result: EQ -mixed a() { switch("b") { case "e": return 5; case "c": return 3; case "b": return 2; default: return 0; case "d": return 4; } return -1; } -mixed b() { return 2; } -.... -test 1385, expected result: EQ -mixed a() { switch("b") { case "e": return 5; case "c": return 3; case "b": return 2; case "d": return 4; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 1386, expected result: EQ -mixed a() { switch("b") { case "e": return 5; case "d": return 4; case "c": return 3; case "b": return 2; } return 0; } -mixed b() { return 2; } -.... -test 1387, expected result: EQ -mixed a() { switch("b") { default: return 0; case "e": return 5; case "d": return 4; case "c": return 3; case "b": return 2; } return -1; } -mixed b() { return 2; } -.... -test 1388, expected result: EQ -mixed a() { switch("b") { case "e": return 5; default: return 0; case "d": return 4; case "c": return 3; case "b": return 2; } return -1; } -mixed b() { return 2; } -.... -test 1389, expected result: EQ -mixed a() { switch("b") { case "e": return 5; case "d": return 4; default: return 0; case "c": return 3; case "b": return 2; } return -1; } -mixed b() { return 2; } -.... -test 1390, expected result: EQ -mixed a() { switch("b") { case "e": return 5; case "d": return 4; case "c": return 3; default: return 0; case "b": return 2; } return -1; } -mixed b() { return 2; } -.... -test 1391, expected result: EQ -mixed a() { switch("b") { case "e": return 5; case "d": return 4; case "c": return 3; case "b": return 2; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 1392, expected result: EQ -mixed a() { switch("b") { case "e": return 5; case "d": return 4; case "b": return 2; case "c": return 3; } return 0; } -mixed b() { return 2; } -.... -test 1393, expected result: EQ -mixed a() { switch("b") { default: return 0; case "e": return 5; case "d": return 4; case "b": return 2; case "c": return 3; } return -1; } -mixed b() { return 2; } -.... -test 1394, expected result: EQ -mixed a() { switch("b") { case "e": return 5; default: return 0; case "d": return 4; case "b": return 2; case "c": return 3; } return -1; } -mixed b() { return 2; } -.... -test 1395, expected result: EQ -mixed a() { switch("b") { case "e": return 5; case "d": return 4; default: return 0; case "b": return 2; case "c": return 3; } return -1; } -mixed b() { return 2; } -.... -test 1396, expected result: EQ -mixed a() { switch("b") { case "e": return 5; case "d": return 4; case "b": return 2; default: return 0; case "c": return 3; } return -1; } -mixed b() { return 2; } -.... -test 1397, expected result: EQ -mixed a() { switch("b") { case "e": return 5; case "d": return 4; case "b": return 2; case "c": return 3; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 1398, expected result: EQ -mixed a() { switch("b") { case "e": return 5; case "b": return 2; case "d": return 4; case "c": return 3; } return 0; } -mixed b() { return 2; } -.... -test 1399, expected result: EQ -mixed a() { switch("b") { default: return 0; case "e": return 5; case "b": return 2; case "d": return 4; case "c": return 3; } return -1; } -mixed b() { return 2; } -.... -test 1400, expected result: EQ -mixed a() { switch("b") { case "e": return 5; default: return 0; case "b": return 2; case "d": return 4; case "c": return 3; } return -1; } -mixed b() { return 2; } -.... -test 1401, expected result: EQ -mixed a() { switch("b") { case "e": return 5; case "b": return 2; default: return 0; case "d": return 4; case "c": return 3; } return -1; } -mixed b() { return 2; } -.... -test 1402, expected result: EQ -mixed a() { switch("b") { case "e": return 5; case "b": return 2; case "d": return 4; default: return 0; case "c": return 3; } return -1; } -mixed b() { return 2; } -.... -test 1403, expected result: EQ -mixed a() { switch("b") { case "e": return 5; case "b": return 2; case "d": return 4; case "c": return 3; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 1404, expected result: EQ -mixed a() { switch("b") { case "e": return 5; case "b": return 2; case "c": return 3; case "d": return 4; } return 0; } -mixed b() { return 2; } -.... -test 1405, expected result: EQ -mixed a() { switch("b") { default: return 0; case "e": return 5; case "b": return 2; case "c": return 3; case "d": return 4; } return -1; } -mixed b() { return 2; } -.... -test 1406, expected result: EQ -mixed a() { switch("b") { case "e": return 5; default: return 0; case "b": return 2; case "c": return 3; case "d": return 4; } return -1; } -mixed b() { return 2; } -.... -test 1407, expected result: EQ -mixed a() { switch("b") { case "e": return 5; case "b": return 2; default: return 0; case "c": return 3; case "d": return 4; } return -1; } -mixed b() { return 2; } -.... -test 1408, expected result: EQ -mixed a() { switch("b") { case "e": return 5; case "b": return 2; case "c": return 3; default: return 0; case "d": return 4; } return -1; } -mixed b() { return 2; } -.... -test 1409, expected result: EQ -mixed a() { switch("b") { case "e": return 5; case "b": return 2; case "c": return 3; case "d": return 4; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 1410, expected result: EQ -mixed a() { switch("c") { case "b": return 2; case "c": return 3; case "d": return 4; case "e": return 5; } return 0; } -mixed b() { return 3; } -.... -test 1411, expected result: EQ -mixed a() { switch("c") { default: return 0; case "b": return 2; case "c": return 3; case "d": return 4; case "e": return 5; } return -1; } -mixed b() { return 3; } -.... -test 1412, expected result: EQ -mixed a() { switch("c") { case "b": return 2; default: return 0; case "c": return 3; case "d": return 4; case "e": return 5; } return -1; } -mixed b() { return 3; } -.... -test 1413, expected result: EQ -mixed a() { switch("c") { case "b": return 2; case "c": return 3; default: return 0; case "d": return 4; case "e": return 5; } return -1; } -mixed b() { return 3; } -.... -test 1414, expected result: EQ -mixed a() { switch("c") { case "b": return 2; case "c": return 3; case "d": return 4; default: return 0; case "e": return 5; } return -1; } -mixed b() { return 3; } -.... -test 1415, expected result: EQ -mixed a() { switch("c") { case "b": return 2; case "c": return 3; case "d": return 4; case "e": return 5; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 1416, expected result: EQ -mixed a() { switch("c") { case "b": return 2; case "c": return 3; case "e": return 5; case "d": return 4; } return 0; } -mixed b() { return 3; } -.... -test 1417, expected result: EQ -mixed a() { switch("c") { default: return 0; case "b": return 2; case "c": return 3; case "e": return 5; case "d": return 4; } return -1; } -mixed b() { return 3; } -.... -test 1418, expected result: EQ -mixed a() { switch("c") { case "b": return 2; default: return 0; case "c": return 3; case "e": return 5; case "d": return 4; } return -1; } -mixed b() { return 3; } -.... -test 1419, expected result: EQ -mixed a() { switch("c") { case "b": return 2; case "c": return 3; default: return 0; case "e": return 5; case "d": return 4; } return -1; } -mixed b() { return 3; } -.... -test 1420, expected result: EQ -mixed a() { switch("c") { case "b": return 2; case "c": return 3; case "e": return 5; default: return 0; case "d": return 4; } return -1; } -mixed b() { return 3; } -.... -test 1421, expected result: EQ -mixed a() { switch("c") { case "b": return 2; case "c": return 3; case "e": return 5; case "d": return 4; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 1422, expected result: EQ -mixed a() { switch("c") { case "b": return 2; case "d": return 4; case "c": return 3; case "e": return 5; } return 0; } -mixed b() { return 3; } -.... -test 1423, expected result: EQ -mixed a() { switch("c") { default: return 0; case "b": return 2; case "d": return 4; case "c": return 3; case "e": return 5; } return -1; } -mixed b() { return 3; } -.... -test 1424, expected result: EQ -mixed a() { switch("c") { case "b": return 2; default: return 0; case "d": return 4; case "c": return 3; case "e": return 5; } return -1; } -mixed b() { return 3; } -.... -test 1425, expected result: EQ -mixed a() { switch("c") { case "b": return 2; case "d": return 4; default: return 0; case "c": return 3; case "e": return 5; } return -1; } -mixed b() { return 3; } -.... -test 1426, expected result: EQ -mixed a() { switch("c") { case "b": return 2; case "d": return 4; case "c": return 3; default: return 0; case "e": return 5; } return -1; } -mixed b() { return 3; } -.... -test 1427, expected result: EQ -mixed a() { switch("c") { case "b": return 2; case "d": return 4; case "c": return 3; case "e": return 5; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 1428, expected result: EQ -mixed a() { switch("c") { case "b": return 2; case "d": return 4; case "e": return 5; case "c": return 3; } return 0; } -mixed b() { return 3; } -.... -test 1429, expected result: EQ -mixed a() { switch("c") { default: return 0; case "b": return 2; case "d": return 4; case "e": return 5; case "c": return 3; } return -1; } -mixed b() { return 3; } -.... -test 1430, expected result: EQ -mixed a() { switch("c") { case "b": return 2; default: return 0; case "d": return 4; case "e": return 5; case "c": return 3; } return -1; } -mixed b() { return 3; } -.... -test 1431, expected result: EQ -mixed a() { switch("c") { case "b": return 2; case "d": return 4; default: return 0; case "e": return 5; case "c": return 3; } return -1; } -mixed b() { return 3; } -.... -test 1432, expected result: EQ -mixed a() { switch("c") { case "b": return 2; case "d": return 4; case "e": return 5; default: return 0; case "c": return 3; } return -1; } -mixed b() { return 3; } -.... -test 1433, expected result: EQ -mixed a() { switch("c") { case "b": return 2; case "d": return 4; case "e": return 5; case "c": return 3; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 1434, expected result: EQ -mixed a() { switch("c") { case "b": return 2; case "e": return 5; case "d": return 4; case "c": return 3; } return 0; } -mixed b() { return 3; } -.... -test 1435, expected result: EQ -mixed a() { switch("c") { default: return 0; case "b": return 2; case "e": return 5; case "d": return 4; case "c": return 3; } return -1; } -mixed b() { return 3; } -.... -test 1436, expected result: EQ -mixed a() { switch("c") { case "b": return 2; default: return 0; case "e": return 5; case "d": return 4; case "c": return 3; } return -1; } -mixed b() { return 3; } -.... -test 1437, expected result: EQ -mixed a() { switch("c") { case "b": return 2; case "e": return 5; default: return 0; case "d": return 4; case "c": return 3; } return -1; } -mixed b() { return 3; } -.... -test 1438, expected result: EQ -mixed a() { switch("c") { case "b": return 2; case "e": return 5; case "d": return 4; default: return 0; case "c": return 3; } return -1; } -mixed b() { return 3; } -.... -test 1439, expected result: EQ -mixed a() { switch("c") { case "b": return 2; case "e": return 5; case "d": return 4; case "c": return 3; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 1440, expected result: EQ -mixed a() { switch("c") { case "b": return 2; case "e": return 5; case "c": return 3; case "d": return 4; } return 0; } -mixed b() { return 3; } -.... -test 1441, expected result: EQ -mixed a() { switch("c") { default: return 0; case "b": return 2; case "e": return 5; case "c": return 3; case "d": return 4; } return -1; } -mixed b() { return 3; } -.... -test 1442, expected result: EQ -mixed a() { switch("c") { case "b": return 2; default: return 0; case "e": return 5; case "c": return 3; case "d": return 4; } return -1; } -mixed b() { return 3; } -.... -test 1443, expected result: EQ -mixed a() { switch("c") { case "b": return 2; case "e": return 5; default: return 0; case "c": return 3; case "d": return 4; } return -1; } -mixed b() { return 3; } -.... -test 1444, expected result: EQ -mixed a() { switch("c") { case "b": return 2; case "e": return 5; case "c": return 3; default: return 0; case "d": return 4; } return -1; } -mixed b() { return 3; } -.... -test 1445, expected result: EQ -mixed a() { switch("c") { case "b": return 2; case "e": return 5; case "c": return 3; case "d": return 4; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 1446, expected result: EQ -mixed a() { switch("c") { case "c": return 3; case "b": return 2; case "d": return 4; case "e": return 5; } return 0; } -mixed b() { return 3; } -.... -test 1447, expected result: EQ -mixed a() { switch("c") { default: return 0; case "c": return 3; case "b": return 2; case "d": return 4; case "e": return 5; } return -1; } -mixed b() { return 3; } -.... -test 1448, expected result: EQ -mixed a() { switch("c") { case "c": return 3; default: return 0; case "b": return 2; case "d": return 4; case "e": return 5; } return -1; } -mixed b() { return 3; } -.... -test 1449, expected result: EQ -mixed a() { switch("c") { case "c": return 3; case "b": return 2; default: return 0; case "d": return 4; case "e": return 5; } return -1; } -mixed b() { return 3; } -.... -test 1450, expected result: EQ -mixed a() { switch("c") { case "c": return 3; case "b": return 2; case "d": return 4; default: return 0; case "e": return 5; } return -1; } -mixed b() { return 3; } -.... -test 1451, expected result: EQ -mixed a() { switch("c") { case "c": return 3; case "b": return 2; case "d": return 4; case "e": return 5; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 1452, expected result: EQ -mixed a() { switch("c") { case "c": return 3; case "b": return 2; case "e": return 5; case "d": return 4; } return 0; } -mixed b() { return 3; } -.... -test 1453, expected result: EQ -mixed a() { switch("c") { default: return 0; case "c": return 3; case "b": return 2; case "e": return 5; case "d": return 4; } return -1; } -mixed b() { return 3; } -.... -test 1454, expected result: EQ -mixed a() { switch("c") { case "c": return 3; default: return 0; case "b": return 2; case "e": return 5; case "d": return 4; } return -1; } -mixed b() { return 3; } -.... -test 1455, expected result: EQ -mixed a() { switch("c") { case "c": return 3; case "b": return 2; default: return 0; case "e": return 5; case "d": return 4; } return -1; } -mixed b() { return 3; } -.... -test 1456, expected result: EQ -mixed a() { switch("c") { case "c": return 3; case "b": return 2; case "e": return 5; default: return 0; case "d": return 4; } return -1; } -mixed b() { return 3; } -.... -test 1457, expected result: EQ -mixed a() { switch("c") { case "c": return 3; case "b": return 2; case "e": return 5; case "d": return 4; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 1458, expected result: EQ -mixed a() { switch("c") { case "c": return 3; case "d": return 4; case "b": return 2; case "e": return 5; } return 0; } -mixed b() { return 3; } -.... -test 1459, expected result: EQ -mixed a() { switch("c") { default: return 0; case "c": return 3; case "d": return 4; case "b": return 2; case "e": return 5; } return -1; } -mixed b() { return 3; } -.... -test 1460, expected result: EQ -mixed a() { switch("c") { case "c": return 3; default: return 0; case "d": return 4; case "b": return 2; case "e": return 5; } return -1; } -mixed b() { return 3; } -.... -test 1461, expected result: EQ -mixed a() { switch("c") { case "c": return 3; case "d": return 4; default: return 0; case "b": return 2; case "e": return 5; } return -1; } -mixed b() { return 3; } -.... -test 1462, expected result: EQ -mixed a() { switch("c") { case "c": return 3; case "d": return 4; case "b": return 2; default: return 0; case "e": return 5; } return -1; } -mixed b() { return 3; } -.... -test 1463, expected result: EQ -mixed a() { switch("c") { case "c": return 3; case "d": return 4; case "b": return 2; case "e": return 5; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 1464, expected result: EQ -mixed a() { switch("c") { case "c": return 3; case "d": return 4; case "e": return 5; case "b": return 2; } return 0; } -mixed b() { return 3; } -.... -test 1465, expected result: EQ -mixed a() { switch("c") { default: return 0; case "c": return 3; case "d": return 4; case "e": return 5; case "b": return 2; } return -1; } -mixed b() { return 3; } -.... -test 1466, expected result: EQ -mixed a() { switch("c") { case "c": return 3; default: return 0; case "d": return 4; case "e": return 5; case "b": return 2; } return -1; } -mixed b() { return 3; } -.... -test 1467, expected result: EQ -mixed a() { switch("c") { case "c": return 3; case "d": return 4; default: return 0; case "e": return 5; case "b": return 2; } return -1; } -mixed b() { return 3; } -.... -test 1468, expected result: EQ -mixed a() { switch("c") { case "c": return 3; case "d": return 4; case "e": return 5; default: return 0; case "b": return 2; } return -1; } -mixed b() { return 3; } -.... -test 1469, expected result: EQ -mixed a() { switch("c") { case "c": return 3; case "d": return 4; case "e": return 5; case "b": return 2; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 1470, expected result: EQ -mixed a() { switch("c") { case "c": return 3; case "e": return 5; case "d": return 4; case "b": return 2; } return 0; } -mixed b() { return 3; } -.... -test 1471, expected result: EQ -mixed a() { switch("c") { default: return 0; case "c": return 3; case "e": return 5; case "d": return 4; case "b": return 2; } return -1; } -mixed b() { return 3; } -.... -test 1472, expected result: EQ -mixed a() { switch("c") { case "c": return 3; default: return 0; case "e": return 5; case "d": return 4; case "b": return 2; } return -1; } -mixed b() { return 3; } -.... -test 1473, expected result: EQ -mixed a() { switch("c") { case "c": return 3; case "e": return 5; default: return 0; case "d": return 4; case "b": return 2; } return -1; } -mixed b() { return 3; } -.... -test 1474, expected result: EQ -mixed a() { switch("c") { case "c": return 3; case "e": return 5; case "d": return 4; default: return 0; case "b": return 2; } return -1; } -mixed b() { return 3; } -.... -test 1475, expected result: EQ -mixed a() { switch("c") { case "c": return 3; case "e": return 5; case "d": return 4; case "b": return 2; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 1476, expected result: EQ -mixed a() { switch("c") { case "c": return 3; case "e": return 5; case "b": return 2; case "d": return 4; } return 0; } -mixed b() { return 3; } -.... -test 1477, expected result: EQ -mixed a() { switch("c") { default: return 0; case "c": return 3; case "e": return 5; case "b": return 2; case "d": return 4; } return -1; } -mixed b() { return 3; } -.... -test 1478, expected result: EQ -mixed a() { switch("c") { case "c": return 3; default: return 0; case "e": return 5; case "b": return 2; case "d": return 4; } return -1; } -mixed b() { return 3; } -.... -test 1479, expected result: EQ -mixed a() { switch("c") { case "c": return 3; case "e": return 5; default: return 0; case "b": return 2; case "d": return 4; } return -1; } -mixed b() { return 3; } -.... -test 1480, expected result: EQ -mixed a() { switch("c") { case "c": return 3; case "e": return 5; case "b": return 2; default: return 0; case "d": return 4; } return -1; } -mixed b() { return 3; } -.... -test 1481, expected result: EQ -mixed a() { switch("c") { case "c": return 3; case "e": return 5; case "b": return 2; case "d": return 4; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 1482, expected result: EQ -mixed a() { switch("c") { case "d": return 4; case "c": return 3; case "b": return 2; case "e": return 5; } return 0; } -mixed b() { return 3; } -.... -test 1483, expected result: EQ -mixed a() { switch("c") { default: return 0; case "d": return 4; case "c": return 3; case "b": return 2; case "e": return 5; } return -1; } -mixed b() { return 3; } -.... -test 1484, expected result: EQ -mixed a() { switch("c") { case "d": return 4; default: return 0; case "c": return 3; case "b": return 2; case "e": return 5; } return -1; } -mixed b() { return 3; } -.... -test 1485, expected result: EQ -mixed a() { switch("c") { case "d": return 4; case "c": return 3; default: return 0; case "b": return 2; case "e": return 5; } return -1; } -mixed b() { return 3; } -.... -test 1486, expected result: EQ -mixed a() { switch("c") { case "d": return 4; case "c": return 3; case "b": return 2; default: return 0; case "e": return 5; } return -1; } -mixed b() { return 3; } -.... -test 1487, expected result: EQ -mixed a() { switch("c") { case "d": return 4; case "c": return 3; case "b": return 2; case "e": return 5; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 1488, expected result: EQ -mixed a() { switch("c") { case "d": return 4; case "c": return 3; case "e": return 5; case "b": return 2; } return 0; } -mixed b() { return 3; } -.... -test 1489, expected result: EQ -mixed a() { switch("c") { default: return 0; case "d": return 4; case "c": return 3; case "e": return 5; case "b": return 2; } return -1; } -mixed b() { return 3; } -.... -test 1490, expected result: EQ -mixed a() { switch("c") { case "d": return 4; default: return 0; case "c": return 3; case "e": return 5; case "b": return 2; } return -1; } -mixed b() { return 3; } -.... -test 1491, expected result: EQ -mixed a() { switch("c") { case "d": return 4; case "c": return 3; default: return 0; case "e": return 5; case "b": return 2; } return -1; } -mixed b() { return 3; } -.... -test 1492, expected result: EQ -mixed a() { switch("c") { case "d": return 4; case "c": return 3; case "e": return 5; default: return 0; case "b": return 2; } return -1; } -mixed b() { return 3; } -.... -test 1493, expected result: EQ -mixed a() { switch("c") { case "d": return 4; case "c": return 3; case "e": return 5; case "b": return 2; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 1494, expected result: EQ -mixed a() { switch("c") { case "d": return 4; case "b": return 2; case "c": return 3; case "e": return 5; } return 0; } -mixed b() { return 3; } -.... -test 1495, expected result: EQ -mixed a() { switch("c") { default: return 0; case "d": return 4; case "b": return 2; case "c": return 3; case "e": return 5; } return -1; } -mixed b() { return 3; } -.... -test 1496, expected result: EQ -mixed a() { switch("c") { case "d": return 4; default: return 0; case "b": return 2; case "c": return 3; case "e": return 5; } return -1; } -mixed b() { return 3; } -.... -test 1497, expected result: EQ -mixed a() { switch("c") { case "d": return 4; case "b": return 2; default: return 0; case "c": return 3; case "e": return 5; } return -1; } -mixed b() { return 3; } -.... -test 1498, expected result: EQ -mixed a() { switch("c") { case "d": return 4; case "b": return 2; case "c": return 3; default: return 0; case "e": return 5; } return -1; } -mixed b() { return 3; } -.... -test 1499, expected result: EQ -mixed a() { switch("c") { case "d": return 4; case "b": return 2; case "c": return 3; case "e": return 5; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 1500, expected result: EQ -mixed a() { switch("c") { case "d": return 4; case "b": return 2; case "e": return 5; case "c": return 3; } return 0; } -mixed b() { return 3; } -.... -test 1501, expected result: EQ -mixed a() { switch("c") { default: return 0; case "d": return 4; case "b": return 2; case "e": return 5; case "c": return 3; } return -1; } -mixed b() { return 3; } -.... -test 1502, expected result: EQ -mixed a() { switch("c") { case "d": return 4; default: return 0; case "b": return 2; case "e": return 5; case "c": return 3; } return -1; } -mixed b() { return 3; } -.... -test 1503, expected result: EQ -mixed a() { switch("c") { case "d": return 4; case "b": return 2; default: return 0; case "e": return 5; case "c": return 3; } return -1; } -mixed b() { return 3; } -.... -test 1504, expected result: EQ -mixed a() { switch("c") { case "d": return 4; case "b": return 2; case "e": return 5; default: return 0; case "c": return 3; } return -1; } -mixed b() { return 3; } -.... -test 1505, expected result: EQ -mixed a() { switch("c") { case "d": return 4; case "b": return 2; case "e": return 5; case "c": return 3; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 1506, expected result: EQ -mixed a() { switch("c") { case "d": return 4; case "e": return 5; case "b": return 2; case "c": return 3; } return 0; } -mixed b() { return 3; } -.... -test 1507, expected result: EQ -mixed a() { switch("c") { default: return 0; case "d": return 4; case "e": return 5; case "b": return 2; case "c": return 3; } return -1; } -mixed b() { return 3; } -.... -test 1508, expected result: EQ -mixed a() { switch("c") { case "d": return 4; default: return 0; case "e": return 5; case "b": return 2; case "c": return 3; } return -1; } -mixed b() { return 3; } -.... -test 1509, expected result: EQ -mixed a() { switch("c") { case "d": return 4; case "e": return 5; default: return 0; case "b": return 2; case "c": return 3; } return -1; } -mixed b() { return 3; } -.... -test 1510, expected result: EQ -mixed a() { switch("c") { case "d": return 4; case "e": return 5; case "b": return 2; default: return 0; case "c": return 3; } return -1; } -mixed b() { return 3; } -.... -test 1511, expected result: EQ -mixed a() { switch("c") { case "d": return 4; case "e": return 5; case "b": return 2; case "c": return 3; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 1512, expected result: EQ -mixed a() { switch("c") { case "d": return 4; case "e": return 5; case "c": return 3; case "b": return 2; } return 0; } -mixed b() { return 3; } -.... -test 1513, expected result: EQ -mixed a() { switch("c") { default: return 0; case "d": return 4; case "e": return 5; case "c": return 3; case "b": return 2; } return -1; } -mixed b() { return 3; } -.... -test 1514, expected result: EQ -mixed a() { switch("c") { case "d": return 4; default: return 0; case "e": return 5; case "c": return 3; case "b": return 2; } return -1; } -mixed b() { return 3; } -.... -test 1515, expected result: EQ -mixed a() { switch("c") { case "d": return 4; case "e": return 5; default: return 0; case "c": return 3; case "b": return 2; } return -1; } -mixed b() { return 3; } -.... -test 1516, expected result: EQ -mixed a() { switch("c") { case "d": return 4; case "e": return 5; case "c": return 3; default: return 0; case "b": return 2; } return -1; } -mixed b() { return 3; } -.... -test 1517, expected result: EQ -mixed a() { switch("c") { case "d": return 4; case "e": return 5; case "c": return 3; case "b": return 2; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 1518, expected result: EQ -mixed a() { switch("c") { case "e": return 5; case "c": return 3; case "d": return 4; case "b": return 2; } return 0; } -mixed b() { return 3; } -.... -test 1519, expected result: EQ -mixed a() { switch("c") { default: return 0; case "e": return 5; case "c": return 3; case "d": return 4; case "b": return 2; } return -1; } -mixed b() { return 3; } -.... -test 1520, expected result: EQ -mixed a() { switch("c") { case "e": return 5; default: return 0; case "c": return 3; case "d": return 4; case "b": return 2; } return -1; } -mixed b() { return 3; } -.... -test 1521, expected result: EQ -mixed a() { switch("c") { case "e": return 5; case "c": return 3; default: return 0; case "d": return 4; case "b": return 2; } return -1; } -mixed b() { return 3; } -.... -test 1522, expected result: EQ -mixed a() { switch("c") { case "e": return 5; case "c": return 3; case "d": return 4; default: return 0; case "b": return 2; } return -1; } -mixed b() { return 3; } -.... -test 1523, expected result: EQ -mixed a() { switch("c") { case "e": return 5; case "c": return 3; case "d": return 4; case "b": return 2; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 1524, expected result: EQ -mixed a() { switch("c") { case "e": return 5; case "c": return 3; case "b": return 2; case "d": return 4; } return 0; } -mixed b() { return 3; } -.... -test 1525, expected result: EQ -mixed a() { switch("c") { default: return 0; case "e": return 5; case "c": return 3; case "b": return 2; case "d": return 4; } return -1; } -mixed b() { return 3; } -.... -test 1526, expected result: EQ -mixed a() { switch("c") { case "e": return 5; default: return 0; case "c": return 3; case "b": return 2; case "d": return 4; } return -1; } -mixed b() { return 3; } -.... -test 1527, expected result: EQ -mixed a() { switch("c") { case "e": return 5; case "c": return 3; default: return 0; case "b": return 2; case "d": return 4; } return -1; } -mixed b() { return 3; } -.... -test 1528, expected result: EQ -mixed a() { switch("c") { case "e": return 5; case "c": return 3; case "b": return 2; default: return 0; case "d": return 4; } return -1; } -mixed b() { return 3; } -.... -test 1529, expected result: EQ -mixed a() { switch("c") { case "e": return 5; case "c": return 3; case "b": return 2; case "d": return 4; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 1530, expected result: EQ -mixed a() { switch("c") { case "e": return 5; case "d": return 4; case "c": return 3; case "b": return 2; } return 0; } -mixed b() { return 3; } -.... -test 1531, expected result: EQ -mixed a() { switch("c") { default: return 0; case "e": return 5; case "d": return 4; case "c": return 3; case "b": return 2; } return -1; } -mixed b() { return 3; } -.... -test 1532, expected result: EQ -mixed a() { switch("c") { case "e": return 5; default: return 0; case "d": return 4; case "c": return 3; case "b": return 2; } return -1; } -mixed b() { return 3; } -.... -test 1533, expected result: EQ -mixed a() { switch("c") { case "e": return 5; case "d": return 4; default: return 0; case "c": return 3; case "b": return 2; } return -1; } -mixed b() { return 3; } -.... -test 1534, expected result: EQ -mixed a() { switch("c") { case "e": return 5; case "d": return 4; case "c": return 3; default: return 0; case "b": return 2; } return -1; } -mixed b() { return 3; } -.... -test 1535, expected result: EQ -mixed a() { switch("c") { case "e": return 5; case "d": return 4; case "c": return 3; case "b": return 2; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 1536, expected result: EQ -mixed a() { switch("c") { case "e": return 5; case "d": return 4; case "b": return 2; case "c": return 3; } return 0; } -mixed b() { return 3; } -.... -test 1537, expected result: EQ -mixed a() { switch("c") { default: return 0; case "e": return 5; case "d": return 4; case "b": return 2; case "c": return 3; } return -1; } -mixed b() { return 3; } -.... -test 1538, expected result: EQ -mixed a() { switch("c") { case "e": return 5; default: return 0; case "d": return 4; case "b": return 2; case "c": return 3; } return -1; } -mixed b() { return 3; } -.... -test 1539, expected result: EQ -mixed a() { switch("c") { case "e": return 5; case "d": return 4; default: return 0; case "b": return 2; case "c": return 3; } return -1; } -mixed b() { return 3; } -.... -test 1540, expected result: EQ -mixed a() { switch("c") { case "e": return 5; case "d": return 4; case "b": return 2; default: return 0; case "c": return 3; } return -1; } -mixed b() { return 3; } -.... -test 1541, expected result: EQ -mixed a() { switch("c") { case "e": return 5; case "d": return 4; case "b": return 2; case "c": return 3; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 1542, expected result: EQ -mixed a() { switch("c") { case "e": return 5; case "b": return 2; case "d": return 4; case "c": return 3; } return 0; } -mixed b() { return 3; } -.... -test 1543, expected result: EQ -mixed a() { switch("c") { default: return 0; case "e": return 5; case "b": return 2; case "d": return 4; case "c": return 3; } return -1; } -mixed b() { return 3; } -.... -test 1544, expected result: EQ -mixed a() { switch("c") { case "e": return 5; default: return 0; case "b": return 2; case "d": return 4; case "c": return 3; } return -1; } -mixed b() { return 3; } -.... -test 1545, expected result: EQ -mixed a() { switch("c") { case "e": return 5; case "b": return 2; default: return 0; case "d": return 4; case "c": return 3; } return -1; } -mixed b() { return 3; } -.... -test 1546, expected result: EQ -mixed a() { switch("c") { case "e": return 5; case "b": return 2; case "d": return 4; default: return 0; case "c": return 3; } return -1; } -mixed b() { return 3; } -.... -test 1547, expected result: EQ -mixed a() { switch("c") { case "e": return 5; case "b": return 2; case "d": return 4; case "c": return 3; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 1548, expected result: EQ -mixed a() { switch("c") { case "e": return 5; case "b": return 2; case "c": return 3; case "d": return 4; } return 0; } -mixed b() { return 3; } -.... -test 1549, expected result: EQ -mixed a() { switch("c") { default: return 0; case "e": return 5; case "b": return 2; case "c": return 3; case "d": return 4; } return -1; } -mixed b() { return 3; } -.... -test 1550, expected result: EQ -mixed a() { switch("c") { case "e": return 5; default: return 0; case "b": return 2; case "c": return 3; case "d": return 4; } return -1; } -mixed b() { return 3; } -.... -test 1551, expected result: EQ -mixed a() { switch("c") { case "e": return 5; case "b": return 2; default: return 0; case "c": return 3; case "d": return 4; } return -1; } -mixed b() { return 3; } -.... -test 1552, expected result: EQ -mixed a() { switch("c") { case "e": return 5; case "b": return 2; case "c": return 3; default: return 0; case "d": return 4; } return -1; } -mixed b() { return 3; } -.... -test 1553, expected result: EQ -mixed a() { switch("c") { case "e": return 5; case "b": return 2; case "c": return 3; case "d": return 4; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 1554, expected result: EQ -mixed a() { switch("d") { case "b": return 2; case "c": return 3; case "d": return 4; case "e": return 5; } return 0; } -mixed b() { return 4; } -.... -test 1555, expected result: EQ -mixed a() { switch("d") { default: return 0; case "b": return 2; case "c": return 3; case "d": return 4; case "e": return 5; } return -1; } -mixed b() { return 4; } -.... -test 1556, expected result: EQ -mixed a() { switch("d") { case "b": return 2; default: return 0; case "c": return 3; case "d": return 4; case "e": return 5; } return -1; } -mixed b() { return 4; } -.... -test 1557, expected result: EQ -mixed a() { switch("d") { case "b": return 2; case "c": return 3; default: return 0; case "d": return 4; case "e": return 5; } return -1; } -mixed b() { return 4; } -.... -test 1558, expected result: EQ -mixed a() { switch("d") { case "b": return 2; case "c": return 3; case "d": return 4; default: return 0; case "e": return 5; } return -1; } -mixed b() { return 4; } -.... -test 1559, expected result: EQ -mixed a() { switch("d") { case "b": return 2; case "c": return 3; case "d": return 4; case "e": return 5; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 1560, expected result: EQ -mixed a() { switch("d") { case "b": return 2; case "c": return 3; case "e": return 5; case "d": return 4; } return 0; } -mixed b() { return 4; } -.... -test 1561, expected result: EQ -mixed a() { switch("d") { default: return 0; case "b": return 2; case "c": return 3; case "e": return 5; case "d": return 4; } return -1; } -mixed b() { return 4; } -.... -test 1562, expected result: EQ -mixed a() { switch("d") { case "b": return 2; default: return 0; case "c": return 3; case "e": return 5; case "d": return 4; } return -1; } -mixed b() { return 4; } -.... -test 1563, expected result: EQ -mixed a() { switch("d") { case "b": return 2; case "c": return 3; default: return 0; case "e": return 5; case "d": return 4; } return -1; } -mixed b() { return 4; } -.... -test 1564, expected result: EQ -mixed a() { switch("d") { case "b": return 2; case "c": return 3; case "e": return 5; default: return 0; case "d": return 4; } return -1; } -mixed b() { return 4; } -.... -test 1565, expected result: EQ -mixed a() { switch("d") { case "b": return 2; case "c": return 3; case "e": return 5; case "d": return 4; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 1566, expected result: EQ -mixed a() { switch("d") { case "b": return 2; case "d": return 4; case "c": return 3; case "e": return 5; } return 0; } -mixed b() { return 4; } -.... -test 1567, expected result: EQ -mixed a() { switch("d") { default: return 0; case "b": return 2; case "d": return 4; case "c": return 3; case "e": return 5; } return -1; } -mixed b() { return 4; } -.... -test 1568, expected result: EQ -mixed a() { switch("d") { case "b": return 2; default: return 0; case "d": return 4; case "c": return 3; case "e": return 5; } return -1; } -mixed b() { return 4; } -.... -test 1569, expected result: EQ -mixed a() { switch("d") { case "b": return 2; case "d": return 4; default: return 0; case "c": return 3; case "e": return 5; } return -1; } -mixed b() { return 4; } -.... -test 1570, expected result: EQ -mixed a() { switch("d") { case "b": return 2; case "d": return 4; case "c": return 3; default: return 0; case "e": return 5; } return -1; } -mixed b() { return 4; } -.... -test 1571, expected result: EQ -mixed a() { switch("d") { case "b": return 2; case "d": return 4; case "c": return 3; case "e": return 5; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 1572, expected result: EQ -mixed a() { switch("d") { case "b": return 2; case "d": return 4; case "e": return 5; case "c": return 3; } return 0; } -mixed b() { return 4; } -.... -test 1573, expected result: EQ -mixed a() { switch("d") { default: return 0; case "b": return 2; case "d": return 4; case "e": return 5; case "c": return 3; } return -1; } -mixed b() { return 4; } -.... -test 1574, expected result: EQ -mixed a() { switch("d") { case "b": return 2; default: return 0; case "d": return 4; case "e": return 5; case "c": return 3; } return -1; } -mixed b() { return 4; } -.... -test 1575, expected result: EQ -mixed a() { switch("d") { case "b": return 2; case "d": return 4; default: return 0; case "e": return 5; case "c": return 3; } return -1; } -mixed b() { return 4; } -.... -test 1576, expected result: EQ -mixed a() { switch("d") { case "b": return 2; case "d": return 4; case "e": return 5; default: return 0; case "c": return 3; } return -1; } -mixed b() { return 4; } -.... -test 1577, expected result: EQ -mixed a() { switch("d") { case "b": return 2; case "d": return 4; case "e": return 5; case "c": return 3; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 1578, expected result: EQ -mixed a() { switch("d") { case "b": return 2; case "e": return 5; case "d": return 4; case "c": return 3; } return 0; } -mixed b() { return 4; } -.... -test 1579, expected result: EQ -mixed a() { switch("d") { default: return 0; case "b": return 2; case "e": return 5; case "d": return 4; case "c": return 3; } return -1; } -mixed b() { return 4; } -.... -test 1580, expected result: EQ -mixed a() { switch("d") { case "b": return 2; default: return 0; case "e": return 5; case "d": return 4; case "c": return 3; } return -1; } -mixed b() { return 4; } -.... -test 1581, expected result: EQ -mixed a() { switch("d") { case "b": return 2; case "e": return 5; default: return 0; case "d": return 4; case "c": return 3; } return -1; } -mixed b() { return 4; } -.... -test 1582, expected result: EQ -mixed a() { switch("d") { case "b": return 2; case "e": return 5; case "d": return 4; default: return 0; case "c": return 3; } return -1; } -mixed b() { return 4; } -.... -test 1583, expected result: EQ -mixed a() { switch("d") { case "b": return 2; case "e": return 5; case "d": return 4; case "c": return 3; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 1584, expected result: EQ -mixed a() { switch("d") { case "b": return 2; case "e": return 5; case "c": return 3; case "d": return 4; } return 0; } -mixed b() { return 4; } -.... -test 1585, expected result: EQ -mixed a() { switch("d") { default: return 0; case "b": return 2; case "e": return 5; case "c": return 3; case "d": return 4; } return -1; } -mixed b() { return 4; } -.... -test 1586, expected result: EQ -mixed a() { switch("d") { case "b": return 2; default: return 0; case "e": return 5; case "c": return 3; case "d": return 4; } return -1; } -mixed b() { return 4; } -.... -test 1587, expected result: EQ -mixed a() { switch("d") { case "b": return 2; case "e": return 5; default: return 0; case "c": return 3; case "d": return 4; } return -1; } -mixed b() { return 4; } -.... -test 1588, expected result: EQ -mixed a() { switch("d") { case "b": return 2; case "e": return 5; case "c": return 3; default: return 0; case "d": return 4; } return -1; } -mixed b() { return 4; } -.... -test 1589, expected result: EQ -mixed a() { switch("d") { case "b": return 2; case "e": return 5; case "c": return 3; case "d": return 4; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 1590, expected result: EQ -mixed a() { switch("d") { case "c": return 3; case "b": return 2; case "d": return 4; case "e": return 5; } return 0; } -mixed b() { return 4; } -.... -test 1591, expected result: EQ -mixed a() { switch("d") { default: return 0; case "c": return 3; case "b": return 2; case "d": return 4; case "e": return 5; } return -1; } -mixed b() { return 4; } -.... -test 1592, expected result: EQ -mixed a() { switch("d") { case "c": return 3; default: return 0; case "b": return 2; case "d": return 4; case "e": return 5; } return -1; } -mixed b() { return 4; } -.... -test 1593, expected result: EQ -mixed a() { switch("d") { case "c": return 3; case "b": return 2; default: return 0; case "d": return 4; case "e": return 5; } return -1; } -mixed b() { return 4; } -.... -test 1594, expected result: EQ -mixed a() { switch("d") { case "c": return 3; case "b": return 2; case "d": return 4; default: return 0; case "e": return 5; } return -1; } -mixed b() { return 4; } -.... -test 1595, expected result: EQ -mixed a() { switch("d") { case "c": return 3; case "b": return 2; case "d": return 4; case "e": return 5; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 1596, expected result: EQ -mixed a() { switch("d") { case "c": return 3; case "b": return 2; case "e": return 5; case "d": return 4; } return 0; } -mixed b() { return 4; } -.... -test 1597, expected result: EQ -mixed a() { switch("d") { default: return 0; case "c": return 3; case "b": return 2; case "e": return 5; case "d": return 4; } return -1; } -mixed b() { return 4; } -.... -test 1598, expected result: EQ -mixed a() { switch("d") { case "c": return 3; default: return 0; case "b": return 2; case "e": return 5; case "d": return 4; } return -1; } -mixed b() { return 4; } -.... -test 1599, expected result: EQ -mixed a() { switch("d") { case "c": return 3; case "b": return 2; default: return 0; case "e": return 5; case "d": return 4; } return -1; } -mixed b() { return 4; } -.... -test 1600, expected result: EQ -mixed a() { switch("d") { case "c": return 3; case "b": return 2; case "e": return 5; default: return 0; case "d": return 4; } return -1; } -mixed b() { return 4; } -.... -test 1601, expected result: EQ -mixed a() { switch("d") { case "c": return 3; case "b": return 2; case "e": return 5; case "d": return 4; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 1602, expected result: EQ -mixed a() { switch("d") { case "c": return 3; case "d": return 4; case "b": return 2; case "e": return 5; } return 0; } -mixed b() { return 4; } -.... -test 1603, expected result: EQ -mixed a() { switch("d") { default: return 0; case "c": return 3; case "d": return 4; case "b": return 2; case "e": return 5; } return -1; } -mixed b() { return 4; } -.... -test 1604, expected result: EQ -mixed a() { switch("d") { case "c": return 3; default: return 0; case "d": return 4; case "b": return 2; case "e": return 5; } return -1; } -mixed b() { return 4; } -.... -test 1605, expected result: EQ -mixed a() { switch("d") { case "c": return 3; case "d": return 4; default: return 0; case "b": return 2; case "e": return 5; } return -1; } -mixed b() { return 4; } -.... -test 1606, expected result: EQ -mixed a() { switch("d") { case "c": return 3; case "d": return 4; case "b": return 2; default: return 0; case "e": return 5; } return -1; } -mixed b() { return 4; } -.... -test 1607, expected result: EQ -mixed a() { switch("d") { case "c": return 3; case "d": return 4; case "b": return 2; case "e": return 5; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 1608, expected result: EQ -mixed a() { switch("d") { case "c": return 3; case "d": return 4; case "e": return 5; case "b": return 2; } return 0; } -mixed b() { return 4; } -.... -test 1609, expected result: EQ -mixed a() { switch("d") { default: return 0; case "c": return 3; case "d": return 4; case "e": return 5; case "b": return 2; } return -1; } -mixed b() { return 4; } -.... -test 1610, expected result: EQ -mixed a() { switch("d") { case "c": return 3; default: return 0; case "d": return 4; case "e": return 5; case "b": return 2; } return -1; } -mixed b() { return 4; } -.... -test 1611, expected result: EQ -mixed a() { switch("d") { case "c": return 3; case "d": return 4; default: return 0; case "e": return 5; case "b": return 2; } return -1; } -mixed b() { return 4; } -.... -test 1612, expected result: EQ -mixed a() { switch("d") { case "c": return 3; case "d": return 4; case "e": return 5; default: return 0; case "b": return 2; } return -1; } -mixed b() { return 4; } -.... -test 1613, expected result: EQ -mixed a() { switch("d") { case "c": return 3; case "d": return 4; case "e": return 5; case "b": return 2; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 1614, expected result: EQ -mixed a() { switch("d") { case "c": return 3; case "e": return 5; case "d": return 4; case "b": return 2; } return 0; } -mixed b() { return 4; } -.... -test 1615, expected result: EQ -mixed a() { switch("d") { default: return 0; case "c": return 3; case "e": return 5; case "d": return 4; case "b": return 2; } return -1; } -mixed b() { return 4; } -.... -test 1616, expected result: EQ -mixed a() { switch("d") { case "c": return 3; default: return 0; case "e": return 5; case "d": return 4; case "b": return 2; } return -1; } -mixed b() { return 4; } -.... -test 1617, expected result: EQ -mixed a() { switch("d") { case "c": return 3; case "e": return 5; default: return 0; case "d": return 4; case "b": return 2; } return -1; } -mixed b() { return 4; } -.... -test 1618, expected result: EQ -mixed a() { switch("d") { case "c": return 3; case "e": return 5; case "d": return 4; default: return 0; case "b": return 2; } return -1; } -mixed b() { return 4; } -.... -test 1619, expected result: EQ -mixed a() { switch("d") { case "c": return 3; case "e": return 5; case "d": return 4; case "b": return 2; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 1620, expected result: EQ -mixed a() { switch("d") { case "c": return 3; case "e": return 5; case "b": return 2; case "d": return 4; } return 0; } -mixed b() { return 4; } -.... -test 1621, expected result: EQ -mixed a() { switch("d") { default: return 0; case "c": return 3; case "e": return 5; case "b": return 2; case "d": return 4; } return -1; } -mixed b() { return 4; } -.... -test 1622, expected result: EQ -mixed a() { switch("d") { case "c": return 3; default: return 0; case "e": return 5; case "b": return 2; case "d": return 4; } return -1; } -mixed b() { return 4; } -.... -test 1623, expected result: EQ -mixed a() { switch("d") { case "c": return 3; case "e": return 5; default: return 0; case "b": return 2; case "d": return 4; } return -1; } -mixed b() { return 4; } -.... -test 1624, expected result: EQ -mixed a() { switch("d") { case "c": return 3; case "e": return 5; case "b": return 2; default: return 0; case "d": return 4; } return -1; } -mixed b() { return 4; } -.... -test 1625, expected result: EQ -mixed a() { switch("d") { case "c": return 3; case "e": return 5; case "b": return 2; case "d": return 4; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 1626, expected result: EQ -mixed a() { switch("d") { case "d": return 4; case "c": return 3; case "b": return 2; case "e": return 5; } return 0; } -mixed b() { return 4; } -.... -test 1627, expected result: EQ -mixed a() { switch("d") { default: return 0; case "d": return 4; case "c": return 3; case "b": return 2; case "e": return 5; } return -1; } -mixed b() { return 4; } -.... -test 1628, expected result: EQ -mixed a() { switch("d") { case "d": return 4; default: return 0; case "c": return 3; case "b": return 2; case "e": return 5; } return -1; } -mixed b() { return 4; } -.... -test 1629, expected result: EQ -mixed a() { switch("d") { case "d": return 4; case "c": return 3; default: return 0; case "b": return 2; case "e": return 5; } return -1; } -mixed b() { return 4; } -.... -test 1630, expected result: EQ -mixed a() { switch("d") { case "d": return 4; case "c": return 3; case "b": return 2; default: return 0; case "e": return 5; } return -1; } -mixed b() { return 4; } -.... -test 1631, expected result: EQ -mixed a() { switch("d") { case "d": return 4; case "c": return 3; case "b": return 2; case "e": return 5; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 1632, expected result: EQ -mixed a() { switch("d") { case "d": return 4; case "c": return 3; case "e": return 5; case "b": return 2; } return 0; } -mixed b() { return 4; } -.... -test 1633, expected result: EQ -mixed a() { switch("d") { default: return 0; case "d": return 4; case "c": return 3; case "e": return 5; case "b": return 2; } return -1; } -mixed b() { return 4; } -.... -test 1634, expected result: EQ -mixed a() { switch("d") { case "d": return 4; default: return 0; case "c": return 3; case "e": return 5; case "b": return 2; } return -1; } -mixed b() { return 4; } -.... -test 1635, expected result: EQ -mixed a() { switch("d") { case "d": return 4; case "c": return 3; default: return 0; case "e": return 5; case "b": return 2; } return -1; } -mixed b() { return 4; } -.... -test 1636, expected result: EQ -mixed a() { switch("d") { case "d": return 4; case "c": return 3; case "e": return 5; default: return 0; case "b": return 2; } return -1; } -mixed b() { return 4; } -.... -test 1637, expected result: EQ -mixed a() { switch("d") { case "d": return 4; case "c": return 3; case "e": return 5; case "b": return 2; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 1638, expected result: EQ -mixed a() { switch("d") { case "d": return 4; case "b": return 2; case "c": return 3; case "e": return 5; } return 0; } -mixed b() { return 4; } -.... -test 1639, expected result: EQ -mixed a() { switch("d") { default: return 0; case "d": return 4; case "b": return 2; case "c": return 3; case "e": return 5; } return -1; } -mixed b() { return 4; } -.... -test 1640, expected result: EQ -mixed a() { switch("d") { case "d": return 4; default: return 0; case "b": return 2; case "c": return 3; case "e": return 5; } return -1; } -mixed b() { return 4; } -.... -test 1641, expected result: EQ -mixed a() { switch("d") { case "d": return 4; case "b": return 2; default: return 0; case "c": return 3; case "e": return 5; } return -1; } -mixed b() { return 4; } -.... -test 1642, expected result: EQ -mixed a() { switch("d") { case "d": return 4; case "b": return 2; case "c": return 3; default: return 0; case "e": return 5; } return -1; } -mixed b() { return 4; } -.... -test 1643, expected result: EQ -mixed a() { switch("d") { case "d": return 4; case "b": return 2; case "c": return 3; case "e": return 5; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 1644, expected result: EQ -mixed a() { switch("d") { case "d": return 4; case "b": return 2; case "e": return 5; case "c": return 3; } return 0; } -mixed b() { return 4; } -.... -test 1645, expected result: EQ -mixed a() { switch("d") { default: return 0; case "d": return 4; case "b": return 2; case "e": return 5; case "c": return 3; } return -1; } -mixed b() { return 4; } -.... -test 1646, expected result: EQ -mixed a() { switch("d") { case "d": return 4; default: return 0; case "b": return 2; case "e": return 5; case "c": return 3; } return -1; } -mixed b() { return 4; } -.... -test 1647, expected result: EQ -mixed a() { switch("d") { case "d": return 4; case "b": return 2; default: return 0; case "e": return 5; case "c": return 3; } return -1; } -mixed b() { return 4; } -.... -test 1648, expected result: EQ -mixed a() { switch("d") { case "d": return 4; case "b": return 2; case "e": return 5; default: return 0; case "c": return 3; } return -1; } -mixed b() { return 4; } -.... -test 1649, expected result: EQ -mixed a() { switch("d") { case "d": return 4; case "b": return 2; case "e": return 5; case "c": return 3; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 1650, expected result: EQ -mixed a() { switch("d") { case "d": return 4; case "e": return 5; case "b": return 2; case "c": return 3; } return 0; } -mixed b() { return 4; } -.... -test 1651, expected result: EQ -mixed a() { switch("d") { default: return 0; case "d": return 4; case "e": return 5; case "b": return 2; case "c": return 3; } return -1; } -mixed b() { return 4; } -.... -test 1652, expected result: EQ -mixed a() { switch("d") { case "d": return 4; default: return 0; case "e": return 5; case "b": return 2; case "c": return 3; } return -1; } -mixed b() { return 4; } -.... -test 1653, expected result: EQ -mixed a() { switch("d") { case "d": return 4; case "e": return 5; default: return 0; case "b": return 2; case "c": return 3; } return -1; } -mixed b() { return 4; } -.... -test 1654, expected result: EQ -mixed a() { switch("d") { case "d": return 4; case "e": return 5; case "b": return 2; default: return 0; case "c": return 3; } return -1; } -mixed b() { return 4; } -.... -test 1655, expected result: EQ -mixed a() { switch("d") { case "d": return 4; case "e": return 5; case "b": return 2; case "c": return 3; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 1656, expected result: EQ -mixed a() { switch("d") { case "d": return 4; case "e": return 5; case "c": return 3; case "b": return 2; } return 0; } -mixed b() { return 4; } -.... -test 1657, expected result: EQ -mixed a() { switch("d") { default: return 0; case "d": return 4; case "e": return 5; case "c": return 3; case "b": return 2; } return -1; } -mixed b() { return 4; } -.... -test 1658, expected result: EQ -mixed a() { switch("d") { case "d": return 4; default: return 0; case "e": return 5; case "c": return 3; case "b": return 2; } return -1; } -mixed b() { return 4; } -.... -test 1659, expected result: EQ -mixed a() { switch("d") { case "d": return 4; case "e": return 5; default: return 0; case "c": return 3; case "b": return 2; } return -1; } -mixed b() { return 4; } -.... -test 1660, expected result: EQ -mixed a() { switch("d") { case "d": return 4; case "e": return 5; case "c": return 3; default: return 0; case "b": return 2; } return -1; } -mixed b() { return 4; } -.... -test 1661, expected result: EQ -mixed a() { switch("d") { case "d": return 4; case "e": return 5; case "c": return 3; case "b": return 2; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 1662, expected result: EQ -mixed a() { switch("d") { case "e": return 5; case "c": return 3; case "d": return 4; case "b": return 2; } return 0; } -mixed b() { return 4; } -.... -test 1663, expected result: EQ -mixed a() { switch("d") { default: return 0; case "e": return 5; case "c": return 3; case "d": return 4; case "b": return 2; } return -1; } -mixed b() { return 4; } -.... -test 1664, expected result: EQ -mixed a() { switch("d") { case "e": return 5; default: return 0; case "c": return 3; case "d": return 4; case "b": return 2; } return -1; } -mixed b() { return 4; } -.... -test 1665, expected result: EQ -mixed a() { switch("d") { case "e": return 5; case "c": return 3; default: return 0; case "d": return 4; case "b": return 2; } return -1; } -mixed b() { return 4; } -.... -test 1666, expected result: EQ -mixed a() { switch("d") { case "e": return 5; case "c": return 3; case "d": return 4; default: return 0; case "b": return 2; } return -1; } -mixed b() { return 4; } -.... -test 1667, expected result: EQ -mixed a() { switch("d") { case "e": return 5; case "c": return 3; case "d": return 4; case "b": return 2; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 1668, expected result: EQ -mixed a() { switch("d") { case "e": return 5; case "c": return 3; case "b": return 2; case "d": return 4; } return 0; } -mixed b() { return 4; } -.... -test 1669, expected result: EQ -mixed a() { switch("d") { default: return 0; case "e": return 5; case "c": return 3; case "b": return 2; case "d": return 4; } return -1; } -mixed b() { return 4; } -.... -test 1670, expected result: EQ -mixed a() { switch("d") { case "e": return 5; default: return 0; case "c": return 3; case "b": return 2; case "d": return 4; } return -1; } -mixed b() { return 4; } -.... -test 1671, expected result: EQ -mixed a() { switch("d") { case "e": return 5; case "c": return 3; default: return 0; case "b": return 2; case "d": return 4; } return -1; } -mixed b() { return 4; } -.... -test 1672, expected result: EQ -mixed a() { switch("d") { case "e": return 5; case "c": return 3; case "b": return 2; default: return 0; case "d": return 4; } return -1; } -mixed b() { return 4; } -.... -test 1673, expected result: EQ -mixed a() { switch("d") { case "e": return 5; case "c": return 3; case "b": return 2; case "d": return 4; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 1674, expected result: EQ -mixed a() { switch("d") { case "e": return 5; case "d": return 4; case "c": return 3; case "b": return 2; } return 0; } -mixed b() { return 4; } -.... -test 1675, expected result: EQ -mixed a() { switch("d") { default: return 0; case "e": return 5; case "d": return 4; case "c": return 3; case "b": return 2; } return -1; } -mixed b() { return 4; } -.... -test 1676, expected result: EQ -mixed a() { switch("d") { case "e": return 5; default: return 0; case "d": return 4; case "c": return 3; case "b": return 2; } return -1; } -mixed b() { return 4; } -.... -test 1677, expected result: EQ -mixed a() { switch("d") { case "e": return 5; case "d": return 4; default: return 0; case "c": return 3; case "b": return 2; } return -1; } -mixed b() { return 4; } -.... -test 1678, expected result: EQ -mixed a() { switch("d") { case "e": return 5; case "d": return 4; case "c": return 3; default: return 0; case "b": return 2; } return -1; } -mixed b() { return 4; } -.... -test 1679, expected result: EQ -mixed a() { switch("d") { case "e": return 5; case "d": return 4; case "c": return 3; case "b": return 2; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 1680, expected result: EQ -mixed a() { switch("d") { case "e": return 5; case "d": return 4; case "b": return 2; case "c": return 3; } return 0; } -mixed b() { return 4; } -.... -test 1681, expected result: EQ -mixed a() { switch("d") { default: return 0; case "e": return 5; case "d": return 4; case "b": return 2; case "c": return 3; } return -1; } -mixed b() { return 4; } -.... -test 1682, expected result: EQ -mixed a() { switch("d") { case "e": return 5; default: return 0; case "d": return 4; case "b": return 2; case "c": return 3; } return -1; } -mixed b() { return 4; } -.... -test 1683, expected result: EQ -mixed a() { switch("d") { case "e": return 5; case "d": return 4; default: return 0; case "b": return 2; case "c": return 3; } return -1; } -mixed b() { return 4; } -.... -test 1684, expected result: EQ -mixed a() { switch("d") { case "e": return 5; case "d": return 4; case "b": return 2; default: return 0; case "c": return 3; } return -1; } -mixed b() { return 4; } -.... -test 1685, expected result: EQ -mixed a() { switch("d") { case "e": return 5; case "d": return 4; case "b": return 2; case "c": return 3; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 1686, expected result: EQ -mixed a() { switch("d") { case "e": return 5; case "b": return 2; case "d": return 4; case "c": return 3; } return 0; } -mixed b() { return 4; } -.... -test 1687, expected result: EQ -mixed a() { switch("d") { default: return 0; case "e": return 5; case "b": return 2; case "d": return 4; case "c": return 3; } return -1; } -mixed b() { return 4; } -.... -test 1688, expected result: EQ -mixed a() { switch("d") { case "e": return 5; default: return 0; case "b": return 2; case "d": return 4; case "c": return 3; } return -1; } -mixed b() { return 4; } -.... -test 1689, expected result: EQ -mixed a() { switch("d") { case "e": return 5; case "b": return 2; default: return 0; case "d": return 4; case "c": return 3; } return -1; } -mixed b() { return 4; } -.... -test 1690, expected result: EQ -mixed a() { switch("d") { case "e": return 5; case "b": return 2; case "d": return 4; default: return 0; case "c": return 3; } return -1; } -mixed b() { return 4; } -.... -test 1691, expected result: EQ -mixed a() { switch("d") { case "e": return 5; case "b": return 2; case "d": return 4; case "c": return 3; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 1692, expected result: EQ -mixed a() { switch("d") { case "e": return 5; case "b": return 2; case "c": return 3; case "d": return 4; } return 0; } -mixed b() { return 4; } -.... -test 1693, expected result: EQ -mixed a() { switch("d") { default: return 0; case "e": return 5; case "b": return 2; case "c": return 3; case "d": return 4; } return -1; } -mixed b() { return 4; } -.... -test 1694, expected result: EQ -mixed a() { switch("d") { case "e": return 5; default: return 0; case "b": return 2; case "c": return 3; case "d": return 4; } return -1; } -mixed b() { return 4; } -.... -test 1695, expected result: EQ -mixed a() { switch("d") { case "e": return 5; case "b": return 2; default: return 0; case "c": return 3; case "d": return 4; } return -1; } -mixed b() { return 4; } -.... -test 1696, expected result: EQ -mixed a() { switch("d") { case "e": return 5; case "b": return 2; case "c": return 3; default: return 0; case "d": return 4; } return -1; } -mixed b() { return 4; } -.... -test 1697, expected result: EQ -mixed a() { switch("d") { case "e": return 5; case "b": return 2; case "c": return 3; case "d": return 4; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 1698, expected result: EQ -mixed a() { switch("e") { case "b": return 2; case "c": return 3; case "d": return 4; case "e": return 5; } return 0; } -mixed b() { return 5; } -.... -test 1699, expected result: EQ -mixed a() { switch("e") { default: return 0; case "b": return 2; case "c": return 3; case "d": return 4; case "e": return 5; } return -1; } -mixed b() { return 5; } -.... -test 1700, expected result: EQ -mixed a() { switch("e") { case "b": return 2; default: return 0; case "c": return 3; case "d": return 4; case "e": return 5; } return -1; } -mixed b() { return 5; } -.... -test 1701, expected result: EQ -mixed a() { switch("e") { case "b": return 2; case "c": return 3; default: return 0; case "d": return 4; case "e": return 5; } return -1; } -mixed b() { return 5; } -.... -test 1702, expected result: EQ -mixed a() { switch("e") { case "b": return 2; case "c": return 3; case "d": return 4; default: return 0; case "e": return 5; } return -1; } -mixed b() { return 5; } -.... -test 1703, expected result: EQ -mixed a() { switch("e") { case "b": return 2; case "c": return 3; case "d": return 4; case "e": return 5; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 1704, expected result: EQ -mixed a() { switch("e") { case "b": return 2; case "c": return 3; case "e": return 5; case "d": return 4; } return 0; } -mixed b() { return 5; } -.... -test 1705, expected result: EQ -mixed a() { switch("e") { default: return 0; case "b": return 2; case "c": return 3; case "e": return 5; case "d": return 4; } return -1; } -mixed b() { return 5; } -.... -test 1706, expected result: EQ -mixed a() { switch("e") { case "b": return 2; default: return 0; case "c": return 3; case "e": return 5; case "d": return 4; } return -1; } -mixed b() { return 5; } -.... -test 1707, expected result: EQ -mixed a() { switch("e") { case "b": return 2; case "c": return 3; default: return 0; case "e": return 5; case "d": return 4; } return -1; } -mixed b() { return 5; } -.... -test 1708, expected result: EQ -mixed a() { switch("e") { case "b": return 2; case "c": return 3; case "e": return 5; default: return 0; case "d": return 4; } return -1; } -mixed b() { return 5; } -.... -test 1709, expected result: EQ -mixed a() { switch("e") { case "b": return 2; case "c": return 3; case "e": return 5; case "d": return 4; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 1710, expected result: EQ -mixed a() { switch("e") { case "b": return 2; case "d": return 4; case "c": return 3; case "e": return 5; } return 0; } -mixed b() { return 5; } -.... -test 1711, expected result: EQ -mixed a() { switch("e") { default: return 0; case "b": return 2; case "d": return 4; case "c": return 3; case "e": return 5; } return -1; } -mixed b() { return 5; } -.... -test 1712, expected result: EQ -mixed a() { switch("e") { case "b": return 2; default: return 0; case "d": return 4; case "c": return 3; case "e": return 5; } return -1; } -mixed b() { return 5; } -.... -test 1713, expected result: EQ -mixed a() { switch("e") { case "b": return 2; case "d": return 4; default: return 0; case "c": return 3; case "e": return 5; } return -1; } -mixed b() { return 5; } -.... -test 1714, expected result: EQ -mixed a() { switch("e") { case "b": return 2; case "d": return 4; case "c": return 3; default: return 0; case "e": return 5; } return -1; } -mixed b() { return 5; } -.... -test 1715, expected result: EQ -mixed a() { switch("e") { case "b": return 2; case "d": return 4; case "c": return 3; case "e": return 5; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 1716, expected result: EQ -mixed a() { switch("e") { case "b": return 2; case "d": return 4; case "e": return 5; case "c": return 3; } return 0; } -mixed b() { return 5; } -.... -test 1717, expected result: EQ -mixed a() { switch("e") { default: return 0; case "b": return 2; case "d": return 4; case "e": return 5; case "c": return 3; } return -1; } -mixed b() { return 5; } -.... -test 1718, expected result: EQ -mixed a() { switch("e") { case "b": return 2; default: return 0; case "d": return 4; case "e": return 5; case "c": return 3; } return -1; } -mixed b() { return 5; } -.... -test 1719, expected result: EQ -mixed a() { switch("e") { case "b": return 2; case "d": return 4; default: return 0; case "e": return 5; case "c": return 3; } return -1; } -mixed b() { return 5; } -.... -test 1720, expected result: EQ -mixed a() { switch("e") { case "b": return 2; case "d": return 4; case "e": return 5; default: return 0; case "c": return 3; } return -1; } -mixed b() { return 5; } -.... -test 1721, expected result: EQ -mixed a() { switch("e") { case "b": return 2; case "d": return 4; case "e": return 5; case "c": return 3; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 1722, expected result: EQ -mixed a() { switch("e") { case "b": return 2; case "e": return 5; case "d": return 4; case "c": return 3; } return 0; } -mixed b() { return 5; } -.... -test 1723, expected result: EQ -mixed a() { switch("e") { default: return 0; case "b": return 2; case "e": return 5; case "d": return 4; case "c": return 3; } return -1; } -mixed b() { return 5; } -.... -test 1724, expected result: EQ -mixed a() { switch("e") { case "b": return 2; default: return 0; case "e": return 5; case "d": return 4; case "c": return 3; } return -1; } -mixed b() { return 5; } -.... -test 1725, expected result: EQ -mixed a() { switch("e") { case "b": return 2; case "e": return 5; default: return 0; case "d": return 4; case "c": return 3; } return -1; } -mixed b() { return 5; } -.... -test 1726, expected result: EQ -mixed a() { switch("e") { case "b": return 2; case "e": return 5; case "d": return 4; default: return 0; case "c": return 3; } return -1; } -mixed b() { return 5; } -.... -test 1727, expected result: EQ -mixed a() { switch("e") { case "b": return 2; case "e": return 5; case "d": return 4; case "c": return 3; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 1728, expected result: EQ -mixed a() { switch("e") { case "b": return 2; case "e": return 5; case "c": return 3; case "d": return 4; } return 0; } -mixed b() { return 5; } -.... -test 1729, expected result: EQ -mixed a() { switch("e") { default: return 0; case "b": return 2; case "e": return 5; case "c": return 3; case "d": return 4; } return -1; } -mixed b() { return 5; } -.... -test 1730, expected result: EQ -mixed a() { switch("e") { case "b": return 2; default: return 0; case "e": return 5; case "c": return 3; case "d": return 4; } return -1; } -mixed b() { return 5; } -.... -test 1731, expected result: EQ -mixed a() { switch("e") { case "b": return 2; case "e": return 5; default: return 0; case "c": return 3; case "d": return 4; } return -1; } -mixed b() { return 5; } -.... -test 1732, expected result: EQ -mixed a() { switch("e") { case "b": return 2; case "e": return 5; case "c": return 3; default: return 0; case "d": return 4; } return -1; } -mixed b() { return 5; } -.... -test 1733, expected result: EQ -mixed a() { switch("e") { case "b": return 2; case "e": return 5; case "c": return 3; case "d": return 4; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 1734, expected result: EQ -mixed a() { switch("e") { case "c": return 3; case "b": return 2; case "d": return 4; case "e": return 5; } return 0; } -mixed b() { return 5; } -.... -test 1735, expected result: EQ -mixed a() { switch("e") { default: return 0; case "c": return 3; case "b": return 2; case "d": return 4; case "e": return 5; } return -1; } -mixed b() { return 5; } -.... -test 1736, expected result: EQ -mixed a() { switch("e") { case "c": return 3; default: return 0; case "b": return 2; case "d": return 4; case "e": return 5; } return -1; } -mixed b() { return 5; } -.... -test 1737, expected result: EQ -mixed a() { switch("e") { case "c": return 3; case "b": return 2; default: return 0; case "d": return 4; case "e": return 5; } return -1; } -mixed b() { return 5; } -.... -test 1738, expected result: EQ -mixed a() { switch("e") { case "c": return 3; case "b": return 2; case "d": return 4; default: return 0; case "e": return 5; } return -1; } -mixed b() { return 5; } -.... -test 1739, expected result: EQ -mixed a() { switch("e") { case "c": return 3; case "b": return 2; case "d": return 4; case "e": return 5; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 1740, expected result: EQ -mixed a() { switch("e") { case "c": return 3; case "b": return 2; case "e": return 5; case "d": return 4; } return 0; } -mixed b() { return 5; } -.... -test 1741, expected result: EQ -mixed a() { switch("e") { default: return 0; case "c": return 3; case "b": return 2; case "e": return 5; case "d": return 4; } return -1; } -mixed b() { return 5; } -.... -test 1742, expected result: EQ -mixed a() { switch("e") { case "c": return 3; default: return 0; case "b": return 2; case "e": return 5; case "d": return 4; } return -1; } -mixed b() { return 5; } -.... -test 1743, expected result: EQ -mixed a() { switch("e") { case "c": return 3; case "b": return 2; default: return 0; case "e": return 5; case "d": return 4; } return -1; } -mixed b() { return 5; } -.... -test 1744, expected result: EQ -mixed a() { switch("e") { case "c": return 3; case "b": return 2; case "e": return 5; default: return 0; case "d": return 4; } return -1; } -mixed b() { return 5; } -.... -test 1745, expected result: EQ -mixed a() { switch("e") { case "c": return 3; case "b": return 2; case "e": return 5; case "d": return 4; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 1746, expected result: EQ -mixed a() { switch("e") { case "c": return 3; case "d": return 4; case "b": return 2; case "e": return 5; } return 0; } -mixed b() { return 5; } -.... -test 1747, expected result: EQ -mixed a() { switch("e") { default: return 0; case "c": return 3; case "d": return 4; case "b": return 2; case "e": return 5; } return -1; } -mixed b() { return 5; } -.... -test 1748, expected result: EQ -mixed a() { switch("e") { case "c": return 3; default: return 0; case "d": return 4; case "b": return 2; case "e": return 5; } return -1; } -mixed b() { return 5; } -.... -test 1749, expected result: EQ -mixed a() { switch("e") { case "c": return 3; case "d": return 4; default: return 0; case "b": return 2; case "e": return 5; } return -1; } -mixed b() { return 5; } -.... -test 1750, expected result: EQ -mixed a() { switch("e") { case "c": return 3; case "d": return 4; case "b": return 2; default: return 0; case "e": return 5; } return -1; } -mixed b() { return 5; } -.... -test 1751, expected result: EQ -mixed a() { switch("e") { case "c": return 3; case "d": return 4; case "b": return 2; case "e": return 5; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 1752, expected result: EQ -mixed a() { switch("e") { case "c": return 3; case "d": return 4; case "e": return 5; case "b": return 2; } return 0; } -mixed b() { return 5; } -.... -test 1753, expected result: EQ -mixed a() { switch("e") { default: return 0; case "c": return 3; case "d": return 4; case "e": return 5; case "b": return 2; } return -1; } -mixed b() { return 5; } -.... -test 1754, expected result: EQ -mixed a() { switch("e") { case "c": return 3; default: return 0; case "d": return 4; case "e": return 5; case "b": return 2; } return -1; } -mixed b() { return 5; } -.... -test 1755, expected result: EQ -mixed a() { switch("e") { case "c": return 3; case "d": return 4; default: return 0; case "e": return 5; case "b": return 2; } return -1; } -mixed b() { return 5; } -.... -test 1756, expected result: EQ -mixed a() { switch("e") { case "c": return 3; case "d": return 4; case "e": return 5; default: return 0; case "b": return 2; } return -1; } -mixed b() { return 5; } -.... -test 1757, expected result: EQ -mixed a() { switch("e") { case "c": return 3; case "d": return 4; case "e": return 5; case "b": return 2; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 1758, expected result: EQ -mixed a() { switch("e") { case "c": return 3; case "e": return 5; case "d": return 4; case "b": return 2; } return 0; } -mixed b() { return 5; } -.... -test 1759, expected result: EQ -mixed a() { switch("e") { default: return 0; case "c": return 3; case "e": return 5; case "d": return 4; case "b": return 2; } return -1; } -mixed b() { return 5; } -.... -test 1760, expected result: EQ -mixed a() { switch("e") { case "c": return 3; default: return 0; case "e": return 5; case "d": return 4; case "b": return 2; } return -1; } -mixed b() { return 5; } -.... -test 1761, expected result: EQ -mixed a() { switch("e") { case "c": return 3; case "e": return 5; default: return 0; case "d": return 4; case "b": return 2; } return -1; } -mixed b() { return 5; } -.... -test 1762, expected result: EQ -mixed a() { switch("e") { case "c": return 3; case "e": return 5; case "d": return 4; default: return 0; case "b": return 2; } return -1; } -mixed b() { return 5; } -.... -test 1763, expected result: EQ -mixed a() { switch("e") { case "c": return 3; case "e": return 5; case "d": return 4; case "b": return 2; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 1764, expected result: EQ -mixed a() { switch("e") { case "c": return 3; case "e": return 5; case "b": return 2; case "d": return 4; } return 0; } -mixed b() { return 5; } -.... -test 1765, expected result: EQ -mixed a() { switch("e") { default: return 0; case "c": return 3; case "e": return 5; case "b": return 2; case "d": return 4; } return -1; } -mixed b() { return 5; } -.... -test 1766, expected result: EQ -mixed a() { switch("e") { case "c": return 3; default: return 0; case "e": return 5; case "b": return 2; case "d": return 4; } return -1; } -mixed b() { return 5; } -.... -test 1767, expected result: EQ -mixed a() { switch("e") { case "c": return 3; case "e": return 5; default: return 0; case "b": return 2; case "d": return 4; } return -1; } -mixed b() { return 5; } -.... -test 1768, expected result: EQ -mixed a() { switch("e") { case "c": return 3; case "e": return 5; case "b": return 2; default: return 0; case "d": return 4; } return -1; } -mixed b() { return 5; } -.... -test 1769, expected result: EQ -mixed a() { switch("e") { case "c": return 3; case "e": return 5; case "b": return 2; case "d": return 4; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 1770, expected result: EQ -mixed a() { switch("e") { case "d": return 4; case "c": return 3; case "b": return 2; case "e": return 5; } return 0; } -mixed b() { return 5; } -.... -test 1771, expected result: EQ -mixed a() { switch("e") { default: return 0; case "d": return 4; case "c": return 3; case "b": return 2; case "e": return 5; } return -1; } -mixed b() { return 5; } -.... -test 1772, expected result: EQ -mixed a() { switch("e") { case "d": return 4; default: return 0; case "c": return 3; case "b": return 2; case "e": return 5; } return -1; } -mixed b() { return 5; } -.... -test 1773, expected result: EQ -mixed a() { switch("e") { case "d": return 4; case "c": return 3; default: return 0; case "b": return 2; case "e": return 5; } return -1; } -mixed b() { return 5; } -.... -test 1774, expected result: EQ -mixed a() { switch("e") { case "d": return 4; case "c": return 3; case "b": return 2; default: return 0; case "e": return 5; } return -1; } -mixed b() { return 5; } -.... -test 1775, expected result: EQ -mixed a() { switch("e") { case "d": return 4; case "c": return 3; case "b": return 2; case "e": return 5; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 1776, expected result: EQ -mixed a() { switch("e") { case "d": return 4; case "c": return 3; case "e": return 5; case "b": return 2; } return 0; } -mixed b() { return 5; } -.... -test 1777, expected result: EQ -mixed a() { switch("e") { default: return 0; case "d": return 4; case "c": return 3; case "e": return 5; case "b": return 2; } return -1; } -mixed b() { return 5; } -.... -test 1778, expected result: EQ -mixed a() { switch("e") { case "d": return 4; default: return 0; case "c": return 3; case "e": return 5; case "b": return 2; } return -1; } -mixed b() { return 5; } -.... -test 1779, expected result: EQ -mixed a() { switch("e") { case "d": return 4; case "c": return 3; default: return 0; case "e": return 5; case "b": return 2; } return -1; } -mixed b() { return 5; } -.... -test 1780, expected result: EQ -mixed a() { switch("e") { case "d": return 4; case "c": return 3; case "e": return 5; default: return 0; case "b": return 2; } return -1; } -mixed b() { return 5; } -.... -test 1781, expected result: EQ -mixed a() { switch("e") { case "d": return 4; case "c": return 3; case "e": return 5; case "b": return 2; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 1782, expected result: EQ -mixed a() { switch("e") { case "d": return 4; case "b": return 2; case "c": return 3; case "e": return 5; } return 0; } -mixed b() { return 5; } -.... -test 1783, expected result: EQ -mixed a() { switch("e") { default: return 0; case "d": return 4; case "b": return 2; case "c": return 3; case "e": return 5; } return -1; } -mixed b() { return 5; } -.... -test 1784, expected result: EQ -mixed a() { switch("e") { case "d": return 4; default: return 0; case "b": return 2; case "c": return 3; case "e": return 5; } return -1; } -mixed b() { return 5; } -.... -test 1785, expected result: EQ -mixed a() { switch("e") { case "d": return 4; case "b": return 2; default: return 0; case "c": return 3; case "e": return 5; } return -1; } -mixed b() { return 5; } -.... -test 1786, expected result: EQ -mixed a() { switch("e") { case "d": return 4; case "b": return 2; case "c": return 3; default: return 0; case "e": return 5; } return -1; } -mixed b() { return 5; } -.... -test 1787, expected result: EQ -mixed a() { switch("e") { case "d": return 4; case "b": return 2; case "c": return 3; case "e": return 5; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 1788, expected result: EQ -mixed a() { switch("e") { case "d": return 4; case "b": return 2; case "e": return 5; case "c": return 3; } return 0; } -mixed b() { return 5; } -.... -test 1789, expected result: EQ -mixed a() { switch("e") { default: return 0; case "d": return 4; case "b": return 2; case "e": return 5; case "c": return 3; } return -1; } -mixed b() { return 5; } -.... -test 1790, expected result: EQ -mixed a() { switch("e") { case "d": return 4; default: return 0; case "b": return 2; case "e": return 5; case "c": return 3; } return -1; } -mixed b() { return 5; } -.... -test 1791, expected result: EQ -mixed a() { switch("e") { case "d": return 4; case "b": return 2; default: return 0; case "e": return 5; case "c": return 3; } return -1; } -mixed b() { return 5; } -.... -test 1792, expected result: EQ -mixed a() { switch("e") { case "d": return 4; case "b": return 2; case "e": return 5; default: return 0; case "c": return 3; } return -1; } -mixed b() { return 5; } -.... -test 1793, expected result: EQ -mixed a() { switch("e") { case "d": return 4; case "b": return 2; case "e": return 5; case "c": return 3; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 1794, expected result: EQ -mixed a() { switch("e") { case "d": return 4; case "e": return 5; case "b": return 2; case "c": return 3; } return 0; } -mixed b() { return 5; } -.... -test 1795, expected result: EQ -mixed a() { switch("e") { default: return 0; case "d": return 4; case "e": return 5; case "b": return 2; case "c": return 3; } return -1; } -mixed b() { return 5; } -.... -test 1796, expected result: EQ -mixed a() { switch("e") { case "d": return 4; default: return 0; case "e": return 5; case "b": return 2; case "c": return 3; } return -1; } -mixed b() { return 5; } -.... -test 1797, expected result: EQ -mixed a() { switch("e") { case "d": return 4; case "e": return 5; default: return 0; case "b": return 2; case "c": return 3; } return -1; } -mixed b() { return 5; } -.... -test 1798, expected result: EQ -mixed a() { switch("e") { case "d": return 4; case "e": return 5; case "b": return 2; default: return 0; case "c": return 3; } return -1; } -mixed b() { return 5; } -.... -test 1799, expected result: EQ -mixed a() { switch("e") { case "d": return 4; case "e": return 5; case "b": return 2; case "c": return 3; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 1800, expected result: EQ -mixed a() { switch("e") { case "d": return 4; case "e": return 5; case "c": return 3; case "b": return 2; } return 0; } -mixed b() { return 5; } -.... -test 1801, expected result: EQ -mixed a() { switch("e") { default: return 0; case "d": return 4; case "e": return 5; case "c": return 3; case "b": return 2; } return -1; } -mixed b() { return 5; } -.... -test 1802, expected result: EQ -mixed a() { switch("e") { case "d": return 4; default: return 0; case "e": return 5; case "c": return 3; case "b": return 2; } return -1; } -mixed b() { return 5; } -.... -test 1803, expected result: EQ -mixed a() { switch("e") { case "d": return 4; case "e": return 5; default: return 0; case "c": return 3; case "b": return 2; } return -1; } -mixed b() { return 5; } -.... -test 1804, expected result: EQ -mixed a() { switch("e") { case "d": return 4; case "e": return 5; case "c": return 3; default: return 0; case "b": return 2; } return -1; } -mixed b() { return 5; } -.... -test 1805, expected result: EQ -mixed a() { switch("e") { case "d": return 4; case "e": return 5; case "c": return 3; case "b": return 2; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 1806, expected result: EQ -mixed a() { switch("e") { case "e": return 5; case "c": return 3; case "d": return 4; case "b": return 2; } return 0; } -mixed b() { return 5; } -.... -test 1807, expected result: EQ -mixed a() { switch("e") { default: return 0; case "e": return 5; case "c": return 3; case "d": return 4; case "b": return 2; } return -1; } -mixed b() { return 5; } -.... -test 1808, expected result: EQ -mixed a() { switch("e") { case "e": return 5; default: return 0; case "c": return 3; case "d": return 4; case "b": return 2; } return -1; } -mixed b() { return 5; } -.... -test 1809, expected result: EQ -mixed a() { switch("e") { case "e": return 5; case "c": return 3; default: return 0; case "d": return 4; case "b": return 2; } return -1; } -mixed b() { return 5; } -.... -test 1810, expected result: EQ -mixed a() { switch("e") { case "e": return 5; case "c": return 3; case "d": return 4; default: return 0; case "b": return 2; } return -1; } -mixed b() { return 5; } -.... -test 1811, expected result: EQ -mixed a() { switch("e") { case "e": return 5; case "c": return 3; case "d": return 4; case "b": return 2; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 1812, expected result: EQ -mixed a() { switch("e") { case "e": return 5; case "c": return 3; case "b": return 2; case "d": return 4; } return 0; } -mixed b() { return 5; } -.... -test 1813, expected result: EQ -mixed a() { switch("e") { default: return 0; case "e": return 5; case "c": return 3; case "b": return 2; case "d": return 4; } return -1; } -mixed b() { return 5; } -.... -test 1814, expected result: EQ -mixed a() { switch("e") { case "e": return 5; default: return 0; case "c": return 3; case "b": return 2; case "d": return 4; } return -1; } -mixed b() { return 5; } -.... -test 1815, expected result: EQ -mixed a() { switch("e") { case "e": return 5; case "c": return 3; default: return 0; case "b": return 2; case "d": return 4; } return -1; } -mixed b() { return 5; } -.... -test 1816, expected result: EQ -mixed a() { switch("e") { case "e": return 5; case "c": return 3; case "b": return 2; default: return 0; case "d": return 4; } return -1; } -mixed b() { return 5; } -.... -test 1817, expected result: EQ -mixed a() { switch("e") { case "e": return 5; case "c": return 3; case "b": return 2; case "d": return 4; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 1818, expected result: EQ -mixed a() { switch("e") { case "e": return 5; case "d": return 4; case "c": return 3; case "b": return 2; } return 0; } -mixed b() { return 5; } -.... -test 1819, expected result: EQ -mixed a() { switch("e") { default: return 0; case "e": return 5; case "d": return 4; case "c": return 3; case "b": return 2; } return -1; } -mixed b() { return 5; } -.... -test 1820, expected result: EQ -mixed a() { switch("e") { case "e": return 5; default: return 0; case "d": return 4; case "c": return 3; case "b": return 2; } return -1; } -mixed b() { return 5; } -.... -test 1821, expected result: EQ -mixed a() { switch("e") { case "e": return 5; case "d": return 4; default: return 0; case "c": return 3; case "b": return 2; } return -1; } -mixed b() { return 5; } -.... -test 1822, expected result: EQ -mixed a() { switch("e") { case "e": return 5; case "d": return 4; case "c": return 3; default: return 0; case "b": return 2; } return -1; } -mixed b() { return 5; } -.... -test 1823, expected result: EQ -mixed a() { switch("e") { case "e": return 5; case "d": return 4; case "c": return 3; case "b": return 2; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 1824, expected result: EQ -mixed a() { switch("e") { case "e": return 5; case "d": return 4; case "b": return 2; case "c": return 3; } return 0; } -mixed b() { return 5; } -.... -test 1825, expected result: EQ -mixed a() { switch("e") { default: return 0; case "e": return 5; case "d": return 4; case "b": return 2; case "c": return 3; } return -1; } -mixed b() { return 5; } -.... -test 1826, expected result: EQ -mixed a() { switch("e") { case "e": return 5; default: return 0; case "d": return 4; case "b": return 2; case "c": return 3; } return -1; } -mixed b() { return 5; } -.... -test 1827, expected result: EQ -mixed a() { switch("e") { case "e": return 5; case "d": return 4; default: return 0; case "b": return 2; case "c": return 3; } return -1; } -mixed b() { return 5; } -.... -test 1828, expected result: EQ -mixed a() { switch("e") { case "e": return 5; case "d": return 4; case "b": return 2; default: return 0; case "c": return 3; } return -1; } -mixed b() { return 5; } -.... -test 1829, expected result: EQ -mixed a() { switch("e") { case "e": return 5; case "d": return 4; case "b": return 2; case "c": return 3; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 1830, expected result: EQ -mixed a() { switch("e") { case "e": return 5; case "b": return 2; case "d": return 4; case "c": return 3; } return 0; } -mixed b() { return 5; } -.... -test 1831, expected result: EQ -mixed a() { switch("e") { default: return 0; case "e": return 5; case "b": return 2; case "d": return 4; case "c": return 3; } return -1; } -mixed b() { return 5; } -.... -test 1832, expected result: EQ -mixed a() { switch("e") { case "e": return 5; default: return 0; case "b": return 2; case "d": return 4; case "c": return 3; } return -1; } -mixed b() { return 5; } -.... -test 1833, expected result: EQ -mixed a() { switch("e") { case "e": return 5; case "b": return 2; default: return 0; case "d": return 4; case "c": return 3; } return -1; } -mixed b() { return 5; } -.... -test 1834, expected result: EQ -mixed a() { switch("e") { case "e": return 5; case "b": return 2; case "d": return 4; default: return 0; case "c": return 3; } return -1; } -mixed b() { return 5; } -.... -test 1835, expected result: EQ -mixed a() { switch("e") { case "e": return 5; case "b": return 2; case "d": return 4; case "c": return 3; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 1836, expected result: EQ -mixed a() { switch("e") { case "e": return 5; case "b": return 2; case "c": return 3; case "d": return 4; } return 0; } -mixed b() { return 5; } -.... -test 1837, expected result: EQ -mixed a() { switch("e") { default: return 0; case "e": return 5; case "b": return 2; case "c": return 3; case "d": return 4; } return -1; } -mixed b() { return 5; } -.... -test 1838, expected result: EQ -mixed a() { switch("e") { case "e": return 5; default: return 0; case "b": return 2; case "c": return 3; case "d": return 4; } return -1; } -mixed b() { return 5; } -.... -test 1839, expected result: EQ -mixed a() { switch("e") { case "e": return 5; case "b": return 2; default: return 0; case "c": return 3; case "d": return 4; } return -1; } -mixed b() { return 5; } -.... -test 1840, expected result: EQ -mixed a() { switch("e") { case "e": return 5; case "b": return 2; case "c": return 3; default: return 0; case "d": return 4; } return -1; } -mixed b() { return 5; } -.... -test 1841, expected result: EQ -mixed a() { switch("e") { case "e": return 5; case "b": return 2; case "c": return 3; case "d": return 4; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 1842, expected result: EQ -mixed a() { switch("a") { case 0: return 2; case "c": return 3; case "d": return 4; case "e": return 5; } return 0; } -mixed b() { return 0; } -.... -test 1843, expected result: EQ -mixed a() { switch("a") { default: return 0; case 0: return 2; case "c": return 3; case "d": return 4; case "e": return 5; } return -1; } -mixed b() { return 0; } -.... -test 1844, expected result: EQ -mixed a() { switch("a") { case 0: return 2; default: return 0; case "c": return 3; case "d": return 4; case "e": return 5; } return -1; } -mixed b() { return 0; } -.... -test 1845, expected result: EQ -mixed a() { switch("a") { case 0: return 2; case "c": return 3; default: return 0; case "d": return 4; case "e": return 5; } return -1; } -mixed b() { return 0; } -.... -test 1846, expected result: EQ -mixed a() { switch("a") { case 0: return 2; case "c": return 3; case "d": return 4; default: return 0; case "e": return 5; } return -1; } -mixed b() { return 0; } -.... -test 1847, expected result: EQ -mixed a() { switch("a") { case 0: return 2; case "c": return 3; case "d": return 4; case "e": return 5; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 1848, expected result: EQ -mixed a() { switch("a") { case 0: return 2; case "c": return 3; case "e": return 5; case "d": return 4; } return 0; } -mixed b() { return 0; } -.... -test 1849, expected result: EQ -mixed a() { switch("a") { default: return 0; case 0: return 2; case "c": return 3; case "e": return 5; case "d": return 4; } return -1; } -mixed b() { return 0; } -.... -test 1850, expected result: EQ -mixed a() { switch("a") { case 0: return 2; default: return 0; case "c": return 3; case "e": return 5; case "d": return 4; } return -1; } -mixed b() { return 0; } -.... -test 1851, expected result: EQ -mixed a() { switch("a") { case 0: return 2; case "c": return 3; default: return 0; case "e": return 5; case "d": return 4; } return -1; } -mixed b() { return 0; } -.... -test 1852, expected result: EQ -mixed a() { switch("a") { case 0: return 2; case "c": return 3; case "e": return 5; default: return 0; case "d": return 4; } return -1; } -mixed b() { return 0; } -.... -test 1853, expected result: EQ -mixed a() { switch("a") { case 0: return 2; case "c": return 3; case "e": return 5; case "d": return 4; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 1854, expected result: EQ -mixed a() { switch("a") { case 0: return 2; case "d": return 4; case "c": return 3; case "e": return 5; } return 0; } -mixed b() { return 0; } -.... -test 1855, expected result: EQ -mixed a() { switch("a") { default: return 0; case 0: return 2; case "d": return 4; case "c": return 3; case "e": return 5; } return -1; } -mixed b() { return 0; } -.... -test 1856, expected result: EQ -mixed a() { switch("a") { case 0: return 2; default: return 0; case "d": return 4; case "c": return 3; case "e": return 5; } return -1; } -mixed b() { return 0; } -.... -test 1857, expected result: EQ -mixed a() { switch("a") { case 0: return 2; case "d": return 4; default: return 0; case "c": return 3; case "e": return 5; } return -1; } -mixed b() { return 0; } -.... -test 1858, expected result: EQ -mixed a() { switch("a") { case 0: return 2; case "d": return 4; case "c": return 3; default: return 0; case "e": return 5; } return -1; } -mixed b() { return 0; } -.... -test 1859, expected result: EQ -mixed a() { switch("a") { case 0: return 2; case "d": return 4; case "c": return 3; case "e": return 5; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 1860, expected result: EQ -mixed a() { switch("a") { case 0: return 2; case "d": return 4; case "e": return 5; case "c": return 3; } return 0; } -mixed b() { return 0; } -.... -test 1861, expected result: EQ -mixed a() { switch("a") { default: return 0; case 0: return 2; case "d": return 4; case "e": return 5; case "c": return 3; } return -1; } -mixed b() { return 0; } -.... -test 1862, expected result: EQ -mixed a() { switch("a") { case 0: return 2; default: return 0; case "d": return 4; case "e": return 5; case "c": return 3; } return -1; } -mixed b() { return 0; } -.... -test 1863, expected result: EQ -mixed a() { switch("a") { case 0: return 2; case "d": return 4; default: return 0; case "e": return 5; case "c": return 3; } return -1; } -mixed b() { return 0; } -.... -test 1864, expected result: EQ -mixed a() { switch("a") { case 0: return 2; case "d": return 4; case "e": return 5; default: return 0; case "c": return 3; } return -1; } -mixed b() { return 0; } -.... -test 1865, expected result: EQ -mixed a() { switch("a") { case 0: return 2; case "d": return 4; case "e": return 5; case "c": return 3; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 1866, expected result: EQ -mixed a() { switch("a") { case 0: return 2; case "e": return 5; case "d": return 4; case "c": return 3; } return 0; } -mixed b() { return 0; } -.... -test 1867, expected result: EQ -mixed a() { switch("a") { default: return 0; case 0: return 2; case "e": return 5; case "d": return 4; case "c": return 3; } return -1; } -mixed b() { return 0; } -.... -test 1868, expected result: EQ -mixed a() { switch("a") { case 0: return 2; default: return 0; case "e": return 5; case "d": return 4; case "c": return 3; } return -1; } -mixed b() { return 0; } -.... -test 1869, expected result: EQ -mixed a() { switch("a") { case 0: return 2; case "e": return 5; default: return 0; case "d": return 4; case "c": return 3; } return -1; } -mixed b() { return 0; } -.... -test 1870, expected result: EQ -mixed a() { switch("a") { case 0: return 2; case "e": return 5; case "d": return 4; default: return 0; case "c": return 3; } return -1; } -mixed b() { return 0; } -.... -test 1871, expected result: EQ -mixed a() { switch("a") { case 0: return 2; case "e": return 5; case "d": return 4; case "c": return 3; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 1872, expected result: EQ -mixed a() { switch("a") { case 0: return 2; case "e": return 5; case "c": return 3; case "d": return 4; } return 0; } -mixed b() { return 0; } -.... -test 1873, expected result: EQ -mixed a() { switch("a") { default: return 0; case 0: return 2; case "e": return 5; case "c": return 3; case "d": return 4; } return -1; } -mixed b() { return 0; } -.... -test 1874, expected result: EQ -mixed a() { switch("a") { case 0: return 2; default: return 0; case "e": return 5; case "c": return 3; case "d": return 4; } return -1; } -mixed b() { return 0; } -.... -test 1875, expected result: EQ -mixed a() { switch("a") { case 0: return 2; case "e": return 5; default: return 0; case "c": return 3; case "d": return 4; } return -1; } -mixed b() { return 0; } -.... -test 1876, expected result: EQ -mixed a() { switch("a") { case 0: return 2; case "e": return 5; case "c": return 3; default: return 0; case "d": return 4; } return -1; } -mixed b() { return 0; } -.... -test 1877, expected result: EQ -mixed a() { switch("a") { case 0: return 2; case "e": return 5; case "c": return 3; case "d": return 4; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 1878, expected result: EQ -mixed a() { switch("a") { case "c": return 3; case 0: return 2; case "d": return 4; case "e": return 5; } return 0; } -mixed b() { return 0; } -.... -test 1879, expected result: EQ -mixed a() { switch("a") { default: return 0; case "c": return 3; case 0: return 2; case "d": return 4; case "e": return 5; } return -1; } -mixed b() { return 0; } -.... -test 1880, expected result: EQ -mixed a() { switch("a") { case "c": return 3; default: return 0; case 0: return 2; case "d": return 4; case "e": return 5; } return -1; } -mixed b() { return 0; } -.... -test 1881, expected result: EQ -mixed a() { switch("a") { case "c": return 3; case 0: return 2; default: return 0; case "d": return 4; case "e": return 5; } return -1; } -mixed b() { return 0; } -.... -test 1882, expected result: EQ -mixed a() { switch("a") { case "c": return 3; case 0: return 2; case "d": return 4; default: return 0; case "e": return 5; } return -1; } -mixed b() { return 0; } -.... -test 1883, expected result: EQ -mixed a() { switch("a") { case "c": return 3; case 0: return 2; case "d": return 4; case "e": return 5; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 1884, expected result: EQ -mixed a() { switch("a") { case "c": return 3; case 0: return 2; case "e": return 5; case "d": return 4; } return 0; } -mixed b() { return 0; } -.... -test 1885, expected result: EQ -mixed a() { switch("a") { default: return 0; case "c": return 3; case 0: return 2; case "e": return 5; case "d": return 4; } return -1; } -mixed b() { return 0; } -.... -test 1886, expected result: EQ -mixed a() { switch("a") { case "c": return 3; default: return 0; case 0: return 2; case "e": return 5; case "d": return 4; } return -1; } -mixed b() { return 0; } -.... -test 1887, expected result: EQ -mixed a() { switch("a") { case "c": return 3; case 0: return 2; default: return 0; case "e": return 5; case "d": return 4; } return -1; } -mixed b() { return 0; } -.... -test 1888, expected result: EQ -mixed a() { switch("a") { case "c": return 3; case 0: return 2; case "e": return 5; default: return 0; case "d": return 4; } return -1; } -mixed b() { return 0; } -.... -test 1889, expected result: EQ -mixed a() { switch("a") { case "c": return 3; case 0: return 2; case "e": return 5; case "d": return 4; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 1890, expected result: EQ -mixed a() { switch("a") { case "c": return 3; case "d": return 4; case 0: return 2; case "e": return 5; } return 0; } -mixed b() { return 0; } -.... -test 1891, expected result: EQ -mixed a() { switch("a") { default: return 0; case "c": return 3; case "d": return 4; case 0: return 2; case "e": return 5; } return -1; } -mixed b() { return 0; } -.... -test 1892, expected result: EQ -mixed a() { switch("a") { case "c": return 3; default: return 0; case "d": return 4; case 0: return 2; case "e": return 5; } return -1; } -mixed b() { return 0; } -.... -test 1893, expected result: EQ -mixed a() { switch("a") { case "c": return 3; case "d": return 4; default: return 0; case 0: return 2; case "e": return 5; } return -1; } -mixed b() { return 0; } -.... -test 1894, expected result: EQ -mixed a() { switch("a") { case "c": return 3; case "d": return 4; case 0: return 2; default: return 0; case "e": return 5; } return -1; } -mixed b() { return 0; } -.... -test 1895, expected result: EQ -mixed a() { switch("a") { case "c": return 3; case "d": return 4; case 0: return 2; case "e": return 5; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 1896, expected result: EQ -mixed a() { switch("a") { case "c": return 3; case "d": return 4; case "e": return 5; case 0: return 2; } return 0; } -mixed b() { return 0; } -.... -test 1897, expected result: EQ -mixed a() { switch("a") { default: return 0; case "c": return 3; case "d": return 4; case "e": return 5; case 0: return 2; } return -1; } -mixed b() { return 0; } -.... -test 1898, expected result: EQ -mixed a() { switch("a") { case "c": return 3; default: return 0; case "d": return 4; case "e": return 5; case 0: return 2; } return -1; } -mixed b() { return 0; } -.... -test 1899, expected result: EQ -mixed a() { switch("a") { case "c": return 3; case "d": return 4; default: return 0; case "e": return 5; case 0: return 2; } return -1; } -mixed b() { return 0; } -.... -test 1900, expected result: EQ -mixed a() { switch("a") { case "c": return 3; case "d": return 4; case "e": return 5; default: return 0; case 0: return 2; } return -1; } -mixed b() { return 0; } -.... -test 1901, expected result: EQ -mixed a() { switch("a") { case "c": return 3; case "d": return 4; case "e": return 5; case 0: return 2; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 1902, expected result: EQ -mixed a() { switch("a") { case "c": return 3; case "e": return 5; case "d": return 4; case 0: return 2; } return 0; } -mixed b() { return 0; } -.... -test 1903, expected result: EQ -mixed a() { switch("a") { default: return 0; case "c": return 3; case "e": return 5; case "d": return 4; case 0: return 2; } return -1; } -mixed b() { return 0; } -.... -test 1904, expected result: EQ -mixed a() { switch("a") { case "c": return 3; default: return 0; case "e": return 5; case "d": return 4; case 0: return 2; } return -1; } -mixed b() { return 0; } -.... -test 1905, expected result: EQ -mixed a() { switch("a") { case "c": return 3; case "e": return 5; default: return 0; case "d": return 4; case 0: return 2; } return -1; } -mixed b() { return 0; } -.... -test 1906, expected result: EQ -mixed a() { switch("a") { case "c": return 3; case "e": return 5; case "d": return 4; default: return 0; case 0: return 2; } return -1; } -mixed b() { return 0; } -.... -test 1907, expected result: EQ -mixed a() { switch("a") { case "c": return 3; case "e": return 5; case "d": return 4; case 0: return 2; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 1908, expected result: EQ -mixed a() { switch("a") { case "c": return 3; case "e": return 5; case 0: return 2; case "d": return 4; } return 0; } -mixed b() { return 0; } -.... -test 1909, expected result: EQ -mixed a() { switch("a") { default: return 0; case "c": return 3; case "e": return 5; case 0: return 2; case "d": return 4; } return -1; } -mixed b() { return 0; } -.... -test 1910, expected result: EQ -mixed a() { switch("a") { case "c": return 3; default: return 0; case "e": return 5; case 0: return 2; case "d": return 4; } return -1; } -mixed b() { return 0; } -.... -test 1911, expected result: EQ -mixed a() { switch("a") { case "c": return 3; case "e": return 5; default: return 0; case 0: return 2; case "d": return 4; } return -1; } -mixed b() { return 0; } -.... -test 1912, expected result: EQ -mixed a() { switch("a") { case "c": return 3; case "e": return 5; case 0: return 2; default: return 0; case "d": return 4; } return -1; } -mixed b() { return 0; } -.... -test 1913, expected result: EQ -mixed a() { switch("a") { case "c": return 3; case "e": return 5; case 0: return 2; case "d": return 4; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 1914, expected result: EQ -mixed a() { switch("a") { case "d": return 4; case "c": return 3; case 0: return 2; case "e": return 5; } return 0; } -mixed b() { return 0; } -.... -test 1915, expected result: EQ -mixed a() { switch("a") { default: return 0; case "d": return 4; case "c": return 3; case 0: return 2; case "e": return 5; } return -1; } -mixed b() { return 0; } -.... -test 1916, expected result: EQ -mixed a() { switch("a") { case "d": return 4; default: return 0; case "c": return 3; case 0: return 2; case "e": return 5; } return -1; } -mixed b() { return 0; } -.... -test 1917, expected result: EQ -mixed a() { switch("a") { case "d": return 4; case "c": return 3; default: return 0; case 0: return 2; case "e": return 5; } return -1; } -mixed b() { return 0; } -.... -test 1918, expected result: EQ -mixed a() { switch("a") { case "d": return 4; case "c": return 3; case 0: return 2; default: return 0; case "e": return 5; } return -1; } -mixed b() { return 0; } -.... -test 1919, expected result: EQ -mixed a() { switch("a") { case "d": return 4; case "c": return 3; case 0: return 2; case "e": return 5; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 1920, expected result: EQ -mixed a() { switch("a") { case "d": return 4; case "c": return 3; case "e": return 5; case 0: return 2; } return 0; } -mixed b() { return 0; } -.... -test 1921, expected result: EQ -mixed a() { switch("a") { default: return 0; case "d": return 4; case "c": return 3; case "e": return 5; case 0: return 2; } return -1; } -mixed b() { return 0; } -.... -test 1922, expected result: EQ -mixed a() { switch("a") { case "d": return 4; default: return 0; case "c": return 3; case "e": return 5; case 0: return 2; } return -1; } -mixed b() { return 0; } -.... -test 1923, expected result: EQ -mixed a() { switch("a") { case "d": return 4; case "c": return 3; default: return 0; case "e": return 5; case 0: return 2; } return -1; } -mixed b() { return 0; } -.... -test 1924, expected result: EQ -mixed a() { switch("a") { case "d": return 4; case "c": return 3; case "e": return 5; default: return 0; case 0: return 2; } return -1; } -mixed b() { return 0; } -.... -test 1925, expected result: EQ -mixed a() { switch("a") { case "d": return 4; case "c": return 3; case "e": return 5; case 0: return 2; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 1926, expected result: EQ -mixed a() { switch("a") { case "d": return 4; case 0: return 2; case "c": return 3; case "e": return 5; } return 0; } -mixed b() { return 0; } -.... -test 1927, expected result: EQ -mixed a() { switch("a") { default: return 0; case "d": return 4; case 0: return 2; case "c": return 3; case "e": return 5; } return -1; } -mixed b() { return 0; } -.... -test 1928, expected result: EQ -mixed a() { switch("a") { case "d": return 4; default: return 0; case 0: return 2; case "c": return 3; case "e": return 5; } return -1; } -mixed b() { return 0; } -.... -test 1929, expected result: EQ -mixed a() { switch("a") { case "d": return 4; case 0: return 2; default: return 0; case "c": return 3; case "e": return 5; } return -1; } -mixed b() { return 0; } -.... -test 1930, expected result: EQ -mixed a() { switch("a") { case "d": return 4; case 0: return 2; case "c": return 3; default: return 0; case "e": return 5; } return -1; } -mixed b() { return 0; } -.... -test 1931, expected result: EQ -mixed a() { switch("a") { case "d": return 4; case 0: return 2; case "c": return 3; case "e": return 5; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 1932, expected result: EQ -mixed a() { switch("a") { case "d": return 4; case 0: return 2; case "e": return 5; case "c": return 3; } return 0; } -mixed b() { return 0; } -.... -test 1933, expected result: EQ -mixed a() { switch("a") { default: return 0; case "d": return 4; case 0: return 2; case "e": return 5; case "c": return 3; } return -1; } -mixed b() { return 0; } -.... -test 1934, expected result: EQ -mixed a() { switch("a") { case "d": return 4; default: return 0; case 0: return 2; case "e": return 5; case "c": return 3; } return -1; } -mixed b() { return 0; } -.... -test 1935, expected result: EQ -mixed a() { switch("a") { case "d": return 4; case 0: return 2; default: return 0; case "e": return 5; case "c": return 3; } return -1; } -mixed b() { return 0; } -.... -test 1936, expected result: EQ -mixed a() { switch("a") { case "d": return 4; case 0: return 2; case "e": return 5; default: return 0; case "c": return 3; } return -1; } -mixed b() { return 0; } -.... -test 1937, expected result: EQ -mixed a() { switch("a") { case "d": return 4; case 0: return 2; case "e": return 5; case "c": return 3; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 1938, expected result: EQ -mixed a() { switch("a") { case "d": return 4; case "e": return 5; case 0: return 2; case "c": return 3; } return 0; } -mixed b() { return 0; } -.... -test 1939, expected result: EQ -mixed a() { switch("a") { default: return 0; case "d": return 4; case "e": return 5; case 0: return 2; case "c": return 3; } return -1; } -mixed b() { return 0; } -.... -test 1940, expected result: EQ -mixed a() { switch("a") { case "d": return 4; default: return 0; case "e": return 5; case 0: return 2; case "c": return 3; } return -1; } -mixed b() { return 0; } -.... -test 1941, expected result: EQ -mixed a() { switch("a") { case "d": return 4; case "e": return 5; default: return 0; case 0: return 2; case "c": return 3; } return -1; } -mixed b() { return 0; } -.... -test 1942, expected result: EQ -mixed a() { switch("a") { case "d": return 4; case "e": return 5; case 0: return 2; default: return 0; case "c": return 3; } return -1; } -mixed b() { return 0; } -.... -test 1943, expected result: EQ -mixed a() { switch("a") { case "d": return 4; case "e": return 5; case 0: return 2; case "c": return 3; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 1944, expected result: EQ -mixed a() { switch("a") { case "d": return 4; case "e": return 5; case "c": return 3; case 0: return 2; } return 0; } -mixed b() { return 0; } -.... -test 1945, expected result: EQ -mixed a() { switch("a") { default: return 0; case "d": return 4; case "e": return 5; case "c": return 3; case 0: return 2; } return -1; } -mixed b() { return 0; } -.... -test 1946, expected result: EQ -mixed a() { switch("a") { case "d": return 4; default: return 0; case "e": return 5; case "c": return 3; case 0: return 2; } return -1; } -mixed b() { return 0; } -.... -test 1947, expected result: EQ -mixed a() { switch("a") { case "d": return 4; case "e": return 5; default: return 0; case "c": return 3; case 0: return 2; } return -1; } -mixed b() { return 0; } -.... -test 1948, expected result: EQ -mixed a() { switch("a") { case "d": return 4; case "e": return 5; case "c": return 3; default: return 0; case 0: return 2; } return -1; } -mixed b() { return 0; } -.... -test 1949, expected result: EQ -mixed a() { switch("a") { case "d": return 4; case "e": return 5; case "c": return 3; case 0: return 2; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 1950, expected result: EQ -mixed a() { switch("a") { case "e": return 5; case "c": return 3; case "d": return 4; case 0: return 2; } return 0; } -mixed b() { return 0; } -.... -test 1951, expected result: EQ -mixed a() { switch("a") { default: return 0; case "e": return 5; case "c": return 3; case "d": return 4; case 0: return 2; } return -1; } -mixed b() { return 0; } -.... -test 1952, expected result: EQ -mixed a() { switch("a") { case "e": return 5; default: return 0; case "c": return 3; case "d": return 4; case 0: return 2; } return -1; } -mixed b() { return 0; } -.... -test 1953, expected result: EQ -mixed a() { switch("a") { case "e": return 5; case "c": return 3; default: return 0; case "d": return 4; case 0: return 2; } return -1; } -mixed b() { return 0; } -.... -test 1954, expected result: EQ -mixed a() { switch("a") { case "e": return 5; case "c": return 3; case "d": return 4; default: return 0; case 0: return 2; } return -1; } -mixed b() { return 0; } -.... -test 1955, expected result: EQ -mixed a() { switch("a") { case "e": return 5; case "c": return 3; case "d": return 4; case 0: return 2; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 1956, expected result: EQ -mixed a() { switch("a") { case "e": return 5; case "c": return 3; case 0: return 2; case "d": return 4; } return 0; } -mixed b() { return 0; } -.... -test 1957, expected result: EQ -mixed a() { switch("a") { default: return 0; case "e": return 5; case "c": return 3; case 0: return 2; case "d": return 4; } return -1; } -mixed b() { return 0; } -.... -test 1958, expected result: EQ -mixed a() { switch("a") { case "e": return 5; default: return 0; case "c": return 3; case 0: return 2; case "d": return 4; } return -1; } -mixed b() { return 0; } -.... -test 1959, expected result: EQ -mixed a() { switch("a") { case "e": return 5; case "c": return 3; default: return 0; case 0: return 2; case "d": return 4; } return -1; } -mixed b() { return 0; } -.... -test 1960, expected result: EQ -mixed a() { switch("a") { case "e": return 5; case "c": return 3; case 0: return 2; default: return 0; case "d": return 4; } return -1; } -mixed b() { return 0; } -.... -test 1961, expected result: EQ -mixed a() { switch("a") { case "e": return 5; case "c": return 3; case 0: return 2; case "d": return 4; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 1962, expected result: EQ -mixed a() { switch("a") { case "e": return 5; case "d": return 4; case "c": return 3; case 0: return 2; } return 0; } -mixed b() { return 0; } -.... -test 1963, expected result: EQ -mixed a() { switch("a") { default: return 0; case "e": return 5; case "d": return 4; case "c": return 3; case 0: return 2; } return -1; } -mixed b() { return 0; } -.... -test 1964, expected result: EQ -mixed a() { switch("a") { case "e": return 5; default: return 0; case "d": return 4; case "c": return 3; case 0: return 2; } return -1; } -mixed b() { return 0; } -.... -test 1965, expected result: EQ -mixed a() { switch("a") { case "e": return 5; case "d": return 4; default: return 0; case "c": return 3; case 0: return 2; } return -1; } -mixed b() { return 0; } -.... -test 1966, expected result: EQ -mixed a() { switch("a") { case "e": return 5; case "d": return 4; case "c": return 3; default: return 0; case 0: return 2; } return -1; } -mixed b() { return 0; } -.... -test 1967, expected result: EQ -mixed a() { switch("a") { case "e": return 5; case "d": return 4; case "c": return 3; case 0: return 2; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 1968, expected result: EQ -mixed a() { switch("a") { case "e": return 5; case "d": return 4; case 0: return 2; case "c": return 3; } return 0; } -mixed b() { return 0; } -.... -test 1969, expected result: EQ -mixed a() { switch("a") { default: return 0; case "e": return 5; case "d": return 4; case 0: return 2; case "c": return 3; } return -1; } -mixed b() { return 0; } -.... -test 1970, expected result: EQ -mixed a() { switch("a") { case "e": return 5; default: return 0; case "d": return 4; case 0: return 2; case "c": return 3; } return -1; } -mixed b() { return 0; } -.... -test 1971, expected result: EQ -mixed a() { switch("a") { case "e": return 5; case "d": return 4; default: return 0; case 0: return 2; case "c": return 3; } return -1; } -mixed b() { return 0; } -.... -test 1972, expected result: EQ -mixed a() { switch("a") { case "e": return 5; case "d": return 4; case 0: return 2; default: return 0; case "c": return 3; } return -1; } -mixed b() { return 0; } -.... -test 1973, expected result: EQ -mixed a() { switch("a") { case "e": return 5; case "d": return 4; case 0: return 2; case "c": return 3; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 1974, expected result: EQ -mixed a() { switch("a") { case "e": return 5; case 0: return 2; case "d": return 4; case "c": return 3; } return 0; } -mixed b() { return 0; } -.... -test 1975, expected result: EQ -mixed a() { switch("a") { default: return 0; case "e": return 5; case 0: return 2; case "d": return 4; case "c": return 3; } return -1; } -mixed b() { return 0; } -.... -test 1976, expected result: EQ -mixed a() { switch("a") { case "e": return 5; default: return 0; case 0: return 2; case "d": return 4; case "c": return 3; } return -1; } -mixed b() { return 0; } -.... -test 1977, expected result: EQ -mixed a() { switch("a") { case "e": return 5; case 0: return 2; default: return 0; case "d": return 4; case "c": return 3; } return -1; } -mixed b() { return 0; } -.... -test 1978, expected result: EQ -mixed a() { switch("a") { case "e": return 5; case 0: return 2; case "d": return 4; default: return 0; case "c": return 3; } return -1; } -mixed b() { return 0; } -.... -test 1979, expected result: EQ -mixed a() { switch("a") { case "e": return 5; case 0: return 2; case "d": return 4; case "c": return 3; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 1980, expected result: EQ -mixed a() { switch("a") { case "e": return 5; case 0: return 2; case "c": return 3; case "d": return 4; } return 0; } -mixed b() { return 0; } -.... -test 1981, expected result: EQ -mixed a() { switch("a") { default: return 0; case "e": return 5; case 0: return 2; case "c": return 3; case "d": return 4; } return -1; } -mixed b() { return 0; } -.... -test 1982, expected result: EQ -mixed a() { switch("a") { case "e": return 5; default: return 0; case 0: return 2; case "c": return 3; case "d": return 4; } return -1; } -mixed b() { return 0; } -.... -test 1983, expected result: EQ -mixed a() { switch("a") { case "e": return 5; case 0: return 2; default: return 0; case "c": return 3; case "d": return 4; } return -1; } -mixed b() { return 0; } -.... -test 1984, expected result: EQ -mixed a() { switch("a") { case "e": return 5; case 0: return 2; case "c": return 3; default: return 0; case "d": return 4; } return -1; } -mixed b() { return 0; } -.... -test 1985, expected result: EQ -mixed a() { switch("a") { case "e": return 5; case 0: return 2; case "c": return 3; case "d": return 4; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 1986, expected result: EQ -mixed a() { switch(0) { case 0: return 2; case "c": return 3; case "d": return 4; case "e": return 5; } return 0; } -mixed b() { return 2; } -.... -test 1987, expected result: EQ -mixed a() { switch(0) { default: return 0; case 0: return 2; case "c": return 3; case "d": return 4; case "e": return 5; } return -1; } -mixed b() { return 2; } -.... -test 1988, expected result: EQ -mixed a() { switch(0) { case 0: return 2; default: return 0; case "c": return 3; case "d": return 4; case "e": return 5; } return -1; } -mixed b() { return 2; } -.... -test 1989, expected result: EQ -mixed a() { switch(0) { case 0: return 2; case "c": return 3; default: return 0; case "d": return 4; case "e": return 5; } return -1; } -mixed b() { return 2; } -.... -test 1990, expected result: EQ -mixed a() { switch(0) { case 0: return 2; case "c": return 3; case "d": return 4; default: return 0; case "e": return 5; } return -1; } -mixed b() { return 2; } -.... -test 1991, expected result: EQ -mixed a() { switch(0) { case 0: return 2; case "c": return 3; case "d": return 4; case "e": return 5; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 1992, expected result: EQ -mixed a() { switch(0) { case 0: return 2; case "c": return 3; case "e": return 5; case "d": return 4; } return 0; } -mixed b() { return 2; } -.... -test 1993, expected result: EQ -mixed a() { switch(0) { default: return 0; case 0: return 2; case "c": return 3; case "e": return 5; case "d": return 4; } return -1; } -mixed b() { return 2; } -.... -test 1994, expected result: EQ -mixed a() { switch(0) { case 0: return 2; default: return 0; case "c": return 3; case "e": return 5; case "d": return 4; } return -1; } -mixed b() { return 2; } -.... -test 1995, expected result: EQ -mixed a() { switch(0) { case 0: return 2; case "c": return 3; default: return 0; case "e": return 5; case "d": return 4; } return -1; } -mixed b() { return 2; } -.... -test 1996, expected result: EQ -mixed a() { switch(0) { case 0: return 2; case "c": return 3; case "e": return 5; default: return 0; case "d": return 4; } return -1; } -mixed b() { return 2; } -.... -test 1997, expected result: EQ -mixed a() { switch(0) { case 0: return 2; case "c": return 3; case "e": return 5; case "d": return 4; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 1998, expected result: EQ -mixed a() { switch(0) { case 0: return 2; case "d": return 4; case "c": return 3; case "e": return 5; } return 0; } -mixed b() { return 2; } -.... -test 1999, expected result: EQ -mixed a() { switch(0) { default: return 0; case 0: return 2; case "d": return 4; case "c": return 3; case "e": return 5; } return -1; } -mixed b() { return 2; } -.... -test 2000, expected result: EQ -mixed a() { switch(0) { case 0: return 2; default: return 0; case "d": return 4; case "c": return 3; case "e": return 5; } return -1; } -mixed b() { return 2; } -.... -test 2001, expected result: EQ -mixed a() { switch(0) { case 0: return 2; case "d": return 4; default: return 0; case "c": return 3; case "e": return 5; } return -1; } -mixed b() { return 2; } -.... -test 2002, expected result: EQ -mixed a() { switch(0) { case 0: return 2; case "d": return 4; case "c": return 3; default: return 0; case "e": return 5; } return -1; } -mixed b() { return 2; } -.... -test 2003, expected result: EQ -mixed a() { switch(0) { case 0: return 2; case "d": return 4; case "c": return 3; case "e": return 5; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 2004, expected result: EQ -mixed a() { switch(0) { case 0: return 2; case "d": return 4; case "e": return 5; case "c": return 3; } return 0; } -mixed b() { return 2; } -.... -test 2005, expected result: EQ -mixed a() { switch(0) { default: return 0; case 0: return 2; case "d": return 4; case "e": return 5; case "c": return 3; } return -1; } -mixed b() { return 2; } -.... -test 2006, expected result: EQ -mixed a() { switch(0) { case 0: return 2; default: return 0; case "d": return 4; case "e": return 5; case "c": return 3; } return -1; } -mixed b() { return 2; } -.... -test 2007, expected result: EQ -mixed a() { switch(0) { case 0: return 2; case "d": return 4; default: return 0; case "e": return 5; case "c": return 3; } return -1; } -mixed b() { return 2; } -.... -test 2008, expected result: EQ -mixed a() { switch(0) { case 0: return 2; case "d": return 4; case "e": return 5; default: return 0; case "c": return 3; } return -1; } -mixed b() { return 2; } -.... -test 2009, expected result: EQ -mixed a() { switch(0) { case 0: return 2; case "d": return 4; case "e": return 5; case "c": return 3; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 2010, expected result: EQ -mixed a() { switch(0) { case 0: return 2; case "e": return 5; case "d": return 4; case "c": return 3; } return 0; } -mixed b() { return 2; } -.... -test 2011, expected result: EQ -mixed a() { switch(0) { default: return 0; case 0: return 2; case "e": return 5; case "d": return 4; case "c": return 3; } return -1; } -mixed b() { return 2; } -.... -test 2012, expected result: EQ -mixed a() { switch(0) { case 0: return 2; default: return 0; case "e": return 5; case "d": return 4; case "c": return 3; } return -1; } -mixed b() { return 2; } -.... -test 2013, expected result: EQ -mixed a() { switch(0) { case 0: return 2; case "e": return 5; default: return 0; case "d": return 4; case "c": return 3; } return -1; } -mixed b() { return 2; } -.... -test 2014, expected result: EQ -mixed a() { switch(0) { case 0: return 2; case "e": return 5; case "d": return 4; default: return 0; case "c": return 3; } return -1; } -mixed b() { return 2; } -.... -test 2015, expected result: EQ -mixed a() { switch(0) { case 0: return 2; case "e": return 5; case "d": return 4; case "c": return 3; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 2016, expected result: EQ -mixed a() { switch(0) { case 0: return 2; case "e": return 5; case "c": return 3; case "d": return 4; } return 0; } -mixed b() { return 2; } -.... -test 2017, expected result: EQ -mixed a() { switch(0) { default: return 0; case 0: return 2; case "e": return 5; case "c": return 3; case "d": return 4; } return -1; } -mixed b() { return 2; } -.... -test 2018, expected result: EQ -mixed a() { switch(0) { case 0: return 2; default: return 0; case "e": return 5; case "c": return 3; case "d": return 4; } return -1; } -mixed b() { return 2; } -.... -test 2019, expected result: EQ -mixed a() { switch(0) { case 0: return 2; case "e": return 5; default: return 0; case "c": return 3; case "d": return 4; } return -1; } -mixed b() { return 2; } -.... -test 2020, expected result: EQ -mixed a() { switch(0) { case 0: return 2; case "e": return 5; case "c": return 3; default: return 0; case "d": return 4; } return -1; } -mixed b() { return 2; } -.... -test 2021, expected result: EQ -mixed a() { switch(0) { case 0: return 2; case "e": return 5; case "c": return 3; case "d": return 4; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 2022, expected result: EQ -mixed a() { switch(0) { case "c": return 3; case 0: return 2; case "d": return 4; case "e": return 5; } return 0; } -mixed b() { return 2; } -.... -test 2023, expected result: EQ -mixed a() { switch(0) { default: return 0; case "c": return 3; case 0: return 2; case "d": return 4; case "e": return 5; } return -1; } -mixed b() { return 2; } -.... -test 2024, expected result: EQ -mixed a() { switch(0) { case "c": return 3; default: return 0; case 0: return 2; case "d": return 4; case "e": return 5; } return -1; } -mixed b() { return 2; } -.... -test 2025, expected result: EQ -mixed a() { switch(0) { case "c": return 3; case 0: return 2; default: return 0; case "d": return 4; case "e": return 5; } return -1; } -mixed b() { return 2; } -.... -test 2026, expected result: EQ -mixed a() { switch(0) { case "c": return 3; case 0: return 2; case "d": return 4; default: return 0; case "e": return 5; } return -1; } -mixed b() { return 2; } -.... -test 2027, expected result: EQ -mixed a() { switch(0) { case "c": return 3; case 0: return 2; case "d": return 4; case "e": return 5; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 2028, expected result: EQ -mixed a() { switch(0) { case "c": return 3; case 0: return 2; case "e": return 5; case "d": return 4; } return 0; } -mixed b() { return 2; } -.... -test 2029, expected result: EQ -mixed a() { switch(0) { default: return 0; case "c": return 3; case 0: return 2; case "e": return 5; case "d": return 4; } return -1; } -mixed b() { return 2; } -.... -test 2030, expected result: EQ -mixed a() { switch(0) { case "c": return 3; default: return 0; case 0: return 2; case "e": return 5; case "d": return 4; } return -1; } -mixed b() { return 2; } -.... -test 2031, expected result: EQ -mixed a() { switch(0) { case "c": return 3; case 0: return 2; default: return 0; case "e": return 5; case "d": return 4; } return -1; } -mixed b() { return 2; } -.... -test 2032, expected result: EQ -mixed a() { switch(0) { case "c": return 3; case 0: return 2; case "e": return 5; default: return 0; case "d": return 4; } return -1; } -mixed b() { return 2; } -.... -test 2033, expected result: EQ -mixed a() { switch(0) { case "c": return 3; case 0: return 2; case "e": return 5; case "d": return 4; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 2034, expected result: EQ -mixed a() { switch(0) { case "c": return 3; case "d": return 4; case 0: return 2; case "e": return 5; } return 0; } -mixed b() { return 2; } -.... -test 2035, expected result: EQ -mixed a() { switch(0) { default: return 0; case "c": return 3; case "d": return 4; case 0: return 2; case "e": return 5; } return -1; } -mixed b() { return 2; } -.... -test 2036, expected result: EQ -mixed a() { switch(0) { case "c": return 3; default: return 0; case "d": return 4; case 0: return 2; case "e": return 5; } return -1; } -mixed b() { return 2; } -.... -test 2037, expected result: EQ -mixed a() { switch(0) { case "c": return 3; case "d": return 4; default: return 0; case 0: return 2; case "e": return 5; } return -1; } -mixed b() { return 2; } -.... -test 2038, expected result: EQ -mixed a() { switch(0) { case "c": return 3; case "d": return 4; case 0: return 2; default: return 0; case "e": return 5; } return -1; } -mixed b() { return 2; } -.... -test 2039, expected result: EQ -mixed a() { switch(0) { case "c": return 3; case "d": return 4; case 0: return 2; case "e": return 5; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 2040, expected result: EQ -mixed a() { switch(0) { case "c": return 3; case "d": return 4; case "e": return 5; case 0: return 2; } return 0; } -mixed b() { return 2; } -.... -test 2041, expected result: EQ -mixed a() { switch(0) { default: return 0; case "c": return 3; case "d": return 4; case "e": return 5; case 0: return 2; } return -1; } -mixed b() { return 2; } -.... -test 2042, expected result: EQ -mixed a() { switch(0) { case "c": return 3; default: return 0; case "d": return 4; case "e": return 5; case 0: return 2; } return -1; } -mixed b() { return 2; } -.... -test 2043, expected result: EQ -mixed a() { switch(0) { case "c": return 3; case "d": return 4; default: return 0; case "e": return 5; case 0: return 2; } return -1; } -mixed b() { return 2; } -.... -test 2044, expected result: EQ -mixed a() { switch(0) { case "c": return 3; case "d": return 4; case "e": return 5; default: return 0; case 0: return 2; } return -1; } -mixed b() { return 2; } -.... -test 2045, expected result: EQ -mixed a() { switch(0) { case "c": return 3; case "d": return 4; case "e": return 5; case 0: return 2; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 2046, expected result: EQ -mixed a() { switch(0) { case "c": return 3; case "e": return 5; case "d": return 4; case 0: return 2; } return 0; } -mixed b() { return 2; } -.... -test 2047, expected result: EQ -mixed a() { switch(0) { default: return 0; case "c": return 3; case "e": return 5; case "d": return 4; case 0: return 2; } return -1; } -mixed b() { return 2; } -.... -test 2048, expected result: EQ -mixed a() { switch(0) { case "c": return 3; default: return 0; case "e": return 5; case "d": return 4; case 0: return 2; } return -1; } -mixed b() { return 2; } -.... -test 2049, expected result: EQ -mixed a() { switch(0) { case "c": return 3; case "e": return 5; default: return 0; case "d": return 4; case 0: return 2; } return -1; } -mixed b() { return 2; } -.... -test 2050, expected result: EQ -mixed a() { switch(0) { case "c": return 3; case "e": return 5; case "d": return 4; default: return 0; case 0: return 2; } return -1; } -mixed b() { return 2; } -.... -test 2051, expected result: EQ -mixed a() { switch(0) { case "c": return 3; case "e": return 5; case "d": return 4; case 0: return 2; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 2052, expected result: EQ -mixed a() { switch(0) { case "c": return 3; case "e": return 5; case 0: return 2; case "d": return 4; } return 0; } -mixed b() { return 2; } -.... -test 2053, expected result: EQ -mixed a() { switch(0) { default: return 0; case "c": return 3; case "e": return 5; case 0: return 2; case "d": return 4; } return -1; } -mixed b() { return 2; } -.... -test 2054, expected result: EQ -mixed a() { switch(0) { case "c": return 3; default: return 0; case "e": return 5; case 0: return 2; case "d": return 4; } return -1; } -mixed b() { return 2; } -.... -test 2055, expected result: EQ -mixed a() { switch(0) { case "c": return 3; case "e": return 5; default: return 0; case 0: return 2; case "d": return 4; } return -1; } -mixed b() { return 2; } -.... -test 2056, expected result: EQ -mixed a() { switch(0) { case "c": return 3; case "e": return 5; case 0: return 2; default: return 0; case "d": return 4; } return -1; } -mixed b() { return 2; } -.... -test 2057, expected result: EQ -mixed a() { switch(0) { case "c": return 3; case "e": return 5; case 0: return 2; case "d": return 4; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 2058, expected result: EQ -mixed a() { switch(0) { case "d": return 4; case "c": return 3; case 0: return 2; case "e": return 5; } return 0; } -mixed b() { return 2; } -.... -test 2059, expected result: EQ -mixed a() { switch(0) { default: return 0; case "d": return 4; case "c": return 3; case 0: return 2; case "e": return 5; } return -1; } -mixed b() { return 2; } -.... -test 2060, expected result: EQ -mixed a() { switch(0) { case "d": return 4; default: return 0; case "c": return 3; case 0: return 2; case "e": return 5; } return -1; } -mixed b() { return 2; } -.... -test 2061, expected result: EQ -mixed a() { switch(0) { case "d": return 4; case "c": return 3; default: return 0; case 0: return 2; case "e": return 5; } return -1; } -mixed b() { return 2; } -.... -test 2062, expected result: EQ -mixed a() { switch(0) { case "d": return 4; case "c": return 3; case 0: return 2; default: return 0; case "e": return 5; } return -1; } -mixed b() { return 2; } -.... -test 2063, expected result: EQ -mixed a() { switch(0) { case "d": return 4; case "c": return 3; case 0: return 2; case "e": return 5; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 2064, expected result: EQ -mixed a() { switch(0) { case "d": return 4; case "c": return 3; case "e": return 5; case 0: return 2; } return 0; } -mixed b() { return 2; } -.... -test 2065, expected result: EQ -mixed a() { switch(0) { default: return 0; case "d": return 4; case "c": return 3; case "e": return 5; case 0: return 2; } return -1; } -mixed b() { return 2; } -.... -test 2066, expected result: EQ -mixed a() { switch(0) { case "d": return 4; default: return 0; case "c": return 3; case "e": return 5; case 0: return 2; } return -1; } -mixed b() { return 2; } -.... -test 2067, expected result: EQ -mixed a() { switch(0) { case "d": return 4; case "c": return 3; default: return 0; case "e": return 5; case 0: return 2; } return -1; } -mixed b() { return 2; } -.... -test 2068, expected result: EQ -mixed a() { switch(0) { case "d": return 4; case "c": return 3; case "e": return 5; default: return 0; case 0: return 2; } return -1; } -mixed b() { return 2; } -.... -test 2069, expected result: EQ -mixed a() { switch(0) { case "d": return 4; case "c": return 3; case "e": return 5; case 0: return 2; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 2070, expected result: EQ -mixed a() { switch(0) { case "d": return 4; case 0: return 2; case "c": return 3; case "e": return 5; } return 0; } -mixed b() { return 2; } -.... -test 2071, expected result: EQ -mixed a() { switch(0) { default: return 0; case "d": return 4; case 0: return 2; case "c": return 3; case "e": return 5; } return -1; } -mixed b() { return 2; } -.... -test 2072, expected result: EQ -mixed a() { switch(0) { case "d": return 4; default: return 0; case 0: return 2; case "c": return 3; case "e": return 5; } return -1; } -mixed b() { return 2; } -.... -test 2073, expected result: EQ -mixed a() { switch(0) { case "d": return 4; case 0: return 2; default: return 0; case "c": return 3; case "e": return 5; } return -1; } -mixed b() { return 2; } -.... -test 2074, expected result: EQ -mixed a() { switch(0) { case "d": return 4; case 0: return 2; case "c": return 3; default: return 0; case "e": return 5; } return -1; } -mixed b() { return 2; } -.... -test 2075, expected result: EQ -mixed a() { switch(0) { case "d": return 4; case 0: return 2; case "c": return 3; case "e": return 5; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 2076, expected result: EQ -mixed a() { switch(0) { case "d": return 4; case 0: return 2; case "e": return 5; case "c": return 3; } return 0; } -mixed b() { return 2; } -.... -test 2077, expected result: EQ -mixed a() { switch(0) { default: return 0; case "d": return 4; case 0: return 2; case "e": return 5; case "c": return 3; } return -1; } -mixed b() { return 2; } -.... -test 2078, expected result: EQ -mixed a() { switch(0) { case "d": return 4; default: return 0; case 0: return 2; case "e": return 5; case "c": return 3; } return -1; } -mixed b() { return 2; } -.... -test 2079, expected result: EQ -mixed a() { switch(0) { case "d": return 4; case 0: return 2; default: return 0; case "e": return 5; case "c": return 3; } return -1; } -mixed b() { return 2; } -.... -test 2080, expected result: EQ -mixed a() { switch(0) { case "d": return 4; case 0: return 2; case "e": return 5; default: return 0; case "c": return 3; } return -1; } -mixed b() { return 2; } -.... -test 2081, expected result: EQ -mixed a() { switch(0) { case "d": return 4; case 0: return 2; case "e": return 5; case "c": return 3; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 2082, expected result: EQ -mixed a() { switch(0) { case "d": return 4; case "e": return 5; case 0: return 2; case "c": return 3; } return 0; } -mixed b() { return 2; } -.... -test 2083, expected result: EQ -mixed a() { switch(0) { default: return 0; case "d": return 4; case "e": return 5; case 0: return 2; case "c": return 3; } return -1; } -mixed b() { return 2; } -.... -test 2084, expected result: EQ -mixed a() { switch(0) { case "d": return 4; default: return 0; case "e": return 5; case 0: return 2; case "c": return 3; } return -1; } -mixed b() { return 2; } -.... -test 2085, expected result: EQ -mixed a() { switch(0) { case "d": return 4; case "e": return 5; default: return 0; case 0: return 2; case "c": return 3; } return -1; } -mixed b() { return 2; } -.... -test 2086, expected result: EQ -mixed a() { switch(0) { case "d": return 4; case "e": return 5; case 0: return 2; default: return 0; case "c": return 3; } return -1; } -mixed b() { return 2; } -.... -test 2087, expected result: EQ -mixed a() { switch(0) { case "d": return 4; case "e": return 5; case 0: return 2; case "c": return 3; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 2088, expected result: EQ -mixed a() { switch(0) { case "d": return 4; case "e": return 5; case "c": return 3; case 0: return 2; } return 0; } -mixed b() { return 2; } -.... -test 2089, expected result: EQ -mixed a() { switch(0) { default: return 0; case "d": return 4; case "e": return 5; case "c": return 3; case 0: return 2; } return -1; } -mixed b() { return 2; } -.... -test 2090, expected result: EQ -mixed a() { switch(0) { case "d": return 4; default: return 0; case "e": return 5; case "c": return 3; case 0: return 2; } return -1; } -mixed b() { return 2; } -.... -test 2091, expected result: EQ -mixed a() { switch(0) { case "d": return 4; case "e": return 5; default: return 0; case "c": return 3; case 0: return 2; } return -1; } -mixed b() { return 2; } -.... -test 2092, expected result: EQ -mixed a() { switch(0) { case "d": return 4; case "e": return 5; case "c": return 3; default: return 0; case 0: return 2; } return -1; } -mixed b() { return 2; } -.... -test 2093, expected result: EQ -mixed a() { switch(0) { case "d": return 4; case "e": return 5; case "c": return 3; case 0: return 2; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 2094, expected result: EQ -mixed a() { switch(0) { case "e": return 5; case "c": return 3; case "d": return 4; case 0: return 2; } return 0; } -mixed b() { return 2; } -.... -test 2095, expected result: EQ -mixed a() { switch(0) { default: return 0; case "e": return 5; case "c": return 3; case "d": return 4; case 0: return 2; } return -1; } -mixed b() { return 2; } -.... -test 2096, expected result: EQ -mixed a() { switch(0) { case "e": return 5; default: return 0; case "c": return 3; case "d": return 4; case 0: return 2; } return -1; } -mixed b() { return 2; } -.... -test 2097, expected result: EQ -mixed a() { switch(0) { case "e": return 5; case "c": return 3; default: return 0; case "d": return 4; case 0: return 2; } return -1; } -mixed b() { return 2; } -.... -test 2098, expected result: EQ -mixed a() { switch(0) { case "e": return 5; case "c": return 3; case "d": return 4; default: return 0; case 0: return 2; } return -1; } -mixed b() { return 2; } -.... -test 2099, expected result: EQ -mixed a() { switch(0) { case "e": return 5; case "c": return 3; case "d": return 4; case 0: return 2; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 2100, expected result: EQ -mixed a() { switch(0) { case "e": return 5; case "c": return 3; case 0: return 2; case "d": return 4; } return 0; } -mixed b() { return 2; } -.... -test 2101, expected result: EQ -mixed a() { switch(0) { default: return 0; case "e": return 5; case "c": return 3; case 0: return 2; case "d": return 4; } return -1; } -mixed b() { return 2; } -.... -test 2102, expected result: EQ -mixed a() { switch(0) { case "e": return 5; default: return 0; case "c": return 3; case 0: return 2; case "d": return 4; } return -1; } -mixed b() { return 2; } -.... -test 2103, expected result: EQ -mixed a() { switch(0) { case "e": return 5; case "c": return 3; default: return 0; case 0: return 2; case "d": return 4; } return -1; } -mixed b() { return 2; } -.... -test 2104, expected result: EQ -mixed a() { switch(0) { case "e": return 5; case "c": return 3; case 0: return 2; default: return 0; case "d": return 4; } return -1; } -mixed b() { return 2; } -.... -test 2105, expected result: EQ -mixed a() { switch(0) { case "e": return 5; case "c": return 3; case 0: return 2; case "d": return 4; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 2106, expected result: EQ -mixed a() { switch(0) { case "e": return 5; case "d": return 4; case "c": return 3; case 0: return 2; } return 0; } -mixed b() { return 2; } -.... -test 2107, expected result: EQ -mixed a() { switch(0) { default: return 0; case "e": return 5; case "d": return 4; case "c": return 3; case 0: return 2; } return -1; } -mixed b() { return 2; } -.... -test 2108, expected result: EQ -mixed a() { switch(0) { case "e": return 5; default: return 0; case "d": return 4; case "c": return 3; case 0: return 2; } return -1; } -mixed b() { return 2; } -.... -test 2109, expected result: EQ -mixed a() { switch(0) { case "e": return 5; case "d": return 4; default: return 0; case "c": return 3; case 0: return 2; } return -1; } -mixed b() { return 2; } -.... -test 2110, expected result: EQ -mixed a() { switch(0) { case "e": return 5; case "d": return 4; case "c": return 3; default: return 0; case 0: return 2; } return -1; } -mixed b() { return 2; } -.... -test 2111, expected result: EQ -mixed a() { switch(0) { case "e": return 5; case "d": return 4; case "c": return 3; case 0: return 2; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 2112, expected result: EQ -mixed a() { switch(0) { case "e": return 5; case "d": return 4; case 0: return 2; case "c": return 3; } return 0; } -mixed b() { return 2; } -.... -test 2113, expected result: EQ -mixed a() { switch(0) { default: return 0; case "e": return 5; case "d": return 4; case 0: return 2; case "c": return 3; } return -1; } -mixed b() { return 2; } -.... -test 2114, expected result: EQ -mixed a() { switch(0) { case "e": return 5; default: return 0; case "d": return 4; case 0: return 2; case "c": return 3; } return -1; } -mixed b() { return 2; } -.... -test 2115, expected result: EQ -mixed a() { switch(0) { case "e": return 5; case "d": return 4; default: return 0; case 0: return 2; case "c": return 3; } return -1; } -mixed b() { return 2; } -.... -test 2116, expected result: EQ -mixed a() { switch(0) { case "e": return 5; case "d": return 4; case 0: return 2; default: return 0; case "c": return 3; } return -1; } -mixed b() { return 2; } -.... -test 2117, expected result: EQ -mixed a() { switch(0) { case "e": return 5; case "d": return 4; case 0: return 2; case "c": return 3; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 2118, expected result: EQ -mixed a() { switch(0) { case "e": return 5; case 0: return 2; case "d": return 4; case "c": return 3; } return 0; } -mixed b() { return 2; } -.... -test 2119, expected result: EQ -mixed a() { switch(0) { default: return 0; case "e": return 5; case 0: return 2; case "d": return 4; case "c": return 3; } return -1; } -mixed b() { return 2; } -.... -test 2120, expected result: EQ -mixed a() { switch(0) { case "e": return 5; default: return 0; case 0: return 2; case "d": return 4; case "c": return 3; } return -1; } -mixed b() { return 2; } -.... -test 2121, expected result: EQ -mixed a() { switch(0) { case "e": return 5; case 0: return 2; default: return 0; case "d": return 4; case "c": return 3; } return -1; } -mixed b() { return 2; } -.... -test 2122, expected result: EQ -mixed a() { switch(0) { case "e": return 5; case 0: return 2; case "d": return 4; default: return 0; case "c": return 3; } return -1; } -mixed b() { return 2; } -.... -test 2123, expected result: EQ -mixed a() { switch(0) { case "e": return 5; case 0: return 2; case "d": return 4; case "c": return 3; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 2124, expected result: EQ -mixed a() { switch(0) { case "e": return 5; case 0: return 2; case "c": return 3; case "d": return 4; } return 0; } -mixed b() { return 2; } -.... -test 2125, expected result: EQ -mixed a() { switch(0) { default: return 0; case "e": return 5; case 0: return 2; case "c": return 3; case "d": return 4; } return -1; } -mixed b() { return 2; } -.... -test 2126, expected result: EQ -mixed a() { switch(0) { case "e": return 5; default: return 0; case 0: return 2; case "c": return 3; case "d": return 4; } return -1; } -mixed b() { return 2; } -.... -test 2127, expected result: EQ -mixed a() { switch(0) { case "e": return 5; case 0: return 2; default: return 0; case "c": return 3; case "d": return 4; } return -1; } -mixed b() { return 2; } -.... -test 2128, expected result: EQ -mixed a() { switch(0) { case "e": return 5; case 0: return 2; case "c": return 3; default: return 0; case "d": return 4; } return -1; } -mixed b() { return 2; } -.... -test 2129, expected result: EQ -mixed a() { switch(0) { case "e": return 5; case 0: return 2; case "c": return 3; case "d": return 4; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 2130, expected result: EQ -mixed a() { switch("c") { case 0: return 2; case "c": return 3; case "d": return 4; case "e": return 5; } return 0; } -mixed b() { return 3; } -.... -test 2131, expected result: EQ -mixed a() { switch("c") { default: return 0; case 0: return 2; case "c": return 3; case "d": return 4; case "e": return 5; } return -1; } -mixed b() { return 3; } -.... -test 2132, expected result: EQ -mixed a() { switch("c") { case 0: return 2; default: return 0; case "c": return 3; case "d": return 4; case "e": return 5; } return -1; } -mixed b() { return 3; } -.... -test 2133, expected result: EQ -mixed a() { switch("c") { case 0: return 2; case "c": return 3; default: return 0; case "d": return 4; case "e": return 5; } return -1; } -mixed b() { return 3; } -.... -test 2134, expected result: EQ -mixed a() { switch("c") { case 0: return 2; case "c": return 3; case "d": return 4; default: return 0; case "e": return 5; } return -1; } -mixed b() { return 3; } -.... -test 2135, expected result: EQ -mixed a() { switch("c") { case 0: return 2; case "c": return 3; case "d": return 4; case "e": return 5; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 2136, expected result: EQ -mixed a() { switch("c") { case 0: return 2; case "c": return 3; case "e": return 5; case "d": return 4; } return 0; } -mixed b() { return 3; } -.... -test 2137, expected result: EQ -mixed a() { switch("c") { default: return 0; case 0: return 2; case "c": return 3; case "e": return 5; case "d": return 4; } return -1; } -mixed b() { return 3; } -.... -test 2138, expected result: EQ -mixed a() { switch("c") { case 0: return 2; default: return 0; case "c": return 3; case "e": return 5; case "d": return 4; } return -1; } -mixed b() { return 3; } -.... -test 2139, expected result: EQ -mixed a() { switch("c") { case 0: return 2; case "c": return 3; default: return 0; case "e": return 5; case "d": return 4; } return -1; } -mixed b() { return 3; } -.... -test 2140, expected result: EQ -mixed a() { switch("c") { case 0: return 2; case "c": return 3; case "e": return 5; default: return 0; case "d": return 4; } return -1; } -mixed b() { return 3; } -.... -test 2141, expected result: EQ -mixed a() { switch("c") { case 0: return 2; case "c": return 3; case "e": return 5; case "d": return 4; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 2142, expected result: EQ -mixed a() { switch("c") { case 0: return 2; case "d": return 4; case "c": return 3; case "e": return 5; } return 0; } -mixed b() { return 3; } -.... -test 2143, expected result: EQ -mixed a() { switch("c") { default: return 0; case 0: return 2; case "d": return 4; case "c": return 3; case "e": return 5; } return -1; } -mixed b() { return 3; } -.... -test 2144, expected result: EQ -mixed a() { switch("c") { case 0: return 2; default: return 0; case "d": return 4; case "c": return 3; case "e": return 5; } return -1; } -mixed b() { return 3; } -.... -test 2145, expected result: EQ -mixed a() { switch("c") { case 0: return 2; case "d": return 4; default: return 0; case "c": return 3; case "e": return 5; } return -1; } -mixed b() { return 3; } -.... -test 2146, expected result: EQ -mixed a() { switch("c") { case 0: return 2; case "d": return 4; case "c": return 3; default: return 0; case "e": return 5; } return -1; } -mixed b() { return 3; } -.... -test 2147, expected result: EQ -mixed a() { switch("c") { case 0: return 2; case "d": return 4; case "c": return 3; case "e": return 5; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 2148, expected result: EQ -mixed a() { switch("c") { case 0: return 2; case "d": return 4; case "e": return 5; case "c": return 3; } return 0; } -mixed b() { return 3; } -.... -test 2149, expected result: EQ -mixed a() { switch("c") { default: return 0; case 0: return 2; case "d": return 4; case "e": return 5; case "c": return 3; } return -1; } -mixed b() { return 3; } -.... -test 2150, expected result: EQ -mixed a() { switch("c") { case 0: return 2; default: return 0; case "d": return 4; case "e": return 5; case "c": return 3; } return -1; } -mixed b() { return 3; } -.... -test 2151, expected result: EQ -mixed a() { switch("c") { case 0: return 2; case "d": return 4; default: return 0; case "e": return 5; case "c": return 3; } return -1; } -mixed b() { return 3; } -.... -test 2152, expected result: EQ -mixed a() { switch("c") { case 0: return 2; case "d": return 4; case "e": return 5; default: return 0; case "c": return 3; } return -1; } -mixed b() { return 3; } -.... -test 2153, expected result: EQ -mixed a() { switch("c") { case 0: return 2; case "d": return 4; case "e": return 5; case "c": return 3; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 2154, expected result: EQ -mixed a() { switch("c") { case 0: return 2; case "e": return 5; case "d": return 4; case "c": return 3; } return 0; } -mixed b() { return 3; } -.... -test 2155, expected result: EQ -mixed a() { switch("c") { default: return 0; case 0: return 2; case "e": return 5; case "d": return 4; case "c": return 3; } return -1; } -mixed b() { return 3; } -.... -test 2156, expected result: EQ -mixed a() { switch("c") { case 0: return 2; default: return 0; case "e": return 5; case "d": return 4; case "c": return 3; } return -1; } -mixed b() { return 3; } -.... -test 2157, expected result: EQ -mixed a() { switch("c") { case 0: return 2; case "e": return 5; default: return 0; case "d": return 4; case "c": return 3; } return -1; } -mixed b() { return 3; } -.... -test 2158, expected result: EQ -mixed a() { switch("c") { case 0: return 2; case "e": return 5; case "d": return 4; default: return 0; case "c": return 3; } return -1; } -mixed b() { return 3; } -.... -test 2159, expected result: EQ -mixed a() { switch("c") { case 0: return 2; case "e": return 5; case "d": return 4; case "c": return 3; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 2160, expected result: EQ -mixed a() { switch("c") { case 0: return 2; case "e": return 5; case "c": return 3; case "d": return 4; } return 0; } -mixed b() { return 3; } -.... -test 2161, expected result: EQ -mixed a() { switch("c") { default: return 0; case 0: return 2; case "e": return 5; case "c": return 3; case "d": return 4; } return -1; } -mixed b() { return 3; } -.... -test 2162, expected result: EQ -mixed a() { switch("c") { case 0: return 2; default: return 0; case "e": return 5; case "c": return 3; case "d": return 4; } return -1; } -mixed b() { return 3; } -.... -test 2163, expected result: EQ -mixed a() { switch("c") { case 0: return 2; case "e": return 5; default: return 0; case "c": return 3; case "d": return 4; } return -1; } -mixed b() { return 3; } -.... -test 2164, expected result: EQ -mixed a() { switch("c") { case 0: return 2; case "e": return 5; case "c": return 3; default: return 0; case "d": return 4; } return -1; } -mixed b() { return 3; } -.... -test 2165, expected result: EQ -mixed a() { switch("c") { case 0: return 2; case "e": return 5; case "c": return 3; case "d": return 4; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 2166, expected result: EQ -mixed a() { switch("c") { case "c": return 3; case 0: return 2; case "d": return 4; case "e": return 5; } return 0; } -mixed b() { return 3; } -.... -test 2167, expected result: EQ -mixed a() { switch("c") { default: return 0; case "c": return 3; case 0: return 2; case "d": return 4; case "e": return 5; } return -1; } -mixed b() { return 3; } -.... -test 2168, expected result: EQ -mixed a() { switch("c") { case "c": return 3; default: return 0; case 0: return 2; case "d": return 4; case "e": return 5; } return -1; } -mixed b() { return 3; } -.... -test 2169, expected result: EQ -mixed a() { switch("c") { case "c": return 3; case 0: return 2; default: return 0; case "d": return 4; case "e": return 5; } return -1; } -mixed b() { return 3; } -.... -test 2170, expected result: EQ -mixed a() { switch("c") { case "c": return 3; case 0: return 2; case "d": return 4; default: return 0; case "e": return 5; } return -1; } -mixed b() { return 3; } -.... -test 2171, expected result: EQ -mixed a() { switch("c") { case "c": return 3; case 0: return 2; case "d": return 4; case "e": return 5; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 2172, expected result: EQ -mixed a() { switch("c") { case "c": return 3; case 0: return 2; case "e": return 5; case "d": return 4; } return 0; } -mixed b() { return 3; } -.... -test 2173, expected result: EQ -mixed a() { switch("c") { default: return 0; case "c": return 3; case 0: return 2; case "e": return 5; case "d": return 4; } return -1; } -mixed b() { return 3; } -.... -test 2174, expected result: EQ -mixed a() { switch("c") { case "c": return 3; default: return 0; case 0: return 2; case "e": return 5; case "d": return 4; } return -1; } -mixed b() { return 3; } -.... -test 2175, expected result: EQ -mixed a() { switch("c") { case "c": return 3; case 0: return 2; default: return 0; case "e": return 5; case "d": return 4; } return -1; } -mixed b() { return 3; } -.... -test 2176, expected result: EQ -mixed a() { switch("c") { case "c": return 3; case 0: return 2; case "e": return 5; default: return 0; case "d": return 4; } return -1; } -mixed b() { return 3; } -.... -test 2177, expected result: EQ -mixed a() { switch("c") { case "c": return 3; case 0: return 2; case "e": return 5; case "d": return 4; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 2178, expected result: EQ -mixed a() { switch("c") { case "c": return 3; case "d": return 4; case 0: return 2; case "e": return 5; } return 0; } -mixed b() { return 3; } -.... -test 2179, expected result: EQ -mixed a() { switch("c") { default: return 0; case "c": return 3; case "d": return 4; case 0: return 2; case "e": return 5; } return -1; } -mixed b() { return 3; } -.... -test 2180, expected result: EQ -mixed a() { switch("c") { case "c": return 3; default: return 0; case "d": return 4; case 0: return 2; case "e": return 5; } return -1; } -mixed b() { return 3; } -.... -test 2181, expected result: EQ -mixed a() { switch("c") { case "c": return 3; case "d": return 4; default: return 0; case 0: return 2; case "e": return 5; } return -1; } -mixed b() { return 3; } -.... -test 2182, expected result: EQ -mixed a() { switch("c") { case "c": return 3; case "d": return 4; case 0: return 2; default: return 0; case "e": return 5; } return -1; } -mixed b() { return 3; } -.... -test 2183, expected result: EQ -mixed a() { switch("c") { case "c": return 3; case "d": return 4; case 0: return 2; case "e": return 5; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 2184, expected result: EQ -mixed a() { switch("c") { case "c": return 3; case "d": return 4; case "e": return 5; case 0: return 2; } return 0; } -mixed b() { return 3; } -.... -test 2185, expected result: EQ -mixed a() { switch("c") { default: return 0; case "c": return 3; case "d": return 4; case "e": return 5; case 0: return 2; } return -1; } -mixed b() { return 3; } -.... -test 2186, expected result: EQ -mixed a() { switch("c") { case "c": return 3; default: return 0; case "d": return 4; case "e": return 5; case 0: return 2; } return -1; } -mixed b() { return 3; } -.... -test 2187, expected result: EQ -mixed a() { switch("c") { case "c": return 3; case "d": return 4; default: return 0; case "e": return 5; case 0: return 2; } return -1; } -mixed b() { return 3; } -.... -test 2188, expected result: EQ -mixed a() { switch("c") { case "c": return 3; case "d": return 4; case "e": return 5; default: return 0; case 0: return 2; } return -1; } -mixed b() { return 3; } -.... -test 2189, expected result: EQ -mixed a() { switch("c") { case "c": return 3; case "d": return 4; case "e": return 5; case 0: return 2; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 2190, expected result: EQ -mixed a() { switch("c") { case "c": return 3; case "e": return 5; case "d": return 4; case 0: return 2; } return 0; } -mixed b() { return 3; } -.... -test 2191, expected result: EQ -mixed a() { switch("c") { default: return 0; case "c": return 3; case "e": return 5; case "d": return 4; case 0: return 2; } return -1; } -mixed b() { return 3; } -.... -test 2192, expected result: EQ -mixed a() { switch("c") { case "c": return 3; default: return 0; case "e": return 5; case "d": return 4; case 0: return 2; } return -1; } -mixed b() { return 3; } -.... -test 2193, expected result: EQ -mixed a() { switch("c") { case "c": return 3; case "e": return 5; default: return 0; case "d": return 4; case 0: return 2; } return -1; } -mixed b() { return 3; } -.... -test 2194, expected result: EQ -mixed a() { switch("c") { case "c": return 3; case "e": return 5; case "d": return 4; default: return 0; case 0: return 2; } return -1; } -mixed b() { return 3; } -.... -test 2195, expected result: EQ -mixed a() { switch("c") { case "c": return 3; case "e": return 5; case "d": return 4; case 0: return 2; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 2196, expected result: EQ -mixed a() { switch("c") { case "c": return 3; case "e": return 5; case 0: return 2; case "d": return 4; } return 0; } -mixed b() { return 3; } -.... -test 2197, expected result: EQ -mixed a() { switch("c") { default: return 0; case "c": return 3; case "e": return 5; case 0: return 2; case "d": return 4; } return -1; } -mixed b() { return 3; } -.... -test 2198, expected result: EQ -mixed a() { switch("c") { case "c": return 3; default: return 0; case "e": return 5; case 0: return 2; case "d": return 4; } return -1; } -mixed b() { return 3; } -.... -test 2199, expected result: EQ -mixed a() { switch("c") { case "c": return 3; case "e": return 5; default: return 0; case 0: return 2; case "d": return 4; } return -1; } -mixed b() { return 3; } -.... -test 2200, expected result: EQ -mixed a() { switch("c") { case "c": return 3; case "e": return 5; case 0: return 2; default: return 0; case "d": return 4; } return -1; } -mixed b() { return 3; } -.... -test 2201, expected result: EQ -mixed a() { switch("c") { case "c": return 3; case "e": return 5; case 0: return 2; case "d": return 4; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 2202, expected result: EQ -mixed a() { switch("c") { case "d": return 4; case "c": return 3; case 0: return 2; case "e": return 5; } return 0; } -mixed b() { return 3; } -.... -test 2203, expected result: EQ -mixed a() { switch("c") { default: return 0; case "d": return 4; case "c": return 3; case 0: return 2; case "e": return 5; } return -1; } -mixed b() { return 3; } -.... -test 2204, expected result: EQ -mixed a() { switch("c") { case "d": return 4; default: return 0; case "c": return 3; case 0: return 2; case "e": return 5; } return -1; } -mixed b() { return 3; } -.... -test 2205, expected result: EQ -mixed a() { switch("c") { case "d": return 4; case "c": return 3; default: return 0; case 0: return 2; case "e": return 5; } return -1; } -mixed b() { return 3; } -.... -test 2206, expected result: EQ -mixed a() { switch("c") { case "d": return 4; case "c": return 3; case 0: return 2; default: return 0; case "e": return 5; } return -1; } -mixed b() { return 3; } -.... -test 2207, expected result: EQ -mixed a() { switch("c") { case "d": return 4; case "c": return 3; case 0: return 2; case "e": return 5; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 2208, expected result: EQ -mixed a() { switch("c") { case "d": return 4; case "c": return 3; case "e": return 5; case 0: return 2; } return 0; } -mixed b() { return 3; } -.... -test 2209, expected result: EQ -mixed a() { switch("c") { default: return 0; case "d": return 4; case "c": return 3; case "e": return 5; case 0: return 2; } return -1; } -mixed b() { return 3; } -.... -test 2210, expected result: EQ -mixed a() { switch("c") { case "d": return 4; default: return 0; case "c": return 3; case "e": return 5; case 0: return 2; } return -1; } -mixed b() { return 3; } -.... -test 2211, expected result: EQ -mixed a() { switch("c") { case "d": return 4; case "c": return 3; default: return 0; case "e": return 5; case 0: return 2; } return -1; } -mixed b() { return 3; } -.... -test 2212, expected result: EQ -mixed a() { switch("c") { case "d": return 4; case "c": return 3; case "e": return 5; default: return 0; case 0: return 2; } return -1; } -mixed b() { return 3; } -.... -test 2213, expected result: EQ -mixed a() { switch("c") { case "d": return 4; case "c": return 3; case "e": return 5; case 0: return 2; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 2214, expected result: EQ -mixed a() { switch("c") { case "d": return 4; case 0: return 2; case "c": return 3; case "e": return 5; } return 0; } -mixed b() { return 3; } -.... -test 2215, expected result: EQ -mixed a() { switch("c") { default: return 0; case "d": return 4; case 0: return 2; case "c": return 3; case "e": return 5; } return -1; } -mixed b() { return 3; } -.... -test 2216, expected result: EQ -mixed a() { switch("c") { case "d": return 4; default: return 0; case 0: return 2; case "c": return 3; case "e": return 5; } return -1; } -mixed b() { return 3; } -.... -test 2217, expected result: EQ -mixed a() { switch("c") { case "d": return 4; case 0: return 2; default: return 0; case "c": return 3; case "e": return 5; } return -1; } -mixed b() { return 3; } -.... -test 2218, expected result: EQ -mixed a() { switch("c") { case "d": return 4; case 0: return 2; case "c": return 3; default: return 0; case "e": return 5; } return -1; } -mixed b() { return 3; } -.... -test 2219, expected result: EQ -mixed a() { switch("c") { case "d": return 4; case 0: return 2; case "c": return 3; case "e": return 5; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 2220, expected result: EQ -mixed a() { switch("c") { case "d": return 4; case 0: return 2; case "e": return 5; case "c": return 3; } return 0; } -mixed b() { return 3; } -.... -test 2221, expected result: EQ -mixed a() { switch("c") { default: return 0; case "d": return 4; case 0: return 2; case "e": return 5; case "c": return 3; } return -1; } -mixed b() { return 3; } -.... -test 2222, expected result: EQ -mixed a() { switch("c") { case "d": return 4; default: return 0; case 0: return 2; case "e": return 5; case "c": return 3; } return -1; } -mixed b() { return 3; } -.... -test 2223, expected result: EQ -mixed a() { switch("c") { case "d": return 4; case 0: return 2; default: return 0; case "e": return 5; case "c": return 3; } return -1; } -mixed b() { return 3; } -.... -test 2224, expected result: EQ -mixed a() { switch("c") { case "d": return 4; case 0: return 2; case "e": return 5; default: return 0; case "c": return 3; } return -1; } -mixed b() { return 3; } -.... -test 2225, expected result: EQ -mixed a() { switch("c") { case "d": return 4; case 0: return 2; case "e": return 5; case "c": return 3; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 2226, expected result: EQ -mixed a() { switch("c") { case "d": return 4; case "e": return 5; case 0: return 2; case "c": return 3; } return 0; } -mixed b() { return 3; } -.... -test 2227, expected result: EQ -mixed a() { switch("c") { default: return 0; case "d": return 4; case "e": return 5; case 0: return 2; case "c": return 3; } return -1; } -mixed b() { return 3; } -.... -test 2228, expected result: EQ -mixed a() { switch("c") { case "d": return 4; default: return 0; case "e": return 5; case 0: return 2; case "c": return 3; } return -1; } -mixed b() { return 3; } -.... -test 2229, expected result: EQ -mixed a() { switch("c") { case "d": return 4; case "e": return 5; default: return 0; case 0: return 2; case "c": return 3; } return -1; } -mixed b() { return 3; } -.... -test 2230, expected result: EQ -mixed a() { switch("c") { case "d": return 4; case "e": return 5; case 0: return 2; default: return 0; case "c": return 3; } return -1; } -mixed b() { return 3; } -.... -test 2231, expected result: EQ -mixed a() { switch("c") { case "d": return 4; case "e": return 5; case 0: return 2; case "c": return 3; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 2232, expected result: EQ -mixed a() { switch("c") { case "d": return 4; case "e": return 5; case "c": return 3; case 0: return 2; } return 0; } -mixed b() { return 3; } -.... -test 2233, expected result: EQ -mixed a() { switch("c") { default: return 0; case "d": return 4; case "e": return 5; case "c": return 3; case 0: return 2; } return -1; } -mixed b() { return 3; } -.... -test 2234, expected result: EQ -mixed a() { switch("c") { case "d": return 4; default: return 0; case "e": return 5; case "c": return 3; case 0: return 2; } return -1; } -mixed b() { return 3; } -.... -test 2235, expected result: EQ -mixed a() { switch("c") { case "d": return 4; case "e": return 5; default: return 0; case "c": return 3; case 0: return 2; } return -1; } -mixed b() { return 3; } -.... -test 2236, expected result: EQ -mixed a() { switch("c") { case "d": return 4; case "e": return 5; case "c": return 3; default: return 0; case 0: return 2; } return -1; } -mixed b() { return 3; } -.... -test 2237, expected result: EQ -mixed a() { switch("c") { case "d": return 4; case "e": return 5; case "c": return 3; case 0: return 2; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 2238, expected result: EQ -mixed a() { switch("c") { case "e": return 5; case "c": return 3; case "d": return 4; case 0: return 2; } return 0; } -mixed b() { return 3; } -.... -test 2239, expected result: EQ -mixed a() { switch("c") { default: return 0; case "e": return 5; case "c": return 3; case "d": return 4; case 0: return 2; } return -1; } -mixed b() { return 3; } -.... -test 2240, expected result: EQ -mixed a() { switch("c") { case "e": return 5; default: return 0; case "c": return 3; case "d": return 4; case 0: return 2; } return -1; } -mixed b() { return 3; } -.... -test 2241, expected result: EQ -mixed a() { switch("c") { case "e": return 5; case "c": return 3; default: return 0; case "d": return 4; case 0: return 2; } return -1; } -mixed b() { return 3; } -.... -test 2242, expected result: EQ -mixed a() { switch("c") { case "e": return 5; case "c": return 3; case "d": return 4; default: return 0; case 0: return 2; } return -1; } -mixed b() { return 3; } -.... -test 2243, expected result: EQ -mixed a() { switch("c") { case "e": return 5; case "c": return 3; case "d": return 4; case 0: return 2; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 2244, expected result: EQ -mixed a() { switch("c") { case "e": return 5; case "c": return 3; case 0: return 2; case "d": return 4; } return 0; } -mixed b() { return 3; } -.... -test 2245, expected result: EQ -mixed a() { switch("c") { default: return 0; case "e": return 5; case "c": return 3; case 0: return 2; case "d": return 4; } return -1; } -mixed b() { return 3; } -.... -test 2246, expected result: EQ -mixed a() { switch("c") { case "e": return 5; default: return 0; case "c": return 3; case 0: return 2; case "d": return 4; } return -1; } -mixed b() { return 3; } -.... -test 2247, expected result: EQ -mixed a() { switch("c") { case "e": return 5; case "c": return 3; default: return 0; case 0: return 2; case "d": return 4; } return -1; } -mixed b() { return 3; } -.... -test 2248, expected result: EQ -mixed a() { switch("c") { case "e": return 5; case "c": return 3; case 0: return 2; default: return 0; case "d": return 4; } return -1; } -mixed b() { return 3; } -.... -test 2249, expected result: EQ -mixed a() { switch("c") { case "e": return 5; case "c": return 3; case 0: return 2; case "d": return 4; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 2250, expected result: EQ -mixed a() { switch("c") { case "e": return 5; case "d": return 4; case "c": return 3; case 0: return 2; } return 0; } -mixed b() { return 3; } -.... -test 2251, expected result: EQ -mixed a() { switch("c") { default: return 0; case "e": return 5; case "d": return 4; case "c": return 3; case 0: return 2; } return -1; } -mixed b() { return 3; } -.... -test 2252, expected result: EQ -mixed a() { switch("c") { case "e": return 5; default: return 0; case "d": return 4; case "c": return 3; case 0: return 2; } return -1; } -mixed b() { return 3; } -.... -test 2253, expected result: EQ -mixed a() { switch("c") { case "e": return 5; case "d": return 4; default: return 0; case "c": return 3; case 0: return 2; } return -1; } -mixed b() { return 3; } -.... -test 2254, expected result: EQ -mixed a() { switch("c") { case "e": return 5; case "d": return 4; case "c": return 3; default: return 0; case 0: return 2; } return -1; } -mixed b() { return 3; } -.... -test 2255, expected result: EQ -mixed a() { switch("c") { case "e": return 5; case "d": return 4; case "c": return 3; case 0: return 2; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 2256, expected result: EQ -mixed a() { switch("c") { case "e": return 5; case "d": return 4; case 0: return 2; case "c": return 3; } return 0; } -mixed b() { return 3; } -.... -test 2257, expected result: EQ -mixed a() { switch("c") { default: return 0; case "e": return 5; case "d": return 4; case 0: return 2; case "c": return 3; } return -1; } -mixed b() { return 3; } -.... -test 2258, expected result: EQ -mixed a() { switch("c") { case "e": return 5; default: return 0; case "d": return 4; case 0: return 2; case "c": return 3; } return -1; } -mixed b() { return 3; } -.... -test 2259, expected result: EQ -mixed a() { switch("c") { case "e": return 5; case "d": return 4; default: return 0; case 0: return 2; case "c": return 3; } return -1; } -mixed b() { return 3; } -.... -test 2260, expected result: EQ -mixed a() { switch("c") { case "e": return 5; case "d": return 4; case 0: return 2; default: return 0; case "c": return 3; } return -1; } -mixed b() { return 3; } -.... -test 2261, expected result: EQ -mixed a() { switch("c") { case "e": return 5; case "d": return 4; case 0: return 2; case "c": return 3; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 2262, expected result: EQ -mixed a() { switch("c") { case "e": return 5; case 0: return 2; case "d": return 4; case "c": return 3; } return 0; } -mixed b() { return 3; } -.... -test 2263, expected result: EQ -mixed a() { switch("c") { default: return 0; case "e": return 5; case 0: return 2; case "d": return 4; case "c": return 3; } return -1; } -mixed b() { return 3; } -.... -test 2264, expected result: EQ -mixed a() { switch("c") { case "e": return 5; default: return 0; case 0: return 2; case "d": return 4; case "c": return 3; } return -1; } -mixed b() { return 3; } -.... -test 2265, expected result: EQ -mixed a() { switch("c") { case "e": return 5; case 0: return 2; default: return 0; case "d": return 4; case "c": return 3; } return -1; } -mixed b() { return 3; } -.... -test 2266, expected result: EQ -mixed a() { switch("c") { case "e": return 5; case 0: return 2; case "d": return 4; default: return 0; case "c": return 3; } return -1; } -mixed b() { return 3; } -.... -test 2267, expected result: EQ -mixed a() { switch("c") { case "e": return 5; case 0: return 2; case "d": return 4; case "c": return 3; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 2268, expected result: EQ -mixed a() { switch("c") { case "e": return 5; case 0: return 2; case "c": return 3; case "d": return 4; } return 0; } -mixed b() { return 3; } -.... -test 2269, expected result: EQ -mixed a() { switch("c") { default: return 0; case "e": return 5; case 0: return 2; case "c": return 3; case "d": return 4; } return -1; } -mixed b() { return 3; } -.... -test 2270, expected result: EQ -mixed a() { switch("c") { case "e": return 5; default: return 0; case 0: return 2; case "c": return 3; case "d": return 4; } return -1; } -mixed b() { return 3; } -.... -test 2271, expected result: EQ -mixed a() { switch("c") { case "e": return 5; case 0: return 2; default: return 0; case "c": return 3; case "d": return 4; } return -1; } -mixed b() { return 3; } -.... -test 2272, expected result: EQ -mixed a() { switch("c") { case "e": return 5; case 0: return 2; case "c": return 3; default: return 0; case "d": return 4; } return -1; } -mixed b() { return 3; } -.... -test 2273, expected result: EQ -mixed a() { switch("c") { case "e": return 5; case 0: return 2; case "c": return 3; case "d": return 4; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 2274, expected result: EQ -mixed a() { switch("d") { case 0: return 2; case "c": return 3; case "d": return 4; case "e": return 5; } return 0; } -mixed b() { return 4; } -.... -test 2275, expected result: EQ -mixed a() { switch("d") { default: return 0; case 0: return 2; case "c": return 3; case "d": return 4; case "e": return 5; } return -1; } -mixed b() { return 4; } -.... -test 2276, expected result: EQ -mixed a() { switch("d") { case 0: return 2; default: return 0; case "c": return 3; case "d": return 4; case "e": return 5; } return -1; } -mixed b() { return 4; } -.... -test 2277, expected result: EQ -mixed a() { switch("d") { case 0: return 2; case "c": return 3; default: return 0; case "d": return 4; case "e": return 5; } return -1; } -mixed b() { return 4; } -.... -test 2278, expected result: EQ -mixed a() { switch("d") { case 0: return 2; case "c": return 3; case "d": return 4; default: return 0; case "e": return 5; } return -1; } -mixed b() { return 4; } -.... -test 2279, expected result: EQ -mixed a() { switch("d") { case 0: return 2; case "c": return 3; case "d": return 4; case "e": return 5; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 2280, expected result: EQ -mixed a() { switch("d") { case 0: return 2; case "c": return 3; case "e": return 5; case "d": return 4; } return 0; } -mixed b() { return 4; } -.... -test 2281, expected result: EQ -mixed a() { switch("d") { default: return 0; case 0: return 2; case "c": return 3; case "e": return 5; case "d": return 4; } return -1; } -mixed b() { return 4; } -.... -test 2282, expected result: EQ -mixed a() { switch("d") { case 0: return 2; default: return 0; case "c": return 3; case "e": return 5; case "d": return 4; } return -1; } -mixed b() { return 4; } -.... -test 2283, expected result: EQ -mixed a() { switch("d") { case 0: return 2; case "c": return 3; default: return 0; case "e": return 5; case "d": return 4; } return -1; } -mixed b() { return 4; } -.... -test 2284, expected result: EQ -mixed a() { switch("d") { case 0: return 2; case "c": return 3; case "e": return 5; default: return 0; case "d": return 4; } return -1; } -mixed b() { return 4; } -.... -test 2285, expected result: EQ -mixed a() { switch("d") { case 0: return 2; case "c": return 3; case "e": return 5; case "d": return 4; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 2286, expected result: EQ -mixed a() { switch("d") { case 0: return 2; case "d": return 4; case "c": return 3; case "e": return 5; } return 0; } -mixed b() { return 4; } -.... -test 2287, expected result: EQ -mixed a() { switch("d") { default: return 0; case 0: return 2; case "d": return 4; case "c": return 3; case "e": return 5; } return -1; } -mixed b() { return 4; } -.... -test 2288, expected result: EQ -mixed a() { switch("d") { case 0: return 2; default: return 0; case "d": return 4; case "c": return 3; case "e": return 5; } return -1; } -mixed b() { return 4; } -.... -test 2289, expected result: EQ -mixed a() { switch("d") { case 0: return 2; case "d": return 4; default: return 0; case "c": return 3; case "e": return 5; } return -1; } -mixed b() { return 4; } -.... -test 2290, expected result: EQ -mixed a() { switch("d") { case 0: return 2; case "d": return 4; case "c": return 3; default: return 0; case "e": return 5; } return -1; } -mixed b() { return 4; } -.... -test 2291, expected result: EQ -mixed a() { switch("d") { case 0: return 2; case "d": return 4; case "c": return 3; case "e": return 5; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 2292, expected result: EQ -mixed a() { switch("d") { case 0: return 2; case "d": return 4; case "e": return 5; case "c": return 3; } return 0; } -mixed b() { return 4; } -.... -test 2293, expected result: EQ -mixed a() { switch("d") { default: return 0; case 0: return 2; case "d": return 4; case "e": return 5; case "c": return 3; } return -1; } -mixed b() { return 4; } -.... -test 2294, expected result: EQ -mixed a() { switch("d") { case 0: return 2; default: return 0; case "d": return 4; case "e": return 5; case "c": return 3; } return -1; } -mixed b() { return 4; } -.... -test 2295, expected result: EQ -mixed a() { switch("d") { case 0: return 2; case "d": return 4; default: return 0; case "e": return 5; case "c": return 3; } return -1; } -mixed b() { return 4; } -.... -test 2296, expected result: EQ -mixed a() { switch("d") { case 0: return 2; case "d": return 4; case "e": return 5; default: return 0; case "c": return 3; } return -1; } -mixed b() { return 4; } -.... -test 2297, expected result: EQ -mixed a() { switch("d") { case 0: return 2; case "d": return 4; case "e": return 5; case "c": return 3; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 2298, expected result: EQ -mixed a() { switch("d") { case 0: return 2; case "e": return 5; case "d": return 4; case "c": return 3; } return 0; } -mixed b() { return 4; } -.... -test 2299, expected result: EQ -mixed a() { switch("d") { default: return 0; case 0: return 2; case "e": return 5; case "d": return 4; case "c": return 3; } return -1; } -mixed b() { return 4; } -.... -test 2300, expected result: EQ -mixed a() { switch("d") { case 0: return 2; default: return 0; case "e": return 5; case "d": return 4; case "c": return 3; } return -1; } -mixed b() { return 4; } -.... -test 2301, expected result: EQ -mixed a() { switch("d") { case 0: return 2; case "e": return 5; default: return 0; case "d": return 4; case "c": return 3; } return -1; } -mixed b() { return 4; } -.... -test 2302, expected result: EQ -mixed a() { switch("d") { case 0: return 2; case "e": return 5; case "d": return 4; default: return 0; case "c": return 3; } return -1; } -mixed b() { return 4; } -.... -test 2303, expected result: EQ -mixed a() { switch("d") { case 0: return 2; case "e": return 5; case "d": return 4; case "c": return 3; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 2304, expected result: EQ -mixed a() { switch("d") { case 0: return 2; case "e": return 5; case "c": return 3; case "d": return 4; } return 0; } -mixed b() { return 4; } -.... -test 2305, expected result: EQ -mixed a() { switch("d") { default: return 0; case 0: return 2; case "e": return 5; case "c": return 3; case "d": return 4; } return -1; } -mixed b() { return 4; } -.... -test 2306, expected result: EQ -mixed a() { switch("d") { case 0: return 2; default: return 0; case "e": return 5; case "c": return 3; case "d": return 4; } return -1; } -mixed b() { return 4; } -.... -test 2307, expected result: EQ -mixed a() { switch("d") { case 0: return 2; case "e": return 5; default: return 0; case "c": return 3; case "d": return 4; } return -1; } -mixed b() { return 4; } -.... -test 2308, expected result: EQ -mixed a() { switch("d") { case 0: return 2; case "e": return 5; case "c": return 3; default: return 0; case "d": return 4; } return -1; } -mixed b() { return 4; } -.... -test 2309, expected result: EQ -mixed a() { switch("d") { case 0: return 2; case "e": return 5; case "c": return 3; case "d": return 4; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 2310, expected result: EQ -mixed a() { switch("d") { case "c": return 3; case 0: return 2; case "d": return 4; case "e": return 5; } return 0; } -mixed b() { return 4; } -.... -test 2311, expected result: EQ -mixed a() { switch("d") { default: return 0; case "c": return 3; case 0: return 2; case "d": return 4; case "e": return 5; } return -1; } -mixed b() { return 4; } -.... -test 2312, expected result: EQ -mixed a() { switch("d") { case "c": return 3; default: return 0; case 0: return 2; case "d": return 4; case "e": return 5; } return -1; } -mixed b() { return 4; } -.... -test 2313, expected result: EQ -mixed a() { switch("d") { case "c": return 3; case 0: return 2; default: return 0; case "d": return 4; case "e": return 5; } return -1; } -mixed b() { return 4; } -.... -test 2314, expected result: EQ -mixed a() { switch("d") { case "c": return 3; case 0: return 2; case "d": return 4; default: return 0; case "e": return 5; } return -1; } -mixed b() { return 4; } -.... -test 2315, expected result: EQ -mixed a() { switch("d") { case "c": return 3; case 0: return 2; case "d": return 4; case "e": return 5; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 2316, expected result: EQ -mixed a() { switch("d") { case "c": return 3; case 0: return 2; case "e": return 5; case "d": return 4; } return 0; } -mixed b() { return 4; } -.... -test 2317, expected result: EQ -mixed a() { switch("d") { default: return 0; case "c": return 3; case 0: return 2; case "e": return 5; case "d": return 4; } return -1; } -mixed b() { return 4; } -.... -test 2318, expected result: EQ -mixed a() { switch("d") { case "c": return 3; default: return 0; case 0: return 2; case "e": return 5; case "d": return 4; } return -1; } -mixed b() { return 4; } -.... -test 2319, expected result: EQ -mixed a() { switch("d") { case "c": return 3; case 0: return 2; default: return 0; case "e": return 5; case "d": return 4; } return -1; } -mixed b() { return 4; } -.... -test 2320, expected result: EQ -mixed a() { switch("d") { case "c": return 3; case 0: return 2; case "e": return 5; default: return 0; case "d": return 4; } return -1; } -mixed b() { return 4; } -.... -test 2321, expected result: EQ -mixed a() { switch("d") { case "c": return 3; case 0: return 2; case "e": return 5; case "d": return 4; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 2322, expected result: EQ -mixed a() { switch("d") { case "c": return 3; case "d": return 4; case 0: return 2; case "e": return 5; } return 0; } -mixed b() { return 4; } -.... -test 2323, expected result: EQ -mixed a() { switch("d") { default: return 0; case "c": return 3; case "d": return 4; case 0: return 2; case "e": return 5; } return -1; } -mixed b() { return 4; } -.... -test 2324, expected result: EQ -mixed a() { switch("d") { case "c": return 3; default: return 0; case "d": return 4; case 0: return 2; case "e": return 5; } return -1; } -mixed b() { return 4; } -.... -test 2325, expected result: EQ -mixed a() { switch("d") { case "c": return 3; case "d": return 4; default: return 0; case 0: return 2; case "e": return 5; } return -1; } -mixed b() { return 4; } -.... -test 2326, expected result: EQ -mixed a() { switch("d") { case "c": return 3; case "d": return 4; case 0: return 2; default: return 0; case "e": return 5; } return -1; } -mixed b() { return 4; } -.... -test 2327, expected result: EQ -mixed a() { switch("d") { case "c": return 3; case "d": return 4; case 0: return 2; case "e": return 5; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 2328, expected result: EQ -mixed a() { switch("d") { case "c": return 3; case "d": return 4; case "e": return 5; case 0: return 2; } return 0; } -mixed b() { return 4; } -.... -test 2329, expected result: EQ -mixed a() { switch("d") { default: return 0; case "c": return 3; case "d": return 4; case "e": return 5; case 0: return 2; } return -1; } -mixed b() { return 4; } -.... -test 2330, expected result: EQ -mixed a() { switch("d") { case "c": return 3; default: return 0; case "d": return 4; case "e": return 5; case 0: return 2; } return -1; } -mixed b() { return 4; } -.... -test 2331, expected result: EQ -mixed a() { switch("d") { case "c": return 3; case "d": return 4; default: return 0; case "e": return 5; case 0: return 2; } return -1; } -mixed b() { return 4; } -.... -test 2332, expected result: EQ -mixed a() { switch("d") { case "c": return 3; case "d": return 4; case "e": return 5; default: return 0; case 0: return 2; } return -1; } -mixed b() { return 4; } -.... -test 2333, expected result: EQ -mixed a() { switch("d") { case "c": return 3; case "d": return 4; case "e": return 5; case 0: return 2; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 2334, expected result: EQ -mixed a() { switch("d") { case "c": return 3; case "e": return 5; case "d": return 4; case 0: return 2; } return 0; } -mixed b() { return 4; } -.... -test 2335, expected result: EQ -mixed a() { switch("d") { default: return 0; case "c": return 3; case "e": return 5; case "d": return 4; case 0: return 2; } return -1; } -mixed b() { return 4; } -.... -test 2336, expected result: EQ -mixed a() { switch("d") { case "c": return 3; default: return 0; case "e": return 5; case "d": return 4; case 0: return 2; } return -1; } -mixed b() { return 4; } -.... -test 2337, expected result: EQ -mixed a() { switch("d") { case "c": return 3; case "e": return 5; default: return 0; case "d": return 4; case 0: return 2; } return -1; } -mixed b() { return 4; } -.... -test 2338, expected result: EQ -mixed a() { switch("d") { case "c": return 3; case "e": return 5; case "d": return 4; default: return 0; case 0: return 2; } return -1; } -mixed b() { return 4; } -.... -test 2339, expected result: EQ -mixed a() { switch("d") { case "c": return 3; case "e": return 5; case "d": return 4; case 0: return 2; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 2340, expected result: EQ -mixed a() { switch("d") { case "c": return 3; case "e": return 5; case 0: return 2; case "d": return 4; } return 0; } -mixed b() { return 4; } -.... -test 2341, expected result: EQ -mixed a() { switch("d") { default: return 0; case "c": return 3; case "e": return 5; case 0: return 2; case "d": return 4; } return -1; } -mixed b() { return 4; } -.... -test 2342, expected result: EQ -mixed a() { switch("d") { case "c": return 3; default: return 0; case "e": return 5; case 0: return 2; case "d": return 4; } return -1; } -mixed b() { return 4; } -.... -test 2343, expected result: EQ -mixed a() { switch("d") { case "c": return 3; case "e": return 5; default: return 0; case 0: return 2; case "d": return 4; } return -1; } -mixed b() { return 4; } -.... -test 2344, expected result: EQ -mixed a() { switch("d") { case "c": return 3; case "e": return 5; case 0: return 2; default: return 0; case "d": return 4; } return -1; } -mixed b() { return 4; } -.... -test 2345, expected result: EQ -mixed a() { switch("d") { case "c": return 3; case "e": return 5; case 0: return 2; case "d": return 4; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 2346, expected result: EQ -mixed a() { switch("d") { case "d": return 4; case "c": return 3; case 0: return 2; case "e": return 5; } return 0; } -mixed b() { return 4; } -.... -test 2347, expected result: EQ -mixed a() { switch("d") { default: return 0; case "d": return 4; case "c": return 3; case 0: return 2; case "e": return 5; } return -1; } -mixed b() { return 4; } -.... -test 2348, expected result: EQ -mixed a() { switch("d") { case "d": return 4; default: return 0; case "c": return 3; case 0: return 2; case "e": return 5; } return -1; } -mixed b() { return 4; } -.... -test 2349, expected result: EQ -mixed a() { switch("d") { case "d": return 4; case "c": return 3; default: return 0; case 0: return 2; case "e": return 5; } return -1; } -mixed b() { return 4; } -.... -test 2350, expected result: EQ -mixed a() { switch("d") { case "d": return 4; case "c": return 3; case 0: return 2; default: return 0; case "e": return 5; } return -1; } -mixed b() { return 4; } -.... -test 2351, expected result: EQ -mixed a() { switch("d") { case "d": return 4; case "c": return 3; case 0: return 2; case "e": return 5; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 2352, expected result: EQ -mixed a() { switch("d") { case "d": return 4; case "c": return 3; case "e": return 5; case 0: return 2; } return 0; } -mixed b() { return 4; } -.... -test 2353, expected result: EQ -mixed a() { switch("d") { default: return 0; case "d": return 4; case "c": return 3; case "e": return 5; case 0: return 2; } return -1; } -mixed b() { return 4; } -.... -test 2354, expected result: EQ -mixed a() { switch("d") { case "d": return 4; default: return 0; case "c": return 3; case "e": return 5; case 0: return 2; } return -1; } -mixed b() { return 4; } -.... -test 2355, expected result: EQ -mixed a() { switch("d") { case "d": return 4; case "c": return 3; default: return 0; case "e": return 5; case 0: return 2; } return -1; } -mixed b() { return 4; } -.... -test 2356, expected result: EQ -mixed a() { switch("d") { case "d": return 4; case "c": return 3; case "e": return 5; default: return 0; case 0: return 2; } return -1; } -mixed b() { return 4; } -.... -test 2357, expected result: EQ -mixed a() { switch("d") { case "d": return 4; case "c": return 3; case "e": return 5; case 0: return 2; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 2358, expected result: EQ -mixed a() { switch("d") { case "d": return 4; case 0: return 2; case "c": return 3; case "e": return 5; } return 0; } -mixed b() { return 4; } -.... -test 2359, expected result: EQ -mixed a() { switch("d") { default: return 0; case "d": return 4; case 0: return 2; case "c": return 3; case "e": return 5; } return -1; } -mixed b() { return 4; } -.... -test 2360, expected result: EQ -mixed a() { switch("d") { case "d": return 4; default: return 0; case 0: return 2; case "c": return 3; case "e": return 5; } return -1; } -mixed b() { return 4; } -.... -test 2361, expected result: EQ -mixed a() { switch("d") { case "d": return 4; case 0: return 2; default: return 0; case "c": return 3; case "e": return 5; } return -1; } -mixed b() { return 4; } -.... -test 2362, expected result: EQ -mixed a() { switch("d") { case "d": return 4; case 0: return 2; case "c": return 3; default: return 0; case "e": return 5; } return -1; } -mixed b() { return 4; } -.... -test 2363, expected result: EQ -mixed a() { switch("d") { case "d": return 4; case 0: return 2; case "c": return 3; case "e": return 5; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 2364, expected result: EQ -mixed a() { switch("d") { case "d": return 4; case 0: return 2; case "e": return 5; case "c": return 3; } return 0; } -mixed b() { return 4; } -.... -test 2365, expected result: EQ -mixed a() { switch("d") { default: return 0; case "d": return 4; case 0: return 2; case "e": return 5; case "c": return 3; } return -1; } -mixed b() { return 4; } -.... -test 2366, expected result: EQ -mixed a() { switch("d") { case "d": return 4; default: return 0; case 0: return 2; case "e": return 5; case "c": return 3; } return -1; } -mixed b() { return 4; } -.... -test 2367, expected result: EQ -mixed a() { switch("d") { case "d": return 4; case 0: return 2; default: return 0; case "e": return 5; case "c": return 3; } return -1; } -mixed b() { return 4; } -.... -test 2368, expected result: EQ -mixed a() { switch("d") { case "d": return 4; case 0: return 2; case "e": return 5; default: return 0; case "c": return 3; } return -1; } -mixed b() { return 4; } -.... -test 2369, expected result: EQ -mixed a() { switch("d") { case "d": return 4; case 0: return 2; case "e": return 5; case "c": return 3; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 2370, expected result: EQ -mixed a() { switch("d") { case "d": return 4; case "e": return 5; case 0: return 2; case "c": return 3; } return 0; } -mixed b() { return 4; } -.... -test 2371, expected result: EQ -mixed a() { switch("d") { default: return 0; case "d": return 4; case "e": return 5; case 0: return 2; case "c": return 3; } return -1; } -mixed b() { return 4; } -.... -test 2372, expected result: EQ -mixed a() { switch("d") { case "d": return 4; default: return 0; case "e": return 5; case 0: return 2; case "c": return 3; } return -1; } -mixed b() { return 4; } -.... -test 2373, expected result: EQ -mixed a() { switch("d") { case "d": return 4; case "e": return 5; default: return 0; case 0: return 2; case "c": return 3; } return -1; } -mixed b() { return 4; } -.... -test 2374, expected result: EQ -mixed a() { switch("d") { case "d": return 4; case "e": return 5; case 0: return 2; default: return 0; case "c": return 3; } return -1; } -mixed b() { return 4; } -.... -test 2375, expected result: EQ -mixed a() { switch("d") { case "d": return 4; case "e": return 5; case 0: return 2; case "c": return 3; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 2376, expected result: EQ -mixed a() { switch("d") { case "d": return 4; case "e": return 5; case "c": return 3; case 0: return 2; } return 0; } -mixed b() { return 4; } -.... -test 2377, expected result: EQ -mixed a() { switch("d") { default: return 0; case "d": return 4; case "e": return 5; case "c": return 3; case 0: return 2; } return -1; } -mixed b() { return 4; } -.... -test 2378, expected result: EQ -mixed a() { switch("d") { case "d": return 4; default: return 0; case "e": return 5; case "c": return 3; case 0: return 2; } return -1; } -mixed b() { return 4; } -.... -test 2379, expected result: EQ -mixed a() { switch("d") { case "d": return 4; case "e": return 5; default: return 0; case "c": return 3; case 0: return 2; } return -1; } -mixed b() { return 4; } -.... -test 2380, expected result: EQ -mixed a() { switch("d") { case "d": return 4; case "e": return 5; case "c": return 3; default: return 0; case 0: return 2; } return -1; } -mixed b() { return 4; } -.... -test 2381, expected result: EQ -mixed a() { switch("d") { case "d": return 4; case "e": return 5; case "c": return 3; case 0: return 2; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 2382, expected result: EQ -mixed a() { switch("d") { case "e": return 5; case "c": return 3; case "d": return 4; case 0: return 2; } return 0; } -mixed b() { return 4; } -.... -test 2383, expected result: EQ -mixed a() { switch("d") { default: return 0; case "e": return 5; case "c": return 3; case "d": return 4; case 0: return 2; } return -1; } -mixed b() { return 4; } -.... -test 2384, expected result: EQ -mixed a() { switch("d") { case "e": return 5; default: return 0; case "c": return 3; case "d": return 4; case 0: return 2; } return -1; } -mixed b() { return 4; } -.... -test 2385, expected result: EQ -mixed a() { switch("d") { case "e": return 5; case "c": return 3; default: return 0; case "d": return 4; case 0: return 2; } return -1; } -mixed b() { return 4; } -.... -test 2386, expected result: EQ -mixed a() { switch("d") { case "e": return 5; case "c": return 3; case "d": return 4; default: return 0; case 0: return 2; } return -1; } -mixed b() { return 4; } -.... -test 2387, expected result: EQ -mixed a() { switch("d") { case "e": return 5; case "c": return 3; case "d": return 4; case 0: return 2; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 2388, expected result: EQ -mixed a() { switch("d") { case "e": return 5; case "c": return 3; case 0: return 2; case "d": return 4; } return 0; } -mixed b() { return 4; } -.... -test 2389, expected result: EQ -mixed a() { switch("d") { default: return 0; case "e": return 5; case "c": return 3; case 0: return 2; case "d": return 4; } return -1; } -mixed b() { return 4; } -.... -test 2390, expected result: EQ -mixed a() { switch("d") { case "e": return 5; default: return 0; case "c": return 3; case 0: return 2; case "d": return 4; } return -1; } -mixed b() { return 4; } -.... -test 2391, expected result: EQ -mixed a() { switch("d") { case "e": return 5; case "c": return 3; default: return 0; case 0: return 2; case "d": return 4; } return -1; } -mixed b() { return 4; } -.... -test 2392, expected result: EQ -mixed a() { switch("d") { case "e": return 5; case "c": return 3; case 0: return 2; default: return 0; case "d": return 4; } return -1; } -mixed b() { return 4; } -.... -test 2393, expected result: EQ -mixed a() { switch("d") { case "e": return 5; case "c": return 3; case 0: return 2; case "d": return 4; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 2394, expected result: EQ -mixed a() { switch("d") { case "e": return 5; case "d": return 4; case "c": return 3; case 0: return 2; } return 0; } -mixed b() { return 4; } -.... -test 2395, expected result: EQ -mixed a() { switch("d") { default: return 0; case "e": return 5; case "d": return 4; case "c": return 3; case 0: return 2; } return -1; } -mixed b() { return 4; } -.... -test 2396, expected result: EQ -mixed a() { switch("d") { case "e": return 5; default: return 0; case "d": return 4; case "c": return 3; case 0: return 2; } return -1; } -mixed b() { return 4; } -.... -test 2397, expected result: EQ -mixed a() { switch("d") { case "e": return 5; case "d": return 4; default: return 0; case "c": return 3; case 0: return 2; } return -1; } -mixed b() { return 4; } -.... -test 2398, expected result: EQ -mixed a() { switch("d") { case "e": return 5; case "d": return 4; case "c": return 3; default: return 0; case 0: return 2; } return -1; } -mixed b() { return 4; } -.... -test 2399, expected result: EQ -mixed a() { switch("d") { case "e": return 5; case "d": return 4; case "c": return 3; case 0: return 2; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 2400, expected result: EQ -mixed a() { switch("d") { case "e": return 5; case "d": return 4; case 0: return 2; case "c": return 3; } return 0; } -mixed b() { return 4; } -.... -test 2401, expected result: EQ -mixed a() { switch("d") { default: return 0; case "e": return 5; case "d": return 4; case 0: return 2; case "c": return 3; } return -1; } -mixed b() { return 4; } -.... -test 2402, expected result: EQ -mixed a() { switch("d") { case "e": return 5; default: return 0; case "d": return 4; case 0: return 2; case "c": return 3; } return -1; } -mixed b() { return 4; } -.... -test 2403, expected result: EQ -mixed a() { switch("d") { case "e": return 5; case "d": return 4; default: return 0; case 0: return 2; case "c": return 3; } return -1; } -mixed b() { return 4; } -.... -test 2404, expected result: EQ -mixed a() { switch("d") { case "e": return 5; case "d": return 4; case 0: return 2; default: return 0; case "c": return 3; } return -1; } -mixed b() { return 4; } -.... -test 2405, expected result: EQ -mixed a() { switch("d") { case "e": return 5; case "d": return 4; case 0: return 2; case "c": return 3; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 2406, expected result: EQ -mixed a() { switch("d") { case "e": return 5; case 0: return 2; case "d": return 4; case "c": return 3; } return 0; } -mixed b() { return 4; } -.... -test 2407, expected result: EQ -mixed a() { switch("d") { default: return 0; case "e": return 5; case 0: return 2; case "d": return 4; case "c": return 3; } return -1; } -mixed b() { return 4; } -.... -test 2408, expected result: EQ -mixed a() { switch("d") { case "e": return 5; default: return 0; case 0: return 2; case "d": return 4; case "c": return 3; } return -1; } -mixed b() { return 4; } -.... -test 2409, expected result: EQ -mixed a() { switch("d") { case "e": return 5; case 0: return 2; default: return 0; case "d": return 4; case "c": return 3; } return -1; } -mixed b() { return 4; } -.... -test 2410, expected result: EQ -mixed a() { switch("d") { case "e": return 5; case 0: return 2; case "d": return 4; default: return 0; case "c": return 3; } return -1; } -mixed b() { return 4; } -.... -test 2411, expected result: EQ -mixed a() { switch("d") { case "e": return 5; case 0: return 2; case "d": return 4; case "c": return 3; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 2412, expected result: EQ -mixed a() { switch("d") { case "e": return 5; case 0: return 2; case "c": return 3; case "d": return 4; } return 0; } -mixed b() { return 4; } -.... -test 2413, expected result: EQ -mixed a() { switch("d") { default: return 0; case "e": return 5; case 0: return 2; case "c": return 3; case "d": return 4; } return -1; } -mixed b() { return 4; } -.... -test 2414, expected result: EQ -mixed a() { switch("d") { case "e": return 5; default: return 0; case 0: return 2; case "c": return 3; case "d": return 4; } return -1; } -mixed b() { return 4; } -.... -test 2415, expected result: EQ -mixed a() { switch("d") { case "e": return 5; case 0: return 2; default: return 0; case "c": return 3; case "d": return 4; } return -1; } -mixed b() { return 4; } -.... -test 2416, expected result: EQ -mixed a() { switch("d") { case "e": return 5; case 0: return 2; case "c": return 3; default: return 0; case "d": return 4; } return -1; } -mixed b() { return 4; } -.... -test 2417, expected result: EQ -mixed a() { switch("d") { case "e": return 5; case 0: return 2; case "c": return 3; case "d": return 4; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 2418, expected result: EQ -mixed a() { switch("e") { case 0: return 2; case "c": return 3; case "d": return 4; case "e": return 5; } return 0; } -mixed b() { return 5; } -.... -test 2419, expected result: EQ -mixed a() { switch("e") { default: return 0; case 0: return 2; case "c": return 3; case "d": return 4; case "e": return 5; } return -1; } -mixed b() { return 5; } -.... -test 2420, expected result: EQ -mixed a() { switch("e") { case 0: return 2; default: return 0; case "c": return 3; case "d": return 4; case "e": return 5; } return -1; } -mixed b() { return 5; } -.... -test 2421, expected result: EQ -mixed a() { switch("e") { case 0: return 2; case "c": return 3; default: return 0; case "d": return 4; case "e": return 5; } return -1; } -mixed b() { return 5; } -.... -test 2422, expected result: EQ -mixed a() { switch("e") { case 0: return 2; case "c": return 3; case "d": return 4; default: return 0; case "e": return 5; } return -1; } -mixed b() { return 5; } -.... -test 2423, expected result: EQ -mixed a() { switch("e") { case 0: return 2; case "c": return 3; case "d": return 4; case "e": return 5; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 2424, expected result: EQ -mixed a() { switch("e") { case 0: return 2; case "c": return 3; case "e": return 5; case "d": return 4; } return 0; } -mixed b() { return 5; } -.... -test 2425, expected result: EQ -mixed a() { switch("e") { default: return 0; case 0: return 2; case "c": return 3; case "e": return 5; case "d": return 4; } return -1; } -mixed b() { return 5; } -.... -test 2426, expected result: EQ -mixed a() { switch("e") { case 0: return 2; default: return 0; case "c": return 3; case "e": return 5; case "d": return 4; } return -1; } -mixed b() { return 5; } -.... -test 2427, expected result: EQ -mixed a() { switch("e") { case 0: return 2; case "c": return 3; default: return 0; case "e": return 5; case "d": return 4; } return -1; } -mixed b() { return 5; } -.... -test 2428, expected result: EQ -mixed a() { switch("e") { case 0: return 2; case "c": return 3; case "e": return 5; default: return 0; case "d": return 4; } return -1; } -mixed b() { return 5; } -.... -test 2429, expected result: EQ -mixed a() { switch("e") { case 0: return 2; case "c": return 3; case "e": return 5; case "d": return 4; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 2430, expected result: EQ -mixed a() { switch("e") { case 0: return 2; case "d": return 4; case "c": return 3; case "e": return 5; } return 0; } -mixed b() { return 5; } -.... -test 2431, expected result: EQ -mixed a() { switch("e") { default: return 0; case 0: return 2; case "d": return 4; case "c": return 3; case "e": return 5; } return -1; } -mixed b() { return 5; } -.... -test 2432, expected result: EQ -mixed a() { switch("e") { case 0: return 2; default: return 0; case "d": return 4; case "c": return 3; case "e": return 5; } return -1; } -mixed b() { return 5; } -.... -test 2433, expected result: EQ -mixed a() { switch("e") { case 0: return 2; case "d": return 4; default: return 0; case "c": return 3; case "e": return 5; } return -1; } -mixed b() { return 5; } -.... -test 2434, expected result: EQ -mixed a() { switch("e") { case 0: return 2; case "d": return 4; case "c": return 3; default: return 0; case "e": return 5; } return -1; } -mixed b() { return 5; } -.... -test 2435, expected result: EQ -mixed a() { switch("e") { case 0: return 2; case "d": return 4; case "c": return 3; case "e": return 5; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 2436, expected result: EQ -mixed a() { switch("e") { case 0: return 2; case "d": return 4; case "e": return 5; case "c": return 3; } return 0; } -mixed b() { return 5; } -.... -test 2437, expected result: EQ -mixed a() { switch("e") { default: return 0; case 0: return 2; case "d": return 4; case "e": return 5; case "c": return 3; } return -1; } -mixed b() { return 5; } -.... -test 2438, expected result: EQ -mixed a() { switch("e") { case 0: return 2; default: return 0; case "d": return 4; case "e": return 5; case "c": return 3; } return -1; } -mixed b() { return 5; } -.... -test 2439, expected result: EQ -mixed a() { switch("e") { case 0: return 2; case "d": return 4; default: return 0; case "e": return 5; case "c": return 3; } return -1; } -mixed b() { return 5; } -.... -test 2440, expected result: EQ -mixed a() { switch("e") { case 0: return 2; case "d": return 4; case "e": return 5; default: return 0; case "c": return 3; } return -1; } -mixed b() { return 5; } -.... -test 2441, expected result: EQ -mixed a() { switch("e") { case 0: return 2; case "d": return 4; case "e": return 5; case "c": return 3; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 2442, expected result: EQ -mixed a() { switch("e") { case 0: return 2; case "e": return 5; case "d": return 4; case "c": return 3; } return 0; } -mixed b() { return 5; } -.... -test 2443, expected result: EQ -mixed a() { switch("e") { default: return 0; case 0: return 2; case "e": return 5; case "d": return 4; case "c": return 3; } return -1; } -mixed b() { return 5; } -.... -test 2444, expected result: EQ -mixed a() { switch("e") { case 0: return 2; default: return 0; case "e": return 5; case "d": return 4; case "c": return 3; } return -1; } -mixed b() { return 5; } -.... -test 2445, expected result: EQ -mixed a() { switch("e") { case 0: return 2; case "e": return 5; default: return 0; case "d": return 4; case "c": return 3; } return -1; } -mixed b() { return 5; } -.... -test 2446, expected result: EQ -mixed a() { switch("e") { case 0: return 2; case "e": return 5; case "d": return 4; default: return 0; case "c": return 3; } return -1; } -mixed b() { return 5; } -.... -test 2447, expected result: EQ -mixed a() { switch("e") { case 0: return 2; case "e": return 5; case "d": return 4; case "c": return 3; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 2448, expected result: EQ -mixed a() { switch("e") { case 0: return 2; case "e": return 5; case "c": return 3; case "d": return 4; } return 0; } -mixed b() { return 5; } -.... -test 2449, expected result: EQ -mixed a() { switch("e") { default: return 0; case 0: return 2; case "e": return 5; case "c": return 3; case "d": return 4; } return -1; } -mixed b() { return 5; } -.... -test 2450, expected result: EQ -mixed a() { switch("e") { case 0: return 2; default: return 0; case "e": return 5; case "c": return 3; case "d": return 4; } return -1; } -mixed b() { return 5; } -.... -test 2451, expected result: EQ -mixed a() { switch("e") { case 0: return 2; case "e": return 5; default: return 0; case "c": return 3; case "d": return 4; } return -1; } -mixed b() { return 5; } -.... -test 2452, expected result: EQ -mixed a() { switch("e") { case 0: return 2; case "e": return 5; case "c": return 3; default: return 0; case "d": return 4; } return -1; } -mixed b() { return 5; } -.... -test 2453, expected result: EQ -mixed a() { switch("e") { case 0: return 2; case "e": return 5; case "c": return 3; case "d": return 4; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 2454, expected result: EQ -mixed a() { switch("e") { case "c": return 3; case 0: return 2; case "d": return 4; case "e": return 5; } return 0; } -mixed b() { return 5; } -.... -test 2455, expected result: EQ -mixed a() { switch("e") { default: return 0; case "c": return 3; case 0: return 2; case "d": return 4; case "e": return 5; } return -1; } -mixed b() { return 5; } -.... -test 2456, expected result: EQ -mixed a() { switch("e") { case "c": return 3; default: return 0; case 0: return 2; case "d": return 4; case "e": return 5; } return -1; } -mixed b() { return 5; } -.... -test 2457, expected result: EQ -mixed a() { switch("e") { case "c": return 3; case 0: return 2; default: return 0; case "d": return 4; case "e": return 5; } return -1; } -mixed b() { return 5; } -.... -test 2458, expected result: EQ -mixed a() { switch("e") { case "c": return 3; case 0: return 2; case "d": return 4; default: return 0; case "e": return 5; } return -1; } -mixed b() { return 5; } -.... -test 2459, expected result: EQ -mixed a() { switch("e") { case "c": return 3; case 0: return 2; case "d": return 4; case "e": return 5; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 2460, expected result: EQ -mixed a() { switch("e") { case "c": return 3; case 0: return 2; case "e": return 5; case "d": return 4; } return 0; } -mixed b() { return 5; } -.... -test 2461, expected result: EQ -mixed a() { switch("e") { default: return 0; case "c": return 3; case 0: return 2; case "e": return 5; case "d": return 4; } return -1; } -mixed b() { return 5; } -.... -test 2462, expected result: EQ -mixed a() { switch("e") { case "c": return 3; default: return 0; case 0: return 2; case "e": return 5; case "d": return 4; } return -1; } -mixed b() { return 5; } -.... -test 2463, expected result: EQ -mixed a() { switch("e") { case "c": return 3; case 0: return 2; default: return 0; case "e": return 5; case "d": return 4; } return -1; } -mixed b() { return 5; } -.... -test 2464, expected result: EQ -mixed a() { switch("e") { case "c": return 3; case 0: return 2; case "e": return 5; default: return 0; case "d": return 4; } return -1; } -mixed b() { return 5; } -.... -test 2465, expected result: EQ -mixed a() { switch("e") { case "c": return 3; case 0: return 2; case "e": return 5; case "d": return 4; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 2466, expected result: EQ -mixed a() { switch("e") { case "c": return 3; case "d": return 4; case 0: return 2; case "e": return 5; } return 0; } -mixed b() { return 5; } -.... -test 2467, expected result: EQ -mixed a() { switch("e") { default: return 0; case "c": return 3; case "d": return 4; case 0: return 2; case "e": return 5; } return -1; } -mixed b() { return 5; } -.... -test 2468, expected result: EQ -mixed a() { switch("e") { case "c": return 3; default: return 0; case "d": return 4; case 0: return 2; case "e": return 5; } return -1; } -mixed b() { return 5; } -.... -test 2469, expected result: EQ -mixed a() { switch("e") { case "c": return 3; case "d": return 4; default: return 0; case 0: return 2; case "e": return 5; } return -1; } -mixed b() { return 5; } -.... -test 2470, expected result: EQ -mixed a() { switch("e") { case "c": return 3; case "d": return 4; case 0: return 2; default: return 0; case "e": return 5; } return -1; } -mixed b() { return 5; } -.... -test 2471, expected result: EQ -mixed a() { switch("e") { case "c": return 3; case "d": return 4; case 0: return 2; case "e": return 5; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 2472, expected result: EQ -mixed a() { switch("e") { case "c": return 3; case "d": return 4; case "e": return 5; case 0: return 2; } return 0; } -mixed b() { return 5; } -.... -test 2473, expected result: EQ -mixed a() { switch("e") { default: return 0; case "c": return 3; case "d": return 4; case "e": return 5; case 0: return 2; } return -1; } -mixed b() { return 5; } -.... -test 2474, expected result: EQ -mixed a() { switch("e") { case "c": return 3; default: return 0; case "d": return 4; case "e": return 5; case 0: return 2; } return -1; } -mixed b() { return 5; } -.... -test 2475, expected result: EQ -mixed a() { switch("e") { case "c": return 3; case "d": return 4; default: return 0; case "e": return 5; case 0: return 2; } return -1; } -mixed b() { return 5; } -.... -test 2476, expected result: EQ -mixed a() { switch("e") { case "c": return 3; case "d": return 4; case "e": return 5; default: return 0; case 0: return 2; } return -1; } -mixed b() { return 5; } -.... -test 2477, expected result: EQ -mixed a() { switch("e") { case "c": return 3; case "d": return 4; case "e": return 5; case 0: return 2; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 2478, expected result: EQ -mixed a() { switch("e") { case "c": return 3; case "e": return 5; case "d": return 4; case 0: return 2; } return 0; } -mixed b() { return 5; } -.... -test 2479, expected result: EQ -mixed a() { switch("e") { default: return 0; case "c": return 3; case "e": return 5; case "d": return 4; case 0: return 2; } return -1; } -mixed b() { return 5; } -.... -test 2480, expected result: EQ -mixed a() { switch("e") { case "c": return 3; default: return 0; case "e": return 5; case "d": return 4; case 0: return 2; } return -1; } -mixed b() { return 5; } -.... -test 2481, expected result: EQ -mixed a() { switch("e") { case "c": return 3; case "e": return 5; default: return 0; case "d": return 4; case 0: return 2; } return -1; } -mixed b() { return 5; } -.... -test 2482, expected result: EQ -mixed a() { switch("e") { case "c": return 3; case "e": return 5; case "d": return 4; default: return 0; case 0: return 2; } return -1; } -mixed b() { return 5; } -.... -test 2483, expected result: EQ -mixed a() { switch("e") { case "c": return 3; case "e": return 5; case "d": return 4; case 0: return 2; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 2484, expected result: EQ -mixed a() { switch("e") { case "c": return 3; case "e": return 5; case 0: return 2; case "d": return 4; } return 0; } -mixed b() { return 5; } -.... -test 2485, expected result: EQ -mixed a() { switch("e") { default: return 0; case "c": return 3; case "e": return 5; case 0: return 2; case "d": return 4; } return -1; } -mixed b() { return 5; } -.... -test 2486, expected result: EQ -mixed a() { switch("e") { case "c": return 3; default: return 0; case "e": return 5; case 0: return 2; case "d": return 4; } return -1; } -mixed b() { return 5; } -.... -test 2487, expected result: EQ -mixed a() { switch("e") { case "c": return 3; case "e": return 5; default: return 0; case 0: return 2; case "d": return 4; } return -1; } -mixed b() { return 5; } -.... -test 2488, expected result: EQ -mixed a() { switch("e") { case "c": return 3; case "e": return 5; case 0: return 2; default: return 0; case "d": return 4; } return -1; } -mixed b() { return 5; } -.... -test 2489, expected result: EQ -mixed a() { switch("e") { case "c": return 3; case "e": return 5; case 0: return 2; case "d": return 4; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 2490, expected result: EQ -mixed a() { switch("e") { case "d": return 4; case "c": return 3; case 0: return 2; case "e": return 5; } return 0; } -mixed b() { return 5; } -.... -test 2491, expected result: EQ -mixed a() { switch("e") { default: return 0; case "d": return 4; case "c": return 3; case 0: return 2; case "e": return 5; } return -1; } -mixed b() { return 5; } -.... -test 2492, expected result: EQ -mixed a() { switch("e") { case "d": return 4; default: return 0; case "c": return 3; case 0: return 2; case "e": return 5; } return -1; } -mixed b() { return 5; } -.... -test 2493, expected result: EQ -mixed a() { switch("e") { case "d": return 4; case "c": return 3; default: return 0; case 0: return 2; case "e": return 5; } return -1; } -mixed b() { return 5; } -.... -test 2494, expected result: EQ -mixed a() { switch("e") { case "d": return 4; case "c": return 3; case 0: return 2; default: return 0; case "e": return 5; } return -1; } -mixed b() { return 5; } -.... -test 2495, expected result: EQ -mixed a() { switch("e") { case "d": return 4; case "c": return 3; case 0: return 2; case "e": return 5; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 2496, expected result: EQ -mixed a() { switch("e") { case "d": return 4; case "c": return 3; case "e": return 5; case 0: return 2; } return 0; } -mixed b() { return 5; } -.... -test 2497, expected result: EQ -mixed a() { switch("e") { default: return 0; case "d": return 4; case "c": return 3; case "e": return 5; case 0: return 2; } return -1; } -mixed b() { return 5; } -.... -test 2498, expected result: EQ -mixed a() { switch("e") { case "d": return 4; default: return 0; case "c": return 3; case "e": return 5; case 0: return 2; } return -1; } -mixed b() { return 5; } -.... -test 2499, expected result: EQ -mixed a() { switch("e") { case "d": return 4; case "c": return 3; default: return 0; case "e": return 5; case 0: return 2; } return -1; } -mixed b() { return 5; } -.... -test 2500, expected result: EQ -mixed a() { switch("e") { case "d": return 4; case "c": return 3; case "e": return 5; default: return 0; case 0: return 2; } return -1; } -mixed b() { return 5; } -.... -test 2501, expected result: EQ -mixed a() { switch("e") { case "d": return 4; case "c": return 3; case "e": return 5; case 0: return 2; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 2502, expected result: EQ -mixed a() { switch("e") { case "d": return 4; case 0: return 2; case "c": return 3; case "e": return 5; } return 0; } -mixed b() { return 5; } -.... -test 2503, expected result: EQ -mixed a() { switch("e") { default: return 0; case "d": return 4; case 0: return 2; case "c": return 3; case "e": return 5; } return -1; } -mixed b() { return 5; } -.... -test 2504, expected result: EQ -mixed a() { switch("e") { case "d": return 4; default: return 0; case 0: return 2; case "c": return 3; case "e": return 5; } return -1; } -mixed b() { return 5; } -.... -test 2505, expected result: EQ -mixed a() { switch("e") { case "d": return 4; case 0: return 2; default: return 0; case "c": return 3; case "e": return 5; } return -1; } -mixed b() { return 5; } -.... -test 2506, expected result: EQ -mixed a() { switch("e") { case "d": return 4; case 0: return 2; case "c": return 3; default: return 0; case "e": return 5; } return -1; } -mixed b() { return 5; } -.... -test 2507, expected result: EQ -mixed a() { switch("e") { case "d": return 4; case 0: return 2; case "c": return 3; case "e": return 5; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 2508, expected result: EQ -mixed a() { switch("e") { case "d": return 4; case 0: return 2; case "e": return 5; case "c": return 3; } return 0; } -mixed b() { return 5; } -.... -test 2509, expected result: EQ -mixed a() { switch("e") { default: return 0; case "d": return 4; case 0: return 2; case "e": return 5; case "c": return 3; } return -1; } -mixed b() { return 5; } -.... -test 2510, expected result: EQ -mixed a() { switch("e") { case "d": return 4; default: return 0; case 0: return 2; case "e": return 5; case "c": return 3; } return -1; } -mixed b() { return 5; } -.... -test 2511, expected result: EQ -mixed a() { switch("e") { case "d": return 4; case 0: return 2; default: return 0; case "e": return 5; case "c": return 3; } return -1; } -mixed b() { return 5; } -.... -test 2512, expected result: EQ -mixed a() { switch("e") { case "d": return 4; case 0: return 2; case "e": return 5; default: return 0; case "c": return 3; } return -1; } -mixed b() { return 5; } -.... -test 2513, expected result: EQ -mixed a() { switch("e") { case "d": return 4; case 0: return 2; case "e": return 5; case "c": return 3; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 2514, expected result: EQ -mixed a() { switch("e") { case "d": return 4; case "e": return 5; case 0: return 2; case "c": return 3; } return 0; } -mixed b() { return 5; } -.... -test 2515, expected result: EQ -mixed a() { switch("e") { default: return 0; case "d": return 4; case "e": return 5; case 0: return 2; case "c": return 3; } return -1; } -mixed b() { return 5; } -.... -test 2516, expected result: EQ -mixed a() { switch("e") { case "d": return 4; default: return 0; case "e": return 5; case 0: return 2; case "c": return 3; } return -1; } -mixed b() { return 5; } -.... -test 2517, expected result: EQ -mixed a() { switch("e") { case "d": return 4; case "e": return 5; default: return 0; case 0: return 2; case "c": return 3; } return -1; } -mixed b() { return 5; } -.... -test 2518, expected result: EQ -mixed a() { switch("e") { case "d": return 4; case "e": return 5; case 0: return 2; default: return 0; case "c": return 3; } return -1; } -mixed b() { return 5; } -.... -test 2519, expected result: EQ -mixed a() { switch("e") { case "d": return 4; case "e": return 5; case 0: return 2; case "c": return 3; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 2520, expected result: EQ -mixed a() { switch("e") { case "d": return 4; case "e": return 5; case "c": return 3; case 0: return 2; } return 0; } -mixed b() { return 5; } -.... -test 2521, expected result: EQ -mixed a() { switch("e") { default: return 0; case "d": return 4; case "e": return 5; case "c": return 3; case 0: return 2; } return -1; } -mixed b() { return 5; } -.... -test 2522, expected result: EQ -mixed a() { switch("e") { case "d": return 4; default: return 0; case "e": return 5; case "c": return 3; case 0: return 2; } return -1; } -mixed b() { return 5; } -.... -test 2523, expected result: EQ -mixed a() { switch("e") { case "d": return 4; case "e": return 5; default: return 0; case "c": return 3; case 0: return 2; } return -1; } -mixed b() { return 5; } -.... -test 2524, expected result: EQ -mixed a() { switch("e") { case "d": return 4; case "e": return 5; case "c": return 3; default: return 0; case 0: return 2; } return -1; } -mixed b() { return 5; } -.... -test 2525, expected result: EQ -mixed a() { switch("e") { case "d": return 4; case "e": return 5; case "c": return 3; case 0: return 2; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 2526, expected result: EQ -mixed a() { switch("e") { case "e": return 5; case "c": return 3; case "d": return 4; case 0: return 2; } return 0; } -mixed b() { return 5; } -.... -test 2527, expected result: EQ -mixed a() { switch("e") { default: return 0; case "e": return 5; case "c": return 3; case "d": return 4; case 0: return 2; } return -1; } -mixed b() { return 5; } -.... -test 2528, expected result: EQ -mixed a() { switch("e") { case "e": return 5; default: return 0; case "c": return 3; case "d": return 4; case 0: return 2; } return -1; } -mixed b() { return 5; } -.... -test 2529, expected result: EQ -mixed a() { switch("e") { case "e": return 5; case "c": return 3; default: return 0; case "d": return 4; case 0: return 2; } return -1; } -mixed b() { return 5; } -.... -test 2530, expected result: EQ -mixed a() { switch("e") { case "e": return 5; case "c": return 3; case "d": return 4; default: return 0; case 0: return 2; } return -1; } -mixed b() { return 5; } -.... -test 2531, expected result: EQ -mixed a() { switch("e") { case "e": return 5; case "c": return 3; case "d": return 4; case 0: return 2; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 2532, expected result: EQ -mixed a() { switch("e") { case "e": return 5; case "c": return 3; case 0: return 2; case "d": return 4; } return 0; } -mixed b() { return 5; } -.... -test 2533, expected result: EQ -mixed a() { switch("e") { default: return 0; case "e": return 5; case "c": return 3; case 0: return 2; case "d": return 4; } return -1; } -mixed b() { return 5; } -.... -test 2534, expected result: EQ -mixed a() { switch("e") { case "e": return 5; default: return 0; case "c": return 3; case 0: return 2; case "d": return 4; } return -1; } -mixed b() { return 5; } -.... -test 2535, expected result: EQ -mixed a() { switch("e") { case "e": return 5; case "c": return 3; default: return 0; case 0: return 2; case "d": return 4; } return -1; } -mixed b() { return 5; } -.... -test 2536, expected result: EQ -mixed a() { switch("e") { case "e": return 5; case "c": return 3; case 0: return 2; default: return 0; case "d": return 4; } return -1; } -mixed b() { return 5; } -.... -test 2537, expected result: EQ -mixed a() { switch("e") { case "e": return 5; case "c": return 3; case 0: return 2; case "d": return 4; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 2538, expected result: EQ -mixed a() { switch("e") { case "e": return 5; case "d": return 4; case "c": return 3; case 0: return 2; } return 0; } -mixed b() { return 5; } -.... -test 2539, expected result: EQ -mixed a() { switch("e") { default: return 0; case "e": return 5; case "d": return 4; case "c": return 3; case 0: return 2; } return -1; } -mixed b() { return 5; } -.... -test 2540, expected result: EQ -mixed a() { switch("e") { case "e": return 5; default: return 0; case "d": return 4; case "c": return 3; case 0: return 2; } return -1; } -mixed b() { return 5; } -.... -test 2541, expected result: EQ -mixed a() { switch("e") { case "e": return 5; case "d": return 4; default: return 0; case "c": return 3; case 0: return 2; } return -1; } -mixed b() { return 5; } -.... -test 2542, expected result: EQ -mixed a() { switch("e") { case "e": return 5; case "d": return 4; case "c": return 3; default: return 0; case 0: return 2; } return -1; } -mixed b() { return 5; } -.... -test 2543, expected result: EQ -mixed a() { switch("e") { case "e": return 5; case "d": return 4; case "c": return 3; case 0: return 2; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 2544, expected result: EQ -mixed a() { switch("e") { case "e": return 5; case "d": return 4; case 0: return 2; case "c": return 3; } return 0; } -mixed b() { return 5; } -.... -test 2545, expected result: EQ -mixed a() { switch("e") { default: return 0; case "e": return 5; case "d": return 4; case 0: return 2; case "c": return 3; } return -1; } -mixed b() { return 5; } -.... -test 2546, expected result: EQ -mixed a() { switch("e") { case "e": return 5; default: return 0; case "d": return 4; case 0: return 2; case "c": return 3; } return -1; } -mixed b() { return 5; } -.... -test 2547, expected result: EQ -mixed a() { switch("e") { case "e": return 5; case "d": return 4; default: return 0; case 0: return 2; case "c": return 3; } return -1; } -mixed b() { return 5; } -.... -test 2548, expected result: EQ -mixed a() { switch("e") { case "e": return 5; case "d": return 4; case 0: return 2; default: return 0; case "c": return 3; } return -1; } -mixed b() { return 5; } -.... -test 2549, expected result: EQ -mixed a() { switch("e") { case "e": return 5; case "d": return 4; case 0: return 2; case "c": return 3; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 2550, expected result: EQ -mixed a() { switch("e") { case "e": return 5; case 0: return 2; case "d": return 4; case "c": return 3; } return 0; } -mixed b() { return 5; } -.... -test 2551, expected result: EQ -mixed a() { switch("e") { default: return 0; case "e": return 5; case 0: return 2; case "d": return 4; case "c": return 3; } return -1; } -mixed b() { return 5; } -.... -test 2552, expected result: EQ -mixed a() { switch("e") { case "e": return 5; default: return 0; case 0: return 2; case "d": return 4; case "c": return 3; } return -1; } -mixed b() { return 5; } -.... -test 2553, expected result: EQ -mixed a() { switch("e") { case "e": return 5; case 0: return 2; default: return 0; case "d": return 4; case "c": return 3; } return -1; } -mixed b() { return 5; } -.... -test 2554, expected result: EQ -mixed a() { switch("e") { case "e": return 5; case 0: return 2; case "d": return 4; default: return 0; case "c": return 3; } return -1; } -mixed b() { return 5; } -.... -test 2555, expected result: EQ -mixed a() { switch("e") { case "e": return 5; case 0: return 2; case "d": return 4; case "c": return 3; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 2556, expected result: EQ -mixed a() { switch("e") { case "e": return 5; case 0: return 2; case "c": return 3; case "d": return 4; } return 0; } -mixed b() { return 5; } -.... -test 2557, expected result: EQ -mixed a() { switch("e") { default: return 0; case "e": return 5; case 0: return 2; case "c": return 3; case "d": return 4; } return -1; } -mixed b() { return 5; } -.... -test 2558, expected result: EQ -mixed a() { switch("e") { case "e": return 5; default: return 0; case 0: return 2; case "c": return 3; case "d": return 4; } return -1; } -mixed b() { return 5; } -.... -test 2559, expected result: EQ -mixed a() { switch("e") { case "e": return 5; case 0: return 2; default: return 0; case "c": return 3; case "d": return 4; } return -1; } -mixed b() { return 5; } -.... -test 2560, expected result: EQ -mixed a() { switch("e") { case "e": return 5; case 0: return 2; case "c": return 3; default: return 0; case "d": return 4; } return -1; } -mixed b() { return 5; } -.... -test 2561, expected result: EQ -mixed a() { switch("e") { case "e": return 5; case 0: return 2; case "c": return 3; case "d": return 4; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 2562, expected result: EQ -mixed a() { switch(1.0) { case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; } return 0; } -mixed b() { return 0; } -.... -test 2563, expected result: EQ -mixed a() { switch(1.0) { default: return 0; case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; } return -1; } -mixed b() { return 0; } -.... -test 2564, expected result: EQ -mixed a() { switch(1.0) { case 2.0: return 2; default: return 0; case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; } return -1; } -mixed b() { return 0; } -.... -test 2565, expected result: EQ -mixed a() { switch(1.0) { case 2.0: return 2; case 3.0: return 3; default: return 0; case 4.0: return 4; case 5.0: return 5; } return -1; } -mixed b() { return 0; } -.... -test 2566, expected result: EQ -mixed a() { switch(1.0) { case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; default: return 0; case 5.0: return 5; } return -1; } -mixed b() { return 0; } -.... -test 2567, expected result: EQ -mixed a() { switch(1.0) { case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 2568, expected result: EQ -mixed a() { switch(1.0) { case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; } return 0; } -mixed b() { return 0; } -.... -test 2569, expected result: EQ -mixed a() { switch(1.0) { default: return 0; case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; } return -1; } -mixed b() { return 0; } -.... -test 2570, expected result: EQ -mixed a() { switch(1.0) { case 2.0: return 2; default: return 0; case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; } return -1; } -mixed b() { return 0; } -.... -test 2571, expected result: EQ -mixed a() { switch(1.0) { case 2.0: return 2; case 3.0: return 3; default: return 0; case 5.0: return 5; case 4.0: return 4; } return -1; } -mixed b() { return 0; } -.... -test 2572, expected result: EQ -mixed a() { switch(1.0) { case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; default: return 0; case 4.0: return 4; } return -1; } -mixed b() { return 0; } -.... -test 2573, expected result: EQ -mixed a() { switch(1.0) { case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 2574, expected result: EQ -mixed a() { switch(1.0) { case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; } return 0; } -mixed b() { return 0; } -.... -test 2575, expected result: EQ -mixed a() { switch(1.0) { default: return 0; case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; } return -1; } -mixed b() { return 0; } -.... -test 2576, expected result: EQ -mixed a() { switch(1.0) { case 2.0: return 2; default: return 0; case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; } return -1; } -mixed b() { return 0; } -.... -test 2577, expected result: EQ -mixed a() { switch(1.0) { case 2.0: return 2; case 4.0: return 4; default: return 0; case 3.0: return 3; case 5.0: return 5; } return -1; } -mixed b() { return 0; } -.... -test 2578, expected result: EQ -mixed a() { switch(1.0) { case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; default: return 0; case 5.0: return 5; } return -1; } -mixed b() { return 0; } -.... -test 2579, expected result: EQ -mixed a() { switch(1.0) { case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 2580, expected result: EQ -mixed a() { switch(1.0) { case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; } return 0; } -mixed b() { return 0; } -.... -test 2581, expected result: EQ -mixed a() { switch(1.0) { default: return 0; case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; } return -1; } -mixed b() { return 0; } -.... -test 2582, expected result: EQ -mixed a() { switch(1.0) { case 2.0: return 2; default: return 0; case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; } return -1; } -mixed b() { return 0; } -.... -test 2583, expected result: EQ -mixed a() { switch(1.0) { case 2.0: return 2; case 4.0: return 4; default: return 0; case 5.0: return 5; case 3.0: return 3; } return -1; } -mixed b() { return 0; } -.... -test 2584, expected result: EQ -mixed a() { switch(1.0) { case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; default: return 0; case 3.0: return 3; } return -1; } -mixed b() { return 0; } -.... -test 2585, expected result: EQ -mixed a() { switch(1.0) { case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 2586, expected result: EQ -mixed a() { switch(1.0) { case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; } return 0; } -mixed b() { return 0; } -.... -test 2587, expected result: EQ -mixed a() { switch(1.0) { default: return 0; case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; } return -1; } -mixed b() { return 0; } -.... -test 2588, expected result: EQ -mixed a() { switch(1.0) { case 2.0: return 2; default: return 0; case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; } return -1; } -mixed b() { return 0; } -.... -test 2589, expected result: EQ -mixed a() { switch(1.0) { case 2.0: return 2; case 5.0: return 5; default: return 0; case 4.0: return 4; case 3.0: return 3; } return -1; } -mixed b() { return 0; } -.... -test 2590, expected result: EQ -mixed a() { switch(1.0) { case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; default: return 0; case 3.0: return 3; } return -1; } -mixed b() { return 0; } -.... -test 2591, expected result: EQ -mixed a() { switch(1.0) { case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 2592, expected result: EQ -mixed a() { switch(1.0) { case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; } return 0; } -mixed b() { return 0; } -.... -test 2593, expected result: EQ -mixed a() { switch(1.0) { default: return 0; case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; } return -1; } -mixed b() { return 0; } -.... -test 2594, expected result: EQ -mixed a() { switch(1.0) { case 2.0: return 2; default: return 0; case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; } return -1; } -mixed b() { return 0; } -.... -test 2595, expected result: EQ -mixed a() { switch(1.0) { case 2.0: return 2; case 5.0: return 5; default: return 0; case 3.0: return 3; case 4.0: return 4; } return -1; } -mixed b() { return 0; } -.... -test 2596, expected result: EQ -mixed a() { switch(1.0) { case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; default: return 0; case 4.0: return 4; } return -1; } -mixed b() { return 0; } -.... -test 2597, expected result: EQ -mixed a() { switch(1.0) { case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 2598, expected result: EQ -mixed a() { switch(1.0) { case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; } return 0; } -mixed b() { return 0; } -.... -test 2599, expected result: EQ -mixed a() { switch(1.0) { default: return 0; case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; } return -1; } -mixed b() { return 0; } -.... -test 2600, expected result: EQ -mixed a() { switch(1.0) { case 3.0: return 3; default: return 0; case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; } return -1; } -mixed b() { return 0; } -.... -test 2601, expected result: EQ -mixed a() { switch(1.0) { case 3.0: return 3; case 2.0: return 2; default: return 0; case 4.0: return 4; case 5.0: return 5; } return -1; } -mixed b() { return 0; } -.... -test 2602, expected result: EQ -mixed a() { switch(1.0) { case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; default: return 0; case 5.0: return 5; } return -1; } -mixed b() { return 0; } -.... -test 2603, expected result: EQ -mixed a() { switch(1.0) { case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 2604, expected result: EQ -mixed a() { switch(1.0) { case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; } return 0; } -mixed b() { return 0; } -.... -test 2605, expected result: EQ -mixed a() { switch(1.0) { default: return 0; case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; } return -1; } -mixed b() { return 0; } -.... -test 2606, expected result: EQ -mixed a() { switch(1.0) { case 3.0: return 3; default: return 0; case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; } return -1; } -mixed b() { return 0; } -.... -test 2607, expected result: EQ -mixed a() { switch(1.0) { case 3.0: return 3; case 2.0: return 2; default: return 0; case 5.0: return 5; case 4.0: return 4; } return -1; } -mixed b() { return 0; } -.... -test 2608, expected result: EQ -mixed a() { switch(1.0) { case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; default: return 0; case 4.0: return 4; } return -1; } -mixed b() { return 0; } -.... -test 2609, expected result: EQ -mixed a() { switch(1.0) { case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 2610, expected result: EQ -mixed a() { switch(1.0) { case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; } return 0; } -mixed b() { return 0; } -.... -test 2611, expected result: EQ -mixed a() { switch(1.0) { default: return 0; case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; } return -1; } -mixed b() { return 0; } -.... -test 2612, expected result: EQ -mixed a() { switch(1.0) { case 3.0: return 3; default: return 0; case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; } return -1; } -mixed b() { return 0; } -.... -test 2613, expected result: EQ -mixed a() { switch(1.0) { case 3.0: return 3; case 4.0: return 4; default: return 0; case 2.0: return 2; case 5.0: return 5; } return -1; } -mixed b() { return 0; } -.... -test 2614, expected result: EQ -mixed a() { switch(1.0) { case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; default: return 0; case 5.0: return 5; } return -1; } -mixed b() { return 0; } -.... -test 2615, expected result: EQ -mixed a() { switch(1.0) { case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 2616, expected result: EQ -mixed a() { switch(1.0) { case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; } return 0; } -mixed b() { return 0; } -.... -test 2617, expected result: EQ -mixed a() { switch(1.0) { default: return 0; case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; } return -1; } -mixed b() { return 0; } -.... -test 2618, expected result: EQ -mixed a() { switch(1.0) { case 3.0: return 3; default: return 0; case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; } return -1; } -mixed b() { return 0; } -.... -test 2619, expected result: EQ -mixed a() { switch(1.0) { case 3.0: return 3; case 4.0: return 4; default: return 0; case 5.0: return 5; case 2.0: return 2; } return -1; } -mixed b() { return 0; } -.... -test 2620, expected result: EQ -mixed a() { switch(1.0) { case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; default: return 0; case 2.0: return 2; } return -1; } -mixed b() { return 0; } -.... -test 2621, expected result: EQ -mixed a() { switch(1.0) { case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 2622, expected result: EQ -mixed a() { switch(1.0) { case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; } return 0; } -mixed b() { return 0; } -.... -test 2623, expected result: EQ -mixed a() { switch(1.0) { default: return 0; case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; } return -1; } -mixed b() { return 0; } -.... -test 2624, expected result: EQ -mixed a() { switch(1.0) { case 3.0: return 3; default: return 0; case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; } return -1; } -mixed b() { return 0; } -.... -test 2625, expected result: EQ -mixed a() { switch(1.0) { case 3.0: return 3; case 5.0: return 5; default: return 0; case 4.0: return 4; case 2.0: return 2; } return -1; } -mixed b() { return 0; } -.... -test 2626, expected result: EQ -mixed a() { switch(1.0) { case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; default: return 0; case 2.0: return 2; } return -1; } -mixed b() { return 0; } -.... -test 2627, expected result: EQ -mixed a() { switch(1.0) { case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 2628, expected result: EQ -mixed a() { switch(1.0) { case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; } return 0; } -mixed b() { return 0; } -.... -test 2629, expected result: EQ -mixed a() { switch(1.0) { default: return 0; case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; } return -1; } -mixed b() { return 0; } -.... -test 2630, expected result: EQ -mixed a() { switch(1.0) { case 3.0: return 3; default: return 0; case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; } return -1; } -mixed b() { return 0; } -.... -test 2631, expected result: EQ -mixed a() { switch(1.0) { case 3.0: return 3; case 5.0: return 5; default: return 0; case 2.0: return 2; case 4.0: return 4; } return -1; } -mixed b() { return 0; } -.... -test 2632, expected result: EQ -mixed a() { switch(1.0) { case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; default: return 0; case 4.0: return 4; } return -1; } -mixed b() { return 0; } -.... -test 2633, expected result: EQ -mixed a() { switch(1.0) { case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 2634, expected result: EQ -mixed a() { switch(1.0) { case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; } return 0; } -mixed b() { return 0; } -.... -test 2635, expected result: EQ -mixed a() { switch(1.0) { default: return 0; case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; } return -1; } -mixed b() { return 0; } -.... -test 2636, expected result: EQ -mixed a() { switch(1.0) { case 4.0: return 4; default: return 0; case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; } return -1; } -mixed b() { return 0; } -.... -test 2637, expected result: EQ -mixed a() { switch(1.0) { case 4.0: return 4; case 3.0: return 3; default: return 0; case 2.0: return 2; case 5.0: return 5; } return -1; } -mixed b() { return 0; } -.... -test 2638, expected result: EQ -mixed a() { switch(1.0) { case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; default: return 0; case 5.0: return 5; } return -1; } -mixed b() { return 0; } -.... -test 2639, expected result: EQ -mixed a() { switch(1.0) { case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 2640, expected result: EQ -mixed a() { switch(1.0) { case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; } return 0; } -mixed b() { return 0; } -.... -test 2641, expected result: EQ -mixed a() { switch(1.0) { default: return 0; case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; } return -1; } -mixed b() { return 0; } -.... -test 2642, expected result: EQ -mixed a() { switch(1.0) { case 4.0: return 4; default: return 0; case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; } return -1; } -mixed b() { return 0; } -.... -test 2643, expected result: EQ -mixed a() { switch(1.0) { case 4.0: return 4; case 3.0: return 3; default: return 0; case 5.0: return 5; case 2.0: return 2; } return -1; } -mixed b() { return 0; } -.... -test 2644, expected result: EQ -mixed a() { switch(1.0) { case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; default: return 0; case 2.0: return 2; } return -1; } -mixed b() { return 0; } -.... -test 2645, expected result: EQ -mixed a() { switch(1.0) { case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 2646, expected result: EQ -mixed a() { switch(1.0) { case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; } return 0; } -mixed b() { return 0; } -.... -test 2647, expected result: EQ -mixed a() { switch(1.0) { default: return 0; case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; } return -1; } -mixed b() { return 0; } -.... -test 2648, expected result: EQ -mixed a() { switch(1.0) { case 4.0: return 4; default: return 0; case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; } return -1; } -mixed b() { return 0; } -.... -test 2649, expected result: EQ -mixed a() { switch(1.0) { case 4.0: return 4; case 2.0: return 2; default: return 0; case 3.0: return 3; case 5.0: return 5; } return -1; } -mixed b() { return 0; } -.... -test 2650, expected result: EQ -mixed a() { switch(1.0) { case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; default: return 0; case 5.0: return 5; } return -1; } -mixed b() { return 0; } -.... -test 2651, expected result: EQ -mixed a() { switch(1.0) { case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 2652, expected result: EQ -mixed a() { switch(1.0) { case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; } return 0; } -mixed b() { return 0; } -.... -test 2653, expected result: EQ -mixed a() { switch(1.0) { default: return 0; case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; } return -1; } -mixed b() { return 0; } -.... -test 2654, expected result: EQ -mixed a() { switch(1.0) { case 4.0: return 4; default: return 0; case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; } return -1; } -mixed b() { return 0; } -.... -test 2655, expected result: EQ -mixed a() { switch(1.0) { case 4.0: return 4; case 2.0: return 2; default: return 0; case 5.0: return 5; case 3.0: return 3; } return -1; } -mixed b() { return 0; } -.... -test 2656, expected result: EQ -mixed a() { switch(1.0) { case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; default: return 0; case 3.0: return 3; } return -1; } -mixed b() { return 0; } -.... -test 2657, expected result: EQ -mixed a() { switch(1.0) { case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 2658, expected result: EQ -mixed a() { switch(1.0) { case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; } return 0; } -mixed b() { return 0; } -.... -test 2659, expected result: EQ -mixed a() { switch(1.0) { default: return 0; case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; } return -1; } -mixed b() { return 0; } -.... -test 2660, expected result: EQ -mixed a() { switch(1.0) { case 4.0: return 4; default: return 0; case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; } return -1; } -mixed b() { return 0; } -.... -test 2661, expected result: EQ -mixed a() { switch(1.0) { case 4.0: return 4; case 5.0: return 5; default: return 0; case 2.0: return 2; case 3.0: return 3; } return -1; } -mixed b() { return 0; } -.... -test 2662, expected result: EQ -mixed a() { switch(1.0) { case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; default: return 0; case 3.0: return 3; } return -1; } -mixed b() { return 0; } -.... -test 2663, expected result: EQ -mixed a() { switch(1.0) { case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 2664, expected result: EQ -mixed a() { switch(1.0) { case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; } return 0; } -mixed b() { return 0; } -.... -test 2665, expected result: EQ -mixed a() { switch(1.0) { default: return 0; case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; } return -1; } -mixed b() { return 0; } -.... -test 2666, expected result: EQ -mixed a() { switch(1.0) { case 4.0: return 4; default: return 0; case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; } return -1; } -mixed b() { return 0; } -.... -test 2667, expected result: EQ -mixed a() { switch(1.0) { case 4.0: return 4; case 5.0: return 5; default: return 0; case 3.0: return 3; case 2.0: return 2; } return -1; } -mixed b() { return 0; } -.... -test 2668, expected result: EQ -mixed a() { switch(1.0) { case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; default: return 0; case 2.0: return 2; } return -1; } -mixed b() { return 0; } -.... -test 2669, expected result: EQ -mixed a() { switch(1.0) { case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 2670, expected result: EQ -mixed a() { switch(1.0) { case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; } return 0; } -mixed b() { return 0; } -.... -test 2671, expected result: EQ -mixed a() { switch(1.0) { default: return 0; case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; } return -1; } -mixed b() { return 0; } -.... -test 2672, expected result: EQ -mixed a() { switch(1.0) { case 5.0: return 5; default: return 0; case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; } return -1; } -mixed b() { return 0; } -.... -test 2673, expected result: EQ -mixed a() { switch(1.0) { case 5.0: return 5; case 3.0: return 3; default: return 0; case 4.0: return 4; case 2.0: return 2; } return -1; } -mixed b() { return 0; } -.... -test 2674, expected result: EQ -mixed a() { switch(1.0) { case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; default: return 0; case 2.0: return 2; } return -1; } -mixed b() { return 0; } -.... -test 2675, expected result: EQ -mixed a() { switch(1.0) { case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 2676, expected result: EQ -mixed a() { switch(1.0) { case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; } return 0; } -mixed b() { return 0; } -.... -test 2677, expected result: EQ -mixed a() { switch(1.0) { default: return 0; case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; } return -1; } -mixed b() { return 0; } -.... -test 2678, expected result: EQ -mixed a() { switch(1.0) { case 5.0: return 5; default: return 0; case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; } return -1; } -mixed b() { return 0; } -.... -test 2679, expected result: EQ -mixed a() { switch(1.0) { case 5.0: return 5; case 3.0: return 3; default: return 0; case 2.0: return 2; case 4.0: return 4; } return -1; } -mixed b() { return 0; } -.... -test 2680, expected result: EQ -mixed a() { switch(1.0) { case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; default: return 0; case 4.0: return 4; } return -1; } -mixed b() { return 0; } -.... -test 2681, expected result: EQ -mixed a() { switch(1.0) { case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 2682, expected result: EQ -mixed a() { switch(1.0) { case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; } return 0; } -mixed b() { return 0; } -.... -test 2683, expected result: EQ -mixed a() { switch(1.0) { default: return 0; case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; } return -1; } -mixed b() { return 0; } -.... -test 2684, expected result: EQ -mixed a() { switch(1.0) { case 5.0: return 5; default: return 0; case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; } return -1; } -mixed b() { return 0; } -.... -test 2685, expected result: EQ -mixed a() { switch(1.0) { case 5.0: return 5; case 4.0: return 4; default: return 0; case 3.0: return 3; case 2.0: return 2; } return -1; } -mixed b() { return 0; } -.... -test 2686, expected result: EQ -mixed a() { switch(1.0) { case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; default: return 0; case 2.0: return 2; } return -1; } -mixed b() { return 0; } -.... -test 2687, expected result: EQ -mixed a() { switch(1.0) { case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 2688, expected result: EQ -mixed a() { switch(1.0) { case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; } return 0; } -mixed b() { return 0; } -.... -test 2689, expected result: EQ -mixed a() { switch(1.0) { default: return 0; case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; } return -1; } -mixed b() { return 0; } -.... -test 2690, expected result: EQ -mixed a() { switch(1.0) { case 5.0: return 5; default: return 0; case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; } return -1; } -mixed b() { return 0; } -.... -test 2691, expected result: EQ -mixed a() { switch(1.0) { case 5.0: return 5; case 4.0: return 4; default: return 0; case 2.0: return 2; case 3.0: return 3; } return -1; } -mixed b() { return 0; } -.... -test 2692, expected result: EQ -mixed a() { switch(1.0) { case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; default: return 0; case 3.0: return 3; } return -1; } -mixed b() { return 0; } -.... -test 2693, expected result: EQ -mixed a() { switch(1.0) { case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 2694, expected result: EQ -mixed a() { switch(1.0) { case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; } return 0; } -mixed b() { return 0; } -.... -test 2695, expected result: EQ -mixed a() { switch(1.0) { default: return 0; case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; } return -1; } -mixed b() { return 0; } -.... -test 2696, expected result: EQ -mixed a() { switch(1.0) { case 5.0: return 5; default: return 0; case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; } return -1; } -mixed b() { return 0; } -.... -test 2697, expected result: EQ -mixed a() { switch(1.0) { case 5.0: return 5; case 2.0: return 2; default: return 0; case 4.0: return 4; case 3.0: return 3; } return -1; } -mixed b() { return 0; } -.... -test 2698, expected result: EQ -mixed a() { switch(1.0) { case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; default: return 0; case 3.0: return 3; } return -1; } -mixed b() { return 0; } -.... -test 2699, expected result: EQ -mixed a() { switch(1.0) { case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 2700, expected result: EQ -mixed a() { switch(1.0) { case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; } return 0; } -mixed b() { return 0; } -.... -test 2701, expected result: EQ -mixed a() { switch(1.0) { default: return 0; case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; } return -1; } -mixed b() { return 0; } -.... -test 2702, expected result: EQ -mixed a() { switch(1.0) { case 5.0: return 5; default: return 0; case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; } return -1; } -mixed b() { return 0; } -.... -test 2703, expected result: EQ -mixed a() { switch(1.0) { case 5.0: return 5; case 2.0: return 2; default: return 0; case 3.0: return 3; case 4.0: return 4; } return -1; } -mixed b() { return 0; } -.... -test 2704, expected result: EQ -mixed a() { switch(1.0) { case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; default: return 0; case 4.0: return 4; } return -1; } -mixed b() { return 0; } -.... -test 2705, expected result: EQ -mixed a() { switch(1.0) { case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 2706, expected result: EQ -mixed a() { switch(2.0) { case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; } return 0; } -mixed b() { return 2; } -.... -test 2707, expected result: EQ -mixed a() { switch(2.0) { default: return 0; case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; } return -1; } -mixed b() { return 2; } -.... -test 2708, expected result: EQ -mixed a() { switch(2.0) { case 2.0: return 2; default: return 0; case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; } return -1; } -mixed b() { return 2; } -.... -test 2709, expected result: EQ -mixed a() { switch(2.0) { case 2.0: return 2; case 3.0: return 3; default: return 0; case 4.0: return 4; case 5.0: return 5; } return -1; } -mixed b() { return 2; } -.... -test 2710, expected result: EQ -mixed a() { switch(2.0) { case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; default: return 0; case 5.0: return 5; } return -1; } -mixed b() { return 2; } -.... -test 2711, expected result: EQ -mixed a() { switch(2.0) { case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 2712, expected result: EQ -mixed a() { switch(2.0) { case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; } return 0; } -mixed b() { return 2; } -.... -test 2713, expected result: EQ -mixed a() { switch(2.0) { default: return 0; case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; } return -1; } -mixed b() { return 2; } -.... -test 2714, expected result: EQ -mixed a() { switch(2.0) { case 2.0: return 2; default: return 0; case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; } return -1; } -mixed b() { return 2; } -.... -test 2715, expected result: EQ -mixed a() { switch(2.0) { case 2.0: return 2; case 3.0: return 3; default: return 0; case 5.0: return 5; case 4.0: return 4; } return -1; } -mixed b() { return 2; } -.... -test 2716, expected result: EQ -mixed a() { switch(2.0) { case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; default: return 0; case 4.0: return 4; } return -1; } -mixed b() { return 2; } -.... -test 2717, expected result: EQ -mixed a() { switch(2.0) { case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 2718, expected result: EQ -mixed a() { switch(2.0) { case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; } return 0; } -mixed b() { return 2; } -.... -test 2719, expected result: EQ -mixed a() { switch(2.0) { default: return 0; case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; } return -1; } -mixed b() { return 2; } -.... -test 2720, expected result: EQ -mixed a() { switch(2.0) { case 2.0: return 2; default: return 0; case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; } return -1; } -mixed b() { return 2; } -.... -test 2721, expected result: EQ -mixed a() { switch(2.0) { case 2.0: return 2; case 4.0: return 4; default: return 0; case 3.0: return 3; case 5.0: return 5; } return -1; } -mixed b() { return 2; } -.... -test 2722, expected result: EQ -mixed a() { switch(2.0) { case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; default: return 0; case 5.0: return 5; } return -1; } -mixed b() { return 2; } -.... -test 2723, expected result: EQ -mixed a() { switch(2.0) { case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 2724, expected result: EQ -mixed a() { switch(2.0) { case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; } return 0; } -mixed b() { return 2; } -.... -test 2725, expected result: EQ -mixed a() { switch(2.0) { default: return 0; case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; } return -1; } -mixed b() { return 2; } -.... -test 2726, expected result: EQ -mixed a() { switch(2.0) { case 2.0: return 2; default: return 0; case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; } return -1; } -mixed b() { return 2; } -.... -test 2727, expected result: EQ -mixed a() { switch(2.0) { case 2.0: return 2; case 4.0: return 4; default: return 0; case 5.0: return 5; case 3.0: return 3; } return -1; } -mixed b() { return 2; } -.... -test 2728, expected result: EQ -mixed a() { switch(2.0) { case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; default: return 0; case 3.0: return 3; } return -1; } -mixed b() { return 2; } -.... -test 2729, expected result: EQ -mixed a() { switch(2.0) { case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 2730, expected result: EQ -mixed a() { switch(2.0) { case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; } return 0; } -mixed b() { return 2; } -.... -test 2731, expected result: EQ -mixed a() { switch(2.0) { default: return 0; case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; } return -1; } -mixed b() { return 2; } -.... -test 2732, expected result: EQ -mixed a() { switch(2.0) { case 2.0: return 2; default: return 0; case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; } return -1; } -mixed b() { return 2; } -.... -test 2733, expected result: EQ -mixed a() { switch(2.0) { case 2.0: return 2; case 5.0: return 5; default: return 0; case 4.0: return 4; case 3.0: return 3; } return -1; } -mixed b() { return 2; } -.... -test 2734, expected result: EQ -mixed a() { switch(2.0) { case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; default: return 0; case 3.0: return 3; } return -1; } -mixed b() { return 2; } -.... -test 2735, expected result: EQ -mixed a() { switch(2.0) { case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 2736, expected result: EQ -mixed a() { switch(2.0) { case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; } return 0; } -mixed b() { return 2; } -.... -test 2737, expected result: EQ -mixed a() { switch(2.0) { default: return 0; case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; } return -1; } -mixed b() { return 2; } -.... -test 2738, expected result: EQ -mixed a() { switch(2.0) { case 2.0: return 2; default: return 0; case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; } return -1; } -mixed b() { return 2; } -.... -test 2739, expected result: EQ -mixed a() { switch(2.0) { case 2.0: return 2; case 5.0: return 5; default: return 0; case 3.0: return 3; case 4.0: return 4; } return -1; } -mixed b() { return 2; } -.... -test 2740, expected result: EQ -mixed a() { switch(2.0) { case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; default: return 0; case 4.0: return 4; } return -1; } -mixed b() { return 2; } -.... -test 2741, expected result: EQ -mixed a() { switch(2.0) { case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 2742, expected result: EQ -mixed a() { switch(2.0) { case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; } return 0; } -mixed b() { return 2; } -.... -test 2743, expected result: EQ -mixed a() { switch(2.0) { default: return 0; case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; } return -1; } -mixed b() { return 2; } -.... -test 2744, expected result: EQ -mixed a() { switch(2.0) { case 3.0: return 3; default: return 0; case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; } return -1; } -mixed b() { return 2; } -.... -test 2745, expected result: EQ -mixed a() { switch(2.0) { case 3.0: return 3; case 2.0: return 2; default: return 0; case 4.0: return 4; case 5.0: return 5; } return -1; } -mixed b() { return 2; } -.... -test 2746, expected result: EQ -mixed a() { switch(2.0) { case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; default: return 0; case 5.0: return 5; } return -1; } -mixed b() { return 2; } -.... -test 2747, expected result: EQ -mixed a() { switch(2.0) { case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 2748, expected result: EQ -mixed a() { switch(2.0) { case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; } return 0; } -mixed b() { return 2; } -.... -test 2749, expected result: EQ -mixed a() { switch(2.0) { default: return 0; case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; } return -1; } -mixed b() { return 2; } -.... -test 2750, expected result: EQ -mixed a() { switch(2.0) { case 3.0: return 3; default: return 0; case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; } return -1; } -mixed b() { return 2; } -.... -test 2751, expected result: EQ -mixed a() { switch(2.0) { case 3.0: return 3; case 2.0: return 2; default: return 0; case 5.0: return 5; case 4.0: return 4; } return -1; } -mixed b() { return 2; } -.... -test 2752, expected result: EQ -mixed a() { switch(2.0) { case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; default: return 0; case 4.0: return 4; } return -1; } -mixed b() { return 2; } -.... -test 2753, expected result: EQ -mixed a() { switch(2.0) { case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 2754, expected result: EQ -mixed a() { switch(2.0) { case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; } return 0; } -mixed b() { return 2; } -.... -test 2755, expected result: EQ -mixed a() { switch(2.0) { default: return 0; case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; } return -1; } -mixed b() { return 2; } -.... -test 2756, expected result: EQ -mixed a() { switch(2.0) { case 3.0: return 3; default: return 0; case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; } return -1; } -mixed b() { return 2; } -.... -test 2757, expected result: EQ -mixed a() { switch(2.0) { case 3.0: return 3; case 4.0: return 4; default: return 0; case 2.0: return 2; case 5.0: return 5; } return -1; } -mixed b() { return 2; } -.... -test 2758, expected result: EQ -mixed a() { switch(2.0) { case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; default: return 0; case 5.0: return 5; } return -1; } -mixed b() { return 2; } -.... -test 2759, expected result: EQ -mixed a() { switch(2.0) { case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 2760, expected result: EQ -mixed a() { switch(2.0) { case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; } return 0; } -mixed b() { return 2; } -.... -test 2761, expected result: EQ -mixed a() { switch(2.0) { default: return 0; case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; } return -1; } -mixed b() { return 2; } -.... -test 2762, expected result: EQ -mixed a() { switch(2.0) { case 3.0: return 3; default: return 0; case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; } return -1; } -mixed b() { return 2; } -.... -test 2763, expected result: EQ -mixed a() { switch(2.0) { case 3.0: return 3; case 4.0: return 4; default: return 0; case 5.0: return 5; case 2.0: return 2; } return -1; } -mixed b() { return 2; } -.... -test 2764, expected result: EQ -mixed a() { switch(2.0) { case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; default: return 0; case 2.0: return 2; } return -1; } -mixed b() { return 2; } -.... -test 2765, expected result: EQ -mixed a() { switch(2.0) { case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 2766, expected result: EQ -mixed a() { switch(2.0) { case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; } return 0; } -mixed b() { return 2; } -.... -test 2767, expected result: EQ -mixed a() { switch(2.0) { default: return 0; case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; } return -1; } -mixed b() { return 2; } -.... -test 2768, expected result: EQ -mixed a() { switch(2.0) { case 3.0: return 3; default: return 0; case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; } return -1; } -mixed b() { return 2; } -.... -test 2769, expected result: EQ -mixed a() { switch(2.0) { case 3.0: return 3; case 5.0: return 5; default: return 0; case 4.0: return 4; case 2.0: return 2; } return -1; } -mixed b() { return 2; } -.... -test 2770, expected result: EQ -mixed a() { switch(2.0) { case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; default: return 0; case 2.0: return 2; } return -1; } -mixed b() { return 2; } -.... -test 2771, expected result: EQ -mixed a() { switch(2.0) { case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 2772, expected result: EQ -mixed a() { switch(2.0) { case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; } return 0; } -mixed b() { return 2; } -.... -test 2773, expected result: EQ -mixed a() { switch(2.0) { default: return 0; case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; } return -1; } -mixed b() { return 2; } -.... -test 2774, expected result: EQ -mixed a() { switch(2.0) { case 3.0: return 3; default: return 0; case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; } return -1; } -mixed b() { return 2; } -.... -test 2775, expected result: EQ -mixed a() { switch(2.0) { case 3.0: return 3; case 5.0: return 5; default: return 0; case 2.0: return 2; case 4.0: return 4; } return -1; } -mixed b() { return 2; } -.... -test 2776, expected result: EQ -mixed a() { switch(2.0) { case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; default: return 0; case 4.0: return 4; } return -1; } -mixed b() { return 2; } -.... -test 2777, expected result: EQ -mixed a() { switch(2.0) { case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 2778, expected result: EQ -mixed a() { switch(2.0) { case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; } return 0; } -mixed b() { return 2; } -.... -test 2779, expected result: EQ -mixed a() { switch(2.0) { default: return 0; case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; } return -1; } -mixed b() { return 2; } -.... -test 2780, expected result: EQ -mixed a() { switch(2.0) { case 4.0: return 4; default: return 0; case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; } return -1; } -mixed b() { return 2; } -.... -test 2781, expected result: EQ -mixed a() { switch(2.0) { case 4.0: return 4; case 3.0: return 3; default: return 0; case 2.0: return 2; case 5.0: return 5; } return -1; } -mixed b() { return 2; } -.... -test 2782, expected result: EQ -mixed a() { switch(2.0) { case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; default: return 0; case 5.0: return 5; } return -1; } -mixed b() { return 2; } -.... -test 2783, expected result: EQ -mixed a() { switch(2.0) { case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 2784, expected result: EQ -mixed a() { switch(2.0) { case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; } return 0; } -mixed b() { return 2; } -.... -test 2785, expected result: EQ -mixed a() { switch(2.0) { default: return 0; case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; } return -1; } -mixed b() { return 2; } -.... -test 2786, expected result: EQ -mixed a() { switch(2.0) { case 4.0: return 4; default: return 0; case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; } return -1; } -mixed b() { return 2; } -.... -test 2787, expected result: EQ -mixed a() { switch(2.0) { case 4.0: return 4; case 3.0: return 3; default: return 0; case 5.0: return 5; case 2.0: return 2; } return -1; } -mixed b() { return 2; } -.... -test 2788, expected result: EQ -mixed a() { switch(2.0) { case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; default: return 0; case 2.0: return 2; } return -1; } -mixed b() { return 2; } -.... -test 2789, expected result: EQ -mixed a() { switch(2.0) { case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 2790, expected result: EQ -mixed a() { switch(2.0) { case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; } return 0; } -mixed b() { return 2; } -.... -test 2791, expected result: EQ -mixed a() { switch(2.0) { default: return 0; case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; } return -1; } -mixed b() { return 2; } -.... -test 2792, expected result: EQ -mixed a() { switch(2.0) { case 4.0: return 4; default: return 0; case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; } return -1; } -mixed b() { return 2; } -.... -test 2793, expected result: EQ -mixed a() { switch(2.0) { case 4.0: return 4; case 2.0: return 2; default: return 0; case 3.0: return 3; case 5.0: return 5; } return -1; } -mixed b() { return 2; } -.... -test 2794, expected result: EQ -mixed a() { switch(2.0) { case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; default: return 0; case 5.0: return 5; } return -1; } -mixed b() { return 2; } -.... -test 2795, expected result: EQ -mixed a() { switch(2.0) { case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 2796, expected result: EQ -mixed a() { switch(2.0) { case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; } return 0; } -mixed b() { return 2; } -.... -test 2797, expected result: EQ -mixed a() { switch(2.0) { default: return 0; case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; } return -1; } -mixed b() { return 2; } -.... -test 2798, expected result: EQ -mixed a() { switch(2.0) { case 4.0: return 4; default: return 0; case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; } return -1; } -mixed b() { return 2; } -.... -test 2799, expected result: EQ -mixed a() { switch(2.0) { case 4.0: return 4; case 2.0: return 2; default: return 0; case 5.0: return 5; case 3.0: return 3; } return -1; } -mixed b() { return 2; } -.... -test 2800, expected result: EQ -mixed a() { switch(2.0) { case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; default: return 0; case 3.0: return 3; } return -1; } -mixed b() { return 2; } -.... -test 2801, expected result: EQ -mixed a() { switch(2.0) { case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 2802, expected result: EQ -mixed a() { switch(2.0) { case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; } return 0; } -mixed b() { return 2; } -.... -test 2803, expected result: EQ -mixed a() { switch(2.0) { default: return 0; case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; } return -1; } -mixed b() { return 2; } -.... -test 2804, expected result: EQ -mixed a() { switch(2.0) { case 4.0: return 4; default: return 0; case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; } return -1; } -mixed b() { return 2; } -.... -test 2805, expected result: EQ -mixed a() { switch(2.0) { case 4.0: return 4; case 5.0: return 5; default: return 0; case 2.0: return 2; case 3.0: return 3; } return -1; } -mixed b() { return 2; } -.... -test 2806, expected result: EQ -mixed a() { switch(2.0) { case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; default: return 0; case 3.0: return 3; } return -1; } -mixed b() { return 2; } -.... -test 2807, expected result: EQ -mixed a() { switch(2.0) { case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 2808, expected result: EQ -mixed a() { switch(2.0) { case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; } return 0; } -mixed b() { return 2; } -.... -test 2809, expected result: EQ -mixed a() { switch(2.0) { default: return 0; case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; } return -1; } -mixed b() { return 2; } -.... -test 2810, expected result: EQ -mixed a() { switch(2.0) { case 4.0: return 4; default: return 0; case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; } return -1; } -mixed b() { return 2; } -.... -test 2811, expected result: EQ -mixed a() { switch(2.0) { case 4.0: return 4; case 5.0: return 5; default: return 0; case 3.0: return 3; case 2.0: return 2; } return -1; } -mixed b() { return 2; } -.... -test 2812, expected result: EQ -mixed a() { switch(2.0) { case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; default: return 0; case 2.0: return 2; } return -1; } -mixed b() { return 2; } -.... -test 2813, expected result: EQ -mixed a() { switch(2.0) { case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 2814, expected result: EQ -mixed a() { switch(2.0) { case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; } return 0; } -mixed b() { return 2; } -.... -test 2815, expected result: EQ -mixed a() { switch(2.0) { default: return 0; case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; } return -1; } -mixed b() { return 2; } -.... -test 2816, expected result: EQ -mixed a() { switch(2.0) { case 5.0: return 5; default: return 0; case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; } return -1; } -mixed b() { return 2; } -.... -test 2817, expected result: EQ -mixed a() { switch(2.0) { case 5.0: return 5; case 3.0: return 3; default: return 0; case 4.0: return 4; case 2.0: return 2; } return -1; } -mixed b() { return 2; } -.... -test 2818, expected result: EQ -mixed a() { switch(2.0) { case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; default: return 0; case 2.0: return 2; } return -1; } -mixed b() { return 2; } -.... -test 2819, expected result: EQ -mixed a() { switch(2.0) { case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 2820, expected result: EQ -mixed a() { switch(2.0) { case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; } return 0; } -mixed b() { return 2; } -.... -test 2821, expected result: EQ -mixed a() { switch(2.0) { default: return 0; case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; } return -1; } -mixed b() { return 2; } -.... -test 2822, expected result: EQ -mixed a() { switch(2.0) { case 5.0: return 5; default: return 0; case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; } return -1; } -mixed b() { return 2; } -.... -test 2823, expected result: EQ -mixed a() { switch(2.0) { case 5.0: return 5; case 3.0: return 3; default: return 0; case 2.0: return 2; case 4.0: return 4; } return -1; } -mixed b() { return 2; } -.... -test 2824, expected result: EQ -mixed a() { switch(2.0) { case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; default: return 0; case 4.0: return 4; } return -1; } -mixed b() { return 2; } -.... -test 2825, expected result: EQ -mixed a() { switch(2.0) { case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 2826, expected result: EQ -mixed a() { switch(2.0) { case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; } return 0; } -mixed b() { return 2; } -.... -test 2827, expected result: EQ -mixed a() { switch(2.0) { default: return 0; case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; } return -1; } -mixed b() { return 2; } -.... -test 2828, expected result: EQ -mixed a() { switch(2.0) { case 5.0: return 5; default: return 0; case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; } return -1; } -mixed b() { return 2; } -.... -test 2829, expected result: EQ -mixed a() { switch(2.0) { case 5.0: return 5; case 4.0: return 4; default: return 0; case 3.0: return 3; case 2.0: return 2; } return -1; } -mixed b() { return 2; } -.... -test 2830, expected result: EQ -mixed a() { switch(2.0) { case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; default: return 0; case 2.0: return 2; } return -1; } -mixed b() { return 2; } -.... -test 2831, expected result: EQ -mixed a() { switch(2.0) { case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 2832, expected result: EQ -mixed a() { switch(2.0) { case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; } return 0; } -mixed b() { return 2; } -.... -test 2833, expected result: EQ -mixed a() { switch(2.0) { default: return 0; case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; } return -1; } -mixed b() { return 2; } -.... -test 2834, expected result: EQ -mixed a() { switch(2.0) { case 5.0: return 5; default: return 0; case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; } return -1; } -mixed b() { return 2; } -.... -test 2835, expected result: EQ -mixed a() { switch(2.0) { case 5.0: return 5; case 4.0: return 4; default: return 0; case 2.0: return 2; case 3.0: return 3; } return -1; } -mixed b() { return 2; } -.... -test 2836, expected result: EQ -mixed a() { switch(2.0) { case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; default: return 0; case 3.0: return 3; } return -1; } -mixed b() { return 2; } -.... -test 2837, expected result: EQ -mixed a() { switch(2.0) { case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 2838, expected result: EQ -mixed a() { switch(2.0) { case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; } return 0; } -mixed b() { return 2; } -.... -test 2839, expected result: EQ -mixed a() { switch(2.0) { default: return 0; case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; } return -1; } -mixed b() { return 2; } -.... -test 2840, expected result: EQ -mixed a() { switch(2.0) { case 5.0: return 5; default: return 0; case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; } return -1; } -mixed b() { return 2; } -.... -test 2841, expected result: EQ -mixed a() { switch(2.0) { case 5.0: return 5; case 2.0: return 2; default: return 0; case 4.0: return 4; case 3.0: return 3; } return -1; } -mixed b() { return 2; } -.... -test 2842, expected result: EQ -mixed a() { switch(2.0) { case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; default: return 0; case 3.0: return 3; } return -1; } -mixed b() { return 2; } -.... -test 2843, expected result: EQ -mixed a() { switch(2.0) { case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 2844, expected result: EQ -mixed a() { switch(2.0) { case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; } return 0; } -mixed b() { return 2; } -.... -test 2845, expected result: EQ -mixed a() { switch(2.0) { default: return 0; case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; } return -1; } -mixed b() { return 2; } -.... -test 2846, expected result: EQ -mixed a() { switch(2.0) { case 5.0: return 5; default: return 0; case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; } return -1; } -mixed b() { return 2; } -.... -test 2847, expected result: EQ -mixed a() { switch(2.0) { case 5.0: return 5; case 2.0: return 2; default: return 0; case 3.0: return 3; case 4.0: return 4; } return -1; } -mixed b() { return 2; } -.... -test 2848, expected result: EQ -mixed a() { switch(2.0) { case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; default: return 0; case 4.0: return 4; } return -1; } -mixed b() { return 2; } -.... -test 2849, expected result: EQ -mixed a() { switch(2.0) { case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 2850, expected result: EQ -mixed a() { switch(3.0) { case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; } return 0; } -mixed b() { return 3; } -.... -test 2851, expected result: EQ -mixed a() { switch(3.0) { default: return 0; case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; } return -1; } -mixed b() { return 3; } -.... -test 2852, expected result: EQ -mixed a() { switch(3.0) { case 2.0: return 2; default: return 0; case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; } return -1; } -mixed b() { return 3; } -.... -test 2853, expected result: EQ -mixed a() { switch(3.0) { case 2.0: return 2; case 3.0: return 3; default: return 0; case 4.0: return 4; case 5.0: return 5; } return -1; } -mixed b() { return 3; } -.... -test 2854, expected result: EQ -mixed a() { switch(3.0) { case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; default: return 0; case 5.0: return 5; } return -1; } -mixed b() { return 3; } -.... -test 2855, expected result: EQ -mixed a() { switch(3.0) { case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 2856, expected result: EQ -mixed a() { switch(3.0) { case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; } return 0; } -mixed b() { return 3; } -.... -test 2857, expected result: EQ -mixed a() { switch(3.0) { default: return 0; case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; } return -1; } -mixed b() { return 3; } -.... -test 2858, expected result: EQ -mixed a() { switch(3.0) { case 2.0: return 2; default: return 0; case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; } return -1; } -mixed b() { return 3; } -.... -test 2859, expected result: EQ -mixed a() { switch(3.0) { case 2.0: return 2; case 3.0: return 3; default: return 0; case 5.0: return 5; case 4.0: return 4; } return -1; } -mixed b() { return 3; } -.... -test 2860, expected result: EQ -mixed a() { switch(3.0) { case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; default: return 0; case 4.0: return 4; } return -1; } -mixed b() { return 3; } -.... -test 2861, expected result: EQ -mixed a() { switch(3.0) { case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 2862, expected result: EQ -mixed a() { switch(3.0) { case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; } return 0; } -mixed b() { return 3; } -.... -test 2863, expected result: EQ -mixed a() { switch(3.0) { default: return 0; case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; } return -1; } -mixed b() { return 3; } -.... -test 2864, expected result: EQ -mixed a() { switch(3.0) { case 2.0: return 2; default: return 0; case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; } return -1; } -mixed b() { return 3; } -.... -test 2865, expected result: EQ -mixed a() { switch(3.0) { case 2.0: return 2; case 4.0: return 4; default: return 0; case 3.0: return 3; case 5.0: return 5; } return -1; } -mixed b() { return 3; } -.... -test 2866, expected result: EQ -mixed a() { switch(3.0) { case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; default: return 0; case 5.0: return 5; } return -1; } -mixed b() { return 3; } -.... -test 2867, expected result: EQ -mixed a() { switch(3.0) { case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 2868, expected result: EQ -mixed a() { switch(3.0) { case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; } return 0; } -mixed b() { return 3; } -.... -test 2869, expected result: EQ -mixed a() { switch(3.0) { default: return 0; case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; } return -1; } -mixed b() { return 3; } -.... -test 2870, expected result: EQ -mixed a() { switch(3.0) { case 2.0: return 2; default: return 0; case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; } return -1; } -mixed b() { return 3; } -.... -test 2871, expected result: EQ -mixed a() { switch(3.0) { case 2.0: return 2; case 4.0: return 4; default: return 0; case 5.0: return 5; case 3.0: return 3; } return -1; } -mixed b() { return 3; } -.... -test 2872, expected result: EQ -mixed a() { switch(3.0) { case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; default: return 0; case 3.0: return 3; } return -1; } -mixed b() { return 3; } -.... -test 2873, expected result: EQ -mixed a() { switch(3.0) { case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 2874, expected result: EQ -mixed a() { switch(3.0) { case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; } return 0; } -mixed b() { return 3; } -.... -test 2875, expected result: EQ -mixed a() { switch(3.0) { default: return 0; case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; } return -1; } -mixed b() { return 3; } -.... -test 2876, expected result: EQ -mixed a() { switch(3.0) { case 2.0: return 2; default: return 0; case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; } return -1; } -mixed b() { return 3; } -.... -test 2877, expected result: EQ -mixed a() { switch(3.0) { case 2.0: return 2; case 5.0: return 5; default: return 0; case 4.0: return 4; case 3.0: return 3; } return -1; } -mixed b() { return 3; } -.... -test 2878, expected result: EQ -mixed a() { switch(3.0) { case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; default: return 0; case 3.0: return 3; } return -1; } -mixed b() { return 3; } -.... -test 2879, expected result: EQ -mixed a() { switch(3.0) { case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 2880, expected result: EQ -mixed a() { switch(3.0) { case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; } return 0; } -mixed b() { return 3; } -.... -test 2881, expected result: EQ -mixed a() { switch(3.0) { default: return 0; case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; } return -1; } -mixed b() { return 3; } -.... -test 2882, expected result: EQ -mixed a() { switch(3.0) { case 2.0: return 2; default: return 0; case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; } return -1; } -mixed b() { return 3; } -.... -test 2883, expected result: EQ -mixed a() { switch(3.0) { case 2.0: return 2; case 5.0: return 5; default: return 0; case 3.0: return 3; case 4.0: return 4; } return -1; } -mixed b() { return 3; } -.... -test 2884, expected result: EQ -mixed a() { switch(3.0) { case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; default: return 0; case 4.0: return 4; } return -1; } -mixed b() { return 3; } -.... -test 2885, expected result: EQ -mixed a() { switch(3.0) { case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 2886, expected result: EQ -mixed a() { switch(3.0) { case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; } return 0; } -mixed b() { return 3; } -.... -test 2887, expected result: EQ -mixed a() { switch(3.0) { default: return 0; case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; } return -1; } -mixed b() { return 3; } -.... -test 2888, expected result: EQ -mixed a() { switch(3.0) { case 3.0: return 3; default: return 0; case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; } return -1; } -mixed b() { return 3; } -.... -test 2889, expected result: EQ -mixed a() { switch(3.0) { case 3.0: return 3; case 2.0: return 2; default: return 0; case 4.0: return 4; case 5.0: return 5; } return -1; } -mixed b() { return 3; } -.... -test 2890, expected result: EQ -mixed a() { switch(3.0) { case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; default: return 0; case 5.0: return 5; } return -1; } -mixed b() { return 3; } -.... -test 2891, expected result: EQ -mixed a() { switch(3.0) { case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 2892, expected result: EQ -mixed a() { switch(3.0) { case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; } return 0; } -mixed b() { return 3; } -.... -test 2893, expected result: EQ -mixed a() { switch(3.0) { default: return 0; case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; } return -1; } -mixed b() { return 3; } -.... -test 2894, expected result: EQ -mixed a() { switch(3.0) { case 3.0: return 3; default: return 0; case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; } return -1; } -mixed b() { return 3; } -.... -test 2895, expected result: EQ -mixed a() { switch(3.0) { case 3.0: return 3; case 2.0: return 2; default: return 0; case 5.0: return 5; case 4.0: return 4; } return -1; } -mixed b() { return 3; } -.... -test 2896, expected result: EQ -mixed a() { switch(3.0) { case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; default: return 0; case 4.0: return 4; } return -1; } -mixed b() { return 3; } -.... -test 2897, expected result: EQ -mixed a() { switch(3.0) { case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 2898, expected result: EQ -mixed a() { switch(3.0) { case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; } return 0; } -mixed b() { return 3; } -.... -test 2899, expected result: EQ -mixed a() { switch(3.0) { default: return 0; case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; } return -1; } -mixed b() { return 3; } -.... -test 2900, expected result: EQ -mixed a() { switch(3.0) { case 3.0: return 3; default: return 0; case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; } return -1; } -mixed b() { return 3; } -.... -test 2901, expected result: EQ -mixed a() { switch(3.0) { case 3.0: return 3; case 4.0: return 4; default: return 0; case 2.0: return 2; case 5.0: return 5; } return -1; } -mixed b() { return 3; } -.... -test 2902, expected result: EQ -mixed a() { switch(3.0) { case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; default: return 0; case 5.0: return 5; } return -1; } -mixed b() { return 3; } -.... -test 2903, expected result: EQ -mixed a() { switch(3.0) { case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 2904, expected result: EQ -mixed a() { switch(3.0) { case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; } return 0; } -mixed b() { return 3; } -.... -test 2905, expected result: EQ -mixed a() { switch(3.0) { default: return 0; case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; } return -1; } -mixed b() { return 3; } -.... -test 2906, expected result: EQ -mixed a() { switch(3.0) { case 3.0: return 3; default: return 0; case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; } return -1; } -mixed b() { return 3; } -.... -test 2907, expected result: EQ -mixed a() { switch(3.0) { case 3.0: return 3; case 4.0: return 4; default: return 0; case 5.0: return 5; case 2.0: return 2; } return -1; } -mixed b() { return 3; } -.... -test 2908, expected result: EQ -mixed a() { switch(3.0) { case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; default: return 0; case 2.0: return 2; } return -1; } -mixed b() { return 3; } -.... -test 2909, expected result: EQ -mixed a() { switch(3.0) { case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 2910, expected result: EQ -mixed a() { switch(3.0) { case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; } return 0; } -mixed b() { return 3; } -.... -test 2911, expected result: EQ -mixed a() { switch(3.0) { default: return 0; case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; } return -1; } -mixed b() { return 3; } -.... -test 2912, expected result: EQ -mixed a() { switch(3.0) { case 3.0: return 3; default: return 0; case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; } return -1; } -mixed b() { return 3; } -.... -test 2913, expected result: EQ -mixed a() { switch(3.0) { case 3.0: return 3; case 5.0: return 5; default: return 0; case 4.0: return 4; case 2.0: return 2; } return -1; } -mixed b() { return 3; } -.... -test 2914, expected result: EQ -mixed a() { switch(3.0) { case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; default: return 0; case 2.0: return 2; } return -1; } -mixed b() { return 3; } -.... -test 2915, expected result: EQ -mixed a() { switch(3.0) { case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 2916, expected result: EQ -mixed a() { switch(3.0) { case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; } return 0; } -mixed b() { return 3; } -.... -test 2917, expected result: EQ -mixed a() { switch(3.0) { default: return 0; case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; } return -1; } -mixed b() { return 3; } -.... -test 2918, expected result: EQ -mixed a() { switch(3.0) { case 3.0: return 3; default: return 0; case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; } return -1; } -mixed b() { return 3; } -.... -test 2919, expected result: EQ -mixed a() { switch(3.0) { case 3.0: return 3; case 5.0: return 5; default: return 0; case 2.0: return 2; case 4.0: return 4; } return -1; } -mixed b() { return 3; } -.... -test 2920, expected result: EQ -mixed a() { switch(3.0) { case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; default: return 0; case 4.0: return 4; } return -1; } -mixed b() { return 3; } -.... -test 2921, expected result: EQ -mixed a() { switch(3.0) { case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 2922, expected result: EQ -mixed a() { switch(3.0) { case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; } return 0; } -mixed b() { return 3; } -.... -test 2923, expected result: EQ -mixed a() { switch(3.0) { default: return 0; case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; } return -1; } -mixed b() { return 3; } -.... -test 2924, expected result: EQ -mixed a() { switch(3.0) { case 4.0: return 4; default: return 0; case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; } return -1; } -mixed b() { return 3; } -.... -test 2925, expected result: EQ -mixed a() { switch(3.0) { case 4.0: return 4; case 3.0: return 3; default: return 0; case 2.0: return 2; case 5.0: return 5; } return -1; } -mixed b() { return 3; } -.... -test 2926, expected result: EQ -mixed a() { switch(3.0) { case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; default: return 0; case 5.0: return 5; } return -1; } -mixed b() { return 3; } -.... -test 2927, expected result: EQ -mixed a() { switch(3.0) { case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 2928, expected result: EQ -mixed a() { switch(3.0) { case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; } return 0; } -mixed b() { return 3; } -.... -test 2929, expected result: EQ -mixed a() { switch(3.0) { default: return 0; case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; } return -1; } -mixed b() { return 3; } -.... -test 2930, expected result: EQ -mixed a() { switch(3.0) { case 4.0: return 4; default: return 0; case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; } return -1; } -mixed b() { return 3; } -.... -test 2931, expected result: EQ -mixed a() { switch(3.0) { case 4.0: return 4; case 3.0: return 3; default: return 0; case 5.0: return 5; case 2.0: return 2; } return -1; } -mixed b() { return 3; } -.... -test 2932, expected result: EQ -mixed a() { switch(3.0) { case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; default: return 0; case 2.0: return 2; } return -1; } -mixed b() { return 3; } -.... -test 2933, expected result: EQ -mixed a() { switch(3.0) { case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 2934, expected result: EQ -mixed a() { switch(3.0) { case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; } return 0; } -mixed b() { return 3; } -.... -test 2935, expected result: EQ -mixed a() { switch(3.0) { default: return 0; case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; } return -1; } -mixed b() { return 3; } -.... -test 2936, expected result: EQ -mixed a() { switch(3.0) { case 4.0: return 4; default: return 0; case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; } return -1; } -mixed b() { return 3; } -.... -test 2937, expected result: EQ -mixed a() { switch(3.0) { case 4.0: return 4; case 2.0: return 2; default: return 0; case 3.0: return 3; case 5.0: return 5; } return -1; } -mixed b() { return 3; } -.... -test 2938, expected result: EQ -mixed a() { switch(3.0) { case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; default: return 0; case 5.0: return 5; } return -1; } -mixed b() { return 3; } -.... -test 2939, expected result: EQ -mixed a() { switch(3.0) { case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 2940, expected result: EQ -mixed a() { switch(3.0) { case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; } return 0; } -mixed b() { return 3; } -.... -test 2941, expected result: EQ -mixed a() { switch(3.0) { default: return 0; case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; } return -1; } -mixed b() { return 3; } -.... -test 2942, expected result: EQ -mixed a() { switch(3.0) { case 4.0: return 4; default: return 0; case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; } return -1; } -mixed b() { return 3; } -.... -test 2943, expected result: EQ -mixed a() { switch(3.0) { case 4.0: return 4; case 2.0: return 2; default: return 0; case 5.0: return 5; case 3.0: return 3; } return -1; } -mixed b() { return 3; } -.... -test 2944, expected result: EQ -mixed a() { switch(3.0) { case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; default: return 0; case 3.0: return 3; } return -1; } -mixed b() { return 3; } -.... -test 2945, expected result: EQ -mixed a() { switch(3.0) { case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 2946, expected result: EQ -mixed a() { switch(3.0) { case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; } return 0; } -mixed b() { return 3; } -.... -test 2947, expected result: EQ -mixed a() { switch(3.0) { default: return 0; case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; } return -1; } -mixed b() { return 3; } -.... -test 2948, expected result: EQ -mixed a() { switch(3.0) { case 4.0: return 4; default: return 0; case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; } return -1; } -mixed b() { return 3; } -.... -test 2949, expected result: EQ -mixed a() { switch(3.0) { case 4.0: return 4; case 5.0: return 5; default: return 0; case 2.0: return 2; case 3.0: return 3; } return -1; } -mixed b() { return 3; } -.... -test 2950, expected result: EQ -mixed a() { switch(3.0) { case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; default: return 0; case 3.0: return 3; } return -1; } -mixed b() { return 3; } -.... -test 2951, expected result: EQ -mixed a() { switch(3.0) { case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 2952, expected result: EQ -mixed a() { switch(3.0) { case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; } return 0; } -mixed b() { return 3; } -.... -test 2953, expected result: EQ -mixed a() { switch(3.0) { default: return 0; case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; } return -1; } -mixed b() { return 3; } -.... -test 2954, expected result: EQ -mixed a() { switch(3.0) { case 4.0: return 4; default: return 0; case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; } return -1; } -mixed b() { return 3; } -.... -test 2955, expected result: EQ -mixed a() { switch(3.0) { case 4.0: return 4; case 5.0: return 5; default: return 0; case 3.0: return 3; case 2.0: return 2; } return -1; } -mixed b() { return 3; } -.... -test 2956, expected result: EQ -mixed a() { switch(3.0) { case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; default: return 0; case 2.0: return 2; } return -1; } -mixed b() { return 3; } -.... -test 2957, expected result: EQ -mixed a() { switch(3.0) { case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 2958, expected result: EQ -mixed a() { switch(3.0) { case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; } return 0; } -mixed b() { return 3; } -.... -test 2959, expected result: EQ -mixed a() { switch(3.0) { default: return 0; case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; } return -1; } -mixed b() { return 3; } -.... -test 2960, expected result: EQ -mixed a() { switch(3.0) { case 5.0: return 5; default: return 0; case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; } return -1; } -mixed b() { return 3; } -.... -test 2961, expected result: EQ -mixed a() { switch(3.0) { case 5.0: return 5; case 3.0: return 3; default: return 0; case 4.0: return 4; case 2.0: return 2; } return -1; } -mixed b() { return 3; } -.... -test 2962, expected result: EQ -mixed a() { switch(3.0) { case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; default: return 0; case 2.0: return 2; } return -1; } -mixed b() { return 3; } -.... -test 2963, expected result: EQ -mixed a() { switch(3.0) { case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 2964, expected result: EQ -mixed a() { switch(3.0) { case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; } return 0; } -mixed b() { return 3; } -.... -test 2965, expected result: EQ -mixed a() { switch(3.0) { default: return 0; case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; } return -1; } -mixed b() { return 3; } -.... -test 2966, expected result: EQ -mixed a() { switch(3.0) { case 5.0: return 5; default: return 0; case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; } return -1; } -mixed b() { return 3; } -.... -test 2967, expected result: EQ -mixed a() { switch(3.0) { case 5.0: return 5; case 3.0: return 3; default: return 0; case 2.0: return 2; case 4.0: return 4; } return -1; } -mixed b() { return 3; } -.... -test 2968, expected result: EQ -mixed a() { switch(3.0) { case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; default: return 0; case 4.0: return 4; } return -1; } -mixed b() { return 3; } -.... -test 2969, expected result: EQ -mixed a() { switch(3.0) { case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 2970, expected result: EQ -mixed a() { switch(3.0) { case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; } return 0; } -mixed b() { return 3; } -.... -test 2971, expected result: EQ -mixed a() { switch(3.0) { default: return 0; case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; } return -1; } -mixed b() { return 3; } -.... -test 2972, expected result: EQ -mixed a() { switch(3.0) { case 5.0: return 5; default: return 0; case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; } return -1; } -mixed b() { return 3; } -.... -test 2973, expected result: EQ -mixed a() { switch(3.0) { case 5.0: return 5; case 4.0: return 4; default: return 0; case 3.0: return 3; case 2.0: return 2; } return -1; } -mixed b() { return 3; } -.... -test 2974, expected result: EQ -mixed a() { switch(3.0) { case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; default: return 0; case 2.0: return 2; } return -1; } -mixed b() { return 3; } -.... -test 2975, expected result: EQ -mixed a() { switch(3.0) { case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 2976, expected result: EQ -mixed a() { switch(3.0) { case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; } return 0; } -mixed b() { return 3; } -.... -test 2977, expected result: EQ -mixed a() { switch(3.0) { default: return 0; case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; } return -1; } -mixed b() { return 3; } -.... -test 2978, expected result: EQ -mixed a() { switch(3.0) { case 5.0: return 5; default: return 0; case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; } return -1; } -mixed b() { return 3; } -.... -test 2979, expected result: EQ -mixed a() { switch(3.0) { case 5.0: return 5; case 4.0: return 4; default: return 0; case 2.0: return 2; case 3.0: return 3; } return -1; } -mixed b() { return 3; } -.... -test 2980, expected result: EQ -mixed a() { switch(3.0) { case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; default: return 0; case 3.0: return 3; } return -1; } -mixed b() { return 3; } -.... -test 2981, expected result: EQ -mixed a() { switch(3.0) { case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 2982, expected result: EQ -mixed a() { switch(3.0) { case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; } return 0; } -mixed b() { return 3; } -.... -test 2983, expected result: EQ -mixed a() { switch(3.0) { default: return 0; case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; } return -1; } -mixed b() { return 3; } -.... -test 2984, expected result: EQ -mixed a() { switch(3.0) { case 5.0: return 5; default: return 0; case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; } return -1; } -mixed b() { return 3; } -.... -test 2985, expected result: EQ -mixed a() { switch(3.0) { case 5.0: return 5; case 2.0: return 2; default: return 0; case 4.0: return 4; case 3.0: return 3; } return -1; } -mixed b() { return 3; } -.... -test 2986, expected result: EQ -mixed a() { switch(3.0) { case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; default: return 0; case 3.0: return 3; } return -1; } -mixed b() { return 3; } -.... -test 2987, expected result: EQ -mixed a() { switch(3.0) { case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 2988, expected result: EQ -mixed a() { switch(3.0) { case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; } return 0; } -mixed b() { return 3; } -.... -test 2989, expected result: EQ -mixed a() { switch(3.0) { default: return 0; case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; } return -1; } -mixed b() { return 3; } -.... -test 2990, expected result: EQ -mixed a() { switch(3.0) { case 5.0: return 5; default: return 0; case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; } return -1; } -mixed b() { return 3; } -.... -test 2991, expected result: EQ -mixed a() { switch(3.0) { case 5.0: return 5; case 2.0: return 2; default: return 0; case 3.0: return 3; case 4.0: return 4; } return -1; } -mixed b() { return 3; } -.... -test 2992, expected result: EQ -mixed a() { switch(3.0) { case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; default: return 0; case 4.0: return 4; } return -1; } -mixed b() { return 3; } -.... -test 2993, expected result: EQ -mixed a() { switch(3.0) { case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 2994, expected result: EQ -mixed a() { switch(4.0) { case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; } return 0; } -mixed b() { return 4; } -.... -test 2995, expected result: EQ -mixed a() { switch(4.0) { default: return 0; case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; } return -1; } -mixed b() { return 4; } -.... -test 2996, expected result: EQ -mixed a() { switch(4.0) { case 2.0: return 2; default: return 0; case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; } return -1; } -mixed b() { return 4; } -.... -test 2997, expected result: EQ -mixed a() { switch(4.0) { case 2.0: return 2; case 3.0: return 3; default: return 0; case 4.0: return 4; case 5.0: return 5; } return -1; } -mixed b() { return 4; } -.... -test 2998, expected result: EQ -mixed a() { switch(4.0) { case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; default: return 0; case 5.0: return 5; } return -1; } -mixed b() { return 4; } -.... -test 2999, expected result: EQ -mixed a() { switch(4.0) { case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 3000, expected result: EQ -mixed a() { switch(4.0) { case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; } return 0; } -mixed b() { return 4; } -.... -test 3001, expected result: EQ -mixed a() { switch(4.0) { default: return 0; case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; } return -1; } -mixed b() { return 4; } -.... -test 3002, expected result: EQ -mixed a() { switch(4.0) { case 2.0: return 2; default: return 0; case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; } return -1; } -mixed b() { return 4; } -.... -test 3003, expected result: EQ -mixed a() { switch(4.0) { case 2.0: return 2; case 3.0: return 3; default: return 0; case 5.0: return 5; case 4.0: return 4; } return -1; } -mixed b() { return 4; } -.... -test 3004, expected result: EQ -mixed a() { switch(4.0) { case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; default: return 0; case 4.0: return 4; } return -1; } -mixed b() { return 4; } -.... -test 3005, expected result: EQ -mixed a() { switch(4.0) { case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 3006, expected result: EQ -mixed a() { switch(4.0) { case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; } return 0; } -mixed b() { return 4; } -.... -test 3007, expected result: EQ -mixed a() { switch(4.0) { default: return 0; case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; } return -1; } -mixed b() { return 4; } -.... -test 3008, expected result: EQ -mixed a() { switch(4.0) { case 2.0: return 2; default: return 0; case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; } return -1; } -mixed b() { return 4; } -.... -test 3009, expected result: EQ -mixed a() { switch(4.0) { case 2.0: return 2; case 4.0: return 4; default: return 0; case 3.0: return 3; case 5.0: return 5; } return -1; } -mixed b() { return 4; } -.... -test 3010, expected result: EQ -mixed a() { switch(4.0) { case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; default: return 0; case 5.0: return 5; } return -1; } -mixed b() { return 4; } -.... -test 3011, expected result: EQ -mixed a() { switch(4.0) { case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 3012, expected result: EQ -mixed a() { switch(4.0) { case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; } return 0; } -mixed b() { return 4; } -.... -test 3013, expected result: EQ -mixed a() { switch(4.0) { default: return 0; case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; } return -1; } -mixed b() { return 4; } -.... -test 3014, expected result: EQ -mixed a() { switch(4.0) { case 2.0: return 2; default: return 0; case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; } return -1; } -mixed b() { return 4; } -.... -test 3015, expected result: EQ -mixed a() { switch(4.0) { case 2.0: return 2; case 4.0: return 4; default: return 0; case 5.0: return 5; case 3.0: return 3; } return -1; } -mixed b() { return 4; } -.... -test 3016, expected result: EQ -mixed a() { switch(4.0) { case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; default: return 0; case 3.0: return 3; } return -1; } -mixed b() { return 4; } -.... -test 3017, expected result: EQ -mixed a() { switch(4.0) { case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 3018, expected result: EQ -mixed a() { switch(4.0) { case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; } return 0; } -mixed b() { return 4; } -.... -test 3019, expected result: EQ -mixed a() { switch(4.0) { default: return 0; case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; } return -1; } -mixed b() { return 4; } -.... -test 3020, expected result: EQ -mixed a() { switch(4.0) { case 2.0: return 2; default: return 0; case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; } return -1; } -mixed b() { return 4; } -.... -test 3021, expected result: EQ -mixed a() { switch(4.0) { case 2.0: return 2; case 5.0: return 5; default: return 0; case 4.0: return 4; case 3.0: return 3; } return -1; } -mixed b() { return 4; } -.... -test 3022, expected result: EQ -mixed a() { switch(4.0) { case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; default: return 0; case 3.0: return 3; } return -1; } -mixed b() { return 4; } -.... -test 3023, expected result: EQ -mixed a() { switch(4.0) { case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 3024, expected result: EQ -mixed a() { switch(4.0) { case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; } return 0; } -mixed b() { return 4; } -.... -test 3025, expected result: EQ -mixed a() { switch(4.0) { default: return 0; case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; } return -1; } -mixed b() { return 4; } -.... -test 3026, expected result: EQ -mixed a() { switch(4.0) { case 2.0: return 2; default: return 0; case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; } return -1; } -mixed b() { return 4; } -.... -test 3027, expected result: EQ -mixed a() { switch(4.0) { case 2.0: return 2; case 5.0: return 5; default: return 0; case 3.0: return 3; case 4.0: return 4; } return -1; } -mixed b() { return 4; } -.... -test 3028, expected result: EQ -mixed a() { switch(4.0) { case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; default: return 0; case 4.0: return 4; } return -1; } -mixed b() { return 4; } -.... -test 3029, expected result: EQ -mixed a() { switch(4.0) { case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 3030, expected result: EQ -mixed a() { switch(4.0) { case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; } return 0; } -mixed b() { return 4; } -.... -test 3031, expected result: EQ -mixed a() { switch(4.0) { default: return 0; case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; } return -1; } -mixed b() { return 4; } -.... -test 3032, expected result: EQ -mixed a() { switch(4.0) { case 3.0: return 3; default: return 0; case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; } return -1; } -mixed b() { return 4; } -.... -test 3033, expected result: EQ -mixed a() { switch(4.0) { case 3.0: return 3; case 2.0: return 2; default: return 0; case 4.0: return 4; case 5.0: return 5; } return -1; } -mixed b() { return 4; } -.... -test 3034, expected result: EQ -mixed a() { switch(4.0) { case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; default: return 0; case 5.0: return 5; } return -1; } -mixed b() { return 4; } -.... -test 3035, expected result: EQ -mixed a() { switch(4.0) { case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 3036, expected result: EQ -mixed a() { switch(4.0) { case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; } return 0; } -mixed b() { return 4; } -.... -test 3037, expected result: EQ -mixed a() { switch(4.0) { default: return 0; case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; } return -1; } -mixed b() { return 4; } -.... -test 3038, expected result: EQ -mixed a() { switch(4.0) { case 3.0: return 3; default: return 0; case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; } return -1; } -mixed b() { return 4; } -.... -test 3039, expected result: EQ -mixed a() { switch(4.0) { case 3.0: return 3; case 2.0: return 2; default: return 0; case 5.0: return 5; case 4.0: return 4; } return -1; } -mixed b() { return 4; } -.... -test 3040, expected result: EQ -mixed a() { switch(4.0) { case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; default: return 0; case 4.0: return 4; } return -1; } -mixed b() { return 4; } -.... -test 3041, expected result: EQ -mixed a() { switch(4.0) { case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 3042, expected result: EQ -mixed a() { switch(4.0) { case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; } return 0; } -mixed b() { return 4; } -.... -test 3043, expected result: EQ -mixed a() { switch(4.0) { default: return 0; case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; } return -1; } -mixed b() { return 4; } -.... -test 3044, expected result: EQ -mixed a() { switch(4.0) { case 3.0: return 3; default: return 0; case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; } return -1; } -mixed b() { return 4; } -.... -test 3045, expected result: EQ -mixed a() { switch(4.0) { case 3.0: return 3; case 4.0: return 4; default: return 0; case 2.0: return 2; case 5.0: return 5; } return -1; } -mixed b() { return 4; } -.... -test 3046, expected result: EQ -mixed a() { switch(4.0) { case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; default: return 0; case 5.0: return 5; } return -1; } -mixed b() { return 4; } -.... -test 3047, expected result: EQ -mixed a() { switch(4.0) { case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 3048, expected result: EQ -mixed a() { switch(4.0) { case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; } return 0; } -mixed b() { return 4; } -.... -test 3049, expected result: EQ -mixed a() { switch(4.0) { default: return 0; case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; } return -1; } -mixed b() { return 4; } -.... -test 3050, expected result: EQ -mixed a() { switch(4.0) { case 3.0: return 3; default: return 0; case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; } return -1; } -mixed b() { return 4; } -.... -test 3051, expected result: EQ -mixed a() { switch(4.0) { case 3.0: return 3; case 4.0: return 4; default: return 0; case 5.0: return 5; case 2.0: return 2; } return -1; } -mixed b() { return 4; } -.... -test 3052, expected result: EQ -mixed a() { switch(4.0) { case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; default: return 0; case 2.0: return 2; } return -1; } -mixed b() { return 4; } -.... -test 3053, expected result: EQ -mixed a() { switch(4.0) { case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 3054, expected result: EQ -mixed a() { switch(4.0) { case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; } return 0; } -mixed b() { return 4; } -.... -test 3055, expected result: EQ -mixed a() { switch(4.0) { default: return 0; case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; } return -1; } -mixed b() { return 4; } -.... -test 3056, expected result: EQ -mixed a() { switch(4.0) { case 3.0: return 3; default: return 0; case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; } return -1; } -mixed b() { return 4; } -.... -test 3057, expected result: EQ -mixed a() { switch(4.0) { case 3.0: return 3; case 5.0: return 5; default: return 0; case 4.0: return 4; case 2.0: return 2; } return -1; } -mixed b() { return 4; } -.... -test 3058, expected result: EQ -mixed a() { switch(4.0) { case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; default: return 0; case 2.0: return 2; } return -1; } -mixed b() { return 4; } -.... -test 3059, expected result: EQ -mixed a() { switch(4.0) { case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 3060, expected result: EQ -mixed a() { switch(4.0) { case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; } return 0; } -mixed b() { return 4; } -.... -test 3061, expected result: EQ -mixed a() { switch(4.0) { default: return 0; case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; } return -1; } -mixed b() { return 4; } -.... -test 3062, expected result: EQ -mixed a() { switch(4.0) { case 3.0: return 3; default: return 0; case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; } return -1; } -mixed b() { return 4; } -.... -test 3063, expected result: EQ -mixed a() { switch(4.0) { case 3.0: return 3; case 5.0: return 5; default: return 0; case 2.0: return 2; case 4.0: return 4; } return -1; } -mixed b() { return 4; } -.... -test 3064, expected result: EQ -mixed a() { switch(4.0) { case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; default: return 0; case 4.0: return 4; } return -1; } -mixed b() { return 4; } -.... -test 3065, expected result: EQ -mixed a() { switch(4.0) { case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 3066, expected result: EQ -mixed a() { switch(4.0) { case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; } return 0; } -mixed b() { return 4; } -.... -test 3067, expected result: EQ -mixed a() { switch(4.0) { default: return 0; case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; } return -1; } -mixed b() { return 4; } -.... -test 3068, expected result: EQ -mixed a() { switch(4.0) { case 4.0: return 4; default: return 0; case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; } return -1; } -mixed b() { return 4; } -.... -test 3069, expected result: EQ -mixed a() { switch(4.0) { case 4.0: return 4; case 3.0: return 3; default: return 0; case 2.0: return 2; case 5.0: return 5; } return -1; } -mixed b() { return 4; } -.... -test 3070, expected result: EQ -mixed a() { switch(4.0) { case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; default: return 0; case 5.0: return 5; } return -1; } -mixed b() { return 4; } -.... -test 3071, expected result: EQ -mixed a() { switch(4.0) { case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 3072, expected result: EQ -mixed a() { switch(4.0) { case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; } return 0; } -mixed b() { return 4; } -.... -test 3073, expected result: EQ -mixed a() { switch(4.0) { default: return 0; case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; } return -1; } -mixed b() { return 4; } -.... -test 3074, expected result: EQ -mixed a() { switch(4.0) { case 4.0: return 4; default: return 0; case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; } return -1; } -mixed b() { return 4; } -.... -test 3075, expected result: EQ -mixed a() { switch(4.0) { case 4.0: return 4; case 3.0: return 3; default: return 0; case 5.0: return 5; case 2.0: return 2; } return -1; } -mixed b() { return 4; } -.... -test 3076, expected result: EQ -mixed a() { switch(4.0) { case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; default: return 0; case 2.0: return 2; } return -1; } -mixed b() { return 4; } -.... -test 3077, expected result: EQ -mixed a() { switch(4.0) { case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 3078, expected result: EQ -mixed a() { switch(4.0) { case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; } return 0; } -mixed b() { return 4; } -.... -test 3079, expected result: EQ -mixed a() { switch(4.0) { default: return 0; case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; } return -1; } -mixed b() { return 4; } -.... -test 3080, expected result: EQ -mixed a() { switch(4.0) { case 4.0: return 4; default: return 0; case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; } return -1; } -mixed b() { return 4; } -.... -test 3081, expected result: EQ -mixed a() { switch(4.0) { case 4.0: return 4; case 2.0: return 2; default: return 0; case 3.0: return 3; case 5.0: return 5; } return -1; } -mixed b() { return 4; } -.... -test 3082, expected result: EQ -mixed a() { switch(4.0) { case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; default: return 0; case 5.0: return 5; } return -1; } -mixed b() { return 4; } -.... -test 3083, expected result: EQ -mixed a() { switch(4.0) { case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 3084, expected result: EQ -mixed a() { switch(4.0) { case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; } return 0; } -mixed b() { return 4; } -.... -test 3085, expected result: EQ -mixed a() { switch(4.0) { default: return 0; case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; } return -1; } -mixed b() { return 4; } -.... -test 3086, expected result: EQ -mixed a() { switch(4.0) { case 4.0: return 4; default: return 0; case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; } return -1; } -mixed b() { return 4; } -.... -test 3087, expected result: EQ -mixed a() { switch(4.0) { case 4.0: return 4; case 2.0: return 2; default: return 0; case 5.0: return 5; case 3.0: return 3; } return -1; } -mixed b() { return 4; } -.... -test 3088, expected result: EQ -mixed a() { switch(4.0) { case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; default: return 0; case 3.0: return 3; } return -1; } -mixed b() { return 4; } -.... -test 3089, expected result: EQ -mixed a() { switch(4.0) { case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 3090, expected result: EQ -mixed a() { switch(4.0) { case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; } return 0; } -mixed b() { return 4; } -.... -test 3091, expected result: EQ -mixed a() { switch(4.0) { default: return 0; case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; } return -1; } -mixed b() { return 4; } -.... -test 3092, expected result: EQ -mixed a() { switch(4.0) { case 4.0: return 4; default: return 0; case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; } return -1; } -mixed b() { return 4; } -.... -test 3093, expected result: EQ -mixed a() { switch(4.0) { case 4.0: return 4; case 5.0: return 5; default: return 0; case 2.0: return 2; case 3.0: return 3; } return -1; } -mixed b() { return 4; } -.... -test 3094, expected result: EQ -mixed a() { switch(4.0) { case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; default: return 0; case 3.0: return 3; } return -1; } -mixed b() { return 4; } -.... -test 3095, expected result: EQ -mixed a() { switch(4.0) { case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 3096, expected result: EQ -mixed a() { switch(4.0) { case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; } return 0; } -mixed b() { return 4; } -.... -test 3097, expected result: EQ -mixed a() { switch(4.0) { default: return 0; case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; } return -1; } -mixed b() { return 4; } -.... -test 3098, expected result: EQ -mixed a() { switch(4.0) { case 4.0: return 4; default: return 0; case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; } return -1; } -mixed b() { return 4; } -.... -test 3099, expected result: EQ -mixed a() { switch(4.0) { case 4.0: return 4; case 5.0: return 5; default: return 0; case 3.0: return 3; case 2.0: return 2; } return -1; } -mixed b() { return 4; } -.... -test 3100, expected result: EQ -mixed a() { switch(4.0) { case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; default: return 0; case 2.0: return 2; } return -1; } -mixed b() { return 4; } -.... -test 3101, expected result: EQ -mixed a() { switch(4.0) { case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 3102, expected result: EQ -mixed a() { switch(4.0) { case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; } return 0; } -mixed b() { return 4; } -.... -test 3103, expected result: EQ -mixed a() { switch(4.0) { default: return 0; case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; } return -1; } -mixed b() { return 4; } -.... -test 3104, expected result: EQ -mixed a() { switch(4.0) { case 5.0: return 5; default: return 0; case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; } return -1; } -mixed b() { return 4; } -.... -test 3105, expected result: EQ -mixed a() { switch(4.0) { case 5.0: return 5; case 3.0: return 3; default: return 0; case 4.0: return 4; case 2.0: return 2; } return -1; } -mixed b() { return 4; } -.... -test 3106, expected result: EQ -mixed a() { switch(4.0) { case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; default: return 0; case 2.0: return 2; } return -1; } -mixed b() { return 4; } -.... -test 3107, expected result: EQ -mixed a() { switch(4.0) { case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 3108, expected result: EQ -mixed a() { switch(4.0) { case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; } return 0; } -mixed b() { return 4; } -.... -test 3109, expected result: EQ -mixed a() { switch(4.0) { default: return 0; case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; } return -1; } -mixed b() { return 4; } -.... -test 3110, expected result: EQ -mixed a() { switch(4.0) { case 5.0: return 5; default: return 0; case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; } return -1; } -mixed b() { return 4; } -.... -test 3111, expected result: EQ -mixed a() { switch(4.0) { case 5.0: return 5; case 3.0: return 3; default: return 0; case 2.0: return 2; case 4.0: return 4; } return -1; } -mixed b() { return 4; } -.... -test 3112, expected result: EQ -mixed a() { switch(4.0) { case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; default: return 0; case 4.0: return 4; } return -1; } -mixed b() { return 4; } -.... -test 3113, expected result: EQ -mixed a() { switch(4.0) { case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 3114, expected result: EQ -mixed a() { switch(4.0) { case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; } return 0; } -mixed b() { return 4; } -.... -test 3115, expected result: EQ -mixed a() { switch(4.0) { default: return 0; case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; } return -1; } -mixed b() { return 4; } -.... -test 3116, expected result: EQ -mixed a() { switch(4.0) { case 5.0: return 5; default: return 0; case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; } return -1; } -mixed b() { return 4; } -.... -test 3117, expected result: EQ -mixed a() { switch(4.0) { case 5.0: return 5; case 4.0: return 4; default: return 0; case 3.0: return 3; case 2.0: return 2; } return -1; } -mixed b() { return 4; } -.... -test 3118, expected result: EQ -mixed a() { switch(4.0) { case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; default: return 0; case 2.0: return 2; } return -1; } -mixed b() { return 4; } -.... -test 3119, expected result: EQ -mixed a() { switch(4.0) { case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 3120, expected result: EQ -mixed a() { switch(4.0) { case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; } return 0; } -mixed b() { return 4; } -.... -test 3121, expected result: EQ -mixed a() { switch(4.0) { default: return 0; case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; } return -1; } -mixed b() { return 4; } -.... -test 3122, expected result: EQ -mixed a() { switch(4.0) { case 5.0: return 5; default: return 0; case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; } return -1; } -mixed b() { return 4; } -.... -test 3123, expected result: EQ -mixed a() { switch(4.0) { case 5.0: return 5; case 4.0: return 4; default: return 0; case 2.0: return 2; case 3.0: return 3; } return -1; } -mixed b() { return 4; } -.... -test 3124, expected result: EQ -mixed a() { switch(4.0) { case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; default: return 0; case 3.0: return 3; } return -1; } -mixed b() { return 4; } -.... -test 3125, expected result: EQ -mixed a() { switch(4.0) { case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 3126, expected result: EQ -mixed a() { switch(4.0) { case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; } return 0; } -mixed b() { return 4; } -.... -test 3127, expected result: EQ -mixed a() { switch(4.0) { default: return 0; case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; } return -1; } -mixed b() { return 4; } -.... -test 3128, expected result: EQ -mixed a() { switch(4.0) { case 5.0: return 5; default: return 0; case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; } return -1; } -mixed b() { return 4; } -.... -test 3129, expected result: EQ -mixed a() { switch(4.0) { case 5.0: return 5; case 2.0: return 2; default: return 0; case 4.0: return 4; case 3.0: return 3; } return -1; } -mixed b() { return 4; } -.... -test 3130, expected result: EQ -mixed a() { switch(4.0) { case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; default: return 0; case 3.0: return 3; } return -1; } -mixed b() { return 4; } -.... -test 3131, expected result: EQ -mixed a() { switch(4.0) { case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 3132, expected result: EQ -mixed a() { switch(4.0) { case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; } return 0; } -mixed b() { return 4; } -.... -test 3133, expected result: EQ -mixed a() { switch(4.0) { default: return 0; case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; } return -1; } -mixed b() { return 4; } -.... -test 3134, expected result: EQ -mixed a() { switch(4.0) { case 5.0: return 5; default: return 0; case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; } return -1; } -mixed b() { return 4; } -.... -test 3135, expected result: EQ -mixed a() { switch(4.0) { case 5.0: return 5; case 2.0: return 2; default: return 0; case 3.0: return 3; case 4.0: return 4; } return -1; } -mixed b() { return 4; } -.... -test 3136, expected result: EQ -mixed a() { switch(4.0) { case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; default: return 0; case 4.0: return 4; } return -1; } -mixed b() { return 4; } -.... -test 3137, expected result: EQ -mixed a() { switch(4.0) { case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 3138, expected result: EQ -mixed a() { switch(5.0) { case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; } return 0; } -mixed b() { return 5; } -.... -test 3139, expected result: EQ -mixed a() { switch(5.0) { default: return 0; case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; } return -1; } -mixed b() { return 5; } -.... -test 3140, expected result: EQ -mixed a() { switch(5.0) { case 2.0: return 2; default: return 0; case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; } return -1; } -mixed b() { return 5; } -.... -test 3141, expected result: EQ -mixed a() { switch(5.0) { case 2.0: return 2; case 3.0: return 3; default: return 0; case 4.0: return 4; case 5.0: return 5; } return -1; } -mixed b() { return 5; } -.... -test 3142, expected result: EQ -mixed a() { switch(5.0) { case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; default: return 0; case 5.0: return 5; } return -1; } -mixed b() { return 5; } -.... -test 3143, expected result: EQ -mixed a() { switch(5.0) { case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 3144, expected result: EQ -mixed a() { switch(5.0) { case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; } return 0; } -mixed b() { return 5; } -.... -test 3145, expected result: EQ -mixed a() { switch(5.0) { default: return 0; case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; } return -1; } -mixed b() { return 5; } -.... -test 3146, expected result: EQ -mixed a() { switch(5.0) { case 2.0: return 2; default: return 0; case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; } return -1; } -mixed b() { return 5; } -.... -test 3147, expected result: EQ -mixed a() { switch(5.0) { case 2.0: return 2; case 3.0: return 3; default: return 0; case 5.0: return 5; case 4.0: return 4; } return -1; } -mixed b() { return 5; } -.... -test 3148, expected result: EQ -mixed a() { switch(5.0) { case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; default: return 0; case 4.0: return 4; } return -1; } -mixed b() { return 5; } -.... -test 3149, expected result: EQ -mixed a() { switch(5.0) { case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 3150, expected result: EQ -mixed a() { switch(5.0) { case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; } return 0; } -mixed b() { return 5; } -.... -test 3151, expected result: EQ -mixed a() { switch(5.0) { default: return 0; case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; } return -1; } -mixed b() { return 5; } -.... -test 3152, expected result: EQ -mixed a() { switch(5.0) { case 2.0: return 2; default: return 0; case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; } return -1; } -mixed b() { return 5; } -.... -test 3153, expected result: EQ -mixed a() { switch(5.0) { case 2.0: return 2; case 4.0: return 4; default: return 0; case 3.0: return 3; case 5.0: return 5; } return -1; } -mixed b() { return 5; } -.... -test 3154, expected result: EQ -mixed a() { switch(5.0) { case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; default: return 0; case 5.0: return 5; } return -1; } -mixed b() { return 5; } -.... -test 3155, expected result: EQ -mixed a() { switch(5.0) { case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 3156, expected result: EQ -mixed a() { switch(5.0) { case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; } return 0; } -mixed b() { return 5; } -.... -test 3157, expected result: EQ -mixed a() { switch(5.0) { default: return 0; case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; } return -1; } -mixed b() { return 5; } -.... -test 3158, expected result: EQ -mixed a() { switch(5.0) { case 2.0: return 2; default: return 0; case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; } return -1; } -mixed b() { return 5; } -.... -test 3159, expected result: EQ -mixed a() { switch(5.0) { case 2.0: return 2; case 4.0: return 4; default: return 0; case 5.0: return 5; case 3.0: return 3; } return -1; } -mixed b() { return 5; } -.... -test 3160, expected result: EQ -mixed a() { switch(5.0) { case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; default: return 0; case 3.0: return 3; } return -1; } -mixed b() { return 5; } -.... -test 3161, expected result: EQ -mixed a() { switch(5.0) { case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 3162, expected result: EQ -mixed a() { switch(5.0) { case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; } return 0; } -mixed b() { return 5; } -.... -test 3163, expected result: EQ -mixed a() { switch(5.0) { default: return 0; case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; } return -1; } -mixed b() { return 5; } -.... -test 3164, expected result: EQ -mixed a() { switch(5.0) { case 2.0: return 2; default: return 0; case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; } return -1; } -mixed b() { return 5; } -.... -test 3165, expected result: EQ -mixed a() { switch(5.0) { case 2.0: return 2; case 5.0: return 5; default: return 0; case 4.0: return 4; case 3.0: return 3; } return -1; } -mixed b() { return 5; } -.... -test 3166, expected result: EQ -mixed a() { switch(5.0) { case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; default: return 0; case 3.0: return 3; } return -1; } -mixed b() { return 5; } -.... -test 3167, expected result: EQ -mixed a() { switch(5.0) { case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 3168, expected result: EQ -mixed a() { switch(5.0) { case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; } return 0; } -mixed b() { return 5; } -.... -test 3169, expected result: EQ -mixed a() { switch(5.0) { default: return 0; case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; } return -1; } -mixed b() { return 5; } -.... -test 3170, expected result: EQ -mixed a() { switch(5.0) { case 2.0: return 2; default: return 0; case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; } return -1; } -mixed b() { return 5; } -.... -test 3171, expected result: EQ -mixed a() { switch(5.0) { case 2.0: return 2; case 5.0: return 5; default: return 0; case 3.0: return 3; case 4.0: return 4; } return -1; } -mixed b() { return 5; } -.... -test 3172, expected result: EQ -mixed a() { switch(5.0) { case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; default: return 0; case 4.0: return 4; } return -1; } -mixed b() { return 5; } -.... -test 3173, expected result: EQ -mixed a() { switch(5.0) { case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 3174, expected result: EQ -mixed a() { switch(5.0) { case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; } return 0; } -mixed b() { return 5; } -.... -test 3175, expected result: EQ -mixed a() { switch(5.0) { default: return 0; case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; } return -1; } -mixed b() { return 5; } -.... -test 3176, expected result: EQ -mixed a() { switch(5.0) { case 3.0: return 3; default: return 0; case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; } return -1; } -mixed b() { return 5; } -.... -test 3177, expected result: EQ -mixed a() { switch(5.0) { case 3.0: return 3; case 2.0: return 2; default: return 0; case 4.0: return 4; case 5.0: return 5; } return -1; } -mixed b() { return 5; } -.... -test 3178, expected result: EQ -mixed a() { switch(5.0) { case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; default: return 0; case 5.0: return 5; } return -1; } -mixed b() { return 5; } -.... -test 3179, expected result: EQ -mixed a() { switch(5.0) { case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; case 5.0: return 5; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 3180, expected result: EQ -mixed a() { switch(5.0) { case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; } return 0; } -mixed b() { return 5; } -.... -test 3181, expected result: EQ -mixed a() { switch(5.0) { default: return 0; case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; } return -1; } -mixed b() { return 5; } -.... -test 3182, expected result: EQ -mixed a() { switch(5.0) { case 3.0: return 3; default: return 0; case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; } return -1; } -mixed b() { return 5; } -.... -test 3183, expected result: EQ -mixed a() { switch(5.0) { case 3.0: return 3; case 2.0: return 2; default: return 0; case 5.0: return 5; case 4.0: return 4; } return -1; } -mixed b() { return 5; } -.... -test 3184, expected result: EQ -mixed a() { switch(5.0) { case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; default: return 0; case 4.0: return 4; } return -1; } -mixed b() { return 5; } -.... -test 3185, expected result: EQ -mixed a() { switch(5.0) { case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; case 4.0: return 4; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 3186, expected result: EQ -mixed a() { switch(5.0) { case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; } return 0; } -mixed b() { return 5; } -.... -test 3187, expected result: EQ -mixed a() { switch(5.0) { default: return 0; case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; } return -1; } -mixed b() { return 5; } -.... -test 3188, expected result: EQ -mixed a() { switch(5.0) { case 3.0: return 3; default: return 0; case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; } return -1; } -mixed b() { return 5; } -.... -test 3189, expected result: EQ -mixed a() { switch(5.0) { case 3.0: return 3; case 4.0: return 4; default: return 0; case 2.0: return 2; case 5.0: return 5; } return -1; } -mixed b() { return 5; } -.... -test 3190, expected result: EQ -mixed a() { switch(5.0) { case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; default: return 0; case 5.0: return 5; } return -1; } -mixed b() { return 5; } -.... -test 3191, expected result: EQ -mixed a() { switch(5.0) { case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 3192, expected result: EQ -mixed a() { switch(5.0) { case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; } return 0; } -mixed b() { return 5; } -.... -test 3193, expected result: EQ -mixed a() { switch(5.0) { default: return 0; case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; } return -1; } -mixed b() { return 5; } -.... -test 3194, expected result: EQ -mixed a() { switch(5.0) { case 3.0: return 3; default: return 0; case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; } return -1; } -mixed b() { return 5; } -.... -test 3195, expected result: EQ -mixed a() { switch(5.0) { case 3.0: return 3; case 4.0: return 4; default: return 0; case 5.0: return 5; case 2.0: return 2; } return -1; } -mixed b() { return 5; } -.... -test 3196, expected result: EQ -mixed a() { switch(5.0) { case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; default: return 0; case 2.0: return 2; } return -1; } -mixed b() { return 5; } -.... -test 3197, expected result: EQ -mixed a() { switch(5.0) { case 3.0: return 3; case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 3198, expected result: EQ -mixed a() { switch(5.0) { case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; } return 0; } -mixed b() { return 5; } -.... -test 3199, expected result: EQ -mixed a() { switch(5.0) { default: return 0; case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; } return -1; } -mixed b() { return 5; } -.... -test 3200, expected result: EQ -mixed a() { switch(5.0) { case 3.0: return 3; default: return 0; case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; } return -1; } -mixed b() { return 5; } -.... -test 3201, expected result: EQ -mixed a() { switch(5.0) { case 3.0: return 3; case 5.0: return 5; default: return 0; case 4.0: return 4; case 2.0: return 2; } return -1; } -mixed b() { return 5; } -.... -test 3202, expected result: EQ -mixed a() { switch(5.0) { case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; default: return 0; case 2.0: return 2; } return -1; } -mixed b() { return 5; } -.... -test 3203, expected result: EQ -mixed a() { switch(5.0) { case 3.0: return 3; case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 3204, expected result: EQ -mixed a() { switch(5.0) { case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; } return 0; } -mixed b() { return 5; } -.... -test 3205, expected result: EQ -mixed a() { switch(5.0) { default: return 0; case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; } return -1; } -mixed b() { return 5; } -.... -test 3206, expected result: EQ -mixed a() { switch(5.0) { case 3.0: return 3; default: return 0; case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; } return -1; } -mixed b() { return 5; } -.... -test 3207, expected result: EQ -mixed a() { switch(5.0) { case 3.0: return 3; case 5.0: return 5; default: return 0; case 2.0: return 2; case 4.0: return 4; } return -1; } -mixed b() { return 5; } -.... -test 3208, expected result: EQ -mixed a() { switch(5.0) { case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; default: return 0; case 4.0: return 4; } return -1; } -mixed b() { return 5; } -.... -test 3209, expected result: EQ -mixed a() { switch(5.0) { case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 3210, expected result: EQ -mixed a() { switch(5.0) { case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; } return 0; } -mixed b() { return 5; } -.... -test 3211, expected result: EQ -mixed a() { switch(5.0) { default: return 0; case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; } return -1; } -mixed b() { return 5; } -.... -test 3212, expected result: EQ -mixed a() { switch(5.0) { case 4.0: return 4; default: return 0; case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; } return -1; } -mixed b() { return 5; } -.... -test 3213, expected result: EQ -mixed a() { switch(5.0) { case 4.0: return 4; case 3.0: return 3; default: return 0; case 2.0: return 2; case 5.0: return 5; } return -1; } -mixed b() { return 5; } -.... -test 3214, expected result: EQ -mixed a() { switch(5.0) { case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; default: return 0; case 5.0: return 5; } return -1; } -mixed b() { return 5; } -.... -test 3215, expected result: EQ -mixed a() { switch(5.0) { case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; case 5.0: return 5; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 3216, expected result: EQ -mixed a() { switch(5.0) { case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; } return 0; } -mixed b() { return 5; } -.... -test 3217, expected result: EQ -mixed a() { switch(5.0) { default: return 0; case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; } return -1; } -mixed b() { return 5; } -.... -test 3218, expected result: EQ -mixed a() { switch(5.0) { case 4.0: return 4; default: return 0; case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; } return -1; } -mixed b() { return 5; } -.... -test 3219, expected result: EQ -mixed a() { switch(5.0) { case 4.0: return 4; case 3.0: return 3; default: return 0; case 5.0: return 5; case 2.0: return 2; } return -1; } -mixed b() { return 5; } -.... -test 3220, expected result: EQ -mixed a() { switch(5.0) { case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; default: return 0; case 2.0: return 2; } return -1; } -mixed b() { return 5; } -.... -test 3221, expected result: EQ -mixed a() { switch(5.0) { case 4.0: return 4; case 3.0: return 3; case 5.0: return 5; case 2.0: return 2; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 3222, expected result: EQ -mixed a() { switch(5.0) { case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; } return 0; } -mixed b() { return 5; } -.... -test 3223, expected result: EQ -mixed a() { switch(5.0) { default: return 0; case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; } return -1; } -mixed b() { return 5; } -.... -test 3224, expected result: EQ -mixed a() { switch(5.0) { case 4.0: return 4; default: return 0; case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; } return -1; } -mixed b() { return 5; } -.... -test 3225, expected result: EQ -mixed a() { switch(5.0) { case 4.0: return 4; case 2.0: return 2; default: return 0; case 3.0: return 3; case 5.0: return 5; } return -1; } -mixed b() { return 5; } -.... -test 3226, expected result: EQ -mixed a() { switch(5.0) { case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; default: return 0; case 5.0: return 5; } return -1; } -mixed b() { return 5; } -.... -test 3227, expected result: EQ -mixed a() { switch(5.0) { case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; case 5.0: return 5; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 3228, expected result: EQ -mixed a() { switch(5.0) { case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; } return 0; } -mixed b() { return 5; } -.... -test 3229, expected result: EQ -mixed a() { switch(5.0) { default: return 0; case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; } return -1; } -mixed b() { return 5; } -.... -test 3230, expected result: EQ -mixed a() { switch(5.0) { case 4.0: return 4; default: return 0; case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; } return -1; } -mixed b() { return 5; } -.... -test 3231, expected result: EQ -mixed a() { switch(5.0) { case 4.0: return 4; case 2.0: return 2; default: return 0; case 5.0: return 5; case 3.0: return 3; } return -1; } -mixed b() { return 5; } -.... -test 3232, expected result: EQ -mixed a() { switch(5.0) { case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; default: return 0; case 3.0: return 3; } return -1; } -mixed b() { return 5; } -.... -test 3233, expected result: EQ -mixed a() { switch(5.0) { case 4.0: return 4; case 2.0: return 2; case 5.0: return 5; case 3.0: return 3; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 3234, expected result: EQ -mixed a() { switch(5.0) { case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; } return 0; } -mixed b() { return 5; } -.... -test 3235, expected result: EQ -mixed a() { switch(5.0) { default: return 0; case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; } return -1; } -mixed b() { return 5; } -.... -test 3236, expected result: EQ -mixed a() { switch(5.0) { case 4.0: return 4; default: return 0; case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; } return -1; } -mixed b() { return 5; } -.... -test 3237, expected result: EQ -mixed a() { switch(5.0) { case 4.0: return 4; case 5.0: return 5; default: return 0; case 2.0: return 2; case 3.0: return 3; } return -1; } -mixed b() { return 5; } -.... -test 3238, expected result: EQ -mixed a() { switch(5.0) { case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; default: return 0; case 3.0: return 3; } return -1; } -mixed b() { return 5; } -.... -test 3239, expected result: EQ -mixed a() { switch(5.0) { case 4.0: return 4; case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 3240, expected result: EQ -mixed a() { switch(5.0) { case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; } return 0; } -mixed b() { return 5; } -.... -test 3241, expected result: EQ -mixed a() { switch(5.0) { default: return 0; case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; } return -1; } -mixed b() { return 5; } -.... -test 3242, expected result: EQ -mixed a() { switch(5.0) { case 4.0: return 4; default: return 0; case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; } return -1; } -mixed b() { return 5; } -.... -test 3243, expected result: EQ -mixed a() { switch(5.0) { case 4.0: return 4; case 5.0: return 5; default: return 0; case 3.0: return 3; case 2.0: return 2; } return -1; } -mixed b() { return 5; } -.... -test 3244, expected result: EQ -mixed a() { switch(5.0) { case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; default: return 0; case 2.0: return 2; } return -1; } -mixed b() { return 5; } -.... -test 3245, expected result: EQ -mixed a() { switch(5.0) { case 4.0: return 4; case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 3246, expected result: EQ -mixed a() { switch(5.0) { case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; } return 0; } -mixed b() { return 5; } -.... -test 3247, expected result: EQ -mixed a() { switch(5.0) { default: return 0; case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; } return -1; } -mixed b() { return 5; } -.... -test 3248, expected result: EQ -mixed a() { switch(5.0) { case 5.0: return 5; default: return 0; case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; } return -1; } -mixed b() { return 5; } -.... -test 3249, expected result: EQ -mixed a() { switch(5.0) { case 5.0: return 5; case 3.0: return 3; default: return 0; case 4.0: return 4; case 2.0: return 2; } return -1; } -mixed b() { return 5; } -.... -test 3250, expected result: EQ -mixed a() { switch(5.0) { case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; default: return 0; case 2.0: return 2; } return -1; } -mixed b() { return 5; } -.... -test 3251, expected result: EQ -mixed a() { switch(5.0) { case 5.0: return 5; case 3.0: return 3; case 4.0: return 4; case 2.0: return 2; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 3252, expected result: EQ -mixed a() { switch(5.0) { case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; } return 0; } -mixed b() { return 5; } -.... -test 3253, expected result: EQ -mixed a() { switch(5.0) { default: return 0; case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; } return -1; } -mixed b() { return 5; } -.... -test 3254, expected result: EQ -mixed a() { switch(5.0) { case 5.0: return 5; default: return 0; case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; } return -1; } -mixed b() { return 5; } -.... -test 3255, expected result: EQ -mixed a() { switch(5.0) { case 5.0: return 5; case 3.0: return 3; default: return 0; case 2.0: return 2; case 4.0: return 4; } return -1; } -mixed b() { return 5; } -.... -test 3256, expected result: EQ -mixed a() { switch(5.0) { case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; default: return 0; case 4.0: return 4; } return -1; } -mixed b() { return 5; } -.... -test 3257, expected result: EQ -mixed a() { switch(5.0) { case 5.0: return 5; case 3.0: return 3; case 2.0: return 2; case 4.0: return 4; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 3258, expected result: EQ -mixed a() { switch(5.0) { case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; } return 0; } -mixed b() { return 5; } -.... -test 3259, expected result: EQ -mixed a() { switch(5.0) { default: return 0; case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; } return -1; } -mixed b() { return 5; } -.... -test 3260, expected result: EQ -mixed a() { switch(5.0) { case 5.0: return 5; default: return 0; case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; } return -1; } -mixed b() { return 5; } -.... -test 3261, expected result: EQ -mixed a() { switch(5.0) { case 5.0: return 5; case 4.0: return 4; default: return 0; case 3.0: return 3; case 2.0: return 2; } return -1; } -mixed b() { return 5; } -.... -test 3262, expected result: EQ -mixed a() { switch(5.0) { case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; default: return 0; case 2.0: return 2; } return -1; } -mixed b() { return 5; } -.... -test 3263, expected result: EQ -mixed a() { switch(5.0) { case 5.0: return 5; case 4.0: return 4; case 3.0: return 3; case 2.0: return 2; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 3264, expected result: EQ -mixed a() { switch(5.0) { case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; } return 0; } -mixed b() { return 5; } -.... -test 3265, expected result: EQ -mixed a() { switch(5.0) { default: return 0; case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; } return -1; } -mixed b() { return 5; } -.... -test 3266, expected result: EQ -mixed a() { switch(5.0) { case 5.0: return 5; default: return 0; case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; } return -1; } -mixed b() { return 5; } -.... -test 3267, expected result: EQ -mixed a() { switch(5.0) { case 5.0: return 5; case 4.0: return 4; default: return 0; case 2.0: return 2; case 3.0: return 3; } return -1; } -mixed b() { return 5; } -.... -test 3268, expected result: EQ -mixed a() { switch(5.0) { case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; default: return 0; case 3.0: return 3; } return -1; } -mixed b() { return 5; } -.... -test 3269, expected result: EQ -mixed a() { switch(5.0) { case 5.0: return 5; case 4.0: return 4; case 2.0: return 2; case 3.0: return 3; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 3270, expected result: EQ -mixed a() { switch(5.0) { case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; } return 0; } -mixed b() { return 5; } -.... -test 3271, expected result: EQ -mixed a() { switch(5.0) { default: return 0; case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; } return -1; } -mixed b() { return 5; } -.... -test 3272, expected result: EQ -mixed a() { switch(5.0) { case 5.0: return 5; default: return 0; case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; } return -1; } -mixed b() { return 5; } -.... -test 3273, expected result: EQ -mixed a() { switch(5.0) { case 5.0: return 5; case 2.0: return 2; default: return 0; case 4.0: return 4; case 3.0: return 3; } return -1; } -mixed b() { return 5; } -.... -test 3274, expected result: EQ -mixed a() { switch(5.0) { case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; default: return 0; case 3.0: return 3; } return -1; } -mixed b() { return 5; } -.... -test 3275, expected result: EQ -mixed a() { switch(5.0) { case 5.0: return 5; case 2.0: return 2; case 4.0: return 4; case 3.0: return 3; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 3276, expected result: EQ -mixed a() { switch(5.0) { case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; } return 0; } -mixed b() { return 5; } -.... -test 3277, expected result: EQ -mixed a() { switch(5.0) { default: return 0; case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; } return -1; } -mixed b() { return 5; } -.... -test 3278, expected result: EQ -mixed a() { switch(5.0) { case 5.0: return 5; default: return 0; case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; } return -1; } -mixed b() { return 5; } -.... -test 3279, expected result: EQ -mixed a() { switch(5.0) { case 5.0: return 5; case 2.0: return 2; default: return 0; case 3.0: return 3; case 4.0: return 4; } return -1; } -mixed b() { return 5; } -.... -test 3280, expected result: EQ -mixed a() { switch(5.0) { case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; default: return 0; case 4.0: return 4; } return -1; } -mixed b() { return 5; } -.... -test 3281, expected result: EQ -mixed a() { switch(5.0) { case 5.0: return 5; case 2.0: return 2; case 3.0: return 3; case 4.0: return 4; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 3282, expected result: EQ -mixed a() { switch(this_object()) { case "": return 2; case 0: return 3; case 4.0: return 4; case 1: return 5; } return 0; } -mixed b() { return 0; } -.... -test 3283, expected result: EQ -mixed a() { switch(this_object()) { default: return 0; case "": return 2; case 0: return 3; case 4.0: return 4; case 1: return 5; } return -1; } -mixed b() { return 0; } -.... -test 3284, expected result: EQ -mixed a() { switch(this_object()) { case "": return 2; default: return 0; case 0: return 3; case 4.0: return 4; case 1: return 5; } return -1; } -mixed b() { return 0; } -.... -test 3285, expected result: EQ -mixed a() { switch(this_object()) { case "": return 2; case 0: return 3; default: return 0; case 4.0: return 4; case 1: return 5; } return -1; } -mixed b() { return 0; } -.... -test 3286, expected result: EQ -mixed a() { switch(this_object()) { case "": return 2; case 0: return 3; case 4.0: return 4; default: return 0; case 1: return 5; } return -1; } -mixed b() { return 0; } -.... -test 3287, expected result: EQ -mixed a() { switch(this_object()) { case "": return 2; case 0: return 3; case 4.0: return 4; case 1: return 5; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 3288, expected result: EQ -mixed a() { switch(this_object()) { case "": return 2; case 0: return 3; case 1: return 5; case 4.0: return 4; } return 0; } -mixed b() { return 0; } -.... -test 3289, expected result: EQ -mixed a() { switch(this_object()) { default: return 0; case "": return 2; case 0: return 3; case 1: return 5; case 4.0: return 4; } return -1; } -mixed b() { return 0; } -.... -test 3290, expected result: EQ -mixed a() { switch(this_object()) { case "": return 2; default: return 0; case 0: return 3; case 1: return 5; case 4.0: return 4; } return -1; } -mixed b() { return 0; } -.... -test 3291, expected result: EQ -mixed a() { switch(this_object()) { case "": return 2; case 0: return 3; default: return 0; case 1: return 5; case 4.0: return 4; } return -1; } -mixed b() { return 0; } -.... -test 3292, expected result: EQ -mixed a() { switch(this_object()) { case "": return 2; case 0: return 3; case 1: return 5; default: return 0; case 4.0: return 4; } return -1; } -mixed b() { return 0; } -.... -test 3293, expected result: EQ -mixed a() { switch(this_object()) { case "": return 2; case 0: return 3; case 1: return 5; case 4.0: return 4; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 3294, expected result: EQ -mixed a() { switch(this_object()) { case "": return 2; case 4.0: return 4; case 0: return 3; case 1: return 5; } return 0; } -mixed b() { return 0; } -.... -test 3295, expected result: EQ -mixed a() { switch(this_object()) { default: return 0; case "": return 2; case 4.0: return 4; case 0: return 3; case 1: return 5; } return -1; } -mixed b() { return 0; } -.... -test 3296, expected result: EQ -mixed a() { switch(this_object()) { case "": return 2; default: return 0; case 4.0: return 4; case 0: return 3; case 1: return 5; } return -1; } -mixed b() { return 0; } -.... -test 3297, expected result: EQ -mixed a() { switch(this_object()) { case "": return 2; case 4.0: return 4; default: return 0; case 0: return 3; case 1: return 5; } return -1; } -mixed b() { return 0; } -.... -test 3298, expected result: EQ -mixed a() { switch(this_object()) { case "": return 2; case 4.0: return 4; case 0: return 3; default: return 0; case 1: return 5; } return -1; } -mixed b() { return 0; } -.... -test 3299, expected result: EQ -mixed a() { switch(this_object()) { case "": return 2; case 4.0: return 4; case 0: return 3; case 1: return 5; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 3300, expected result: EQ -mixed a() { switch(this_object()) { case "": return 2; case 4.0: return 4; case 1: return 5; case 0: return 3; } return 0; } -mixed b() { return 0; } -.... -test 3301, expected result: EQ -mixed a() { switch(this_object()) { default: return 0; case "": return 2; case 4.0: return 4; case 1: return 5; case 0: return 3; } return -1; } -mixed b() { return 0; } -.... -test 3302, expected result: EQ -mixed a() { switch(this_object()) { case "": return 2; default: return 0; case 4.0: return 4; case 1: return 5; case 0: return 3; } return -1; } -mixed b() { return 0; } -.... -test 3303, expected result: EQ -mixed a() { switch(this_object()) { case "": return 2; case 4.0: return 4; default: return 0; case 1: return 5; case 0: return 3; } return -1; } -mixed b() { return 0; } -.... -test 3304, expected result: EQ -mixed a() { switch(this_object()) { case "": return 2; case 4.0: return 4; case 1: return 5; default: return 0; case 0: return 3; } return -1; } -mixed b() { return 0; } -.... -test 3305, expected result: EQ -mixed a() { switch(this_object()) { case "": return 2; case 4.0: return 4; case 1: return 5; case 0: return 3; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 3306, expected result: EQ -mixed a() { switch(this_object()) { case "": return 2; case 1: return 5; case 4.0: return 4; case 0: return 3; } return 0; } -mixed b() { return 0; } -.... -test 3307, expected result: EQ -mixed a() { switch(this_object()) { default: return 0; case "": return 2; case 1: return 5; case 4.0: return 4; case 0: return 3; } return -1; } -mixed b() { return 0; } -.... -test 3308, expected result: EQ -mixed a() { switch(this_object()) { case "": return 2; default: return 0; case 1: return 5; case 4.0: return 4; case 0: return 3; } return -1; } -mixed b() { return 0; } -.... -test 3309, expected result: EQ -mixed a() { switch(this_object()) { case "": return 2; case 1: return 5; default: return 0; case 4.0: return 4; case 0: return 3; } return -1; } -mixed b() { return 0; } -.... -test 3310, expected result: EQ -mixed a() { switch(this_object()) { case "": return 2; case 1: return 5; case 4.0: return 4; default: return 0; case 0: return 3; } return -1; } -mixed b() { return 0; } -.... -test 3311, expected result: EQ -mixed a() { switch(this_object()) { case "": return 2; case 1: return 5; case 4.0: return 4; case 0: return 3; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 3312, expected result: EQ -mixed a() { switch(this_object()) { case "": return 2; case 1: return 5; case 0: return 3; case 4.0: return 4; } return 0; } -mixed b() { return 0; } -.... -test 3313, expected result: EQ -mixed a() { switch(this_object()) { default: return 0; case "": return 2; case 1: return 5; case 0: return 3; case 4.0: return 4; } return -1; } -mixed b() { return 0; } -.... -test 3314, expected result: EQ -mixed a() { switch(this_object()) { case "": return 2; default: return 0; case 1: return 5; case 0: return 3; case 4.0: return 4; } return -1; } -mixed b() { return 0; } -.... -test 3315, expected result: EQ -mixed a() { switch(this_object()) { case "": return 2; case 1: return 5; default: return 0; case 0: return 3; case 4.0: return 4; } return -1; } -mixed b() { return 0; } -.... -test 3316, expected result: EQ -mixed a() { switch(this_object()) { case "": return 2; case 1: return 5; case 0: return 3; default: return 0; case 4.0: return 4; } return -1; } -mixed b() { return 0; } -.... -test 3317, expected result: EQ -mixed a() { switch(this_object()) { case "": return 2; case 1: return 5; case 0: return 3; case 4.0: return 4; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 3318, expected result: EQ -mixed a() { switch(this_object()) { case 0: return 3; case "": return 2; case 4.0: return 4; case 1: return 5; } return 0; } -mixed b() { return 0; } -.... -test 3319, expected result: EQ -mixed a() { switch(this_object()) { default: return 0; case 0: return 3; case "": return 2; case 4.0: return 4; case 1: return 5; } return -1; } -mixed b() { return 0; } -.... -test 3320, expected result: EQ -mixed a() { switch(this_object()) { case 0: return 3; default: return 0; case "": return 2; case 4.0: return 4; case 1: return 5; } return -1; } -mixed b() { return 0; } -.... -test 3321, expected result: EQ -mixed a() { switch(this_object()) { case 0: return 3; case "": return 2; default: return 0; case 4.0: return 4; case 1: return 5; } return -1; } -mixed b() { return 0; } -.... -test 3322, expected result: EQ -mixed a() { switch(this_object()) { case 0: return 3; case "": return 2; case 4.0: return 4; default: return 0; case 1: return 5; } return -1; } -mixed b() { return 0; } -.... -test 3323, expected result: EQ -mixed a() { switch(this_object()) { case 0: return 3; case "": return 2; case 4.0: return 4; case 1: return 5; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 3324, expected result: EQ -mixed a() { switch(this_object()) { case 0: return 3; case "": return 2; case 1: return 5; case 4.0: return 4; } return 0; } -mixed b() { return 0; } -.... -test 3325, expected result: EQ -mixed a() { switch(this_object()) { default: return 0; case 0: return 3; case "": return 2; case 1: return 5; case 4.0: return 4; } return -1; } -mixed b() { return 0; } -.... -test 3326, expected result: EQ -mixed a() { switch(this_object()) { case 0: return 3; default: return 0; case "": return 2; case 1: return 5; case 4.0: return 4; } return -1; } -mixed b() { return 0; } -.... -test 3327, expected result: EQ -mixed a() { switch(this_object()) { case 0: return 3; case "": return 2; default: return 0; case 1: return 5; case 4.0: return 4; } return -1; } -mixed b() { return 0; } -.... -test 3328, expected result: EQ -mixed a() { switch(this_object()) { case 0: return 3; case "": return 2; case 1: return 5; default: return 0; case 4.0: return 4; } return -1; } -mixed b() { return 0; } -.... -test 3329, expected result: EQ -mixed a() { switch(this_object()) { case 0: return 3; case "": return 2; case 1: return 5; case 4.0: return 4; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 3330, expected result: EQ -mixed a() { switch(this_object()) { case 0: return 3; case 4.0: return 4; case "": return 2; case 1: return 5; } return 0; } -mixed b() { return 0; } -.... -test 3331, expected result: EQ -mixed a() { switch(this_object()) { default: return 0; case 0: return 3; case 4.0: return 4; case "": return 2; case 1: return 5; } return -1; } -mixed b() { return 0; } -.... -test 3332, expected result: EQ -mixed a() { switch(this_object()) { case 0: return 3; default: return 0; case 4.0: return 4; case "": return 2; case 1: return 5; } return -1; } -mixed b() { return 0; } -.... -test 3333, expected result: EQ -mixed a() { switch(this_object()) { case 0: return 3; case 4.0: return 4; default: return 0; case "": return 2; case 1: return 5; } return -1; } -mixed b() { return 0; } -.... -test 3334, expected result: EQ -mixed a() { switch(this_object()) { case 0: return 3; case 4.0: return 4; case "": return 2; default: return 0; case 1: return 5; } return -1; } -mixed b() { return 0; } -.... -test 3335, expected result: EQ -mixed a() { switch(this_object()) { case 0: return 3; case 4.0: return 4; case "": return 2; case 1: return 5; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 3336, expected result: EQ -mixed a() { switch(this_object()) { case 0: return 3; case 4.0: return 4; case 1: return 5; case "": return 2; } return 0; } -mixed b() { return 0; } -.... -test 3337, expected result: EQ -mixed a() { switch(this_object()) { default: return 0; case 0: return 3; case 4.0: return 4; case 1: return 5; case "": return 2; } return -1; } -mixed b() { return 0; } -.... -test 3338, expected result: EQ -mixed a() { switch(this_object()) { case 0: return 3; default: return 0; case 4.0: return 4; case 1: return 5; case "": return 2; } return -1; } -mixed b() { return 0; } -.... -test 3339, expected result: EQ -mixed a() { switch(this_object()) { case 0: return 3; case 4.0: return 4; default: return 0; case 1: return 5; case "": return 2; } return -1; } -mixed b() { return 0; } -.... -test 3340, expected result: EQ -mixed a() { switch(this_object()) { case 0: return 3; case 4.0: return 4; case 1: return 5; default: return 0; case "": return 2; } return -1; } -mixed b() { return 0; } -.... -test 3341, expected result: EQ -mixed a() { switch(this_object()) { case 0: return 3; case 4.0: return 4; case 1: return 5; case "": return 2; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 3342, expected result: EQ -mixed a() { switch(this_object()) { case 0: return 3; case 1: return 5; case 4.0: return 4; case "": return 2; } return 0; } -mixed b() { return 0; } -.... -test 3343, expected result: EQ -mixed a() { switch(this_object()) { default: return 0; case 0: return 3; case 1: return 5; case 4.0: return 4; case "": return 2; } return -1; } -mixed b() { return 0; } -.... -test 3344, expected result: EQ -mixed a() { switch(this_object()) { case 0: return 3; default: return 0; case 1: return 5; case 4.0: return 4; case "": return 2; } return -1; } -mixed b() { return 0; } -.... -test 3345, expected result: EQ -mixed a() { switch(this_object()) { case 0: return 3; case 1: return 5; default: return 0; case 4.0: return 4; case "": return 2; } return -1; } -mixed b() { return 0; } -.... -test 3346, expected result: EQ -mixed a() { switch(this_object()) { case 0: return 3; case 1: return 5; case 4.0: return 4; default: return 0; case "": return 2; } return -1; } -mixed b() { return 0; } -.... -test 3347, expected result: EQ -mixed a() { switch(this_object()) { case 0: return 3; case 1: return 5; case 4.0: return 4; case "": return 2; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 3348, expected result: EQ -mixed a() { switch(this_object()) { case 0: return 3; case 1: return 5; case "": return 2; case 4.0: return 4; } return 0; } -mixed b() { return 0; } -.... -test 3349, expected result: EQ -mixed a() { switch(this_object()) { default: return 0; case 0: return 3; case 1: return 5; case "": return 2; case 4.0: return 4; } return -1; } -mixed b() { return 0; } -.... -test 3350, expected result: EQ -mixed a() { switch(this_object()) { case 0: return 3; default: return 0; case 1: return 5; case "": return 2; case 4.0: return 4; } return -1; } -mixed b() { return 0; } -.... -test 3351, expected result: EQ -mixed a() { switch(this_object()) { case 0: return 3; case 1: return 5; default: return 0; case "": return 2; case 4.0: return 4; } return -1; } -mixed b() { return 0; } -.... -test 3352, expected result: EQ -mixed a() { switch(this_object()) { case 0: return 3; case 1: return 5; case "": return 2; default: return 0; case 4.0: return 4; } return -1; } -mixed b() { return 0; } -.... -test 3353, expected result: EQ -mixed a() { switch(this_object()) { case 0: return 3; case 1: return 5; case "": return 2; case 4.0: return 4; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 3354, expected result: EQ -mixed a() { switch(this_object()) { case 4.0: return 4; case 0: return 3; case "": return 2; case 1: return 5; } return 0; } -mixed b() { return 0; } -.... -test 3355, expected result: EQ -mixed a() { switch(this_object()) { default: return 0; case 4.0: return 4; case 0: return 3; case "": return 2; case 1: return 5; } return -1; } -mixed b() { return 0; } -.... -test 3356, expected result: EQ -mixed a() { switch(this_object()) { case 4.0: return 4; default: return 0; case 0: return 3; case "": return 2; case 1: return 5; } return -1; } -mixed b() { return 0; } -.... -test 3357, expected result: EQ -mixed a() { switch(this_object()) { case 4.0: return 4; case 0: return 3; default: return 0; case "": return 2; case 1: return 5; } return -1; } -mixed b() { return 0; } -.... -test 3358, expected result: EQ -mixed a() { switch(this_object()) { case 4.0: return 4; case 0: return 3; case "": return 2; default: return 0; case 1: return 5; } return -1; } -mixed b() { return 0; } -.... -test 3359, expected result: EQ -mixed a() { switch(this_object()) { case 4.0: return 4; case 0: return 3; case "": return 2; case 1: return 5; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 3360, expected result: EQ -mixed a() { switch(this_object()) { case 4.0: return 4; case 0: return 3; case 1: return 5; case "": return 2; } return 0; } -mixed b() { return 0; } -.... -test 3361, expected result: EQ -mixed a() { switch(this_object()) { default: return 0; case 4.0: return 4; case 0: return 3; case 1: return 5; case "": return 2; } return -1; } -mixed b() { return 0; } -.... -test 3362, expected result: EQ -mixed a() { switch(this_object()) { case 4.0: return 4; default: return 0; case 0: return 3; case 1: return 5; case "": return 2; } return -1; } -mixed b() { return 0; } -.... -test 3363, expected result: EQ -mixed a() { switch(this_object()) { case 4.0: return 4; case 0: return 3; default: return 0; case 1: return 5; case "": return 2; } return -1; } -mixed b() { return 0; } -.... -test 3364, expected result: EQ -mixed a() { switch(this_object()) { case 4.0: return 4; case 0: return 3; case 1: return 5; default: return 0; case "": return 2; } return -1; } -mixed b() { return 0; } -.... -test 3365, expected result: EQ -mixed a() { switch(this_object()) { case 4.0: return 4; case 0: return 3; case 1: return 5; case "": return 2; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 3366, expected result: EQ -mixed a() { switch(this_object()) { case 4.0: return 4; case "": return 2; case 0: return 3; case 1: return 5; } return 0; } -mixed b() { return 0; } -.... -test 3367, expected result: EQ -mixed a() { switch(this_object()) { default: return 0; case 4.0: return 4; case "": return 2; case 0: return 3; case 1: return 5; } return -1; } -mixed b() { return 0; } -.... -test 3368, expected result: EQ -mixed a() { switch(this_object()) { case 4.0: return 4; default: return 0; case "": return 2; case 0: return 3; case 1: return 5; } return -1; } -mixed b() { return 0; } -.... -test 3369, expected result: EQ -mixed a() { switch(this_object()) { case 4.0: return 4; case "": return 2; default: return 0; case 0: return 3; case 1: return 5; } return -1; } -mixed b() { return 0; } -.... -test 3370, expected result: EQ -mixed a() { switch(this_object()) { case 4.0: return 4; case "": return 2; case 0: return 3; default: return 0; case 1: return 5; } return -1; } -mixed b() { return 0; } -.... -test 3371, expected result: EQ -mixed a() { switch(this_object()) { case 4.0: return 4; case "": return 2; case 0: return 3; case 1: return 5; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 3372, expected result: EQ -mixed a() { switch(this_object()) { case 4.0: return 4; case "": return 2; case 1: return 5; case 0: return 3; } return 0; } -mixed b() { return 0; } -.... -test 3373, expected result: EQ -mixed a() { switch(this_object()) { default: return 0; case 4.0: return 4; case "": return 2; case 1: return 5; case 0: return 3; } return -1; } -mixed b() { return 0; } -.... -test 3374, expected result: EQ -mixed a() { switch(this_object()) { case 4.0: return 4; default: return 0; case "": return 2; case 1: return 5; case 0: return 3; } return -1; } -mixed b() { return 0; } -.... -test 3375, expected result: EQ -mixed a() { switch(this_object()) { case 4.0: return 4; case "": return 2; default: return 0; case 1: return 5; case 0: return 3; } return -1; } -mixed b() { return 0; } -.... -test 3376, expected result: EQ -mixed a() { switch(this_object()) { case 4.0: return 4; case "": return 2; case 1: return 5; default: return 0; case 0: return 3; } return -1; } -mixed b() { return 0; } -.... -test 3377, expected result: EQ -mixed a() { switch(this_object()) { case 4.0: return 4; case "": return 2; case 1: return 5; case 0: return 3; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 3378, expected result: EQ -mixed a() { switch(this_object()) { case 4.0: return 4; case 1: return 5; case "": return 2; case 0: return 3; } return 0; } -mixed b() { return 0; } -.... -test 3379, expected result: EQ -mixed a() { switch(this_object()) { default: return 0; case 4.0: return 4; case 1: return 5; case "": return 2; case 0: return 3; } return -1; } -mixed b() { return 0; } -.... -test 3380, expected result: EQ -mixed a() { switch(this_object()) { case 4.0: return 4; default: return 0; case 1: return 5; case "": return 2; case 0: return 3; } return -1; } -mixed b() { return 0; } -.... -test 3381, expected result: EQ -mixed a() { switch(this_object()) { case 4.0: return 4; case 1: return 5; default: return 0; case "": return 2; case 0: return 3; } return -1; } -mixed b() { return 0; } -.... -test 3382, expected result: EQ -mixed a() { switch(this_object()) { case 4.0: return 4; case 1: return 5; case "": return 2; default: return 0; case 0: return 3; } return -1; } -mixed b() { return 0; } -.... -test 3383, expected result: EQ -mixed a() { switch(this_object()) { case 4.0: return 4; case 1: return 5; case "": return 2; case 0: return 3; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 3384, expected result: EQ -mixed a() { switch(this_object()) { case 4.0: return 4; case 1: return 5; case 0: return 3; case "": return 2; } return 0; } -mixed b() { return 0; } -.... -test 3385, expected result: EQ -mixed a() { switch(this_object()) { default: return 0; case 4.0: return 4; case 1: return 5; case 0: return 3; case "": return 2; } return -1; } -mixed b() { return 0; } -.... -test 3386, expected result: EQ -mixed a() { switch(this_object()) { case 4.0: return 4; default: return 0; case 1: return 5; case 0: return 3; case "": return 2; } return -1; } -mixed b() { return 0; } -.... -test 3387, expected result: EQ -mixed a() { switch(this_object()) { case 4.0: return 4; case 1: return 5; default: return 0; case 0: return 3; case "": return 2; } return -1; } -mixed b() { return 0; } -.... -test 3388, expected result: EQ -mixed a() { switch(this_object()) { case 4.0: return 4; case 1: return 5; case 0: return 3; default: return 0; case "": return 2; } return -1; } -mixed b() { return 0; } -.... -test 3389, expected result: EQ -mixed a() { switch(this_object()) { case 4.0: return 4; case 1: return 5; case 0: return 3; case "": return 2; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 3390, expected result: EQ -mixed a() { switch(this_object()) { case 1: return 5; case 0: return 3; case 4.0: return 4; case "": return 2; } return 0; } -mixed b() { return 0; } -.... -test 3391, expected result: EQ -mixed a() { switch(this_object()) { default: return 0; case 1: return 5; case 0: return 3; case 4.0: return 4; case "": return 2; } return -1; } -mixed b() { return 0; } -.... -test 3392, expected result: EQ -mixed a() { switch(this_object()) { case 1: return 5; default: return 0; case 0: return 3; case 4.0: return 4; case "": return 2; } return -1; } -mixed b() { return 0; } -.... -test 3393, expected result: EQ -mixed a() { switch(this_object()) { case 1: return 5; case 0: return 3; default: return 0; case 4.0: return 4; case "": return 2; } return -1; } -mixed b() { return 0; } -.... -test 3394, expected result: EQ -mixed a() { switch(this_object()) { case 1: return 5; case 0: return 3; case 4.0: return 4; default: return 0; case "": return 2; } return -1; } -mixed b() { return 0; } -.... -test 3395, expected result: EQ -mixed a() { switch(this_object()) { case 1: return 5; case 0: return 3; case 4.0: return 4; case "": return 2; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 3396, expected result: EQ -mixed a() { switch(this_object()) { case 1: return 5; case 0: return 3; case "": return 2; case 4.0: return 4; } return 0; } -mixed b() { return 0; } -.... -test 3397, expected result: EQ -mixed a() { switch(this_object()) { default: return 0; case 1: return 5; case 0: return 3; case "": return 2; case 4.0: return 4; } return -1; } -mixed b() { return 0; } -.... -test 3398, expected result: EQ -mixed a() { switch(this_object()) { case 1: return 5; default: return 0; case 0: return 3; case "": return 2; case 4.0: return 4; } return -1; } -mixed b() { return 0; } -.... -test 3399, expected result: EQ -mixed a() { switch(this_object()) { case 1: return 5; case 0: return 3; default: return 0; case "": return 2; case 4.0: return 4; } return -1; } -mixed b() { return 0; } -.... -test 3400, expected result: EQ -mixed a() { switch(this_object()) { case 1: return 5; case 0: return 3; case "": return 2; default: return 0; case 4.0: return 4; } return -1; } -mixed b() { return 0; } -.... -test 3401, expected result: EQ -mixed a() { switch(this_object()) { case 1: return 5; case 0: return 3; case "": return 2; case 4.0: return 4; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 3402, expected result: EQ -mixed a() { switch(this_object()) { case 1: return 5; case 4.0: return 4; case 0: return 3; case "": return 2; } return 0; } -mixed b() { return 0; } -.... -test 3403, expected result: EQ -mixed a() { switch(this_object()) { default: return 0; case 1: return 5; case 4.0: return 4; case 0: return 3; case "": return 2; } return -1; } -mixed b() { return 0; } -.... -test 3404, expected result: EQ -mixed a() { switch(this_object()) { case 1: return 5; default: return 0; case 4.0: return 4; case 0: return 3; case "": return 2; } return -1; } -mixed b() { return 0; } -.... -test 3405, expected result: EQ -mixed a() { switch(this_object()) { case 1: return 5; case 4.0: return 4; default: return 0; case 0: return 3; case "": return 2; } return -1; } -mixed b() { return 0; } -.... -test 3406, expected result: EQ -mixed a() { switch(this_object()) { case 1: return 5; case 4.0: return 4; case 0: return 3; default: return 0; case "": return 2; } return -1; } -mixed b() { return 0; } -.... -test 3407, expected result: EQ -mixed a() { switch(this_object()) { case 1: return 5; case 4.0: return 4; case 0: return 3; case "": return 2; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 3408, expected result: EQ -mixed a() { switch(this_object()) { case 1: return 5; case 4.0: return 4; case "": return 2; case 0: return 3; } return 0; } -mixed b() { return 0; } -.... -test 3409, expected result: EQ -mixed a() { switch(this_object()) { default: return 0; case 1: return 5; case 4.0: return 4; case "": return 2; case 0: return 3; } return -1; } -mixed b() { return 0; } -.... -test 3410, expected result: EQ -mixed a() { switch(this_object()) { case 1: return 5; default: return 0; case 4.0: return 4; case "": return 2; case 0: return 3; } return -1; } -mixed b() { return 0; } -.... -test 3411, expected result: EQ -mixed a() { switch(this_object()) { case 1: return 5; case 4.0: return 4; default: return 0; case "": return 2; case 0: return 3; } return -1; } -mixed b() { return 0; } -.... -test 3412, expected result: EQ -mixed a() { switch(this_object()) { case 1: return 5; case 4.0: return 4; case "": return 2; default: return 0; case 0: return 3; } return -1; } -mixed b() { return 0; } -.... -test 3413, expected result: EQ -mixed a() { switch(this_object()) { case 1: return 5; case 4.0: return 4; case "": return 2; case 0: return 3; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 3414, expected result: EQ -mixed a() { switch(this_object()) { case 1: return 5; case "": return 2; case 4.0: return 4; case 0: return 3; } return 0; } -mixed b() { return 0; } -.... -test 3415, expected result: EQ -mixed a() { switch(this_object()) { default: return 0; case 1: return 5; case "": return 2; case 4.0: return 4; case 0: return 3; } return -1; } -mixed b() { return 0; } -.... -test 3416, expected result: EQ -mixed a() { switch(this_object()) { case 1: return 5; default: return 0; case "": return 2; case 4.0: return 4; case 0: return 3; } return -1; } -mixed b() { return 0; } -.... -test 3417, expected result: EQ -mixed a() { switch(this_object()) { case 1: return 5; case "": return 2; default: return 0; case 4.0: return 4; case 0: return 3; } return -1; } -mixed b() { return 0; } -.... -test 3418, expected result: EQ -mixed a() { switch(this_object()) { case 1: return 5; case "": return 2; case 4.0: return 4; default: return 0; case 0: return 3; } return -1; } -mixed b() { return 0; } -.... -test 3419, expected result: EQ -mixed a() { switch(this_object()) { case 1: return 5; case "": return 2; case 4.0: return 4; case 0: return 3; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 3420, expected result: EQ -mixed a() { switch(this_object()) { case 1: return 5; case "": return 2; case 0: return 3; case 4.0: return 4; } return 0; } -mixed b() { return 0; } -.... -test 3421, expected result: EQ -mixed a() { switch(this_object()) { default: return 0; case 1: return 5; case "": return 2; case 0: return 3; case 4.0: return 4; } return -1; } -mixed b() { return 0; } -.... -test 3422, expected result: EQ -mixed a() { switch(this_object()) { case 1: return 5; default: return 0; case "": return 2; case 0: return 3; case 4.0: return 4; } return -1; } -mixed b() { return 0; } -.... -test 3423, expected result: EQ -mixed a() { switch(this_object()) { case 1: return 5; case "": return 2; default: return 0; case 0: return 3; case 4.0: return 4; } return -1; } -mixed b() { return 0; } -.... -test 3424, expected result: EQ -mixed a() { switch(this_object()) { case 1: return 5; case "": return 2; case 0: return 3; default: return 0; case 4.0: return 4; } return -1; } -mixed b() { return 0; } -.... -test 3425, expected result: EQ -mixed a() { switch(this_object()) { case 1: return 5; case "": return 2; case 0: return 3; case 4.0: return 4; default: return 0; } return -1; } -mixed b() { return 0; } -.... -test 3426, expected result: EQ -mixed a() { switch("") { case "": return 2; case 0: return 3; case 4.0: return 4; case 1: return 5; } return 0; } -mixed b() { return 2; } -.... -test 3427, expected result: EQ -mixed a() { switch("") { default: return 0; case "": return 2; case 0: return 3; case 4.0: return 4; case 1: return 5; } return -1; } -mixed b() { return 2; } -.... -test 3428, expected result: EQ -mixed a() { switch("") { case "": return 2; default: return 0; case 0: return 3; case 4.0: return 4; case 1: return 5; } return -1; } -mixed b() { return 2; } -.... -test 3429, expected result: EQ -mixed a() { switch("") { case "": return 2; case 0: return 3; default: return 0; case 4.0: return 4; case 1: return 5; } return -1; } -mixed b() { return 2; } -.... -test 3430, expected result: EQ -mixed a() { switch("") { case "": return 2; case 0: return 3; case 4.0: return 4; default: return 0; case 1: return 5; } return -1; } -mixed b() { return 2; } -.... -test 3431, expected result: EQ -mixed a() { switch("") { case "": return 2; case 0: return 3; case 4.0: return 4; case 1: return 5; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 3432, expected result: EQ -mixed a() { switch("") { case "": return 2; case 0: return 3; case 1: return 5; case 4.0: return 4; } return 0; } -mixed b() { return 2; } -.... -test 3433, expected result: EQ -mixed a() { switch("") { default: return 0; case "": return 2; case 0: return 3; case 1: return 5; case 4.0: return 4; } return -1; } -mixed b() { return 2; } -.... -test 3434, expected result: EQ -mixed a() { switch("") { case "": return 2; default: return 0; case 0: return 3; case 1: return 5; case 4.0: return 4; } return -1; } -mixed b() { return 2; } -.... -test 3435, expected result: EQ -mixed a() { switch("") { case "": return 2; case 0: return 3; default: return 0; case 1: return 5; case 4.0: return 4; } return -1; } -mixed b() { return 2; } -.... -test 3436, expected result: EQ -mixed a() { switch("") { case "": return 2; case 0: return 3; case 1: return 5; default: return 0; case 4.0: return 4; } return -1; } -mixed b() { return 2; } -.... -test 3437, expected result: EQ -mixed a() { switch("") { case "": return 2; case 0: return 3; case 1: return 5; case 4.0: return 4; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 3438, expected result: EQ -mixed a() { switch("") { case "": return 2; case 4.0: return 4; case 0: return 3; case 1: return 5; } return 0; } -mixed b() { return 2; } -.... -test 3439, expected result: EQ -mixed a() { switch("") { default: return 0; case "": return 2; case 4.0: return 4; case 0: return 3; case 1: return 5; } return -1; } -mixed b() { return 2; } -.... -test 3440, expected result: EQ -mixed a() { switch("") { case "": return 2; default: return 0; case 4.0: return 4; case 0: return 3; case 1: return 5; } return -1; } -mixed b() { return 2; } -.... -test 3441, expected result: EQ -mixed a() { switch("") { case "": return 2; case 4.0: return 4; default: return 0; case 0: return 3; case 1: return 5; } return -1; } -mixed b() { return 2; } -.... -test 3442, expected result: EQ -mixed a() { switch("") { case "": return 2; case 4.0: return 4; case 0: return 3; default: return 0; case 1: return 5; } return -1; } -mixed b() { return 2; } -.... -test 3443, expected result: EQ -mixed a() { switch("") { case "": return 2; case 4.0: return 4; case 0: return 3; case 1: return 5; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 3444, expected result: EQ -mixed a() { switch("") { case "": return 2; case 4.0: return 4; case 1: return 5; case 0: return 3; } return 0; } -mixed b() { return 2; } -.... -test 3445, expected result: EQ -mixed a() { switch("") { default: return 0; case "": return 2; case 4.0: return 4; case 1: return 5; case 0: return 3; } return -1; } -mixed b() { return 2; } -.... -test 3446, expected result: EQ -mixed a() { switch("") { case "": return 2; default: return 0; case 4.0: return 4; case 1: return 5; case 0: return 3; } return -1; } -mixed b() { return 2; } -.... -test 3447, expected result: EQ -mixed a() { switch("") { case "": return 2; case 4.0: return 4; default: return 0; case 1: return 5; case 0: return 3; } return -1; } -mixed b() { return 2; } -.... -test 3448, expected result: EQ -mixed a() { switch("") { case "": return 2; case 4.0: return 4; case 1: return 5; default: return 0; case 0: return 3; } return -1; } -mixed b() { return 2; } -.... -test 3449, expected result: EQ -mixed a() { switch("") { case "": return 2; case 4.0: return 4; case 1: return 5; case 0: return 3; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 3450, expected result: EQ -mixed a() { switch("") { case "": return 2; case 1: return 5; case 4.0: return 4; case 0: return 3; } return 0; } -mixed b() { return 2; } -.... -test 3451, expected result: EQ -mixed a() { switch("") { default: return 0; case "": return 2; case 1: return 5; case 4.0: return 4; case 0: return 3; } return -1; } -mixed b() { return 2; } -.... -test 3452, expected result: EQ -mixed a() { switch("") { case "": return 2; default: return 0; case 1: return 5; case 4.0: return 4; case 0: return 3; } return -1; } -mixed b() { return 2; } -.... -test 3453, expected result: EQ -mixed a() { switch("") { case "": return 2; case 1: return 5; default: return 0; case 4.0: return 4; case 0: return 3; } return -1; } -mixed b() { return 2; } -.... -test 3454, expected result: EQ -mixed a() { switch("") { case "": return 2; case 1: return 5; case 4.0: return 4; default: return 0; case 0: return 3; } return -1; } -mixed b() { return 2; } -.... -test 3455, expected result: EQ -mixed a() { switch("") { case "": return 2; case 1: return 5; case 4.0: return 4; case 0: return 3; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 3456, expected result: EQ -mixed a() { switch("") { case "": return 2; case 1: return 5; case 0: return 3; case 4.0: return 4; } return 0; } -mixed b() { return 2; } -.... -test 3457, expected result: EQ -mixed a() { switch("") { default: return 0; case "": return 2; case 1: return 5; case 0: return 3; case 4.0: return 4; } return -1; } -mixed b() { return 2; } -.... -test 3458, expected result: EQ -mixed a() { switch("") { case "": return 2; default: return 0; case 1: return 5; case 0: return 3; case 4.0: return 4; } return -1; } -mixed b() { return 2; } -.... -test 3459, expected result: EQ -mixed a() { switch("") { case "": return 2; case 1: return 5; default: return 0; case 0: return 3; case 4.0: return 4; } return -1; } -mixed b() { return 2; } -.... -test 3460, expected result: EQ -mixed a() { switch("") { case "": return 2; case 1: return 5; case 0: return 3; default: return 0; case 4.0: return 4; } return -1; } -mixed b() { return 2; } -.... -test 3461, expected result: EQ -mixed a() { switch("") { case "": return 2; case 1: return 5; case 0: return 3; case 4.0: return 4; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 3462, expected result: EQ -mixed a() { switch("") { case 0: return 3; case "": return 2; case 4.0: return 4; case 1: return 5; } return 0; } -mixed b() { return 2; } -.... -test 3463, expected result: EQ -mixed a() { switch("") { default: return 0; case 0: return 3; case "": return 2; case 4.0: return 4; case 1: return 5; } return -1; } -mixed b() { return 2; } -.... -test 3464, expected result: EQ -mixed a() { switch("") { case 0: return 3; default: return 0; case "": return 2; case 4.0: return 4; case 1: return 5; } return -1; } -mixed b() { return 2; } -.... -test 3465, expected result: EQ -mixed a() { switch("") { case 0: return 3; case "": return 2; default: return 0; case 4.0: return 4; case 1: return 5; } return -1; } -mixed b() { return 2; } -.... -test 3466, expected result: EQ -mixed a() { switch("") { case 0: return 3; case "": return 2; case 4.0: return 4; default: return 0; case 1: return 5; } return -1; } -mixed b() { return 2; } -.... -test 3467, expected result: EQ -mixed a() { switch("") { case 0: return 3; case "": return 2; case 4.0: return 4; case 1: return 5; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 3468, expected result: EQ -mixed a() { switch("") { case 0: return 3; case "": return 2; case 1: return 5; case 4.0: return 4; } return 0; } -mixed b() { return 2; } -.... -test 3469, expected result: EQ -mixed a() { switch("") { default: return 0; case 0: return 3; case "": return 2; case 1: return 5; case 4.0: return 4; } return -1; } -mixed b() { return 2; } -.... -test 3470, expected result: EQ -mixed a() { switch("") { case 0: return 3; default: return 0; case "": return 2; case 1: return 5; case 4.0: return 4; } return -1; } -mixed b() { return 2; } -.... -test 3471, expected result: EQ -mixed a() { switch("") { case 0: return 3; case "": return 2; default: return 0; case 1: return 5; case 4.0: return 4; } return -1; } -mixed b() { return 2; } -.... -test 3472, expected result: EQ -mixed a() { switch("") { case 0: return 3; case "": return 2; case 1: return 5; default: return 0; case 4.0: return 4; } return -1; } -mixed b() { return 2; } -.... -test 3473, expected result: EQ -mixed a() { switch("") { case 0: return 3; case "": return 2; case 1: return 5; case 4.0: return 4; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 3474, expected result: EQ -mixed a() { switch("") { case 0: return 3; case 4.0: return 4; case "": return 2; case 1: return 5; } return 0; } -mixed b() { return 2; } -.... -test 3475, expected result: EQ -mixed a() { switch("") { default: return 0; case 0: return 3; case 4.0: return 4; case "": return 2; case 1: return 5; } return -1; } -mixed b() { return 2; } -.... -test 3476, expected result: EQ -mixed a() { switch("") { case 0: return 3; default: return 0; case 4.0: return 4; case "": return 2; case 1: return 5; } return -1; } -mixed b() { return 2; } -.... -test 3477, expected result: EQ -mixed a() { switch("") { case 0: return 3; case 4.0: return 4; default: return 0; case "": return 2; case 1: return 5; } return -1; } -mixed b() { return 2; } -.... -test 3478, expected result: EQ -mixed a() { switch("") { case 0: return 3; case 4.0: return 4; case "": return 2; default: return 0; case 1: return 5; } return -1; } -mixed b() { return 2; } -.... -test 3479, expected result: EQ -mixed a() { switch("") { case 0: return 3; case 4.0: return 4; case "": return 2; case 1: return 5; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 3480, expected result: EQ -mixed a() { switch("") { case 0: return 3; case 4.0: return 4; case 1: return 5; case "": return 2; } return 0; } -mixed b() { return 2; } -.... -test 3481, expected result: EQ -mixed a() { switch("") { default: return 0; case 0: return 3; case 4.0: return 4; case 1: return 5; case "": return 2; } return -1; } -mixed b() { return 2; } -.... -test 3482, expected result: EQ -mixed a() { switch("") { case 0: return 3; default: return 0; case 4.0: return 4; case 1: return 5; case "": return 2; } return -1; } -mixed b() { return 2; } -.... -test 3483, expected result: EQ -mixed a() { switch("") { case 0: return 3; case 4.0: return 4; default: return 0; case 1: return 5; case "": return 2; } return -1; } -mixed b() { return 2; } -.... -test 3484, expected result: EQ -mixed a() { switch("") { case 0: return 3; case 4.0: return 4; case 1: return 5; default: return 0; case "": return 2; } return -1; } -mixed b() { return 2; } -.... -test 3485, expected result: EQ -mixed a() { switch("") { case 0: return 3; case 4.0: return 4; case 1: return 5; case "": return 2; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 3486, expected result: EQ -mixed a() { switch("") { case 0: return 3; case 1: return 5; case 4.0: return 4; case "": return 2; } return 0; } -mixed b() { return 2; } -.... -test 3487, expected result: EQ -mixed a() { switch("") { default: return 0; case 0: return 3; case 1: return 5; case 4.0: return 4; case "": return 2; } return -1; } -mixed b() { return 2; } -.... -test 3488, expected result: EQ -mixed a() { switch("") { case 0: return 3; default: return 0; case 1: return 5; case 4.0: return 4; case "": return 2; } return -1; } -mixed b() { return 2; } -.... -test 3489, expected result: EQ -mixed a() { switch("") { case 0: return 3; case 1: return 5; default: return 0; case 4.0: return 4; case "": return 2; } return -1; } -mixed b() { return 2; } -.... -test 3490, expected result: EQ -mixed a() { switch("") { case 0: return 3; case 1: return 5; case 4.0: return 4; default: return 0; case "": return 2; } return -1; } -mixed b() { return 2; } -.... -test 3491, expected result: EQ -mixed a() { switch("") { case 0: return 3; case 1: return 5; case 4.0: return 4; case "": return 2; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 3492, expected result: EQ -mixed a() { switch("") { case 0: return 3; case 1: return 5; case "": return 2; case 4.0: return 4; } return 0; } -mixed b() { return 2; } -.... -test 3493, expected result: EQ -mixed a() { switch("") { default: return 0; case 0: return 3; case 1: return 5; case "": return 2; case 4.0: return 4; } return -1; } -mixed b() { return 2; } -.... -test 3494, expected result: EQ -mixed a() { switch("") { case 0: return 3; default: return 0; case 1: return 5; case "": return 2; case 4.0: return 4; } return -1; } -mixed b() { return 2; } -.... -test 3495, expected result: EQ -mixed a() { switch("") { case 0: return 3; case 1: return 5; default: return 0; case "": return 2; case 4.0: return 4; } return -1; } -mixed b() { return 2; } -.... -test 3496, expected result: EQ -mixed a() { switch("") { case 0: return 3; case 1: return 5; case "": return 2; default: return 0; case 4.0: return 4; } return -1; } -mixed b() { return 2; } -.... -test 3497, expected result: EQ -mixed a() { switch("") { case 0: return 3; case 1: return 5; case "": return 2; case 4.0: return 4; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 3498, expected result: EQ -mixed a() { switch("") { case 4.0: return 4; case 0: return 3; case "": return 2; case 1: return 5; } return 0; } -mixed b() { return 2; } -.... -test 3499, expected result: EQ -mixed a() { switch("") { default: return 0; case 4.0: return 4; case 0: return 3; case "": return 2; case 1: return 5; } return -1; } -mixed b() { return 2; } -.... -test 3500, expected result: EQ -mixed a() { switch("") { case 4.0: return 4; default: return 0; case 0: return 3; case "": return 2; case 1: return 5; } return -1; } -mixed b() { return 2; } -.... -test 3501, expected result: EQ -mixed a() { switch("") { case 4.0: return 4; case 0: return 3; default: return 0; case "": return 2; case 1: return 5; } return -1; } -mixed b() { return 2; } -.... -test 3502, expected result: EQ -mixed a() { switch("") { case 4.0: return 4; case 0: return 3; case "": return 2; default: return 0; case 1: return 5; } return -1; } -mixed b() { return 2; } -.... -test 3503, expected result: EQ -mixed a() { switch("") { case 4.0: return 4; case 0: return 3; case "": return 2; case 1: return 5; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 3504, expected result: EQ -mixed a() { switch("") { case 4.0: return 4; case 0: return 3; case 1: return 5; case "": return 2; } return 0; } -mixed b() { return 2; } -.... -test 3505, expected result: EQ -mixed a() { switch("") { default: return 0; case 4.0: return 4; case 0: return 3; case 1: return 5; case "": return 2; } return -1; } -mixed b() { return 2; } -.... -test 3506, expected result: EQ -mixed a() { switch("") { case 4.0: return 4; default: return 0; case 0: return 3; case 1: return 5; case "": return 2; } return -1; } -mixed b() { return 2; } -.... -test 3507, expected result: EQ -mixed a() { switch("") { case 4.0: return 4; case 0: return 3; default: return 0; case 1: return 5; case "": return 2; } return -1; } -mixed b() { return 2; } -.... -test 3508, expected result: EQ -mixed a() { switch("") { case 4.0: return 4; case 0: return 3; case 1: return 5; default: return 0; case "": return 2; } return -1; } -mixed b() { return 2; } -.... -test 3509, expected result: EQ -mixed a() { switch("") { case 4.0: return 4; case 0: return 3; case 1: return 5; case "": return 2; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 3510, expected result: EQ -mixed a() { switch("") { case 4.0: return 4; case "": return 2; case 0: return 3; case 1: return 5; } return 0; } -mixed b() { return 2; } -.... -test 3511, expected result: EQ -mixed a() { switch("") { default: return 0; case 4.0: return 4; case "": return 2; case 0: return 3; case 1: return 5; } return -1; } -mixed b() { return 2; } -.... -test 3512, expected result: EQ -mixed a() { switch("") { case 4.0: return 4; default: return 0; case "": return 2; case 0: return 3; case 1: return 5; } return -1; } -mixed b() { return 2; } -.... -test 3513, expected result: EQ -mixed a() { switch("") { case 4.0: return 4; case "": return 2; default: return 0; case 0: return 3; case 1: return 5; } return -1; } -mixed b() { return 2; } -.... -test 3514, expected result: EQ -mixed a() { switch("") { case 4.0: return 4; case "": return 2; case 0: return 3; default: return 0; case 1: return 5; } return -1; } -mixed b() { return 2; } -.... -test 3515, expected result: EQ -mixed a() { switch("") { case 4.0: return 4; case "": return 2; case 0: return 3; case 1: return 5; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 3516, expected result: EQ -mixed a() { switch("") { case 4.0: return 4; case "": return 2; case 1: return 5; case 0: return 3; } return 0; } -mixed b() { return 2; } -.... -test 3517, expected result: EQ -mixed a() { switch("") { default: return 0; case 4.0: return 4; case "": return 2; case 1: return 5; case 0: return 3; } return -1; } -mixed b() { return 2; } -.... -test 3518, expected result: EQ -mixed a() { switch("") { case 4.0: return 4; default: return 0; case "": return 2; case 1: return 5; case 0: return 3; } return -1; } -mixed b() { return 2; } -.... -test 3519, expected result: EQ -mixed a() { switch("") { case 4.0: return 4; case "": return 2; default: return 0; case 1: return 5; case 0: return 3; } return -1; } -mixed b() { return 2; } -.... -test 3520, expected result: EQ -mixed a() { switch("") { case 4.0: return 4; case "": return 2; case 1: return 5; default: return 0; case 0: return 3; } return -1; } -mixed b() { return 2; } -.... -test 3521, expected result: EQ -mixed a() { switch("") { case 4.0: return 4; case "": return 2; case 1: return 5; case 0: return 3; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 3522, expected result: EQ -mixed a() { switch("") { case 4.0: return 4; case 1: return 5; case "": return 2; case 0: return 3; } return 0; } -mixed b() { return 2; } -.... -test 3523, expected result: EQ -mixed a() { switch("") { default: return 0; case 4.0: return 4; case 1: return 5; case "": return 2; case 0: return 3; } return -1; } -mixed b() { return 2; } -.... -test 3524, expected result: EQ -mixed a() { switch("") { case 4.0: return 4; default: return 0; case 1: return 5; case "": return 2; case 0: return 3; } return -1; } -mixed b() { return 2; } -.... -test 3525, expected result: EQ -mixed a() { switch("") { case 4.0: return 4; case 1: return 5; default: return 0; case "": return 2; case 0: return 3; } return -1; } -mixed b() { return 2; } -.... -test 3526, expected result: EQ -mixed a() { switch("") { case 4.0: return 4; case 1: return 5; case "": return 2; default: return 0; case 0: return 3; } return -1; } -mixed b() { return 2; } -.... -test 3527, expected result: EQ -mixed a() { switch("") { case 4.0: return 4; case 1: return 5; case "": return 2; case 0: return 3; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 3528, expected result: EQ -mixed a() { switch("") { case 4.0: return 4; case 1: return 5; case 0: return 3; case "": return 2; } return 0; } -mixed b() { return 2; } -.... -test 3529, expected result: EQ -mixed a() { switch("") { default: return 0; case 4.0: return 4; case 1: return 5; case 0: return 3; case "": return 2; } return -1; } -mixed b() { return 2; } -.... -test 3530, expected result: EQ -mixed a() { switch("") { case 4.0: return 4; default: return 0; case 1: return 5; case 0: return 3; case "": return 2; } return -1; } -mixed b() { return 2; } -.... -test 3531, expected result: EQ -mixed a() { switch("") { case 4.0: return 4; case 1: return 5; default: return 0; case 0: return 3; case "": return 2; } return -1; } -mixed b() { return 2; } -.... -test 3532, expected result: EQ -mixed a() { switch("") { case 4.0: return 4; case 1: return 5; case 0: return 3; default: return 0; case "": return 2; } return -1; } -mixed b() { return 2; } -.... -test 3533, expected result: EQ -mixed a() { switch("") { case 4.0: return 4; case 1: return 5; case 0: return 3; case "": return 2; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 3534, expected result: EQ -mixed a() { switch("") { case 1: return 5; case 0: return 3; case 4.0: return 4; case "": return 2; } return 0; } -mixed b() { return 2; } -.... -test 3535, expected result: EQ -mixed a() { switch("") { default: return 0; case 1: return 5; case 0: return 3; case 4.0: return 4; case "": return 2; } return -1; } -mixed b() { return 2; } -.... -test 3536, expected result: EQ -mixed a() { switch("") { case 1: return 5; default: return 0; case 0: return 3; case 4.0: return 4; case "": return 2; } return -1; } -mixed b() { return 2; } -.... -test 3537, expected result: EQ -mixed a() { switch("") { case 1: return 5; case 0: return 3; default: return 0; case 4.0: return 4; case "": return 2; } return -1; } -mixed b() { return 2; } -.... -test 3538, expected result: EQ -mixed a() { switch("") { case 1: return 5; case 0: return 3; case 4.0: return 4; default: return 0; case "": return 2; } return -1; } -mixed b() { return 2; } -.... -test 3539, expected result: EQ -mixed a() { switch("") { case 1: return 5; case 0: return 3; case 4.0: return 4; case "": return 2; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 3540, expected result: EQ -mixed a() { switch("") { case 1: return 5; case 0: return 3; case "": return 2; case 4.0: return 4; } return 0; } -mixed b() { return 2; } -.... -test 3541, expected result: EQ -mixed a() { switch("") { default: return 0; case 1: return 5; case 0: return 3; case "": return 2; case 4.0: return 4; } return -1; } -mixed b() { return 2; } -.... -test 3542, expected result: EQ -mixed a() { switch("") { case 1: return 5; default: return 0; case 0: return 3; case "": return 2; case 4.0: return 4; } return -1; } -mixed b() { return 2; } -.... -test 3543, expected result: EQ -mixed a() { switch("") { case 1: return 5; case 0: return 3; default: return 0; case "": return 2; case 4.0: return 4; } return -1; } -mixed b() { return 2; } -.... -test 3544, expected result: EQ -mixed a() { switch("") { case 1: return 5; case 0: return 3; case "": return 2; default: return 0; case 4.0: return 4; } return -1; } -mixed b() { return 2; } -.... -test 3545, expected result: EQ -mixed a() { switch("") { case 1: return 5; case 0: return 3; case "": return 2; case 4.0: return 4; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 3546, expected result: EQ -mixed a() { switch("") { case 1: return 5; case 4.0: return 4; case 0: return 3; case "": return 2; } return 0; } -mixed b() { return 2; } -.... -test 3547, expected result: EQ -mixed a() { switch("") { default: return 0; case 1: return 5; case 4.0: return 4; case 0: return 3; case "": return 2; } return -1; } -mixed b() { return 2; } -.... -test 3548, expected result: EQ -mixed a() { switch("") { case 1: return 5; default: return 0; case 4.0: return 4; case 0: return 3; case "": return 2; } return -1; } -mixed b() { return 2; } -.... -test 3549, expected result: EQ -mixed a() { switch("") { case 1: return 5; case 4.0: return 4; default: return 0; case 0: return 3; case "": return 2; } return -1; } -mixed b() { return 2; } -.... -test 3550, expected result: EQ -mixed a() { switch("") { case 1: return 5; case 4.0: return 4; case 0: return 3; default: return 0; case "": return 2; } return -1; } -mixed b() { return 2; } -.... -test 3551, expected result: EQ -mixed a() { switch("") { case 1: return 5; case 4.0: return 4; case 0: return 3; case "": return 2; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 3552, expected result: EQ -mixed a() { switch("") { case 1: return 5; case 4.0: return 4; case "": return 2; case 0: return 3; } return 0; } -mixed b() { return 2; } -.... -test 3553, expected result: EQ -mixed a() { switch("") { default: return 0; case 1: return 5; case 4.0: return 4; case "": return 2; case 0: return 3; } return -1; } -mixed b() { return 2; } -.... -test 3554, expected result: EQ -mixed a() { switch("") { case 1: return 5; default: return 0; case 4.0: return 4; case "": return 2; case 0: return 3; } return -1; } -mixed b() { return 2; } -.... -test 3555, expected result: EQ -mixed a() { switch("") { case 1: return 5; case 4.0: return 4; default: return 0; case "": return 2; case 0: return 3; } return -1; } -mixed b() { return 2; } -.... -test 3556, expected result: EQ -mixed a() { switch("") { case 1: return 5; case 4.0: return 4; case "": return 2; default: return 0; case 0: return 3; } return -1; } -mixed b() { return 2; } -.... -test 3557, expected result: EQ -mixed a() { switch("") { case 1: return 5; case 4.0: return 4; case "": return 2; case 0: return 3; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 3558, expected result: EQ -mixed a() { switch("") { case 1: return 5; case "": return 2; case 4.0: return 4; case 0: return 3; } return 0; } -mixed b() { return 2; } -.... -test 3559, expected result: EQ -mixed a() { switch("") { default: return 0; case 1: return 5; case "": return 2; case 4.0: return 4; case 0: return 3; } return -1; } -mixed b() { return 2; } -.... -test 3560, expected result: EQ -mixed a() { switch("") { case 1: return 5; default: return 0; case "": return 2; case 4.0: return 4; case 0: return 3; } return -1; } -mixed b() { return 2; } -.... -test 3561, expected result: EQ -mixed a() { switch("") { case 1: return 5; case "": return 2; default: return 0; case 4.0: return 4; case 0: return 3; } return -1; } -mixed b() { return 2; } -.... -test 3562, expected result: EQ -mixed a() { switch("") { case 1: return 5; case "": return 2; case 4.0: return 4; default: return 0; case 0: return 3; } return -1; } -mixed b() { return 2; } -.... -test 3563, expected result: EQ -mixed a() { switch("") { case 1: return 5; case "": return 2; case 4.0: return 4; case 0: return 3; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 3564, expected result: EQ -mixed a() { switch("") { case 1: return 5; case "": return 2; case 0: return 3; case 4.0: return 4; } return 0; } -mixed b() { return 2; } -.... -test 3565, expected result: EQ -mixed a() { switch("") { default: return 0; case 1: return 5; case "": return 2; case 0: return 3; case 4.0: return 4; } return -1; } -mixed b() { return 2; } -.... -test 3566, expected result: EQ -mixed a() { switch("") { case 1: return 5; default: return 0; case "": return 2; case 0: return 3; case 4.0: return 4; } return -1; } -mixed b() { return 2; } -.... -test 3567, expected result: EQ -mixed a() { switch("") { case 1: return 5; case "": return 2; default: return 0; case 0: return 3; case 4.0: return 4; } return -1; } -mixed b() { return 2; } -.... -test 3568, expected result: EQ -mixed a() { switch("") { case 1: return 5; case "": return 2; case 0: return 3; default: return 0; case 4.0: return 4; } return -1; } -mixed b() { return 2; } -.... -test 3569, expected result: EQ -mixed a() { switch("") { case 1: return 5; case "": return 2; case 0: return 3; case 4.0: return 4; default: return 0; } return -1; } -mixed b() { return 2; } -.... -test 3570, expected result: EQ -mixed a() { switch(0) { case "": return 2; case 0: return 3; case 4.0: return 4; case 1: return 5; } return 0; } -mixed b() { return 3; } -.... -test 3571, expected result: EQ -mixed a() { switch(0) { default: return 0; case "": return 2; case 0: return 3; case 4.0: return 4; case 1: return 5; } return -1; } -mixed b() { return 3; } -.... -test 3572, expected result: EQ -mixed a() { switch(0) { case "": return 2; default: return 0; case 0: return 3; case 4.0: return 4; case 1: return 5; } return -1; } -mixed b() { return 3; } -.... -test 3573, expected result: EQ -mixed a() { switch(0) { case "": return 2; case 0: return 3; default: return 0; case 4.0: return 4; case 1: return 5; } return -1; } -mixed b() { return 3; } -.... -test 3574, expected result: EQ -mixed a() { switch(0) { case "": return 2; case 0: return 3; case 4.0: return 4; default: return 0; case 1: return 5; } return -1; } -mixed b() { return 3; } -.... -test 3575, expected result: EQ -mixed a() { switch(0) { case "": return 2; case 0: return 3; case 4.0: return 4; case 1: return 5; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 3576, expected result: EQ -mixed a() { switch(0) { case "": return 2; case 0: return 3; case 1: return 5; case 4.0: return 4; } return 0; } -mixed b() { return 3; } -.... -test 3577, expected result: EQ -mixed a() { switch(0) { default: return 0; case "": return 2; case 0: return 3; case 1: return 5; case 4.0: return 4; } return -1; } -mixed b() { return 3; } -.... -test 3578, expected result: EQ -mixed a() { switch(0) { case "": return 2; default: return 0; case 0: return 3; case 1: return 5; case 4.0: return 4; } return -1; } -mixed b() { return 3; } -.... -test 3579, expected result: EQ -mixed a() { switch(0) { case "": return 2; case 0: return 3; default: return 0; case 1: return 5; case 4.0: return 4; } return -1; } -mixed b() { return 3; } -.... -test 3580, expected result: EQ -mixed a() { switch(0) { case "": return 2; case 0: return 3; case 1: return 5; default: return 0; case 4.0: return 4; } return -1; } -mixed b() { return 3; } -.... -test 3581, expected result: EQ -mixed a() { switch(0) { case "": return 2; case 0: return 3; case 1: return 5; case 4.0: return 4; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 3582, expected result: EQ -mixed a() { switch(0) { case "": return 2; case 4.0: return 4; case 0: return 3; case 1: return 5; } return 0; } -mixed b() { return 3; } -.... -test 3583, expected result: EQ -mixed a() { switch(0) { default: return 0; case "": return 2; case 4.0: return 4; case 0: return 3; case 1: return 5; } return -1; } -mixed b() { return 3; } -.... -test 3584, expected result: EQ -mixed a() { switch(0) { case "": return 2; default: return 0; case 4.0: return 4; case 0: return 3; case 1: return 5; } return -1; } -mixed b() { return 3; } -.... -test 3585, expected result: EQ -mixed a() { switch(0) { case "": return 2; case 4.0: return 4; default: return 0; case 0: return 3; case 1: return 5; } return -1; } -mixed b() { return 3; } -.... -test 3586, expected result: EQ -mixed a() { switch(0) { case "": return 2; case 4.0: return 4; case 0: return 3; default: return 0; case 1: return 5; } return -1; } -mixed b() { return 3; } -.... -test 3587, expected result: EQ -mixed a() { switch(0) { case "": return 2; case 4.0: return 4; case 0: return 3; case 1: return 5; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 3588, expected result: EQ -mixed a() { switch(0) { case "": return 2; case 4.0: return 4; case 1: return 5; case 0: return 3; } return 0; } -mixed b() { return 3; } -.... -test 3589, expected result: EQ -mixed a() { switch(0) { default: return 0; case "": return 2; case 4.0: return 4; case 1: return 5; case 0: return 3; } return -1; } -mixed b() { return 3; } -.... -test 3590, expected result: EQ -mixed a() { switch(0) { case "": return 2; default: return 0; case 4.0: return 4; case 1: return 5; case 0: return 3; } return -1; } -mixed b() { return 3; } -.... -test 3591, expected result: EQ -mixed a() { switch(0) { case "": return 2; case 4.0: return 4; default: return 0; case 1: return 5; case 0: return 3; } return -1; } -mixed b() { return 3; } -.... -test 3592, expected result: EQ -mixed a() { switch(0) { case "": return 2; case 4.0: return 4; case 1: return 5; default: return 0; case 0: return 3; } return -1; } -mixed b() { return 3; } -.... -test 3593, expected result: EQ -mixed a() { switch(0) { case "": return 2; case 4.0: return 4; case 1: return 5; case 0: return 3; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 3594, expected result: EQ -mixed a() { switch(0) { case "": return 2; case 1: return 5; case 4.0: return 4; case 0: return 3; } return 0; } -mixed b() { return 3; } -.... -test 3595, expected result: EQ -mixed a() { switch(0) { default: return 0; case "": return 2; case 1: return 5; case 4.0: return 4; case 0: return 3; } return -1; } -mixed b() { return 3; } -.... -test 3596, expected result: EQ -mixed a() { switch(0) { case "": return 2; default: return 0; case 1: return 5; case 4.0: return 4; case 0: return 3; } return -1; } -mixed b() { return 3; } -.... -test 3597, expected result: EQ -mixed a() { switch(0) { case "": return 2; case 1: return 5; default: return 0; case 4.0: return 4; case 0: return 3; } return -1; } -mixed b() { return 3; } -.... -test 3598, expected result: EQ -mixed a() { switch(0) { case "": return 2; case 1: return 5; case 4.0: return 4; default: return 0; case 0: return 3; } return -1; } -mixed b() { return 3; } -.... -test 3599, expected result: EQ -mixed a() { switch(0) { case "": return 2; case 1: return 5; case 4.0: return 4; case 0: return 3; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 3600, expected result: EQ -mixed a() { switch(0) { case "": return 2; case 1: return 5; case 0: return 3; case 4.0: return 4; } return 0; } -mixed b() { return 3; } -.... -test 3601, expected result: EQ -mixed a() { switch(0) { default: return 0; case "": return 2; case 1: return 5; case 0: return 3; case 4.0: return 4; } return -1; } -mixed b() { return 3; } -.... -test 3602, expected result: EQ -mixed a() { switch(0) { case "": return 2; default: return 0; case 1: return 5; case 0: return 3; case 4.0: return 4; } return -1; } -mixed b() { return 3; } -.... -test 3603, expected result: EQ -mixed a() { switch(0) { case "": return 2; case 1: return 5; default: return 0; case 0: return 3; case 4.0: return 4; } return -1; } -mixed b() { return 3; } -.... -test 3604, expected result: EQ -mixed a() { switch(0) { case "": return 2; case 1: return 5; case 0: return 3; default: return 0; case 4.0: return 4; } return -1; } -mixed b() { return 3; } -.... -test 3605, expected result: EQ -mixed a() { switch(0) { case "": return 2; case 1: return 5; case 0: return 3; case 4.0: return 4; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 3606, expected result: EQ -mixed a() { switch(0) { case 0: return 3; case "": return 2; case 4.0: return 4; case 1: return 5; } return 0; } -mixed b() { return 3; } -.... -test 3607, expected result: EQ -mixed a() { switch(0) { default: return 0; case 0: return 3; case "": return 2; case 4.0: return 4; case 1: return 5; } return -1; } -mixed b() { return 3; } -.... -test 3608, expected result: EQ -mixed a() { switch(0) { case 0: return 3; default: return 0; case "": return 2; case 4.0: return 4; case 1: return 5; } return -1; } -mixed b() { return 3; } -.... -test 3609, expected result: EQ -mixed a() { switch(0) { case 0: return 3; case "": return 2; default: return 0; case 4.0: return 4; case 1: return 5; } return -1; } -mixed b() { return 3; } -.... -test 3610, expected result: EQ -mixed a() { switch(0) { case 0: return 3; case "": return 2; case 4.0: return 4; default: return 0; case 1: return 5; } return -1; } -mixed b() { return 3; } -.... -test 3611, expected result: EQ -mixed a() { switch(0) { case 0: return 3; case "": return 2; case 4.0: return 4; case 1: return 5; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 3612, expected result: EQ -mixed a() { switch(0) { case 0: return 3; case "": return 2; case 1: return 5; case 4.0: return 4; } return 0; } -mixed b() { return 3; } -.... -test 3613, expected result: EQ -mixed a() { switch(0) { default: return 0; case 0: return 3; case "": return 2; case 1: return 5; case 4.0: return 4; } return -1; } -mixed b() { return 3; } -.... -test 3614, expected result: EQ -mixed a() { switch(0) { case 0: return 3; default: return 0; case "": return 2; case 1: return 5; case 4.0: return 4; } return -1; } -mixed b() { return 3; } -.... -test 3615, expected result: EQ -mixed a() { switch(0) { case 0: return 3; case "": return 2; default: return 0; case 1: return 5; case 4.0: return 4; } return -1; } -mixed b() { return 3; } -.... -test 3616, expected result: EQ -mixed a() { switch(0) { case 0: return 3; case "": return 2; case 1: return 5; default: return 0; case 4.0: return 4; } return -1; } -mixed b() { return 3; } -.... -test 3617, expected result: EQ -mixed a() { switch(0) { case 0: return 3; case "": return 2; case 1: return 5; case 4.0: return 4; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 3618, expected result: EQ -mixed a() { switch(0) { case 0: return 3; case 4.0: return 4; case "": return 2; case 1: return 5; } return 0; } -mixed b() { return 3; } -.... -test 3619, expected result: EQ -mixed a() { switch(0) { default: return 0; case 0: return 3; case 4.0: return 4; case "": return 2; case 1: return 5; } return -1; } -mixed b() { return 3; } -.... -test 3620, expected result: EQ -mixed a() { switch(0) { case 0: return 3; default: return 0; case 4.0: return 4; case "": return 2; case 1: return 5; } return -1; } -mixed b() { return 3; } -.... -test 3621, expected result: EQ -mixed a() { switch(0) { case 0: return 3; case 4.0: return 4; default: return 0; case "": return 2; case 1: return 5; } return -1; } -mixed b() { return 3; } -.... -test 3622, expected result: EQ -mixed a() { switch(0) { case 0: return 3; case 4.0: return 4; case "": return 2; default: return 0; case 1: return 5; } return -1; } -mixed b() { return 3; } -.... -test 3623, expected result: EQ -mixed a() { switch(0) { case 0: return 3; case 4.0: return 4; case "": return 2; case 1: return 5; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 3624, expected result: EQ -mixed a() { switch(0) { case 0: return 3; case 4.0: return 4; case 1: return 5; case "": return 2; } return 0; } -mixed b() { return 3; } -.... -test 3625, expected result: EQ -mixed a() { switch(0) { default: return 0; case 0: return 3; case 4.0: return 4; case 1: return 5; case "": return 2; } return -1; } -mixed b() { return 3; } -.... -test 3626, expected result: EQ -mixed a() { switch(0) { case 0: return 3; default: return 0; case 4.0: return 4; case 1: return 5; case "": return 2; } return -1; } -mixed b() { return 3; } -.... -test 3627, expected result: EQ -mixed a() { switch(0) { case 0: return 3; case 4.0: return 4; default: return 0; case 1: return 5; case "": return 2; } return -1; } -mixed b() { return 3; } -.... -test 3628, expected result: EQ -mixed a() { switch(0) { case 0: return 3; case 4.0: return 4; case 1: return 5; default: return 0; case "": return 2; } return -1; } -mixed b() { return 3; } -.... -test 3629, expected result: EQ -mixed a() { switch(0) { case 0: return 3; case 4.0: return 4; case 1: return 5; case "": return 2; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 3630, expected result: EQ -mixed a() { switch(0) { case 0: return 3; case 1: return 5; case 4.0: return 4; case "": return 2; } return 0; } -mixed b() { return 3; } -.... -test 3631, expected result: EQ -mixed a() { switch(0) { default: return 0; case 0: return 3; case 1: return 5; case 4.0: return 4; case "": return 2; } return -1; } -mixed b() { return 3; } -.... -test 3632, expected result: EQ -mixed a() { switch(0) { case 0: return 3; default: return 0; case 1: return 5; case 4.0: return 4; case "": return 2; } return -1; } -mixed b() { return 3; } -.... -test 3633, expected result: EQ -mixed a() { switch(0) { case 0: return 3; case 1: return 5; default: return 0; case 4.0: return 4; case "": return 2; } return -1; } -mixed b() { return 3; } -.... -test 3634, expected result: EQ -mixed a() { switch(0) { case 0: return 3; case 1: return 5; case 4.0: return 4; default: return 0; case "": return 2; } return -1; } -mixed b() { return 3; } -.... -test 3635, expected result: EQ -mixed a() { switch(0) { case 0: return 3; case 1: return 5; case 4.0: return 4; case "": return 2; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 3636, expected result: EQ -mixed a() { switch(0) { case 0: return 3; case 1: return 5; case "": return 2; case 4.0: return 4; } return 0; } -mixed b() { return 3; } -.... -test 3637, expected result: EQ -mixed a() { switch(0) { default: return 0; case 0: return 3; case 1: return 5; case "": return 2; case 4.0: return 4; } return -1; } -mixed b() { return 3; } -.... -test 3638, expected result: EQ -mixed a() { switch(0) { case 0: return 3; default: return 0; case 1: return 5; case "": return 2; case 4.0: return 4; } return -1; } -mixed b() { return 3; } -.... -test 3639, expected result: EQ -mixed a() { switch(0) { case 0: return 3; case 1: return 5; default: return 0; case "": return 2; case 4.0: return 4; } return -1; } -mixed b() { return 3; } -.... -test 3640, expected result: EQ -mixed a() { switch(0) { case 0: return 3; case 1: return 5; case "": return 2; default: return 0; case 4.0: return 4; } return -1; } -mixed b() { return 3; } -.... -test 3641, expected result: EQ -mixed a() { switch(0) { case 0: return 3; case 1: return 5; case "": return 2; case 4.0: return 4; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 3642, expected result: EQ -mixed a() { switch(0) { case 4.0: return 4; case 0: return 3; case "": return 2; case 1: return 5; } return 0; } -mixed b() { return 3; } -.... -test 3643, expected result: EQ -mixed a() { switch(0) { default: return 0; case 4.0: return 4; case 0: return 3; case "": return 2; case 1: return 5; } return -1; } -mixed b() { return 3; } -.... -test 3644, expected result: EQ -mixed a() { switch(0) { case 4.0: return 4; default: return 0; case 0: return 3; case "": return 2; case 1: return 5; } return -1; } -mixed b() { return 3; } -.... -test 3645, expected result: EQ -mixed a() { switch(0) { case 4.0: return 4; case 0: return 3; default: return 0; case "": return 2; case 1: return 5; } return -1; } -mixed b() { return 3; } -.... -test 3646, expected result: EQ -mixed a() { switch(0) { case 4.0: return 4; case 0: return 3; case "": return 2; default: return 0; case 1: return 5; } return -1; } -mixed b() { return 3; } -.... -test 3647, expected result: EQ -mixed a() { switch(0) { case 4.0: return 4; case 0: return 3; case "": return 2; case 1: return 5; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 3648, expected result: EQ -mixed a() { switch(0) { case 4.0: return 4; case 0: return 3; case 1: return 5; case "": return 2; } return 0; } -mixed b() { return 3; } -.... -test 3649, expected result: EQ -mixed a() { switch(0) { default: return 0; case 4.0: return 4; case 0: return 3; case 1: return 5; case "": return 2; } return -1; } -mixed b() { return 3; } -.... -test 3650, expected result: EQ -mixed a() { switch(0) { case 4.0: return 4; default: return 0; case 0: return 3; case 1: return 5; case "": return 2; } return -1; } -mixed b() { return 3; } -.... -test 3651, expected result: EQ -mixed a() { switch(0) { case 4.0: return 4; case 0: return 3; default: return 0; case 1: return 5; case "": return 2; } return -1; } -mixed b() { return 3; } -.... -test 3652, expected result: EQ -mixed a() { switch(0) { case 4.0: return 4; case 0: return 3; case 1: return 5; default: return 0; case "": return 2; } return -1; } -mixed b() { return 3; } -.... -test 3653, expected result: EQ -mixed a() { switch(0) { case 4.0: return 4; case 0: return 3; case 1: return 5; case "": return 2; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 3654, expected result: EQ -mixed a() { switch(0) { case 4.0: return 4; case "": return 2; case 0: return 3; case 1: return 5; } return 0; } -mixed b() { return 3; } -.... -test 3655, expected result: EQ -mixed a() { switch(0) { default: return 0; case 4.0: return 4; case "": return 2; case 0: return 3; case 1: return 5; } return -1; } -mixed b() { return 3; } -.... -test 3656, expected result: EQ -mixed a() { switch(0) { case 4.0: return 4; default: return 0; case "": return 2; case 0: return 3; case 1: return 5; } return -1; } -mixed b() { return 3; } -.... -test 3657, expected result: EQ -mixed a() { switch(0) { case 4.0: return 4; case "": return 2; default: return 0; case 0: return 3; case 1: return 5; } return -1; } -mixed b() { return 3; } -.... -test 3658, expected result: EQ -mixed a() { switch(0) { case 4.0: return 4; case "": return 2; case 0: return 3; default: return 0; case 1: return 5; } return -1; } -mixed b() { return 3; } -.... -test 3659, expected result: EQ -mixed a() { switch(0) { case 4.0: return 4; case "": return 2; case 0: return 3; case 1: return 5; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 3660, expected result: EQ -mixed a() { switch(0) { case 4.0: return 4; case "": return 2; case 1: return 5; case 0: return 3; } return 0; } -mixed b() { return 3; } -.... -test 3661, expected result: EQ -mixed a() { switch(0) { default: return 0; case 4.0: return 4; case "": return 2; case 1: return 5; case 0: return 3; } return -1; } -mixed b() { return 3; } -.... -test 3662, expected result: EQ -mixed a() { switch(0) { case 4.0: return 4; default: return 0; case "": return 2; case 1: return 5; case 0: return 3; } return -1; } -mixed b() { return 3; } -.... -test 3663, expected result: EQ -mixed a() { switch(0) { case 4.0: return 4; case "": return 2; default: return 0; case 1: return 5; case 0: return 3; } return -1; } -mixed b() { return 3; } -.... -test 3664, expected result: EQ -mixed a() { switch(0) { case 4.0: return 4; case "": return 2; case 1: return 5; default: return 0; case 0: return 3; } return -1; } -mixed b() { return 3; } -.... -test 3665, expected result: EQ -mixed a() { switch(0) { case 4.0: return 4; case "": return 2; case 1: return 5; case 0: return 3; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 3666, expected result: EQ -mixed a() { switch(0) { case 4.0: return 4; case 1: return 5; case "": return 2; case 0: return 3; } return 0; } -mixed b() { return 3; } -.... -test 3667, expected result: EQ -mixed a() { switch(0) { default: return 0; case 4.0: return 4; case 1: return 5; case "": return 2; case 0: return 3; } return -1; } -mixed b() { return 3; } -.... -test 3668, expected result: EQ -mixed a() { switch(0) { case 4.0: return 4; default: return 0; case 1: return 5; case "": return 2; case 0: return 3; } return -1; } -mixed b() { return 3; } -.... -test 3669, expected result: EQ -mixed a() { switch(0) { case 4.0: return 4; case 1: return 5; default: return 0; case "": return 2; case 0: return 3; } return -1; } -mixed b() { return 3; } -.... -test 3670, expected result: EQ -mixed a() { switch(0) { case 4.0: return 4; case 1: return 5; case "": return 2; default: return 0; case 0: return 3; } return -1; } -mixed b() { return 3; } -.... -test 3671, expected result: EQ -mixed a() { switch(0) { case 4.0: return 4; case 1: return 5; case "": return 2; case 0: return 3; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 3672, expected result: EQ -mixed a() { switch(0) { case 4.0: return 4; case 1: return 5; case 0: return 3; case "": return 2; } return 0; } -mixed b() { return 3; } -.... -test 3673, expected result: EQ -mixed a() { switch(0) { default: return 0; case 4.0: return 4; case 1: return 5; case 0: return 3; case "": return 2; } return -1; } -mixed b() { return 3; } -.... -test 3674, expected result: EQ -mixed a() { switch(0) { case 4.0: return 4; default: return 0; case 1: return 5; case 0: return 3; case "": return 2; } return -1; } -mixed b() { return 3; } -.... -test 3675, expected result: EQ -mixed a() { switch(0) { case 4.0: return 4; case 1: return 5; default: return 0; case 0: return 3; case "": return 2; } return -1; } -mixed b() { return 3; } -.... -test 3676, expected result: EQ -mixed a() { switch(0) { case 4.0: return 4; case 1: return 5; case 0: return 3; default: return 0; case "": return 2; } return -1; } -mixed b() { return 3; } -.... -test 3677, expected result: EQ -mixed a() { switch(0) { case 4.0: return 4; case 1: return 5; case 0: return 3; case "": return 2; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 3678, expected result: EQ -mixed a() { switch(0) { case 1: return 5; case 0: return 3; case 4.0: return 4; case "": return 2; } return 0; } -mixed b() { return 3; } -.... -test 3679, expected result: EQ -mixed a() { switch(0) { default: return 0; case 1: return 5; case 0: return 3; case 4.0: return 4; case "": return 2; } return -1; } -mixed b() { return 3; } -.... -test 3680, expected result: EQ -mixed a() { switch(0) { case 1: return 5; default: return 0; case 0: return 3; case 4.0: return 4; case "": return 2; } return -1; } -mixed b() { return 3; } -.... -test 3681, expected result: EQ -mixed a() { switch(0) { case 1: return 5; case 0: return 3; default: return 0; case 4.0: return 4; case "": return 2; } return -1; } -mixed b() { return 3; } -.... -test 3682, expected result: EQ -mixed a() { switch(0) { case 1: return 5; case 0: return 3; case 4.0: return 4; default: return 0; case "": return 2; } return -1; } -mixed b() { return 3; } -.... -test 3683, expected result: EQ -mixed a() { switch(0) { case 1: return 5; case 0: return 3; case 4.0: return 4; case "": return 2; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 3684, expected result: EQ -mixed a() { switch(0) { case 1: return 5; case 0: return 3; case "": return 2; case 4.0: return 4; } return 0; } -mixed b() { return 3; } -.... -test 3685, expected result: EQ -mixed a() { switch(0) { default: return 0; case 1: return 5; case 0: return 3; case "": return 2; case 4.0: return 4; } return -1; } -mixed b() { return 3; } -.... -test 3686, expected result: EQ -mixed a() { switch(0) { case 1: return 5; default: return 0; case 0: return 3; case "": return 2; case 4.0: return 4; } return -1; } -mixed b() { return 3; } -.... -test 3687, expected result: EQ -mixed a() { switch(0) { case 1: return 5; case 0: return 3; default: return 0; case "": return 2; case 4.0: return 4; } return -1; } -mixed b() { return 3; } -.... -test 3688, expected result: EQ -mixed a() { switch(0) { case 1: return 5; case 0: return 3; case "": return 2; default: return 0; case 4.0: return 4; } return -1; } -mixed b() { return 3; } -.... -test 3689, expected result: EQ -mixed a() { switch(0) { case 1: return 5; case 0: return 3; case "": return 2; case 4.0: return 4; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 3690, expected result: EQ -mixed a() { switch(0) { case 1: return 5; case 4.0: return 4; case 0: return 3; case "": return 2; } return 0; } -mixed b() { return 3; } -.... -test 3691, expected result: EQ -mixed a() { switch(0) { default: return 0; case 1: return 5; case 4.0: return 4; case 0: return 3; case "": return 2; } return -1; } -mixed b() { return 3; } -.... -test 3692, expected result: EQ -mixed a() { switch(0) { case 1: return 5; default: return 0; case 4.0: return 4; case 0: return 3; case "": return 2; } return -1; } -mixed b() { return 3; } -.... -test 3693, expected result: EQ -mixed a() { switch(0) { case 1: return 5; case 4.0: return 4; default: return 0; case 0: return 3; case "": return 2; } return -1; } -mixed b() { return 3; } -.... -test 3694, expected result: EQ -mixed a() { switch(0) { case 1: return 5; case 4.0: return 4; case 0: return 3; default: return 0; case "": return 2; } return -1; } -mixed b() { return 3; } -.... -test 3695, expected result: EQ -mixed a() { switch(0) { case 1: return 5; case 4.0: return 4; case 0: return 3; case "": return 2; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 3696, expected result: EQ -mixed a() { switch(0) { case 1: return 5; case 4.0: return 4; case "": return 2; case 0: return 3; } return 0; } -mixed b() { return 3; } -.... -test 3697, expected result: EQ -mixed a() { switch(0) { default: return 0; case 1: return 5; case 4.0: return 4; case "": return 2; case 0: return 3; } return -1; } -mixed b() { return 3; } -.... -test 3698, expected result: EQ -mixed a() { switch(0) { case 1: return 5; default: return 0; case 4.0: return 4; case "": return 2; case 0: return 3; } return -1; } -mixed b() { return 3; } -.... -test 3699, expected result: EQ -mixed a() { switch(0) { case 1: return 5; case 4.0: return 4; default: return 0; case "": return 2; case 0: return 3; } return -1; } -mixed b() { return 3; } -.... -test 3700, expected result: EQ -mixed a() { switch(0) { case 1: return 5; case 4.0: return 4; case "": return 2; default: return 0; case 0: return 3; } return -1; } -mixed b() { return 3; } -.... -test 3701, expected result: EQ -mixed a() { switch(0) { case 1: return 5; case 4.0: return 4; case "": return 2; case 0: return 3; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 3702, expected result: EQ -mixed a() { switch(0) { case 1: return 5; case "": return 2; case 4.0: return 4; case 0: return 3; } return 0; } -mixed b() { return 3; } -.... -test 3703, expected result: EQ -mixed a() { switch(0) { default: return 0; case 1: return 5; case "": return 2; case 4.0: return 4; case 0: return 3; } return -1; } -mixed b() { return 3; } -.... -test 3704, expected result: EQ -mixed a() { switch(0) { case 1: return 5; default: return 0; case "": return 2; case 4.0: return 4; case 0: return 3; } return -1; } -mixed b() { return 3; } -.... -test 3705, expected result: EQ -mixed a() { switch(0) { case 1: return 5; case "": return 2; default: return 0; case 4.0: return 4; case 0: return 3; } return -1; } -mixed b() { return 3; } -.... -test 3706, expected result: EQ -mixed a() { switch(0) { case 1: return 5; case "": return 2; case 4.0: return 4; default: return 0; case 0: return 3; } return -1; } -mixed b() { return 3; } -.... -test 3707, expected result: EQ -mixed a() { switch(0) { case 1: return 5; case "": return 2; case 4.0: return 4; case 0: return 3; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 3708, expected result: EQ -mixed a() { switch(0) { case 1: return 5; case "": return 2; case 0: return 3; case 4.0: return 4; } return 0; } -mixed b() { return 3; } -.... -test 3709, expected result: EQ -mixed a() { switch(0) { default: return 0; case 1: return 5; case "": return 2; case 0: return 3; case 4.0: return 4; } return -1; } -mixed b() { return 3; } -.... -test 3710, expected result: EQ -mixed a() { switch(0) { case 1: return 5; default: return 0; case "": return 2; case 0: return 3; case 4.0: return 4; } return -1; } -mixed b() { return 3; } -.... -test 3711, expected result: EQ -mixed a() { switch(0) { case 1: return 5; case "": return 2; default: return 0; case 0: return 3; case 4.0: return 4; } return -1; } -mixed b() { return 3; } -.... -test 3712, expected result: EQ -mixed a() { switch(0) { case 1: return 5; case "": return 2; case 0: return 3; default: return 0; case 4.0: return 4; } return -1; } -mixed b() { return 3; } -.... -test 3713, expected result: EQ -mixed a() { switch(0) { case 1: return 5; case "": return 2; case 0: return 3; case 4.0: return 4; default: return 0; } return -1; } -mixed b() { return 3; } -.... -test 3714, expected result: EQ -mixed a() { switch(4.0) { case "": return 2; case 0: return 3; case 4.0: return 4; case 1: return 5; } return 0; } -mixed b() { return 4; } -.... -test 3715, expected result: EQ -mixed a() { switch(4.0) { default: return 0; case "": return 2; case 0: return 3; case 4.0: return 4; case 1: return 5; } return -1; } -mixed b() { return 4; } -.... -test 3716, expected result: EQ -mixed a() { switch(4.0) { case "": return 2; default: return 0; case 0: return 3; case 4.0: return 4; case 1: return 5; } return -1; } -mixed b() { return 4; } -.... -test 3717, expected result: EQ -mixed a() { switch(4.0) { case "": return 2; case 0: return 3; default: return 0; case 4.0: return 4; case 1: return 5; } return -1; } -mixed b() { return 4; } -.... -test 3718, expected result: EQ -mixed a() { switch(4.0) { case "": return 2; case 0: return 3; case 4.0: return 4; default: return 0; case 1: return 5; } return -1; } -mixed b() { return 4; } -.... -test 3719, expected result: EQ -mixed a() { switch(4.0) { case "": return 2; case 0: return 3; case 4.0: return 4; case 1: return 5; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 3720, expected result: EQ -mixed a() { switch(4.0) { case "": return 2; case 0: return 3; case 1: return 5; case 4.0: return 4; } return 0; } -mixed b() { return 4; } -.... -test 3721, expected result: EQ -mixed a() { switch(4.0) { default: return 0; case "": return 2; case 0: return 3; case 1: return 5; case 4.0: return 4; } return -1; } -mixed b() { return 4; } -.... -test 3722, expected result: EQ -mixed a() { switch(4.0) { case "": return 2; default: return 0; case 0: return 3; case 1: return 5; case 4.0: return 4; } return -1; } -mixed b() { return 4; } -.... -test 3723, expected result: EQ -mixed a() { switch(4.0) { case "": return 2; case 0: return 3; default: return 0; case 1: return 5; case 4.0: return 4; } return -1; } -mixed b() { return 4; } -.... -test 3724, expected result: EQ -mixed a() { switch(4.0) { case "": return 2; case 0: return 3; case 1: return 5; default: return 0; case 4.0: return 4; } return -1; } -mixed b() { return 4; } -.... -test 3725, expected result: EQ -mixed a() { switch(4.0) { case "": return 2; case 0: return 3; case 1: return 5; case 4.0: return 4; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 3726, expected result: EQ -mixed a() { switch(4.0) { case "": return 2; case 4.0: return 4; case 0: return 3; case 1: return 5; } return 0; } -mixed b() { return 4; } -.... -test 3727, expected result: EQ -mixed a() { switch(4.0) { default: return 0; case "": return 2; case 4.0: return 4; case 0: return 3; case 1: return 5; } return -1; } -mixed b() { return 4; } -.... -test 3728, expected result: EQ -mixed a() { switch(4.0) { case "": return 2; default: return 0; case 4.0: return 4; case 0: return 3; case 1: return 5; } return -1; } -mixed b() { return 4; } -.... -test 3729, expected result: EQ -mixed a() { switch(4.0) { case "": return 2; case 4.0: return 4; default: return 0; case 0: return 3; case 1: return 5; } return -1; } -mixed b() { return 4; } -.... -test 3730, expected result: EQ -mixed a() { switch(4.0) { case "": return 2; case 4.0: return 4; case 0: return 3; default: return 0; case 1: return 5; } return -1; } -mixed b() { return 4; } -.... -test 3731, expected result: EQ -mixed a() { switch(4.0) { case "": return 2; case 4.0: return 4; case 0: return 3; case 1: return 5; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 3732, expected result: EQ -mixed a() { switch(4.0) { case "": return 2; case 4.0: return 4; case 1: return 5; case 0: return 3; } return 0; } -mixed b() { return 4; } -.... -test 3733, expected result: EQ -mixed a() { switch(4.0) { default: return 0; case "": return 2; case 4.0: return 4; case 1: return 5; case 0: return 3; } return -1; } -mixed b() { return 4; } -.... -test 3734, expected result: EQ -mixed a() { switch(4.0) { case "": return 2; default: return 0; case 4.0: return 4; case 1: return 5; case 0: return 3; } return -1; } -mixed b() { return 4; } -.... -test 3735, expected result: EQ -mixed a() { switch(4.0) { case "": return 2; case 4.0: return 4; default: return 0; case 1: return 5; case 0: return 3; } return -1; } -mixed b() { return 4; } -.... -test 3736, expected result: EQ -mixed a() { switch(4.0) { case "": return 2; case 4.0: return 4; case 1: return 5; default: return 0; case 0: return 3; } return -1; } -mixed b() { return 4; } -.... -test 3737, expected result: EQ -mixed a() { switch(4.0) { case "": return 2; case 4.0: return 4; case 1: return 5; case 0: return 3; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 3738, expected result: EQ -mixed a() { switch(4.0) { case "": return 2; case 1: return 5; case 4.0: return 4; case 0: return 3; } return 0; } -mixed b() { return 4; } -.... -test 3739, expected result: EQ -mixed a() { switch(4.0) { default: return 0; case "": return 2; case 1: return 5; case 4.0: return 4; case 0: return 3; } return -1; } -mixed b() { return 4; } -.... -test 3740, expected result: EQ -mixed a() { switch(4.0) { case "": return 2; default: return 0; case 1: return 5; case 4.0: return 4; case 0: return 3; } return -1; } -mixed b() { return 4; } -.... -test 3741, expected result: EQ -mixed a() { switch(4.0) { case "": return 2; case 1: return 5; default: return 0; case 4.0: return 4; case 0: return 3; } return -1; } -mixed b() { return 4; } -.... -test 3742, expected result: EQ -mixed a() { switch(4.0) { case "": return 2; case 1: return 5; case 4.0: return 4; default: return 0; case 0: return 3; } return -1; } -mixed b() { return 4; } -.... -test 3743, expected result: EQ -mixed a() { switch(4.0) { case "": return 2; case 1: return 5; case 4.0: return 4; case 0: return 3; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 3744, expected result: EQ -mixed a() { switch(4.0) { case "": return 2; case 1: return 5; case 0: return 3; case 4.0: return 4; } return 0; } -mixed b() { return 4; } -.... -test 3745, expected result: EQ -mixed a() { switch(4.0) { default: return 0; case "": return 2; case 1: return 5; case 0: return 3; case 4.0: return 4; } return -1; } -mixed b() { return 4; } -.... -test 3746, expected result: EQ -mixed a() { switch(4.0) { case "": return 2; default: return 0; case 1: return 5; case 0: return 3; case 4.0: return 4; } return -1; } -mixed b() { return 4; } -.... -test 3747, expected result: EQ -mixed a() { switch(4.0) { case "": return 2; case 1: return 5; default: return 0; case 0: return 3; case 4.0: return 4; } return -1; } -mixed b() { return 4; } -.... -test 3748, expected result: EQ -mixed a() { switch(4.0) { case "": return 2; case 1: return 5; case 0: return 3; default: return 0; case 4.0: return 4; } return -1; } -mixed b() { return 4; } -.... -test 3749, expected result: EQ -mixed a() { switch(4.0) { case "": return 2; case 1: return 5; case 0: return 3; case 4.0: return 4; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 3750, expected result: EQ -mixed a() { switch(4.0) { case 0: return 3; case "": return 2; case 4.0: return 4; case 1: return 5; } return 0; } -mixed b() { return 4; } -.... -test 3751, expected result: EQ -mixed a() { switch(4.0) { default: return 0; case 0: return 3; case "": return 2; case 4.0: return 4; case 1: return 5; } return -1; } -mixed b() { return 4; } -.... -test 3752, expected result: EQ -mixed a() { switch(4.0) { case 0: return 3; default: return 0; case "": return 2; case 4.0: return 4; case 1: return 5; } return -1; } -mixed b() { return 4; } -.... -test 3753, expected result: EQ -mixed a() { switch(4.0) { case 0: return 3; case "": return 2; default: return 0; case 4.0: return 4; case 1: return 5; } return -1; } -mixed b() { return 4; } -.... -test 3754, expected result: EQ -mixed a() { switch(4.0) { case 0: return 3; case "": return 2; case 4.0: return 4; default: return 0; case 1: return 5; } return -1; } -mixed b() { return 4; } -.... -test 3755, expected result: EQ -mixed a() { switch(4.0) { case 0: return 3; case "": return 2; case 4.0: return 4; case 1: return 5; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 3756, expected result: EQ -mixed a() { switch(4.0) { case 0: return 3; case "": return 2; case 1: return 5; case 4.0: return 4; } return 0; } -mixed b() { return 4; } -.... -test 3757, expected result: EQ -mixed a() { switch(4.0) { default: return 0; case 0: return 3; case "": return 2; case 1: return 5; case 4.0: return 4; } return -1; } -mixed b() { return 4; } -.... -test 3758, expected result: EQ -mixed a() { switch(4.0) { case 0: return 3; default: return 0; case "": return 2; case 1: return 5; case 4.0: return 4; } return -1; } -mixed b() { return 4; } -.... -test 3759, expected result: EQ -mixed a() { switch(4.0) { case 0: return 3; case "": return 2; default: return 0; case 1: return 5; case 4.0: return 4; } return -1; } -mixed b() { return 4; } -.... -test 3760, expected result: EQ -mixed a() { switch(4.0) { case 0: return 3; case "": return 2; case 1: return 5; default: return 0; case 4.0: return 4; } return -1; } -mixed b() { return 4; } -.... -test 3761, expected result: EQ -mixed a() { switch(4.0) { case 0: return 3; case "": return 2; case 1: return 5; case 4.0: return 4; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 3762, expected result: EQ -mixed a() { switch(4.0) { case 0: return 3; case 4.0: return 4; case "": return 2; case 1: return 5; } return 0; } -mixed b() { return 4; } -.... -test 3763, expected result: EQ -mixed a() { switch(4.0) { default: return 0; case 0: return 3; case 4.0: return 4; case "": return 2; case 1: return 5; } return -1; } -mixed b() { return 4; } -.... -test 3764, expected result: EQ -mixed a() { switch(4.0) { case 0: return 3; default: return 0; case 4.0: return 4; case "": return 2; case 1: return 5; } return -1; } -mixed b() { return 4; } -.... -test 3765, expected result: EQ -mixed a() { switch(4.0) { case 0: return 3; case 4.0: return 4; default: return 0; case "": return 2; case 1: return 5; } return -1; } -mixed b() { return 4; } -.... -test 3766, expected result: EQ -mixed a() { switch(4.0) { case 0: return 3; case 4.0: return 4; case "": return 2; default: return 0; case 1: return 5; } return -1; } -mixed b() { return 4; } -.... -test 3767, expected result: EQ -mixed a() { switch(4.0) { case 0: return 3; case 4.0: return 4; case "": return 2; case 1: return 5; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 3768, expected result: EQ -mixed a() { switch(4.0) { case 0: return 3; case 4.0: return 4; case 1: return 5; case "": return 2; } return 0; } -mixed b() { return 4; } -.... -test 3769, expected result: EQ -mixed a() { switch(4.0) { default: return 0; case 0: return 3; case 4.0: return 4; case 1: return 5; case "": return 2; } return -1; } -mixed b() { return 4; } -.... -test 3770, expected result: EQ -mixed a() { switch(4.0) { case 0: return 3; default: return 0; case 4.0: return 4; case 1: return 5; case "": return 2; } return -1; } -mixed b() { return 4; } -.... -test 3771, expected result: EQ -mixed a() { switch(4.0) { case 0: return 3; case 4.0: return 4; default: return 0; case 1: return 5; case "": return 2; } return -1; } -mixed b() { return 4; } -.... -test 3772, expected result: EQ -mixed a() { switch(4.0) { case 0: return 3; case 4.0: return 4; case 1: return 5; default: return 0; case "": return 2; } return -1; } -mixed b() { return 4; } -.... -test 3773, expected result: EQ -mixed a() { switch(4.0) { case 0: return 3; case 4.0: return 4; case 1: return 5; case "": return 2; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 3774, expected result: EQ -mixed a() { switch(4.0) { case 0: return 3; case 1: return 5; case 4.0: return 4; case "": return 2; } return 0; } -mixed b() { return 4; } -.... -test 3775, expected result: EQ -mixed a() { switch(4.0) { default: return 0; case 0: return 3; case 1: return 5; case 4.0: return 4; case "": return 2; } return -1; } -mixed b() { return 4; } -.... -test 3776, expected result: EQ -mixed a() { switch(4.0) { case 0: return 3; default: return 0; case 1: return 5; case 4.0: return 4; case "": return 2; } return -1; } -mixed b() { return 4; } -.... -test 3777, expected result: EQ -mixed a() { switch(4.0) { case 0: return 3; case 1: return 5; default: return 0; case 4.0: return 4; case "": return 2; } return -1; } -mixed b() { return 4; } -.... -test 3778, expected result: EQ -mixed a() { switch(4.0) { case 0: return 3; case 1: return 5; case 4.0: return 4; default: return 0; case "": return 2; } return -1; } -mixed b() { return 4; } -.... -test 3779, expected result: EQ -mixed a() { switch(4.0) { case 0: return 3; case 1: return 5; case 4.0: return 4; case "": return 2; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 3780, expected result: EQ -mixed a() { switch(4.0) { case 0: return 3; case 1: return 5; case "": return 2; case 4.0: return 4; } return 0; } -mixed b() { return 4; } -.... -test 3781, expected result: EQ -mixed a() { switch(4.0) { default: return 0; case 0: return 3; case 1: return 5; case "": return 2; case 4.0: return 4; } return -1; } -mixed b() { return 4; } -.... -test 3782, expected result: EQ -mixed a() { switch(4.0) { case 0: return 3; default: return 0; case 1: return 5; case "": return 2; case 4.0: return 4; } return -1; } -mixed b() { return 4; } -.... -test 3783, expected result: EQ -mixed a() { switch(4.0) { case 0: return 3; case 1: return 5; default: return 0; case "": return 2; case 4.0: return 4; } return -1; } -mixed b() { return 4; } -.... -test 3784, expected result: EQ -mixed a() { switch(4.0) { case 0: return 3; case 1: return 5; case "": return 2; default: return 0; case 4.0: return 4; } return -1; } -mixed b() { return 4; } -.... -test 3785, expected result: EQ -mixed a() { switch(4.0) { case 0: return 3; case 1: return 5; case "": return 2; case 4.0: return 4; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 3786, expected result: EQ -mixed a() { switch(4.0) { case 4.0: return 4; case 0: return 3; case "": return 2; case 1: return 5; } return 0; } -mixed b() { return 4; } -.... -test 3787, expected result: EQ -mixed a() { switch(4.0) { default: return 0; case 4.0: return 4; case 0: return 3; case "": return 2; case 1: return 5; } return -1; } -mixed b() { return 4; } -.... -test 3788, expected result: EQ -mixed a() { switch(4.0) { case 4.0: return 4; default: return 0; case 0: return 3; case "": return 2; case 1: return 5; } return -1; } -mixed b() { return 4; } -.... -test 3789, expected result: EQ -mixed a() { switch(4.0) { case 4.0: return 4; case 0: return 3; default: return 0; case "": return 2; case 1: return 5; } return -1; } -mixed b() { return 4; } -.... -test 3790, expected result: EQ -mixed a() { switch(4.0) { case 4.0: return 4; case 0: return 3; case "": return 2; default: return 0; case 1: return 5; } return -1; } -mixed b() { return 4; } -.... -test 3791, expected result: EQ -mixed a() { switch(4.0) { case 4.0: return 4; case 0: return 3; case "": return 2; case 1: return 5; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 3792, expected result: EQ -mixed a() { switch(4.0) { case 4.0: return 4; case 0: return 3; case 1: return 5; case "": return 2; } return 0; } -mixed b() { return 4; } -.... -test 3793, expected result: EQ -mixed a() { switch(4.0) { default: return 0; case 4.0: return 4; case 0: return 3; case 1: return 5; case "": return 2; } return -1; } -mixed b() { return 4; } -.... -test 3794, expected result: EQ -mixed a() { switch(4.0) { case 4.0: return 4; default: return 0; case 0: return 3; case 1: return 5; case "": return 2; } return -1; } -mixed b() { return 4; } -.... -test 3795, expected result: EQ -mixed a() { switch(4.0) { case 4.0: return 4; case 0: return 3; default: return 0; case 1: return 5; case "": return 2; } return -1; } -mixed b() { return 4; } -.... -test 3796, expected result: EQ -mixed a() { switch(4.0) { case 4.0: return 4; case 0: return 3; case 1: return 5; default: return 0; case "": return 2; } return -1; } -mixed b() { return 4; } -.... -test 3797, expected result: EQ -mixed a() { switch(4.0) { case 4.0: return 4; case 0: return 3; case 1: return 5; case "": return 2; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 3798, expected result: EQ -mixed a() { switch(4.0) { case 4.0: return 4; case "": return 2; case 0: return 3; case 1: return 5; } return 0; } -mixed b() { return 4; } -.... -test 3799, expected result: EQ -mixed a() { switch(4.0) { default: return 0; case 4.0: return 4; case "": return 2; case 0: return 3; case 1: return 5; } return -1; } -mixed b() { return 4; } -.... -test 3800, expected result: EQ -mixed a() { switch(4.0) { case 4.0: return 4; default: return 0; case "": return 2; case 0: return 3; case 1: return 5; } return -1; } -mixed b() { return 4; } -.... -test 3801, expected result: EQ -mixed a() { switch(4.0) { case 4.0: return 4; case "": return 2; default: return 0; case 0: return 3; case 1: return 5; } return -1; } -mixed b() { return 4; } -.... -test 3802, expected result: EQ -mixed a() { switch(4.0) { case 4.0: return 4; case "": return 2; case 0: return 3; default: return 0; case 1: return 5; } return -1; } -mixed b() { return 4; } -.... -test 3803, expected result: EQ -mixed a() { switch(4.0) { case 4.0: return 4; case "": return 2; case 0: return 3; case 1: return 5; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 3804, expected result: EQ -mixed a() { switch(4.0) { case 4.0: return 4; case "": return 2; case 1: return 5; case 0: return 3; } return 0; } -mixed b() { return 4; } -.... -test 3805, expected result: EQ -mixed a() { switch(4.0) { default: return 0; case 4.0: return 4; case "": return 2; case 1: return 5; case 0: return 3; } return -1; } -mixed b() { return 4; } -.... -test 3806, expected result: EQ -mixed a() { switch(4.0) { case 4.0: return 4; default: return 0; case "": return 2; case 1: return 5; case 0: return 3; } return -1; } -mixed b() { return 4; } -.... -test 3807, expected result: EQ -mixed a() { switch(4.0) { case 4.0: return 4; case "": return 2; default: return 0; case 1: return 5; case 0: return 3; } return -1; } -mixed b() { return 4; } -.... -test 3808, expected result: EQ -mixed a() { switch(4.0) { case 4.0: return 4; case "": return 2; case 1: return 5; default: return 0; case 0: return 3; } return -1; } -mixed b() { return 4; } -.... -test 3809, expected result: EQ -mixed a() { switch(4.0) { case 4.0: return 4; case "": return 2; case 1: return 5; case 0: return 3; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 3810, expected result: EQ -mixed a() { switch(4.0) { case 4.0: return 4; case 1: return 5; case "": return 2; case 0: return 3; } return 0; } -mixed b() { return 4; } -.... -test 3811, expected result: EQ -mixed a() { switch(4.0) { default: return 0; case 4.0: return 4; case 1: return 5; case "": return 2; case 0: return 3; } return -1; } -mixed b() { return 4; } -.... -test 3812, expected result: EQ -mixed a() { switch(4.0) { case 4.0: return 4; default: return 0; case 1: return 5; case "": return 2; case 0: return 3; } return -1; } -mixed b() { return 4; } -.... -test 3813, expected result: EQ -mixed a() { switch(4.0) { case 4.0: return 4; case 1: return 5; default: return 0; case "": return 2; case 0: return 3; } return -1; } -mixed b() { return 4; } -.... -test 3814, expected result: EQ -mixed a() { switch(4.0) { case 4.0: return 4; case 1: return 5; case "": return 2; default: return 0; case 0: return 3; } return -1; } -mixed b() { return 4; } -.... -test 3815, expected result: EQ -mixed a() { switch(4.0) { case 4.0: return 4; case 1: return 5; case "": return 2; case 0: return 3; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 3816, expected result: EQ -mixed a() { switch(4.0) { case 4.0: return 4; case 1: return 5; case 0: return 3; case "": return 2; } return 0; } -mixed b() { return 4; } -.... -test 3817, expected result: EQ -mixed a() { switch(4.0) { default: return 0; case 4.0: return 4; case 1: return 5; case 0: return 3; case "": return 2; } return -1; } -mixed b() { return 4; } -.... -test 3818, expected result: EQ -mixed a() { switch(4.0) { case 4.0: return 4; default: return 0; case 1: return 5; case 0: return 3; case "": return 2; } return -1; } -mixed b() { return 4; } -.... -test 3819, expected result: EQ -mixed a() { switch(4.0) { case 4.0: return 4; case 1: return 5; default: return 0; case 0: return 3; case "": return 2; } return -1; } -mixed b() { return 4; } -.... -test 3820, expected result: EQ -mixed a() { switch(4.0) { case 4.0: return 4; case 1: return 5; case 0: return 3; default: return 0; case "": return 2; } return -1; } -mixed b() { return 4; } -.... -test 3821, expected result: EQ -mixed a() { switch(4.0) { case 4.0: return 4; case 1: return 5; case 0: return 3; case "": return 2; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 3822, expected result: EQ -mixed a() { switch(4.0) { case 1: return 5; case 0: return 3; case 4.0: return 4; case "": return 2; } return 0; } -mixed b() { return 4; } -.... -test 3823, expected result: EQ -mixed a() { switch(4.0) { default: return 0; case 1: return 5; case 0: return 3; case 4.0: return 4; case "": return 2; } return -1; } -mixed b() { return 4; } -.... -test 3824, expected result: EQ -mixed a() { switch(4.0) { case 1: return 5; default: return 0; case 0: return 3; case 4.0: return 4; case "": return 2; } return -1; } -mixed b() { return 4; } -.... -test 3825, expected result: EQ -mixed a() { switch(4.0) { case 1: return 5; case 0: return 3; default: return 0; case 4.0: return 4; case "": return 2; } return -1; } -mixed b() { return 4; } -.... -test 3826, expected result: EQ -mixed a() { switch(4.0) { case 1: return 5; case 0: return 3; case 4.0: return 4; default: return 0; case "": return 2; } return -1; } -mixed b() { return 4; } -.... -test 3827, expected result: EQ -mixed a() { switch(4.0) { case 1: return 5; case 0: return 3; case 4.0: return 4; case "": return 2; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 3828, expected result: EQ -mixed a() { switch(4.0) { case 1: return 5; case 0: return 3; case "": return 2; case 4.0: return 4; } return 0; } -mixed b() { return 4; } -.... -test 3829, expected result: EQ -mixed a() { switch(4.0) { default: return 0; case 1: return 5; case 0: return 3; case "": return 2; case 4.0: return 4; } return -1; } -mixed b() { return 4; } -.... -test 3830, expected result: EQ -mixed a() { switch(4.0) { case 1: return 5; default: return 0; case 0: return 3; case "": return 2; case 4.0: return 4; } return -1; } -mixed b() { return 4; } -.... -test 3831, expected result: EQ -mixed a() { switch(4.0) { case 1: return 5; case 0: return 3; default: return 0; case "": return 2; case 4.0: return 4; } return -1; } -mixed b() { return 4; } -.... -test 3832, expected result: EQ -mixed a() { switch(4.0) { case 1: return 5; case 0: return 3; case "": return 2; default: return 0; case 4.0: return 4; } return -1; } -mixed b() { return 4; } -.... -test 3833, expected result: EQ -mixed a() { switch(4.0) { case 1: return 5; case 0: return 3; case "": return 2; case 4.0: return 4; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 3834, expected result: EQ -mixed a() { switch(4.0) { case 1: return 5; case 4.0: return 4; case 0: return 3; case "": return 2; } return 0; } -mixed b() { return 4; } -.... -test 3835, expected result: EQ -mixed a() { switch(4.0) { default: return 0; case 1: return 5; case 4.0: return 4; case 0: return 3; case "": return 2; } return -1; } -mixed b() { return 4; } -.... -test 3836, expected result: EQ -mixed a() { switch(4.0) { case 1: return 5; default: return 0; case 4.0: return 4; case 0: return 3; case "": return 2; } return -1; } -mixed b() { return 4; } -.... -test 3837, expected result: EQ -mixed a() { switch(4.0) { case 1: return 5; case 4.0: return 4; default: return 0; case 0: return 3; case "": return 2; } return -1; } -mixed b() { return 4; } -.... -test 3838, expected result: EQ -mixed a() { switch(4.0) { case 1: return 5; case 4.0: return 4; case 0: return 3; default: return 0; case "": return 2; } return -1; } -mixed b() { return 4; } -.... -test 3839, expected result: EQ -mixed a() { switch(4.0) { case 1: return 5; case 4.0: return 4; case 0: return 3; case "": return 2; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 3840, expected result: EQ -mixed a() { switch(4.0) { case 1: return 5; case 4.0: return 4; case "": return 2; case 0: return 3; } return 0; } -mixed b() { return 4; } -.... -test 3841, expected result: EQ -mixed a() { switch(4.0) { default: return 0; case 1: return 5; case 4.0: return 4; case "": return 2; case 0: return 3; } return -1; } -mixed b() { return 4; } -.... -test 3842, expected result: EQ -mixed a() { switch(4.0) { case 1: return 5; default: return 0; case 4.0: return 4; case "": return 2; case 0: return 3; } return -1; } -mixed b() { return 4; } -.... -test 3843, expected result: EQ -mixed a() { switch(4.0) { case 1: return 5; case 4.0: return 4; default: return 0; case "": return 2; case 0: return 3; } return -1; } -mixed b() { return 4; } -.... -test 3844, expected result: EQ -mixed a() { switch(4.0) { case 1: return 5; case 4.0: return 4; case "": return 2; default: return 0; case 0: return 3; } return -1; } -mixed b() { return 4; } -.... -test 3845, expected result: EQ -mixed a() { switch(4.0) { case 1: return 5; case 4.0: return 4; case "": return 2; case 0: return 3; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 3846, expected result: EQ -mixed a() { switch(4.0) { case 1: return 5; case "": return 2; case 4.0: return 4; case 0: return 3; } return 0; } -mixed b() { return 4; } -.... -test 3847, expected result: EQ -mixed a() { switch(4.0) { default: return 0; case 1: return 5; case "": return 2; case 4.0: return 4; case 0: return 3; } return -1; } -mixed b() { return 4; } -.... -test 3848, expected result: EQ -mixed a() { switch(4.0) { case 1: return 5; default: return 0; case "": return 2; case 4.0: return 4; case 0: return 3; } return -1; } -mixed b() { return 4; } -.... -test 3849, expected result: EQ -mixed a() { switch(4.0) { case 1: return 5; case "": return 2; default: return 0; case 4.0: return 4; case 0: return 3; } return -1; } -mixed b() { return 4; } -.... -test 3850, expected result: EQ -mixed a() { switch(4.0) { case 1: return 5; case "": return 2; case 4.0: return 4; default: return 0; case 0: return 3; } return -1; } -mixed b() { return 4; } -.... -test 3851, expected result: EQ -mixed a() { switch(4.0) { case 1: return 5; case "": return 2; case 4.0: return 4; case 0: return 3; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 3852, expected result: EQ -mixed a() { switch(4.0) { case 1: return 5; case "": return 2; case 0: return 3; case 4.0: return 4; } return 0; } -mixed b() { return 4; } -.... -test 3853, expected result: EQ -mixed a() { switch(4.0) { default: return 0; case 1: return 5; case "": return 2; case 0: return 3; case 4.0: return 4; } return -1; } -mixed b() { return 4; } -.... -test 3854, expected result: EQ -mixed a() { switch(4.0) { case 1: return 5; default: return 0; case "": return 2; case 0: return 3; case 4.0: return 4; } return -1; } -mixed b() { return 4; } -.... -test 3855, expected result: EQ -mixed a() { switch(4.0) { case 1: return 5; case "": return 2; default: return 0; case 0: return 3; case 4.0: return 4; } return -1; } -mixed b() { return 4; } -.... -test 3856, expected result: EQ -mixed a() { switch(4.0) { case 1: return 5; case "": return 2; case 0: return 3; default: return 0; case 4.0: return 4; } return -1; } -mixed b() { return 4; } -.... -test 3857, expected result: EQ -mixed a() { switch(4.0) { case 1: return 5; case "": return 2; case 0: return 3; case 4.0: return 4; default: return 0; } return -1; } -mixed b() { return 4; } -.... -test 3858, expected result: EQ -mixed a() { switch(1) { case "": return 2; case 0: return 3; case 4.0: return 4; case 1: return 5; } return 0; } -mixed b() { return 5; } -.... -test 3859, expected result: EQ -mixed a() { switch(1) { default: return 0; case "": return 2; case 0: return 3; case 4.0: return 4; case 1: return 5; } return -1; } -mixed b() { return 5; } -.... -test 3860, expected result: EQ -mixed a() { switch(1) { case "": return 2; default: return 0; case 0: return 3; case 4.0: return 4; case 1: return 5; } return -1; } -mixed b() { return 5; } -.... -test 3861, expected result: EQ -mixed a() { switch(1) { case "": return 2; case 0: return 3; default: return 0; case 4.0: return 4; case 1: return 5; } return -1; } -mixed b() { return 5; } -.... -test 3862, expected result: EQ -mixed a() { switch(1) { case "": return 2; case 0: return 3; case 4.0: return 4; default: return 0; case 1: return 5; } return -1; } -mixed b() { return 5; } -.... -test 3863, expected result: EQ -mixed a() { switch(1) { case "": return 2; case 0: return 3; case 4.0: return 4; case 1: return 5; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 3864, expected result: EQ -mixed a() { switch(1) { case "": return 2; case 0: return 3; case 1: return 5; case 4.0: return 4; } return 0; } -mixed b() { return 5; } -.... -test 3865, expected result: EQ -mixed a() { switch(1) { default: return 0; case "": return 2; case 0: return 3; case 1: return 5; case 4.0: return 4; } return -1; } -mixed b() { return 5; } -.... -test 3866, expected result: EQ -mixed a() { switch(1) { case "": return 2; default: return 0; case 0: return 3; case 1: return 5; case 4.0: return 4; } return -1; } -mixed b() { return 5; } -.... -test 3867, expected result: EQ -mixed a() { switch(1) { case "": return 2; case 0: return 3; default: return 0; case 1: return 5; case 4.0: return 4; } return -1; } -mixed b() { return 5; } -.... -test 3868, expected result: EQ -mixed a() { switch(1) { case "": return 2; case 0: return 3; case 1: return 5; default: return 0; case 4.0: return 4; } return -1; } -mixed b() { return 5; } -.... -test 3869, expected result: EQ -mixed a() { switch(1) { case "": return 2; case 0: return 3; case 1: return 5; case 4.0: return 4; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 3870, expected result: EQ -mixed a() { switch(1) { case "": return 2; case 4.0: return 4; case 0: return 3; case 1: return 5; } return 0; } -mixed b() { return 5; } -.... -test 3871, expected result: EQ -mixed a() { switch(1) { default: return 0; case "": return 2; case 4.0: return 4; case 0: return 3; case 1: return 5; } return -1; } -mixed b() { return 5; } -.... -test 3872, expected result: EQ -mixed a() { switch(1) { case "": return 2; default: return 0; case 4.0: return 4; case 0: return 3; case 1: return 5; } return -1; } -mixed b() { return 5; } -.... -test 3873, expected result: EQ -mixed a() { switch(1) { case "": return 2; case 4.0: return 4; default: return 0; case 0: return 3; case 1: return 5; } return -1; } -mixed b() { return 5; } -.... -test 3874, expected result: EQ -mixed a() { switch(1) { case "": return 2; case 4.0: return 4; case 0: return 3; default: return 0; case 1: return 5; } return -1; } -mixed b() { return 5; } -.... -test 3875, expected result: EQ -mixed a() { switch(1) { case "": return 2; case 4.0: return 4; case 0: return 3; case 1: return 5; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 3876, expected result: EQ -mixed a() { switch(1) { case "": return 2; case 4.0: return 4; case 1: return 5; case 0: return 3; } return 0; } -mixed b() { return 5; } -.... -test 3877, expected result: EQ -mixed a() { switch(1) { default: return 0; case "": return 2; case 4.0: return 4; case 1: return 5; case 0: return 3; } return -1; } -mixed b() { return 5; } -.... -test 3878, expected result: EQ -mixed a() { switch(1) { case "": return 2; default: return 0; case 4.0: return 4; case 1: return 5; case 0: return 3; } return -1; } -mixed b() { return 5; } -.... -test 3879, expected result: EQ -mixed a() { switch(1) { case "": return 2; case 4.0: return 4; default: return 0; case 1: return 5; case 0: return 3; } return -1; } -mixed b() { return 5; } -.... -test 3880, expected result: EQ -mixed a() { switch(1) { case "": return 2; case 4.0: return 4; case 1: return 5; default: return 0; case 0: return 3; } return -1; } -mixed b() { return 5; } -.... -test 3881, expected result: EQ -mixed a() { switch(1) { case "": return 2; case 4.0: return 4; case 1: return 5; case 0: return 3; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 3882, expected result: EQ -mixed a() { switch(1) { case "": return 2; case 1: return 5; case 4.0: return 4; case 0: return 3; } return 0; } -mixed b() { return 5; } -.... -test 3883, expected result: EQ -mixed a() { switch(1) { default: return 0; case "": return 2; case 1: return 5; case 4.0: return 4; case 0: return 3; } return -1; } -mixed b() { return 5; } -.... -test 3884, expected result: EQ -mixed a() { switch(1) { case "": return 2; default: return 0; case 1: return 5; case 4.0: return 4; case 0: return 3; } return -1; } -mixed b() { return 5; } -.... -test 3885, expected result: EQ -mixed a() { switch(1) { case "": return 2; case 1: return 5; default: return 0; case 4.0: return 4; case 0: return 3; } return -1; } -mixed b() { return 5; } -.... -test 3886, expected result: EQ -mixed a() { switch(1) { case "": return 2; case 1: return 5; case 4.0: return 4; default: return 0; case 0: return 3; } return -1; } -mixed b() { return 5; } -.... -test 3887, expected result: EQ -mixed a() { switch(1) { case "": return 2; case 1: return 5; case 4.0: return 4; case 0: return 3; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 3888, expected result: EQ -mixed a() { switch(1) { case "": return 2; case 1: return 5; case 0: return 3; case 4.0: return 4; } return 0; } -mixed b() { return 5; } -.... -test 3889, expected result: EQ -mixed a() { switch(1) { default: return 0; case "": return 2; case 1: return 5; case 0: return 3; case 4.0: return 4; } return -1; } -mixed b() { return 5; } -.... -test 3890, expected result: EQ -mixed a() { switch(1) { case "": return 2; default: return 0; case 1: return 5; case 0: return 3; case 4.0: return 4; } return -1; } -mixed b() { return 5; } -.... -test 3891, expected result: EQ -mixed a() { switch(1) { case "": return 2; case 1: return 5; default: return 0; case 0: return 3; case 4.0: return 4; } return -1; } -mixed b() { return 5; } -.... -test 3892, expected result: EQ -mixed a() { switch(1) { case "": return 2; case 1: return 5; case 0: return 3; default: return 0; case 4.0: return 4; } return -1; } -mixed b() { return 5; } -.... -test 3893, expected result: EQ -mixed a() { switch(1) { case "": return 2; case 1: return 5; case 0: return 3; case 4.0: return 4; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 3894, expected result: EQ -mixed a() { switch(1) { case 0: return 3; case "": return 2; case 4.0: return 4; case 1: return 5; } return 0; } -mixed b() { return 5; } -.... -test 3895, expected result: EQ -mixed a() { switch(1) { default: return 0; case 0: return 3; case "": return 2; case 4.0: return 4; case 1: return 5; } return -1; } -mixed b() { return 5; } -.... -test 3896, expected result: EQ -mixed a() { switch(1) { case 0: return 3; default: return 0; case "": return 2; case 4.0: return 4; case 1: return 5; } return -1; } -mixed b() { return 5; } -.... -test 3897, expected result: EQ -mixed a() { switch(1) { case 0: return 3; case "": return 2; default: return 0; case 4.0: return 4; case 1: return 5; } return -1; } -mixed b() { return 5; } -.... -test 3898, expected result: EQ -mixed a() { switch(1) { case 0: return 3; case "": return 2; case 4.0: return 4; default: return 0; case 1: return 5; } return -1; } -mixed b() { return 5; } -.... -test 3899, expected result: EQ -mixed a() { switch(1) { case 0: return 3; case "": return 2; case 4.0: return 4; case 1: return 5; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 3900, expected result: EQ -mixed a() { switch(1) { case 0: return 3; case "": return 2; case 1: return 5; case 4.0: return 4; } return 0; } -mixed b() { return 5; } -.... -test 3901, expected result: EQ -mixed a() { switch(1) { default: return 0; case 0: return 3; case "": return 2; case 1: return 5; case 4.0: return 4; } return -1; } -mixed b() { return 5; } -.... -test 3902, expected result: EQ -mixed a() { switch(1) { case 0: return 3; default: return 0; case "": return 2; case 1: return 5; case 4.0: return 4; } return -1; } -mixed b() { return 5; } -.... -test 3903, expected result: EQ -mixed a() { switch(1) { case 0: return 3; case "": return 2; default: return 0; case 1: return 5; case 4.0: return 4; } return -1; } -mixed b() { return 5; } -.... -test 3904, expected result: EQ -mixed a() { switch(1) { case 0: return 3; case "": return 2; case 1: return 5; default: return 0; case 4.0: return 4; } return -1; } -mixed b() { return 5; } -.... -test 3905, expected result: EQ -mixed a() { switch(1) { case 0: return 3; case "": return 2; case 1: return 5; case 4.0: return 4; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 3906, expected result: EQ -mixed a() { switch(1) { case 0: return 3; case 4.0: return 4; case "": return 2; case 1: return 5; } return 0; } -mixed b() { return 5; } -.... -test 3907, expected result: EQ -mixed a() { switch(1) { default: return 0; case 0: return 3; case 4.0: return 4; case "": return 2; case 1: return 5; } return -1; } -mixed b() { return 5; } -.... -test 3908, expected result: EQ -mixed a() { switch(1) { case 0: return 3; default: return 0; case 4.0: return 4; case "": return 2; case 1: return 5; } return -1; } -mixed b() { return 5; } -.... -test 3909, expected result: EQ -mixed a() { switch(1) { case 0: return 3; case 4.0: return 4; default: return 0; case "": return 2; case 1: return 5; } return -1; } -mixed b() { return 5; } -.... -test 3910, expected result: EQ -mixed a() { switch(1) { case 0: return 3; case 4.0: return 4; case "": return 2; default: return 0; case 1: return 5; } return -1; } -mixed b() { return 5; } -.... -test 3911, expected result: EQ -mixed a() { switch(1) { case 0: return 3; case 4.0: return 4; case "": return 2; case 1: return 5; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 3912, expected result: EQ -mixed a() { switch(1) { case 0: return 3; case 4.0: return 4; case 1: return 5; case "": return 2; } return 0; } -mixed b() { return 5; } -.... -test 3913, expected result: EQ -mixed a() { switch(1) { default: return 0; case 0: return 3; case 4.0: return 4; case 1: return 5; case "": return 2; } return -1; } -mixed b() { return 5; } -.... -test 3914, expected result: EQ -mixed a() { switch(1) { case 0: return 3; default: return 0; case 4.0: return 4; case 1: return 5; case "": return 2; } return -1; } -mixed b() { return 5; } -.... -test 3915, expected result: EQ -mixed a() { switch(1) { case 0: return 3; case 4.0: return 4; default: return 0; case 1: return 5; case "": return 2; } return -1; } -mixed b() { return 5; } -.... -test 3916, expected result: EQ -mixed a() { switch(1) { case 0: return 3; case 4.0: return 4; case 1: return 5; default: return 0; case "": return 2; } return -1; } -mixed b() { return 5; } -.... -test 3917, expected result: EQ -mixed a() { switch(1) { case 0: return 3; case 4.0: return 4; case 1: return 5; case "": return 2; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 3918, expected result: EQ -mixed a() { switch(1) { case 0: return 3; case 1: return 5; case 4.0: return 4; case "": return 2; } return 0; } -mixed b() { return 5; } -.... -test 3919, expected result: EQ -mixed a() { switch(1) { default: return 0; case 0: return 3; case 1: return 5; case 4.0: return 4; case "": return 2; } return -1; } -mixed b() { return 5; } -.... -test 3920, expected result: EQ -mixed a() { switch(1) { case 0: return 3; default: return 0; case 1: return 5; case 4.0: return 4; case "": return 2; } return -1; } -mixed b() { return 5; } -.... -test 3921, expected result: EQ -mixed a() { switch(1) { case 0: return 3; case 1: return 5; default: return 0; case 4.0: return 4; case "": return 2; } return -1; } -mixed b() { return 5; } -.... -test 3922, expected result: EQ -mixed a() { switch(1) { case 0: return 3; case 1: return 5; case 4.0: return 4; default: return 0; case "": return 2; } return -1; } -mixed b() { return 5; } -.... -test 3923, expected result: EQ -mixed a() { switch(1) { case 0: return 3; case 1: return 5; case 4.0: return 4; case "": return 2; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 3924, expected result: EQ -mixed a() { switch(1) { case 0: return 3; case 1: return 5; case "": return 2; case 4.0: return 4; } return 0; } -mixed b() { return 5; } -.... -test 3925, expected result: EQ -mixed a() { switch(1) { default: return 0; case 0: return 3; case 1: return 5; case "": return 2; case 4.0: return 4; } return -1; } -mixed b() { return 5; } -.... -test 3926, expected result: EQ -mixed a() { switch(1) { case 0: return 3; default: return 0; case 1: return 5; case "": return 2; case 4.0: return 4; } return -1; } -mixed b() { return 5; } -.... -test 3927, expected result: EQ -mixed a() { switch(1) { case 0: return 3; case 1: return 5; default: return 0; case "": return 2; case 4.0: return 4; } return -1; } -mixed b() { return 5; } -.... -test 3928, expected result: EQ -mixed a() { switch(1) { case 0: return 3; case 1: return 5; case "": return 2; default: return 0; case 4.0: return 4; } return -1; } -mixed b() { return 5; } -.... -test 3929, expected result: EQ -mixed a() { switch(1) { case 0: return 3; case 1: return 5; case "": return 2; case 4.0: return 4; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 3930, expected result: EQ -mixed a() { switch(1) { case 4.0: return 4; case 0: return 3; case "": return 2; case 1: return 5; } return 0; } -mixed b() { return 5; } -.... -test 3931, expected result: EQ -mixed a() { switch(1) { default: return 0; case 4.0: return 4; case 0: return 3; case "": return 2; case 1: return 5; } return -1; } -mixed b() { return 5; } -.... -test 3932, expected result: EQ -mixed a() { switch(1) { case 4.0: return 4; default: return 0; case 0: return 3; case "": return 2; case 1: return 5; } return -1; } -mixed b() { return 5; } -.... -test 3933, expected result: EQ -mixed a() { switch(1) { case 4.0: return 4; case 0: return 3; default: return 0; case "": return 2; case 1: return 5; } return -1; } -mixed b() { return 5; } -.... -test 3934, expected result: EQ -mixed a() { switch(1) { case 4.0: return 4; case 0: return 3; case "": return 2; default: return 0; case 1: return 5; } return -1; } -mixed b() { return 5; } -.... -test 3935, expected result: EQ -mixed a() { switch(1) { case 4.0: return 4; case 0: return 3; case "": return 2; case 1: return 5; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 3936, expected result: EQ -mixed a() { switch(1) { case 4.0: return 4; case 0: return 3; case 1: return 5; case "": return 2; } return 0; } -mixed b() { return 5; } -.... -test 3937, expected result: EQ -mixed a() { switch(1) { default: return 0; case 4.0: return 4; case 0: return 3; case 1: return 5; case "": return 2; } return -1; } -mixed b() { return 5; } -.... -test 3938, expected result: EQ -mixed a() { switch(1) { case 4.0: return 4; default: return 0; case 0: return 3; case 1: return 5; case "": return 2; } return -1; } -mixed b() { return 5; } -.... -test 3939, expected result: EQ -mixed a() { switch(1) { case 4.0: return 4; case 0: return 3; default: return 0; case 1: return 5; case "": return 2; } return -1; } -mixed b() { return 5; } -.... -test 3940, expected result: EQ -mixed a() { switch(1) { case 4.0: return 4; case 0: return 3; case 1: return 5; default: return 0; case "": return 2; } return -1; } -mixed b() { return 5; } -.... -test 3941, expected result: EQ -mixed a() { switch(1) { case 4.0: return 4; case 0: return 3; case 1: return 5; case "": return 2; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 3942, expected result: EQ -mixed a() { switch(1) { case 4.0: return 4; case "": return 2; case 0: return 3; case 1: return 5; } return 0; } -mixed b() { return 5; } -.... -test 3943, expected result: EQ -mixed a() { switch(1) { default: return 0; case 4.0: return 4; case "": return 2; case 0: return 3; case 1: return 5; } return -1; } -mixed b() { return 5; } -.... -test 3944, expected result: EQ -mixed a() { switch(1) { case 4.0: return 4; default: return 0; case "": return 2; case 0: return 3; case 1: return 5; } return -1; } -mixed b() { return 5; } -.... -test 3945, expected result: EQ -mixed a() { switch(1) { case 4.0: return 4; case "": return 2; default: return 0; case 0: return 3; case 1: return 5; } return -1; } -mixed b() { return 5; } -.... -test 3946, expected result: EQ -mixed a() { switch(1) { case 4.0: return 4; case "": return 2; case 0: return 3; default: return 0; case 1: return 5; } return -1; } -mixed b() { return 5; } -.... -test 3947, expected result: EQ -mixed a() { switch(1) { case 4.0: return 4; case "": return 2; case 0: return 3; case 1: return 5; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 3948, expected result: EQ -mixed a() { switch(1) { case 4.0: return 4; case "": return 2; case 1: return 5; case 0: return 3; } return 0; } -mixed b() { return 5; } -.... -test 3949, expected result: EQ -mixed a() { switch(1) { default: return 0; case 4.0: return 4; case "": return 2; case 1: return 5; case 0: return 3; } return -1; } -mixed b() { return 5; } -.... -test 3950, expected result: EQ -mixed a() { switch(1) { case 4.0: return 4; default: return 0; case "": return 2; case 1: return 5; case 0: return 3; } return -1; } -mixed b() { return 5; } -.... -test 3951, expected result: EQ -mixed a() { switch(1) { case 4.0: return 4; case "": return 2; default: return 0; case 1: return 5; case 0: return 3; } return -1; } -mixed b() { return 5; } -.... -test 3952, expected result: EQ -mixed a() { switch(1) { case 4.0: return 4; case "": return 2; case 1: return 5; default: return 0; case 0: return 3; } return -1; } -mixed b() { return 5; } -.... -test 3953, expected result: EQ -mixed a() { switch(1) { case 4.0: return 4; case "": return 2; case 1: return 5; case 0: return 3; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 3954, expected result: EQ -mixed a() { switch(1) { case 4.0: return 4; case 1: return 5; case "": return 2; case 0: return 3; } return 0; } -mixed b() { return 5; } -.... -test 3955, expected result: EQ -mixed a() { switch(1) { default: return 0; case 4.0: return 4; case 1: return 5; case "": return 2; case 0: return 3; } return -1; } -mixed b() { return 5; } -.... -test 3956, expected result: EQ -mixed a() { switch(1) { case 4.0: return 4; default: return 0; case 1: return 5; case "": return 2; case 0: return 3; } return -1; } -mixed b() { return 5; } -.... -test 3957, expected result: EQ -mixed a() { switch(1) { case 4.0: return 4; case 1: return 5; default: return 0; case "": return 2; case 0: return 3; } return -1; } -mixed b() { return 5; } -.... -test 3958, expected result: EQ -mixed a() { switch(1) { case 4.0: return 4; case 1: return 5; case "": return 2; default: return 0; case 0: return 3; } return -1; } -mixed b() { return 5; } -.... -test 3959, expected result: EQ -mixed a() { switch(1) { case 4.0: return 4; case 1: return 5; case "": return 2; case 0: return 3; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 3960, expected result: EQ -mixed a() { switch(1) { case 4.0: return 4; case 1: return 5; case 0: return 3; case "": return 2; } return 0; } -mixed b() { return 5; } -.... -test 3961, expected result: EQ -mixed a() { switch(1) { default: return 0; case 4.0: return 4; case 1: return 5; case 0: return 3; case "": return 2; } return -1; } -mixed b() { return 5; } -.... -test 3962, expected result: EQ -mixed a() { switch(1) { case 4.0: return 4; default: return 0; case 1: return 5; case 0: return 3; case "": return 2; } return -1; } -mixed b() { return 5; } -.... -test 3963, expected result: EQ -mixed a() { switch(1) { case 4.0: return 4; case 1: return 5; default: return 0; case 0: return 3; case "": return 2; } return -1; } -mixed b() { return 5; } -.... -test 3964, expected result: EQ -mixed a() { switch(1) { case 4.0: return 4; case 1: return 5; case 0: return 3; default: return 0; case "": return 2; } return -1; } -mixed b() { return 5; } -.... -test 3965, expected result: EQ -mixed a() { switch(1) { case 4.0: return 4; case 1: return 5; case 0: return 3; case "": return 2; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 3966, expected result: EQ -mixed a() { switch(1) { case 1: return 5; case 0: return 3; case 4.0: return 4; case "": return 2; } return 0; } -mixed b() { return 5; } -.... -test 3967, expected result: EQ -mixed a() { switch(1) { default: return 0; case 1: return 5; case 0: return 3; case 4.0: return 4; case "": return 2; } return -1; } -mixed b() { return 5; } -.... -test 3968, expected result: EQ -mixed a() { switch(1) { case 1: return 5; default: return 0; case 0: return 3; case 4.0: return 4; case "": return 2; } return -1; } -mixed b() { return 5; } -.... -test 3969, expected result: EQ -mixed a() { switch(1) { case 1: return 5; case 0: return 3; default: return 0; case 4.0: return 4; case "": return 2; } return -1; } -mixed b() { return 5; } -.... -test 3970, expected result: EQ -mixed a() { switch(1) { case 1: return 5; case 0: return 3; case 4.0: return 4; default: return 0; case "": return 2; } return -1; } -mixed b() { return 5; } -.... -test 3971, expected result: EQ -mixed a() { switch(1) { case 1: return 5; case 0: return 3; case 4.0: return 4; case "": return 2; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 3972, expected result: EQ -mixed a() { switch(1) { case 1: return 5; case 0: return 3; case "": return 2; case 4.0: return 4; } return 0; } -mixed b() { return 5; } -.... -test 3973, expected result: EQ -mixed a() { switch(1) { default: return 0; case 1: return 5; case 0: return 3; case "": return 2; case 4.0: return 4; } return -1; } -mixed b() { return 5; } -.... -test 3974, expected result: EQ -mixed a() { switch(1) { case 1: return 5; default: return 0; case 0: return 3; case "": return 2; case 4.0: return 4; } return -1; } -mixed b() { return 5; } -.... -test 3975, expected result: EQ -mixed a() { switch(1) { case 1: return 5; case 0: return 3; default: return 0; case "": return 2; case 4.0: return 4; } return -1; } -mixed b() { return 5; } -.... -test 3976, expected result: EQ -mixed a() { switch(1) { case 1: return 5; case 0: return 3; case "": return 2; default: return 0; case 4.0: return 4; } return -1; } -mixed b() { return 5; } -.... -test 3977, expected result: EQ -mixed a() { switch(1) { case 1: return 5; case 0: return 3; case "": return 2; case 4.0: return 4; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 3978, expected result: EQ -mixed a() { switch(1) { case 1: return 5; case 4.0: return 4; case 0: return 3; case "": return 2; } return 0; } -mixed b() { return 5; } -.... -test 3979, expected result: EQ -mixed a() { switch(1) { default: return 0; case 1: return 5; case 4.0: return 4; case 0: return 3; case "": return 2; } return -1; } -mixed b() { return 5; } -.... -test 3980, expected result: EQ -mixed a() { switch(1) { case 1: return 5; default: return 0; case 4.0: return 4; case 0: return 3; case "": return 2; } return -1; } -mixed b() { return 5; } -.... -test 3981, expected result: EQ -mixed a() { switch(1) { case 1: return 5; case 4.0: return 4; default: return 0; case 0: return 3; case "": return 2; } return -1; } -mixed b() { return 5; } -.... -test 3982, expected result: EQ -mixed a() { switch(1) { case 1: return 5; case 4.0: return 4; case 0: return 3; default: return 0; case "": return 2; } return -1; } -mixed b() { return 5; } -.... -test 3983, expected result: EQ -mixed a() { switch(1) { case 1: return 5; case 4.0: return 4; case 0: return 3; case "": return 2; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 3984, expected result: EQ -mixed a() { switch(1) { case 1: return 5; case 4.0: return 4; case "": return 2; case 0: return 3; } return 0; } -mixed b() { return 5; } -.... -test 3985, expected result: EQ -mixed a() { switch(1) { default: return 0; case 1: return 5; case 4.0: return 4; case "": return 2; case 0: return 3; } return -1; } -mixed b() { return 5; } -.... -test 3986, expected result: EQ -mixed a() { switch(1) { case 1: return 5; default: return 0; case 4.0: return 4; case "": return 2; case 0: return 3; } return -1; } -mixed b() { return 5; } -.... -test 3987, expected result: EQ -mixed a() { switch(1) { case 1: return 5; case 4.0: return 4; default: return 0; case "": return 2; case 0: return 3; } return -1; } -mixed b() { return 5; } -.... -test 3988, expected result: EQ -mixed a() { switch(1) { case 1: return 5; case 4.0: return 4; case "": return 2; default: return 0; case 0: return 3; } return -1; } -mixed b() { return 5; } -.... -test 3989, expected result: EQ -mixed a() { switch(1) { case 1: return 5; case 4.0: return 4; case "": return 2; case 0: return 3; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 3990, expected result: EQ -mixed a() { switch(1) { case 1: return 5; case "": return 2; case 4.0: return 4; case 0: return 3; } return 0; } -mixed b() { return 5; } -.... -test 3991, expected result: EQ -mixed a() { switch(1) { default: return 0; case 1: return 5; case "": return 2; case 4.0: return 4; case 0: return 3; } return -1; } -mixed b() { return 5; } -.... -test 3992, expected result: EQ -mixed a() { switch(1) { case 1: return 5; default: return 0; case "": return 2; case 4.0: return 4; case 0: return 3; } return -1; } -mixed b() { return 5; } -.... -test 3993, expected result: EQ -mixed a() { switch(1) { case 1: return 5; case "": return 2; default: return 0; case 4.0: return 4; case 0: return 3; } return -1; } -mixed b() { return 5; } -.... -test 3994, expected result: EQ -mixed a() { switch(1) { case 1: return 5; case "": return 2; case 4.0: return 4; default: return 0; case 0: return 3; } return -1; } -mixed b() { return 5; } -.... -test 3995, expected result: EQ -mixed a() { switch(1) { case 1: return 5; case "": return 2; case 4.0: return 4; case 0: return 3; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 3996, expected result: EQ -mixed a() { switch(1) { case 1: return 5; case "": return 2; case 0: return 3; case 4.0: return 4; } return 0; } -mixed b() { return 5; } -.... -test 3997, expected result: EQ -mixed a() { switch(1) { default: return 0; case 1: return 5; case "": return 2; case 0: return 3; case 4.0: return 4; } return -1; } -mixed b() { return 5; } -.... -test 3998, expected result: EQ -mixed a() { switch(1) { case 1: return 5; default: return 0; case "": return 2; case 0: return 3; case 4.0: return 4; } return -1; } -mixed b() { return 5; } -.... -test 3999, expected result: EQ -mixed a() { switch(1) { case 1: return 5; case "": return 2; default: return 0; case 0: return 3; case 4.0: return 4; } return -1; } -mixed b() { return 5; } -.... -test 4000, expected result: EQ -mixed a() { switch(1) { case 1: return 5; case "": return 2; case 0: return 3; default: return 0; case 4.0: return 4; } return -1; } -mixed b() { return 5; } -.... -test 4001, expected result: EQ -mixed a() { switch(1) { case 1: return 5; case "": return 2; case 0: return 3; case 4.0: return 4; default: return 0; } return -1; } -mixed b() { return 5; } -.... -test 4002, expected result: EQ -mixed a() { int e;string t=""; for(e=0;e<10;e++) switch(e) { default: t+=e; case 4..8: } return t; } -mixed b() { return "01239"; } -.... -test 4003, expected result: EQ -mixed a() { float e,q; q=0.0; for(e=0.1;e<10.0;e+=1.0) switch(e) { default: q+=e; case 4.0..8.0: } return q; } -mixed b() { return 0.1+1.1+2.1+3.1+8.1+9.1; } -.... -test 4004, expected result: EQ -mixed a() { int e; object o=clone((program)"/precompiled/file"); if(!o->open("conftest.h","wct")) return -1; e=o->write("return 17;\n"); if(!o->close()) return -1; return e; } -mixed b() { return 11; } -.... -test 4005, expected result: EQ -mixed a() { -#include "conftest.h" -; } -mixed b() { return 17; } -.... -test 4006, expected result: EQ -mixed a() { -#include <conftest.h> -; } -mixed b() { return 17; } -.... -test 4007, expected result: TRUE -mixed a() { return intp(__LINE__); } -.... -test 4008, expected result: TRUE -mixed a() { return stringp(__FILE__); } -.... -test 4009, expected result: TRUE -mixed a() { return stringp(__DATE__); } -.... -test 4010, expected result: TRUE -mixed a() { return stringp(__TIME__); } -.... -test 4011, expected result: EQ -mixed a() { -#define FOOa 1 -return FOOa; -; } -mixed b() { return 1; } -.... -test 4012, expected result: EQ -mixed a() { -#define FOOb 17 -#undef FOOb -#define FOOb 1 -return FOOb; -; } -mixed b() { return 1; } -.... -test 4013, expected result: COMPILE_ERROR -mixed a() { -#define FOOc FOOc FOO -FOO -; } -.... -test 4014, expected result: COMPILE_ERROR -mixed a() { -#error FOOd -FOO -; } -.... -test 4015, expected result: EQ -mixed a() { -/* return 99; * / /* */ -return 1; -; } -mixed b() { return 1; } -.... -test 4016, expected result: EQ -mixed a() { -// return 99; -return 1; -; } -mixed b() { return 1; } -.... -test 4017, expected result: EQ -mixed a() { -#if 1 -return 1; -#else -return 0; -#endif -; } -mixed b() { return 1; } -.... -test 4018, expected result: EQ -mixed a() { -#if 0 -return 1; -#else -return 0; -#endif -; } -mixed b() { return 0; } -.... -test 4019, expected result: EQ -mixed a() { -#if 1==1 -return 1; -#else -return 0; -#endif -; } -mixed b() { return 1; } -.... -test 4020, expected result: EQ -mixed a() { -#if 1==2 -return 1; -#else -return 0; -#endif -; } -mixed b() { return 0; } -.... -test 4021, expected result: EQ -mixed a() { -#if 1!=2 -return 1; -#else -return 0; -#endif -; } -mixed b() { return 1; } -.... -test 4022, expected result: EQ -mixed a() { -#if 1!=1 -return 1; -#else -return 0; -#endif -; } -mixed b() { return 0; } -.... -test 4023, expected result: EQ -mixed a() { -#if (((1))==1) -return 1; -#else -return 0; -#endif -; } -mixed b() { return 1; } -.... -test 4024, expected result: EQ -mixed a() { -#if ((1)==(2)) -return 1; -#else -return 0; -#endif -; } -mixed b() { return 0; } -.... -test 4025, expected result: EQ -mixed a() { -#if -1 -return 1; -#else -return 0; -#endif -; } -mixed b() { return 1; } -.... -test 4026, expected result: EQ -mixed a() { -#if (-1) -return 1; -#else -return 0; -#endif -; } -mixed b() { return 1; } -.... -test 4027, expected result: EQ -mixed a() { -#if (-1==0-1) -return 1; -#else -return 0; -#endif -; } -mixed b() { return 1; } -.... -test 4028, expected result: EQ -mixed a() { -#if (-1-1==~1) -return 1; -#else -return 0; -#endif -; } -mixed b() { return 1; } -.... -test 4029, expected result: EQ -mixed a() { -#if 17 == ( 1 ? 17 : 18 ) -return 1; -#else -return 0; -#endif -; } -mixed b() { return 1; } -.... -test 4030, expected result: EQ -mixed a() { -#if 18 == ( 0 ? 17 : 18 ) -return 1; -#else -return 0; -#endif -; } -mixed b() { return 1; } -.... -test 4031, expected result: EQ -mixed a() { -#if 10 == ( 10 || 20 ) -return 1; -#else -return 0; -#endif -; } -mixed b() { return 1; } -.... -test 4032, expected result: EQ -mixed a() { -#if 20 == ( 0 || 20 ) -return 1; -#else -return 0; -#endif -; } -mixed b() { return 1; } -.... -test 4033, expected result: EQ -mixed a() { -#if 0 == ( 0 && 20 ) -return 1; -#else -return 0; -#endif -; } -mixed b() { return 1; } -.... -test 4034, expected result: EQ -mixed a() { -#if 20 == ( 10 && 20 ) -return 1; -#else -return 0; -#endif -; } -mixed b() { return 1; } -.... -test 4035, expected result: EQ -mixed a() { -#if 3 == ( 1 | 2 ) -return 1; -#else -return 0; -#endif -; } -mixed b() { return 1; } -.... -test 4036, expected result: EQ -mixed a() { -#if 2 == ( 2 | 2 ) -return 1; -#else -return 0; -#endif -; } -mixed b() { return 1; } -.... -test 4037, expected result: EQ -mixed a() { -#if 0 == ( 2 ^ 2 ) -return 1; -#else -return 0; -#endif -; } -mixed b() { return 1; } -.... -test 4038, expected result: EQ -mixed a() { -#if 3 == ( 1 ^ 2 ) -return 1; -#else -return 0; -#endif -; } -mixed b() { return 1; } -.... -test 4039, expected result: EQ -mixed a() { -#if 0 == ( 1 & 2 ) -return 1; -#else -return 0; -#endif -; } -mixed b() { return 1; } -.... -test 4040, expected result: EQ -mixed a() { -#if 2 == ( 2 & 7 ) -return 1; -#else -return 0; -#endif -; } -mixed b() { return 1; } -.... -test 4041, expected result: EQ -mixed a() { -#if 1<2 -return 1; -#else -return 0; -#endif -; } -mixed b() { return 1; } -.... -test 4042, expected result: EQ -mixed a() { -#if !(1>2) -return 1; -#else -return 0; -#endif -; } -mixed b() { return 1; } -.... -test 4043, expected result: EQ -mixed a() { -#if 2>1 -return 1; -#else -return 0; -#endif -; } -mixed b() { return 1; } -.... -test 4044, expected result: EQ -mixed a() { -#if !(2<1) -return 1; -#else -return 0; -#endif -; } -mixed b() { return 1; } -.... -test 4045, expected result: EQ -mixed a() { -#if 1<=2 -return 1; -#else -return 0; -#endif -; } -mixed b() { return 1; } -.... -test 4046, expected result: EQ -mixed a() { -#if !(1>=2) -return 1; -#else -return 0; -#endif -; } -mixed b() { return 1; } -.... -test 4047, expected result: EQ -mixed a() { -#if 2>=1 -return 1; -#else -return 0; -#endif -; } -mixed b() { return 1; } -.... -test 4048, expected result: EQ -mixed a() { -#if !(2<=1) -return 1; -#else -return 0; -#endif -; } -mixed b() { return 1; } -.... -test 4049, expected result: EQ -mixed a() { -#if 2<=2 -return 1; -#else -return 0; -#endif -; } -mixed b() { return 1; } -.... -test 4050, expected result: EQ -mixed a() { -#if 1>=1 -return 1; -#else -return 0; -#endif -; } -mixed b() { return 1; } -.... -test 4051, expected result: EQ -mixed a() { -#if 1.0<2.0 -return 1; -#else -return 0; -#endif -; } -mixed b() { return 1; } -.... -test 4052, expected result: EQ -mixed a() { -#if !(1.0>2.0) -return 1; -#else -return 0; -#endif -; } -mixed b() { return 1; } -.... -test 4053, expected result: EQ -mixed a() { -#if 2.0>1.0 -return 1; -#else -return 0; -#endif -; } -mixed b() { return 1; } -.... -test 4054, expected result: EQ -mixed a() { -#if !(2.0<1.0) -return 1; -#else -return 0; -#endif -; } -mixed b() { return 1; } -.... -test 4055, expected result: EQ -mixed a() { -#if 1.0<=2.0 -return 1; -#else -return 0; -#endif -; } -mixed b() { return 1; } -.... -test 4056, expected result: EQ -mixed a() { -#if !(1.0>=2.0) -return 1; -#else -return 0; -#endif -; } -mixed b() { return 1; } -.... -test 4057, expected result: EQ -mixed a() { -#if 2.0>=1.0 -return 1; -#else -return 0; -#endif -; } -mixed b() { return 1; } -.... -test 4058, expected result: EQ -mixed a() { -#if !(2.0<=1.0) -return 1; -#else -return 0; -#endif -; } -mixed b() { return 1; } -.... -test 4059, expected result: EQ -mixed a() { -#if 2.0<=2.0 -return 1; -#else -return 0; -#endif -; } -mixed b() { return 1; } -.... -test 4060, expected result: EQ -mixed a() { -#if 1.0>=1.0 -return 1; -#else -return 0; -#endif -; } -mixed b() { return 1; } -.... -test 4061, expected result: EQ -mixed a() { -#if "a"<"b" -return 1; -#else -return 0; -#endif -; } -mixed b() { return 1; } -.... -test 4062, expected result: EQ -mixed a() { -#if !("a">"b") -return 1; -#else -return 0; -#endif -; } -mixed b() { return 1; } -.... -test 4063, expected result: EQ -mixed a() { -#if "b">"a" -return 1; -#else -return 0; -#endif -; } -mixed b() { return 1; } -.... -test 4064, expected result: EQ -mixed a() { -#if !("b"<"a") -return 1; -#else -return 0; -#endif -; } -mixed b() { return 1; } -.... -test 4065, expected result: EQ -mixed a() { -#if "a"<="b" -return 1; -#else -return 0; -#endif -; } -mixed b() { return 1; } -.... -test 4066, expected result: EQ -mixed a() { -#if !("a">="b") -return 1; -#else -return 0; -#endif -; } -mixed b() { return 1; } -.... -test 4067, expected result: EQ -mixed a() { -#if "b">="a" -return 1; -#else -return 0; -#endif -; } -mixed b() { return 1; } -.... -test 4068, expected result: EQ -mixed a() { -#if !("b"<="a") -return 1; -#else -return 0; -#endif -; } -mixed b() { return 1; } -.... -test 4069, expected result: EQ -mixed a() { -#if "b"<="b" -return 1; -#else -return 0; -#endif -; } -mixed b() { return 1; } -.... -test 4070, expected result: EQ -mixed a() { -#if "a">="a" -return 1; -#else -return 0; -#endif -; } -mixed b() { return 1; } -.... -test 4071, expected result: EQ -mixed a() { -#if 1<<10==1024 -return 1; -#else -return 0; -#endif -; } -mixed b() { return 1; } -.... -test 4072, expected result: EQ -mixed a() { -#if 5<<3==40 -return 1; -#else -return 0; -#endif -; } -mixed b() { return 1; } -.... -test 4073, expected result: EQ -mixed a() { -#if 1024>>10==1 -return 1; -#else -return 0; -#endif -; } -mixed b() { return 1; } -.... -test 4074, expected result: EQ -mixed a() { -#if 47>>3==5 -return 1; -#else -return 0; -#endif -; } -mixed b() { return 1; } -.... -test 4075, expected result: EQ -mixed a() { -#if 1024+10==1034 -return 1; -#else -return 0; -#endif -; } -mixed b() { return 1; } -.... -test 4076, expected result: EQ -mixed a() { -#if 47+3==50 -return 1; -#else -return 0; -#endif -; } -mixed b() { return 1; } -.... -test 4077, expected result: EQ -mixed a() { -#if 1024-10==1014 -return 1; -#else -return 0; -#endif -; } -mixed b() { return 1; } -.... -test 4078, expected result: EQ -mixed a() { -#if 47-3==44 -return 1; -#else -return 0; -#endif -; } -mixed b() { return 1; } -.... -test 4079, expected result: EQ -mixed a() { -#if 1024*10==10240 -return 1; -#else -return 0; -#endif -; } -mixed b() { return 1; } -.... -test 4080, expected result: EQ -mixed a() { -#if 47/3==15 -return 1; -#else -return 0; -#endif -; } -mixed b() { return 1; } -.... -test 4081, expected result: COMPILE_ERROR -mixed a() { -#if 1/0 -return 1; -#else -return 0; -#endif -; } -.... -test 4082, expected result: EQ -mixed a() { -#if 47%3==2 -return 1; -#else -return 0; -#endif -; } -mixed b() { return 1; } -.... -test 4083, expected result: COMPILE_ERROR -mixed a() { -#if 1%0 -return 1; -#else -return 0; -#endif -; } -.... -test 4084, expected result: EQ -mixed a() { -#if "foo"[0]=='f' -return 1; -#else -return 0; -#endif -; } -mixed b() { return 1; } -.... -test 4085, expected result: EQ -mixed a() { -#define FOOe 0 -#if defined(FOOe) -return 1; -#else -return 0; -#endif -; } -mixed b() { return 1; } -.... -test 4086, expected result: EQ -mixed a() { -#define FOOf 1 -#if FOOf < 2 -return 1; -#else -return 0; -#endif -; } -mixed b() { return 1; } -.... -test 4087, expected result: EQ -mixed a() { -#define FOOg 1 -#if FOOg < 0 -return 0; -#else -return 1; -#endif -; } -mixed b() { return 1; } -.... -test 4088, expected result: EQ -mixed a() { -#define FOOh 1 -#if 0 < FOOh -return 1; -#else -return 0; -#endif -; } -mixed b() { return 1; } -.... -test 4089, expected result: EQ -mixed a() { -#define FOOi 1 -#if 2 < FOOi -return 0; -#else -return 1; -#endif -; } -mixed b() { return 1; } -.... -test 4090, expected result: EQ -mixed a() { -#if 1 /* trying to be mean // * / */ /* /* */ -return 1; /* */ -#define foo -# 1 "---" -#undef foo -#else /* trying to be mean // * / */ /* /* */ -return 0; // -#endif /* trying to be mean // * / */ /* /* */ -; } -mixed b() { return 1; } -.... -test 4091, expected result: EQ -mixed a() { -#if 0 /* trying to be mean // * / */ /* /* */ -return 0; /* */ -#define foo -# 1 "---" -#undef foo -#else /* trying to be mean // * / */ /* /* */ -return 1; // -#endif /* trying to be mean // * / */ /* /* */ -; } -mixed b() { return 1; } -.... -test 4092, expected result: EQ -mixed a() { -#if 1 //* trying to be mean // */ */ -return 1; -#else //* trying to be mean // */ */ -return 0; -#endif //* trying to be mean // */ */ -; } -mixed b() { return 1; } -.... -test 4093, expected result: EQ -mixed a() { -#if 0 //* trying to be mean // */ */ -return 0; -#else //* trying to be mean // */ */ -return 1; -#endif //* trying to be mean // */ */ -; } -mixed b() { return 1; } -.... -test 4094, expected result: EQ -mixed a() { -#define FOOj -#if defined(FOOj) -return 1; -#else -return 0; -#endif -; } -mixed b() { return 1; } -.... -test 4095, expected result: EQ -mixed a() { -#if defined(FOOk) -return 0; -#else -return 1; -#endif -; } -mixed b() { return 1; } -.... -test 4096, expected result: EQ -mixed a() { -#ifdef FOOl -return 0; -#else -return 1; -#endif -; } -mixed b() { return 1; } -.... -test 4097, expected result: EQ -mixed a() { -#define FOOm -#ifdef FOOm -return 1; -#else -return 0; -#endif -; } -mixed b() { return 1; } -.... -test 4098, expected result: EQ -mixed a() { -#define FOOo -#ifndef FOOo -return 0; -#else -return 1; -#endif -; } -mixed b() { return 1; } -.... -test 4099, expected result: EQ -mixed a() { -#ifndef FOOp -return 1; -#else -return 0; -#endif -; } -mixed b() { return 1; } -.... -test 4100, expected result: EQ -mixed a() { -#if 1 -return 1; -#else -FEL -#if 0 -FEL -#else -FEL -#endif -return 0; -#endif -; } -mixed b() { return 1; } -.... -test 4101, expected result: EQ -mixed a() { -#if 0 -FEL -#if 0 -FEL -#else -FEL -#if 1 -FEL -#else -FEL -#endif -#endif -return 0; -#else -return 1; -#endif -; } -mixed b() { return 1; } -.... -test 4102, expected result: EQ -mixed a() { -#if 0 -return 0; -#elif 0 -return 0; -#else -return 1; -#endif -; } -mixed b() { return 1; } -.... -test 4103, expected result: EQ -mixed a() { -#if 0 -return 0; -#elif 1 -return 1; -#else -return 0; -#endif -; } -mixed b() { return 1; } -.... -test 4104, expected result: EQ -mixed a() { -#if 1 -return 1; -#elif 1 -return 0; -#else -return 0; -#endif -; } -mixed b() { return 1; } -.... -test 4105, expected result: EQ -mixed a() { -#if 0 -return 0; -#elseif 0 -return 0; -#else -return 1; -#endif -; } -mixed b() { return 1; } -.... -test 4106, expected result: EQ -mixed a() { -#if 0 -return 0; -#elseif 0 -return 0; -#elseif 1 -return 1; -#elseif 0 -return 0; -#elseif 0 -return 0; -#else -FEL -#endif -; } -mixed b() { return 1; } -.... -test 4107, expected result: EQ -mixed a() { -#if 0 -return 0; -#elseif 1 -return 1; -#else -return 0; -#endif -; } -mixed b() { return 1; } -.... -test 4108, expected result: EQ -mixed a() { -#if 1 -return 1; -#elseif 1 -return 0; -#else -return 0; -#endif -; } -mixed b() { return 1; } -.... -test 4109, expected result: EQ -mixed a() { -#pragma whatever -return 1; -; } -mixed b() { return 1; } -.... -test 4110, expected result: TRUE -mixed a() { return programp((program)"/precompiled/file"); } -.... -test 4111, expected result: RUN -mixed a() { add_efun("FILE",(program)"/precompiled/file"); } -.... -test 4112, expected result: TRUE -mixed a() { return programp(FILE); } -.... -test 4113, expected result: TRUE -mixed a() { return programp((program)"/precompiled/port"); } -.... -test 4114, expected result: EQ -mixed a() { object o; o=clone(FILE); destruct(o); return 1; } -mixed b() { return 1; } -.... -test 4115, expected result: EQ -mixed a() { object o=clone(FILE); return o->open("conftest","wct") && o->close(); } -mixed b() { return 1; } -.... -test 4116, expected result: EQ -mixed a() { return file_stat("conftest")[1]; } -mixed b() { return 0; } -.... -test 4117, expected result: TRUE -mixed a() { return rm("conftest"); } -.... -test 4118, expected result: EQ -mixed a() { return file_stat("conftest"); } -mixed b() { return 0; } -.... -test 4119, expected result: EQ -mixed a() { int e; object o=clone(FILE); if(!o->open("conftest","wct")) return -1; e=o->write("sune"); if(!o->close()) return -1; return e; } -mixed b() { return 4; } -.... -test 4120, expected result: EQ -mixed a() { string s; object o=clone(FILE); if(!o->open("conftest","r")) return -1; s=o->read(4); if(!o->close()) return -1; return s; } -mixed b() { return "sune"; } -.... -test 4121, expected result: EQ -mixed a() { string s; object o=clone(FILE); if(!o->open("conftest","r")) return -1; s=o->read(999999); if(!o->close()) return -1; return s; } -mixed b() { return "sune"; } -.... -test 4122, expected result: EQ -mixed a() { int e; object o=clone(FILE); if(!o->open("conftest","wct")) return -1; e=o->write(sprintf("%'+-*'100000s","")); if(!o->close()) return -1; return e; } -mixed b() { return 100000; } -.... -test 4123, expected result: EQ -mixed a() { string s; object o=clone(FILE); if(!o->open("conftest","r")) return -1; s=o->read(9999999); if(!o->close()) return -1; return s; } -mixed b() { return sprintf("%'+-*'100000s",""); } -.... -test 4124, expected result: EQ -mixed a() { object o=clone(FILE); return o->open("conftest","r") && o->read(4711) && o->tell() == 4711 && o->close(); } -mixed b() { return 1; } -.... -test 4125, expected result: EQ -mixed a() { object o=clone(FILE); return equal(o->open("conftest","r") && o->stat(), file_stat("conftest")); } -mixed b() { return 1; } -.... -test 4126, expected result: RUN -mixed a() { clone(FILE,"stdin")->errno(); } -.... -test 4127, expected result: FALSE -mixed a() { return clone(FILE,"stdin")->query_id(); } -.... -test 4128, expected result: RUN -mixed a() { clone(FILE,"stdin")->query_read_callback(); } -.... -test 4129, expected result: RUN -mixed a() { clone(FILE,"stdin")->query_write_callback(); } -.... -test 4130, expected result: RUN -mixed a() { clone(FILE,"stdin")->query_close_callback(); } -.... -test 4131, expected result: EQ -mixed a() { object o=clone(FILE),o2=o->pipe();o->write("1"); return o2->read(1); } -mixed b() { return "1"; } -.... -test 4132, expected result: EQ -mixed a() { object o=clone(FILE),o2=o->pipe();o2->write("1"); return o->read(1); } -mixed b() { return "1"; } -.... -test 4133, expected result: EQ -mixed a() { object o=clone(FILE); o->open("conftest","r"); o=o->dup(); return o->read(100) ; } -mixed b() { return sprintf("%'+-*'100s",""); } -.... -test 4134, expected result: EQ -mixed a() { object o=clone(FILE),o2=clone(FILE); o2->pipe(); o->open("conftest","r"); o->dup2(o2); return o2->read(100) ; } -mixed b() { return sprintf("%'+-*'100s",""); } -.... -test 4135, expected result: EQ -mixed a() { return popen("echo foo"); } -mixed b() { return "foo\n"; } -.... -test 4136, expected result: TRUE -mixed a() { return rm("conftest"); } -.... -test 4137, expected result: EQ -mixed a() { return file_stat("conftest"); } -mixed b() { return 0; } -.... -test 4138, expected result: TRUE -mixed a() { return stringp(getcwd()); } -.... -test 4139, expected result: EQ -mixed a() { return '/'; } -mixed b() { return getcwd()[0]; } -.... -test 4140, expected result: TRUE -mixed a() { return stringp(sprintf("")); } -.... -test 4141, expected result: EQ -mixed a() { return sprintf("%d",1); } -mixed b() { return "1"; } -.... -test 4142, expected result: EQ -mixed a() { return sprintf("%%"); } -mixed b() { return "%"; } -.... -test 4143, expected result: EQ -mixed a() { return sprintf("%d",1); } -mixed b() { return "1"; } -.... -test 4144, expected result: EQ -mixed a() { return sprintf("%d",-1); } -mixed b() { return "-1"; } -.... -test 4145, expected result: EQ -mixed a() { return sprintf("%u",1<<31); } -mixed b() { return "2147483648"; } -.... -test 4146, expected result: EQ -mixed a() { return sprintf("%o",255); } -mixed b() { return "377"; } -.... -test 4147, expected result: EQ -mixed a() { return sprintf("%x",255); } -mixed b() { return "ff"; } -.... -test 4148, expected result: EQ -mixed a() { return sprintf("%X",255); } -mixed b() { return "FF"; } -.... -test 4149, expected result: EQ -mixed a() { return sprintf("%c",255); } -mixed b() { return "\377"; } -.... -test 4150, expected result: TRUE -mixed a() { return stringp(sprintf("%f",255.0)); } -.... -test 4151, expected result: TRUE -mixed a() { return stringp(sprintf("%g",255.0)); } -.... -test 4152, expected result: TRUE -mixed a() { return stringp(sprintf("%e",255.0)); } -.... -test 4153, expected result: TRUE -mixed a() { return stringp(sprintf("%e",255.0)); } -.... -test 4154, expected result: EQ -mixed a() { return sprintf("%s","foobaR"); } -mixed b() { return "foobaR"; } -.... -test 4155, expected result: EQ -mixed a() { return sprintf("%s","foo\nbar"); } -mixed b() { return "foo\nbar"; } -.... -test 4156, expected result: TRUE -mixed a() { return stringp(sprintf("%O",this_object())); } -.... -test 4157, expected result: TRUE -mixed a() { return stringp(sprintf("%O",({}))); } -.... -test 4158, expected result: EQ -mixed a() { return sprintf("%n"); } -mixed b() { return ""; } -.... -test 4159, expected result: EQ -mixed a() { return sprintf("%t",1); } -mixed b() { return "int"; } -.... -test 4160, expected result: EQ -mixed a() { return sprintf("%t",this_object()); } -mixed b() { return "object"; } -.... -test 4161, expected result: EQ -mixed a() { return sprintf("%{%d\n%}",({1,2,3,4})); } -mixed b() { return "1\n2\n3\n4\n"; } -.... -test 4162, expected result: EQ -mixed a() { return strlen(sprintf("%1000s","")); } -mixed b() { return 1000; } -.... -test 4163, expected result: EQ -mixed a() { return sprintf("%2d",1); } -mixed b() { return " 1"; } -.... -test 4164, expected result: EQ -mixed a() { return sprintf("%2d",1); } -mixed b() { return " 1"; } -.... -test 4165, expected result: EQ -mixed a() { return sprintf("%2d",2222); } -mixed b() { return "2222"; } -.... -test 4166, expected result: EQ -mixed a() { return sprintf("%!2d",2222); } -mixed b() { return "22"; } -.... -test 4167, expected result: EQ -mixed a() { return sprintf("%!!2d",2222); } -mixed b() { return "2222"; } -.... -test 4168, expected result: EQ -mixed a() { return sprintf("% d",2); } -mixed b() { return " 2"; } -.... -test 4169, expected result: EQ -mixed a() { return sprintf("% d",-2); } -mixed b() { return "-2"; } -.... -test 4170, expected result: EQ -mixed a() { return sprintf("%+d",2); } -mixed b() { return "+2"; } -.... -test 4171, expected result: EQ -mixed a() { return sprintf("%+d",-2); } -mixed b() { return "-2"; } -.... -test 4172, expected result: EQ -mixed a() { return sprintf("%-2d",2); } -mixed b() { return "2 "; } -.... -test 4173, expected result: EQ -mixed a() { return sprintf("%|3d",2); } -mixed b() { return " 2 "; } -.... -test 4174, expected result: EQ -mixed a() { return sprintf("%-=3s","f o bar gaz"); } -mixed b() { return "f o\nbar\ngaz"; } -.... -test 4175, expected result: EQ -mixed a() { return sprintf("%*d",3,3); } -mixed b() { return " 3"; } -.... -test 4176, expected result: EQ -mixed a() { return sprintf("%'FOO'10s","BAR"); } -mixed b() { return "FOOFOOFBAR"; } -.... -test 4177, expected result: EQ -mixed a() { return sprintf("%d %<d %<d",2); } -mixed b() { return "2 2 2"; } -.... -test 4178, expected result: TRUE -mixed a() { return stringp(sprintf("%O",({1,2,"foo"}))); } -.... -test 4179, expected result: TRUE -mixed a() { return stringp(sprintf("%O",([1:2,"foo":"bar"]))); } -.... -test 4180, expected result: EVAL_ERROR -mixed a() { sprintf("%d"); } -.... -test 4181, expected result: TRUE -mixed a() { return programp((program)"/precompiled/regexp"); } -.... -test 4182, expected result: EQ -mixed a() { object o; o=clone((program)"/precompiled/regexp"); destruct(o); return 1; } -mixed b() { return 1; } -.... -test 4183, expected result: EQ -mixed a() { object o; o=clone((program)"/precompiled/regexp","^.*$"); destruct(o); return 1; } -mixed b() { return 1; } -.... -test 4184, expected result: EQ -mixed a() { return clone((program)"/precompiled/regexp","^.*$")->match(""); } -mixed b() { return 1; } -.... -test 4185, expected result: EQ -mixed a() { return clone((program)"/precompiled/regexp","^.*$")->match("a"); } -mixed b() { return 1; } -.... -test 4186, expected result: EQ -mixed a() { return clone((program)"/precompiled/regexp","^.*$")->match("-"); } -mixed b() { return 1; } -.... -test 4187, expected result: EQ -mixed a() { return clone((program)"/precompiled/regexp","^$")->match(""); } -mixed b() { return 1; } -.... -test 4188, expected result: EQ -mixed a() { return clone((program)"/precompiled/regexp","^.$")->match("a"); } -mixed b() { return 1; } -.... -test 4189, expected result: EQ -mixed a() { return clone((program)"/precompiled/regexp","^.$")->match("-"); } -mixed b() { return 1; } -.... -test 4190, expected result: EQ -mixed a() { return clone((program)"/precompiled/regexp","^[abc]$")->match("-"); } -mixed b() { return 0; } -.... -test 4191, expected result: EQ -mixed a() { return clone((program)"/precompiled/regexp","^[abc]$")->match("a"); } -mixed b() { return 1; } -.... -test 4192, expected result: EQ -mixed a() { return clone((program)"/precompiled/regexp","^[abc]$")->match("c"); } -mixed b() { return 1; } -.... -test 4193, expected result: EQ -mixed a() { return clone((program)"/precompiled/regexp","^[^abc]$")->match("-"); } -mixed b() { return 1; } -.... -test 4194, expected result: EQ -mixed a() { return clone((program)"/precompiled/regexp","^[^abc]$")->match("a"); } -mixed b() { return 0; } -.... -test 4195, expected result: EQ -mixed a() { return clone((program)"/precompiled/regexp","^[^abc]$")->match("c"); } -mixed b() { return 0; } -.... -test 4196, expected result: EQ -mixed a() { return clone((program)"/precompiled/regexp","^a*$")->match("aaaa"); } -mixed b() { return 1; } -.... -test 4197, expected result: EQ -mixed a() { return clone((program)"/precompiled/regexp","^a|b$")->match("a"); } -mixed b() { return 1; } -.... -test 4198, expected result: EQ -mixed a() { return clone((program)"/precompiled/regexp","^a|b$")->match("b"); } -mixed b() { return 1; } -.... -test 4199, expected result: EQUAL -mixed a() { return clone((program)"/precompiled/regexp","^(a*)[^a]*$")->split("aaabbb"); } -mixed b() { return ({"aaa"}); } -.... -test 4200, expected result: TRUE -mixed a() { return floatp(tan(0.5)); } -.... -test 4201, expected result: EQ -mixed a() { return 0.5; } -mixed b() { return tan(atan(0.5)); } -.... -test 4202, expected result: EQ -mixed a() { return 0.5; } -mixed b() { return atan(tan(0.5)); } -.... -test 4203, expected result: TRUE -mixed a() { return floatp(asin(0.7)); } -.... -test 4204, expected result: EQ -mixed a() { return asin(0.0); } -mixed b() { return 0.0; } -.... -test 4205, expected result: TRUE -mixed a() { return floatp(atan(0.7)); } -.... -test 4206, expected result: TRUE -mixed a() { return 3.1415 < 4.0*atan(1.0); } -.... -test 4207, expected result: TRUE -mixed a() { return 3.1416 > 4.0*atan(1.0); } -.... -test 4208, expected result: TRUE -mixed a() { return floatp(sin(1.2)); } -.... -test 4209, expected result: TRUE -mixed a() { return sin(atan(1.0))>0.707; } -.... -test 4210, expected result: TRUE -mixed a() { return sin(atan(1.0))<0.708; } -.... -test 4211, expected result: TRUE -mixed a() { return acos(0.7) > 0.795; } -.... -test 4212, expected result: TRUE -mixed a() { return acos(0.7) < 0.796; } -.... -test 4213, expected result: TRUE -mixed a() { return floatp(cos(1.2)); } -.... -test 4214, expected result: TRUE -mixed a() { return cos(atan(1.0))>0.707; } -.... -test 4215, expected result: TRUE -mixed a() { return cos(atan(1.0))<0.708; } -.... -test 4216, expected result: EQ -mixed a() { return 4; } -mixed b() { return sqrt(16); } -.... -test 4217, expected result: EQ -mixed a() { return 4; } -mixed b() { return sqrt(17); } -.... -test 4218, expected result: EQ -mixed a() { return 4; } -mixed b() { return sqrt(24); } -.... -test 4219, expected result: EQ -mixed a() { return 4.0; } -mixed b() { return sqrt(16.0); } -.... -test 4220, expected result: EQ -mixed a() { return 17.0; } -mixed b() { return floor(17.0); } -.... -test 4221, expected result: EQ -mixed a() { return 17.0; } -mixed b() { return floor(17.1); } -.... -test 4222, expected result: EQ -mixed a() { return 17.0; } -mixed b() { return floor(17.7); } -.... -test 4223, expected result: EQ -mixed a() { return 17.0; } -mixed b() { return ceil(17.0); } -.... -test 4224, expected result: EQ -mixed a() { return 18.0; } -mixed b() { return ceil(17.1); } -.... -test 4225, expected result: EQ -mixed a() { return 18.0; } -mixed b() { return ceil(17.7); } -.... -test 4226, expected result: TRUE -mixed a() { return 2.70001>exp(log(2.7)); } -.... -test 4227, expected result: TRUE -mixed a() { return 2.69999<exp(log(2.7)); } -.... -test 4228, expected result: TRUE -mixed a() { return 2.70001>log(exp(2.7)); } -.... -test 4229, expected result: TRUE -mixed a() { return 2.69999<log(exp(2.7)); } -.... -test 4230, expected result: EQ -mixed a() { return pow(10.0,10.0); } -mixed b() { return 10000000000.0; } -.... -test 4231, expected result: EQ -mixed a() { return intp (17); } -mixed b() { return !(0); } -.... -test 4232, expected result: EQ -mixed a() { return intp (1.7); } -mixed b() { return !(0-1); } -.... -test 4233, expected result: EQ -mixed a() { return intp ("17"); } -mixed b() { return !(0-2); } -.... -test 4234, expected result: EQ -mixed a() { return intp (this_object()); } -mixed b() { return !(0-3); } -.... -test 4235, expected result: EQ -mixed a() { return intp (a); } -mixed b() { return !(0-4); } -.... -test 4236, expected result: EQ -mixed a() { return intp (({})); } -mixed b() { return !(0-5); } -.... -test 4237, expected result: EQ -mixed a() { return intp (([])); } -mixed b() { return !(0-6); } -.... -test 4238, expected result: EQ -mixed a() { return intp ((<>)); } -mixed b() { return !(0-7); } -.... -test 4239, expected result: EQ -mixed a() { return intp (object_program(this_object())); } -mixed b() { return !(0-8); } -.... -test 4240, expected result: EQ -mixed a() { return floatp (17); } -mixed b() { return !(1); } -.... -test 4241, expected result: EQ -mixed a() { return floatp (1.7); } -mixed b() { return !(1-1); } -.... -test 4242, expected result: EQ -mixed a() { return floatp ("17"); } -mixed b() { return !(1-2); } -.... -test 4243, expected result: EQ -mixed a() { return floatp (this_object()); } -mixed b() { return !(1-3); } -.... -test 4244, expected result: EQ -mixed a() { return floatp (a); } -mixed b() { return !(1-4); } -.... -test 4245, expected result: EQ -mixed a() { return floatp (({})); } -mixed b() { return !(1-5); } -.... -test 4246, expected result: EQ -mixed a() { return floatp (([])); } -mixed b() { return !(1-6); } -.... -test 4247, expected result: EQ -mixed a() { return floatp ((<>)); } -mixed b() { return !(1-7); } -.... -test 4248, expected result: EQ -mixed a() { return floatp (object_program(this_object())); } -mixed b() { return !(1-8); } -.... -test 4249, expected result: EQ -mixed a() { return stringp (17); } -mixed b() { return !(2); } -.... -test 4250, expected result: EQ -mixed a() { return stringp (1.7); } -mixed b() { return !(2-1); } -.... -test 4251, expected result: EQ -mixed a() { return stringp ("17"); } -mixed b() { return !(2-2); } -.... -test 4252, expected result: EQ -mixed a() { return stringp (this_object()); } -mixed b() { return !(2-3); } -.... -test 4253, expected result: EQ -mixed a() { return stringp (a); } -mixed b() { return !(2-4); } -.... -test 4254, expected result: EQ -mixed a() { return stringp (({})); } -mixed b() { return !(2-5); } -.... -test 4255, expected result: EQ -mixed a() { return stringp (([])); } -mixed b() { return !(2-6); } -.... -test 4256, expected result: EQ -mixed a() { return stringp ((<>)); } -mixed b() { return !(2-7); } -.... -test 4257, expected result: EQ -mixed a() { return stringp (object_program(this_object())); } -mixed b() { return !(2-8); } -.... -test 4258, expected result: EQ -mixed a() { return objectp (17); } -mixed b() { return !(3); } -.... -test 4259, expected result: EQ -mixed a() { return objectp (1.7); } -mixed b() { return !(3-1); } -.... -test 4260, expected result: EQ -mixed a() { return objectp ("17"); } -mixed b() { return !(3-2); } -.... -test 4261, expected result: EQ -mixed a() { return objectp (this_object()); } -mixed b() { return !(3-3); } -.... -test 4262, expected result: EQ -mixed a() { return objectp (a); } -mixed b() { return !(3-4); } -.... -test 4263, expected result: EQ -mixed a() { return objectp (({})); } -mixed b() { return !(3-5); } -.... -test 4264, expected result: EQ -mixed a() { return objectp (([])); } -mixed b() { return !(3-6); } -.... -test 4265, expected result: EQ -mixed a() { return objectp ((<>)); } -mixed b() { return !(3-7); } -.... -test 4266, expected result: EQ -mixed a() { return objectp (object_program(this_object())); } -mixed b() { return !(3-8); } -.... -test 4267, expected result: EQ -mixed a() { return functionp (17); } -mixed b() { return !(4); } -.... -test 4268, expected result: EQ -mixed a() { return functionp (1.7); } -mixed b() { return !(4-1); } -.... -test 4269, expected result: EQ -mixed a() { return functionp ("17"); } -mixed b() { return !(4-2); } -.... -test 4270, expected result: EQ -mixed a() { return functionp (this_object()); } -mixed b() { return !(4-3); } -.... -test 4271, expected result: EQ -mixed a() { return functionp (a); } -mixed b() { return !(4-4); } -.... -test 4272, expected result: EQ -mixed a() { return functionp (({})); } -mixed b() { return !(4-5); } -.... -test 4273, expected result: EQ -mixed a() { return functionp (([])); } -mixed b() { return !(4-6); } -.... -test 4274, expected result: EQ -mixed a() { return functionp ((<>)); } -mixed b() { return !(4-7); } -.... -test 4275, expected result: EQ -mixed a() { return functionp (object_program(this_object())); } -mixed b() { return !(4-8); } -.... -test 4276, expected result: EQ -mixed a() { return arrayp (17); } -mixed b() { return !(5); } -.... -test 4277, expected result: EQ -mixed a() { return arrayp (1.7); } -mixed b() { return !(5-1); } -.... -test 4278, expected result: EQ -mixed a() { return arrayp ("17"); } -mixed b() { return !(5-2); } -.... -test 4279, expected result: EQ -mixed a() { return arrayp (this_object()); } -mixed b() { return !(5-3); } -.... -test 4280, expected result: EQ -mixed a() { return arrayp (a); } -mixed b() { return !(5-4); } -.... -test 4281, expected result: EQ -mixed a() { return arrayp (({})); } -mixed b() { return !(5-5); } -.... -test 4282, expected result: EQ -mixed a() { return arrayp (([])); } -mixed b() { return !(5-6); } -.... -test 4283, expected result: EQ -mixed a() { return arrayp ((<>)); } -mixed b() { return !(5-7); } -.... -test 4284, expected result: EQ -mixed a() { return arrayp (object_program(this_object())); } -mixed b() { return !(5-8); } -.... -test 4285, expected result: EQ -mixed a() { return mappingp (17); } -mixed b() { return !(6); } -.... -test 4286, expected result: EQ -mixed a() { return mappingp (1.7); } -mixed b() { return !(6-1); } -.... -test 4287, expected result: EQ -mixed a() { return mappingp ("17"); } -mixed b() { return !(6-2); } -.... -test 4288, expected result: EQ -mixed a() { return mappingp (this_object()); } -mixed b() { return !(6-3); } -.... -test 4289, expected result: EQ -mixed a() { return mappingp (a); } -mixed b() { return !(6-4); } -.... -test 4290, expected result: EQ -mixed a() { return mappingp (({})); } -mixed b() { return !(6-5); } -.... -test 4291, expected result: EQ -mixed a() { return mappingp (([])); } -mixed b() { return !(6-6); } -.... -test 4292, expected result: EQ -mixed a() { return mappingp ((<>)); } -mixed b() { return !(6-7); } -.... -test 4293, expected result: EQ -mixed a() { return mappingp (object_program(this_object())); } -mixed b() { return !(6-8); } -.... -test 4294, expected result: EQ -mixed a() { return listp (17); } -mixed b() { return !(7); } -.... -test 4295, expected result: EQ -mixed a() { return listp (1.7); } -mixed b() { return !(7-1); } -.... -test 4296, expected result: EQ -mixed a() { return listp ("17"); } -mixed b() { return !(7-2); } -.... -test 4297, expected result: EQ -mixed a() { return listp (this_object()); } -mixed b() { return !(7-3); } -.... -test 4298, expected result: EQ -mixed a() { return listp (a); } -mixed b() { return !(7-4); } -.... -test 4299, expected result: EQ -mixed a() { return listp (({})); } -mixed b() { return !(7-5); } -.... -test 4300, expected result: EQ -mixed a() { return listp (([])); } -mixed b() { return !(7-6); } -.... -test 4301, expected result: EQ -mixed a() { return listp ((<>)); } -mixed b() { return !(7-7); } -.... -test 4302, expected result: EQ -mixed a() { return listp (object_program(this_object())); } -mixed b() { return !(7-8); } -.... -test 4303, expected result: EQ -mixed a() { return programp (17); } -mixed b() { return !(8); } -.... -test 4304, expected result: EQ -mixed a() { return programp (1.7); } -mixed b() { return !(8-1); } -.... -test 4305, expected result: EQ -mixed a() { return programp ("17"); } -mixed b() { return !(8-2); } -.... -test 4306, expected result: EQ -mixed a() { return programp (this_object()); } -mixed b() { return !(8-3); } -.... -test 4307, expected result: EQ -mixed a() { return programp (a); } -mixed b() { return !(8-4); } -.... -test 4308, expected result: EQ -mixed a() { return programp (({})); } -mixed b() { return !(8-5); } -.... -test 4309, expected result: EQ -mixed a() { return programp (([])); } -mixed b() { return !(8-6); } -.... -test 4310, expected result: EQ -mixed a() { return programp ((<>)); } -mixed b() { return !(8-7); } -.... -test 4311, expected result: EQ -mixed a() { return programp (object_program(this_object())); } -mixed b() { return !(8-8); } -.... -test 4312, expected result: RUN -mixed a() { add_efun("foobar",lambda() { return 1; }); } -.... -test 4313, expected result: EQ -mixed a() { -#if efun(foobar) -return 1; -#else -return 0; -#endif -; } -mixed b() { return 1; } -.... -test 4314, expected result: EQ -mixed a() { return foobar(); } -mixed b() { return 1; } -.... -test 4315, expected result: RUN -mixed a() { add_efun("foobar"); } -.... -test 4316, expected result: EQ -mixed a() { -#if efun(foobar) -return 1; -#else -return 0; -#endif -; } -mixed b() { return 0; } -.... -test 4317, expected result: TRUE -mixed a() { return arrayp(aggregate()); } -.... -test 4318, expected result: EQ -mixed a() { return sizeof(aggregate()); } -mixed b() { return 0; } -.... -test 4319, expected result: EQUAL -mixed a() { return aggregate(1,2,3,4); } -mixed b() { return ({1,2,3,4}); } -.... -test 4320, expected result: TRUE -mixed a() { return listp(aggregate_list()); } -.... -test 4321, expected result: TRUE -mixed a() { return listp(aggregate_list()); } -.... -test 4322, expected result: TRUE -mixed a() { return mappingp(all_efuns()); } -.... -test 4323, expected result: TRUE -mixed a() { return all_efuns()["all_efuns"]; } -.... -test 4324, expected result: EQ -mixed a() { return all_efuns()["all_efuns"]; } -mixed b() { return all_efuns; } -.... -test 4325, expected result: TRUE -mixed a() { return arrayp(allocate(0)); } -.... -test 4326, expected result: EQUAL -mixed a() { return allocate(2); } -mixed b() { return ({0,0}); } -.... -test 4327, expected result: FALSE -mixed a() { return allocate(2)==({0,0}); } -.... -test 4328, expected result: TRUE -mixed a() { return arrayp(backtrace()); } -.... -test 4329, expected result: EQ -mixed a() { return backtrace()[-1][2]; } -mixed b() { return a; } -.... -test 4330, expected result: EQ -mixed a() { return 1; } -mixed b() { return call_function(a); } -.... -test 4331, expected result: EQ -mixed a() { return 1; } -mixed b() { return call_function(lambda(int a){ return a; },1); } -.... -test 4332, expected result: EQ -mixed a() { return 1; } -mixed b() { return call_function(intp,1); } -.... -test 4333, expected result: EQ -mixed a() { return capitalize("fubar"); } -mixed b() { return "Fubar"; } -.... -test 4334, expected result: EQ -mixed a() { return capitalize("FooBar"); } -mixed b() { return "FooBar"; } -.... -test 4335, expected result: EQ -mixed a() { return capitalize("-"); } -mixed b() { return "-"; } -.... -test 4336, expected result: TRUE -mixed a() { return objectp(clone(compile_string("int foo() { return 17; }"))); } -.... -test 4337, expected result: EQ -mixed a() { return clone(compile_string("int foo() { return 17; }"))->foo(); } -mixed b() { return 17; } -.... -test 4338, expected result: EQ -mixed a() { return combine_path("/foo/bar/gazonk/",".."); } -mixed b() { return "/foo/bar"; } -.... -test 4339, expected result: EQ -mixed a() { return combine_path("/.../","sune"); } -mixed b() { return "/.../sune"; } -.... -test 4340, expected result: EQ -mixed a() { return combine_path("/","foo/.../sune"); } -mixed b() { return "/foo/.../sune"; } -.... -test 4341, expected result: EQ -mixed a() { return combine_path("/./foo/bar//gazonk/","../"); } -mixed b() { return "/foo/bar/"; } -.... -test 4342, expected result: EQ -mixed a() { return combine_path("/","/foo/./bar/gazonk/.."); } -mixed b() { return "/foo/bar"; } -.... -test 4343, expected result: EQ -mixed a() { return combine_path("/","/foo/bar/gazonk/../../"); } -mixed b() { return "/foo/"; } -.... -test 4344, expected result: EQ -mixed a() { return combine_path("/","/foo//bar/gazonk/../.."); } -mixed b() { return "/foo"; } -.... -test 4345, expected result: EQ -mixed a() { return combine_path("/","/foo/bar/./gazonk/../../.."); } -mixed b() { return "/"; } -.... -test 4346, expected result: EQ -mixed a() { return combine_path("/","/foo/../bar//./gazonk/../.."); } -mixed b() { return "/"; } -.... -test 4347, expected result: EQ -mixed a() { return combine_path("/","/foo/././/bar/gazonk/../../../.."); } -mixed b() { return "/"; } -.... -test 4348, expected result: EQ -mixed a() { return copy_value(1); } -mixed b() { return 1; } -.... -test 4349, expected result: EQ -mixed a() { return copy_value(""); } -mixed b() { return ""; } -.... -test 4350, expected result: EQ -mixed a() { return copy_value(1.0); } -mixed b() { return 1.0; } -.... -test 4351, expected result: EQ -mixed a() { return copy_value(this_object()); } -mixed b() { return this_object(); } -.... -test 4352, expected result: EQ -mixed a() { return copy_value(a); } -mixed b() { return a; } -.... -test 4353, expected result: EQ -mixed a() { mixed x=({1}) ; return x==x; } -mixed b() { return 1; } -.... -test 4354, expected result: EQ -mixed a() { mixed x=({1}) ; return copy_value(x)!=x; } -mixed b() { return 1; } -.... -test 4355, expected result: EQ -mixed a() { mixed x=({1}) ; return equal(copy_value(x),x); } -mixed b() { return 1; } -.... -test 4356, expected result: EQ -mixed a() { mixed x=([]) ; return x==x; } -mixed b() { return 1; } -.... -test 4357, expected result: EQ -mixed a() { mixed x=([]) ; return copy_value(x)!=x; } -mixed b() { return 1; } -.... -test 4358, expected result: EQ -mixed a() { mixed x=([]) ; return equal(copy_value(x),x); } -mixed b() { return 1; } -.... -test 4359, expected result: EQ -mixed a() { mixed x=(<>) ; return x==x; } -mixed b() { return 1; } -.... -test 4360, expected result: EQ -mixed a() { mixed x=(<>) ; return copy_value(x)!=x; } -mixed b() { return 1; } -.... -test 4361, expected result: EQ -mixed a() { mixed x=(<>) ; return equal(copy_value(x),x); } -mixed b() { return 1; } -.... -test 4362, expected result: EQ -mixed a() { mixed x=(< ([]), ({1}) ,"" , 1.0 >) ; return x==x; } -mixed b() { return 1; } -.... -test 4363, expected result: EQ -mixed a() { mixed x=(< ([]), ({1}) ,"" , 1.0 >) ; return copy_value(x)!=x; } -mixed b() { return 1; } -.... -test 4364, expected result: EQ -mixed a() { mixed x=(< ([]), ({1}) ,"" , 1.0 >) ; return equal(copy_value(x),x); } -mixed b() { return 1; } -.... -test 4365, expected result: TRUE -mixed a() { return stringp(crypt("hej")); } -.... -test 4366, expected result: TRUE -mixed a() { return crypt("hej",crypt("hej")); } -.... -test 4367, expected result: TRUE -mixed a() { return stringp(ctime(0)); } -.... -test 4368, expected result: EQUAL -mixed a() { return ({"a","b","c",}); } -mixed b() { return explode("anna bnna c","nna "); } -.... -test 4369, expected result: EQUAL -mixed a() { return ({"","",}); } -mixed b() { return explode("hej","hej"); } -.... -test 4370, expected result: EQUAL -mixed a() { return ({"",}); } -mixed b() { return explode("","hej"); } -.... -test 4371, expected result: EQ -mixed a() { return function_name(a); } -mixed b() { return "a"; } -.... -test 4372, expected result: EQ -mixed a() { return function_name(function_name); } -mixed b() { return 0; } -.... -test 4373, expected result: EQ -mixed a() { return function_object(a); } -mixed b() { return this_object(); } -.... -test 4374, expected result: EQ -mixed a() { return function_name(function_object); } -mixed b() { return 0; } -.... -test 4375, expected result: EQ -mixed a() { return a; } -mixed b() { return get_function(this_object(),"a"); } -.... -test 4376, expected result: EQ -mixed a() { return a; } -mixed b() { return this_object()->a; } -.... -test 4377, expected result: TRUE -mixed a() { return intp(hash("foo")); } -.... -test 4378, expected result: TRUE -mixed a() { return intp(hash("foo",10)); } -.... -test 4379, expected result: TRUE -mixed a() { return hash("foo",10)<10; } -.... -test 4380, expected result: TRUE -mixed a() { return hash("bar",10)<10; } -.... -test 4381, expected result: TRUE -mixed a() { return hash("gazonk",10)<10; } -.... -test 4382, expected result: EQ -mixed a() { return hash("foobargazonk"); } -mixed b() { return hash("foobargazonk"); } -.... -test 4383, expected result: EQ -mixed a() { return implode(({}),""); } -mixed b() { return ""; } -.... -test 4384, expected result: EQ -mixed a() { return implode(explode("foo","o"),"o"); } -mixed b() { return "foo"; } -.... -test 4385, expected result: EQ -mixed a() { return implode(({"foo","bar"}),"-"); } -mixed b() { return "foo-bar"; } -.... -test 4386, expected result: EQ -mixed a() { return implode(({"foo",0,"bar"}),"-"); } -mixed b() { return "foo-bar"; } -.... -test 4387, expected result: EQ -mixed a() { return implode(({1.0,"foo",0,"bar",this_object(),([])}),"-"); } -mixed b() { return "foo-bar"; } -.... -test 4388, expected result: EQ -mixed a() { return implode(({"f","o","o"})); } -mixed b() { return "foo"; } -.... -test 4389, expected result: EQUAL -mixed a() { return indices("foo"); } -mixed b() { return ({0,1,2}); } -.... -test 4390, expected result: EQUAL -mixed a() { return indices(({'f','o','o'})); } -mixed b() { return ({0,1,2}); } -.... -test 4391, expected result: EQUAL -mixed a() { return sort_array(indices(([7:3,8:9,99:12]))); } -mixed b() { return ({7,8,99}); } -.... -test 4392, expected result: EQUAL -mixed a() { return sort_array(indices((<7,8,99>))); } -mixed b() { return ({7,8,99}); } -.... -test 4393, expected result: EQUAL -mixed a() { return mklist(indices(this_object())); } -mixed b() { return (<"a","b">); } -.... -test 4394, expected result: EQUAL -mixed a() { return lower_case("foo"); } -mixed b() { return "foo"; } -.... -test 4395, expected result: EQUAL -mixed a() { return lower_case("Foo"); } -mixed b() { return "foo"; } -.... -test 4396, expected result: EQUAL -mixed a() { return lower_case("Foo1234-*~\n"); } -mixed b() { return "foo1234-*~\n"; } -.... -test 4397, expected result: TRUE -mixed a() { return objectp(next_object()); } -.... -test 4398, expected result: EQ -mixed a() { int e;object o=next_object(); for(e=0;e<1000 && o;e++) o=next_object(o); return o; } -mixed b() { return 0; } -.... -test 4399, expected result: TRUE -mixed a() { return programp(object_program(this_object())); } -.... -test 4400, expected result: TRUE -mixed a() { return stringp(query_host_name()); } -.... -test 4401, expected result: EQ -mixed a() { return lambda(int ... q) { return query_num_arg(); }(); } -mixed b() { return 0; } -.... -test 4402, expected result: EQ -mixed a() { return lambda(int ... q) { return query_num_arg(); }(1); } -mixed b() { return 1; } -.... -test 4403, expected result: EQ -mixed a() { return lambda(int ... q) { return query_num_arg(); }(1,1); } -mixed b() { return 2; } -.... -test 4404, expected result: EQ -mixed a() { return lambda(int ... q) { return query_num_arg(); }(1,1,1); } -mixed b() { return 3; } -.... -test 4405, expected result: EQ -mixed a() { return lambda(int ... q) { return query_num_arg(); }(1,1,1,1); } -mixed b() { return 4; } -.... -test 4406, expected result: EQ -mixed a() { int e,d;for(e=0;e<1000;e++){d=random(10); if(d<0 || d>=10) return 0;} return 1; } -mixed b() { return 1; } -.... -test 4407, expected result: RUN -mixed a() { int p; foreach(({1,2,3,4,5}),p) random_seed(p); } -.... -test 4408, expected result: EQ -mixed a() { return random_seed(17),random(20000); } -mixed b() { return random_seed(17),random(20000); } -.... -test 4409, expected result: EQ -mixed a() { return random_seed(18),random(20000); } -mixed b() { return random_seed(18),random(20000); } -.... -test 4410, expected result: EQ -mixed a() { return random_seed(19),random(20000); } -mixed b() { return random_seed(19),random(20000); } -.... -test 4411, expected result: EQ -mixed a() { return replace("foobargazonk","o","-"); } -mixed b() { return "f--bargaz-nk"; } -.... -test 4412, expected result: EQ -mixed a() { return replace("foobargazonk",({"o","a"}),({"()","<>"})); } -mixed b() { return "f()()b<>rg<>z()nk"; } -.... -test 4413, expected result: EQ -mixed a() { return replace("f--barf--",({"f--","f--bar"}),({"f--bar","f--"})); } -mixed b() { return "f--f--bar"; } -.... -test 4414, expected result: EQ -mixed a() { return replace("f--barf--",({"f--bar","f--"}),({"f--","f--bar"})); } -mixed b() { return "f--f--bar"; } -.... -test 4415, expected result: EQUAL -mixed a() { return replace(({1,2,3,4,5,1,2,3,4}),3,-1); } -mixed b() { return ({1,2,-1,4,5,1,2,-1,4}); } -.... -test 4416, expected result: EQUAL -mixed a() { return replace(([1:2,3:4,5:1,2:3]),3,-1); } -mixed b() { return ([1:2,3:4,5:1,2:-1]); } -.... -test 4417, expected result: EQ -mixed a() { return reverse("reverse"); } -mixed b() { return "esrever"; } -.... -test 4418, expected result: EQ -mixed a() { return reverse(""); } -mixed b() { return ""; } -.... -test 4419, expected result: EQ -mixed a() { return reverse("a"); } -mixed b() { return "a"; } -.... -test 4420, expected result: EQUAL -mixed a() { return reverse(({1,5,9})); } -mixed b() { return ({9,5,1}); } -.... -test 4421, expected result: EQUAL -mixed a() { return reverse(0x12345678); } -mixed b() { return 0x1e6a2c48; } -.... -test 4422, expected result: TRUE -mixed a() { return arrayp(rusage()); } -.... -test 4423, expected result: TRUE -mixed a() { return sizeof(rusage())>0; } -.... -test 4424, expected result: EQ -mixed a() { return search("foolbar","gazonk"); } -mixed b() { return -1; } -.... -test 4425, expected result: EQ -mixed a() { return search("qowiueproqiuweproiwqueoplkjljlklksjjriwueproiuwerowieu","lkjljlklksjj"); } -mixed b() { return 24; } -.... -test 4426, expected result: EQ -mixed a() { return search("lkjljlklksjjriwueproiuwerlskjdvlaskjfowieu","lkjljlklksjj"); } -mixed b() { return 0; } -.... -test 4427, expected result: EQ -mixed a() { return search("aaaaaaaaaaaaaaaaaaaaaaaalkjljlklksjj","lkjljlklksjj"); } -mixed b() { return 24; } -.... -test 4428, expected result: EQ -mixed a() { return search("foobargazonk","oo"); } -mixed b() { return 1; } -.... -test 4429, expected result: EQ -mixed a() { return search("foobargazonk","o",3); } -mixed b() { return 9; } -.... -test 4430, expected result: EQ -mixed a() { return search("foobargazonk","o",9); } -mixed b() { return 9; } -.... -test 4431, expected result: EQ -mixed a() { return search("foobargazonk","o",10); } -mixed b() { return -1; } -.... -test 4432, expected result: EQ -mixed a() { return search("foobargazonk","x",9); } -mixed b() { return -1; } -.... -test 4433, expected result: EQ -mixed a() { return search(({56,8,2,6,2,7,3,56,7}),8); } -mixed b() { return 1; } -.... -test 4434, expected result: EQ -mixed a() { return search(({56,8,2,6,2,7,3,56,7}),56,0); } -mixed b() { return 0; } -.... -test 4435, expected result: EQ -mixed a() { return search(({56,8,2,6,2,7,3,56,7}),56,1); } -mixed b() { return 7; } -.... -test 4436, expected result: EQ -mixed a() { return search(({56,8,2,6,2,7,3,56,7}),56,7); } -mixed b() { return 7; } -.... -test 4437, expected result: EQ -mixed a() { return search(({56,8,2,6,2,7,3,56,7}),56,8); } -mixed b() { return -1; } -.... -test 4438, expected result: EQ -mixed a() { return search(({"foo"}),"foo"); } -mixed b() { return 0; } -.... -test 4439, expected result: EQ -mixed a() { return search("fo-obar|gazonk"/"|","fo-obar"); } -mixed b() { return 0; } -.... -test 4440, expected result: EQ -mixed a() { return search("fo-obar|gazonk"/"|","gazonk"); } -mixed b() { return 1; } -.... -test 4441, expected result: EQ -mixed a() { return search(([1:2,3:4,5:6,7:8]),4); } -mixed b() { return 3; } -.... -test 4442, expected result: TRUE -mixed a() { return zero_type(search(([1:2,3:4,5:6,7:8]),1)); } -.... -test 4443, expected result: EQ -mixed a() { return search(([1:2,3:4,5:6,7:8]),8); } -mixed b() { return 7; } -.... -test 4444, expected result: EQ -mixed a() { return search(sprintf("SUNE"+"%'"+"+-*"+"'*n",10),"SUNE"); } -mixed b() { return 0; } -.... -test 4445, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n" ,10),"SUNE"); } -mixed b() { return -1; } -.... -test 4446, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+"SUNE",10),"SUNE"); } -mixed b() { return 10; } -.... -test 4447, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+"SUNE"+"%'"+"+-*"+"'*n",10,10),"SUNE"); } -mixed b() { return 10; } -.... -test 4448, expected result: EQ -mixed a() { return search(sprintf("SUNE"+"%'"+"+-*"+"'*n",10+1),"SUNE"); } -mixed b() { return 0; } -.... -test 4449, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n" ,10+1),"SUNE"); } -mixed b() { return -1; } -.... -test 4450, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+"SUNE",10+1),"SUNE"); } -mixed b() { return 10+1; } -.... -test 4451, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+"SUNE"+"%'"+"+-*"+"'*n",10+1,10+1),"SUNE"); } -mixed b() { return 10+1; } -.... -test 4452, expected result: EQ -mixed a() { return search(sprintf("SUNE"+"%'"+"+-*"+"'*n",10+2),"SUNE"); } -mixed b() { return 0; } -.... -test 4453, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n" ,10+2),"SUNE"); } -mixed b() { return -1; } -.... -test 4454, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+"SUNE",10+2),"SUNE"); } -mixed b() { return 10+2; } -.... -test 4455, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+"SUNE"+"%'"+"+-*"+"'*n",10+2,10+2),"SUNE"); } -mixed b() { return 10+2; } -.... -test 4456, expected result: EQ -mixed a() { return search(sprintf("SUNE"+"%'"+"+-*"+"'*n",10+3),"SUNE"); } -mixed b() { return 0; } -.... -test 4457, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n" ,10+3),"SUNE"); } -mixed b() { return -1; } -.... -test 4458, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+"SUNE",10+3),"SUNE"); } -mixed b() { return 10+3; } -.... -test 4459, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+"SUNE"+"%'"+"+-*"+"'*n",10+3,10+3),"SUNE"); } -mixed b() { return 10+3; } -.... -test 4460, expected result: EQ -mixed a() { return search(sprintf("SUNE"+"%'"+"+-*"+"'*n",1000),"SUNE"); } -mixed b() { return 0; } -.... -test 4461, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n" ,1000),"SUNE"); } -mixed b() { return -1; } -.... -test 4462, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+"SUNE",1000),"SUNE"); } -mixed b() { return 1000; } -.... -test 4463, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+"SUNE"+"%'"+"+-*"+"'*n",1000,1000),"SUNE"); } -mixed b() { return 1000; } -.... -test 4464, expected result: EQ -mixed a() { return search(sprintf("SUNE"+"%'"+"+-*"+"'*n",1000+1),"SUNE"); } -mixed b() { return 0; } -.... -test 4465, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n" ,1000+1),"SUNE"); } -mixed b() { return -1; } -.... -test 4466, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+"SUNE",1000+1),"SUNE"); } -mixed b() { return 1000+1; } -.... -test 4467, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+"SUNE"+"%'"+"+-*"+"'*n",1000+1,1000+1),"SUNE"); } -mixed b() { return 1000+1; } -.... -test 4468, expected result: EQ -mixed a() { return search(sprintf("SUNE"+"%'"+"+-*"+"'*n",1000+2),"SUNE"); } -mixed b() { return 0; } -.... -test 4469, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n" ,1000+2),"SUNE"); } -mixed b() { return -1; } -.... -test 4470, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+"SUNE",1000+2),"SUNE"); } -mixed b() { return 1000+2; } -.... -test 4471, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+"SUNE"+"%'"+"+-*"+"'*n",1000+2,1000+2),"SUNE"); } -mixed b() { return 1000+2; } -.... -test 4472, expected result: EQ -mixed a() { return search(sprintf("SUNE"+"%'"+"+-*"+"'*n",1000+3),"SUNE"); } -mixed b() { return 0; } -.... -test 4473, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n" ,1000+3),"SUNE"); } -mixed b() { return -1; } -.... -test 4474, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+"SUNE",1000+3),"SUNE"); } -mixed b() { return 1000+3; } -.... -test 4475, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+"SUNE"+"%'"+"+-*"+"'*n",1000+3,1000+3),"SUNE"); } -mixed b() { return 1000+3; } -.... -test 4476, expected result: EQ -mixed a() { return search(sprintf("SUNE"+"%'"+"+-*"+"'*n",100000),"SUNE"); } -mixed b() { return 0; } -.... -test 4477, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n" ,100000),"SUNE"); } -mixed b() { return -1; } -.... -test 4478, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+"SUNE",100000),"SUNE"); } -mixed b() { return 100000; } -.... -test 4479, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+"SUNE"+"%'"+"+-*"+"'*n",100000,100000),"SUNE"); } -mixed b() { return 100000; } -.... -test 4480, expected result: EQ -mixed a() { return search(sprintf("SUNE"+"%'"+"+-*"+"'*n",100000+1),"SUNE"); } -mixed b() { return 0; } -.... -test 4481, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n" ,100000+1),"SUNE"); } -mixed b() { return -1; } -.... -test 4482, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+"SUNE",100000+1),"SUNE"); } -mixed b() { return 100000+1; } -.... -test 4483, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+"SUNE"+"%'"+"+-*"+"'*n",100000+1,100000+1),"SUNE"); } -mixed b() { return 100000+1; } -.... -test 4484, expected result: EQ -mixed a() { return search(sprintf("SUNE"+"%'"+"+-*"+"'*n",100000+2),"SUNE"); } -mixed b() { return 0; } -.... -test 4485, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n" ,100000+2),"SUNE"); } -mixed b() { return -1; } -.... -test 4486, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+"SUNE",100000+2),"SUNE"); } -mixed b() { return 100000+2; } -.... -test 4487, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+"SUNE"+"%'"+"+-*"+"'*n",100000+2,100000+2),"SUNE"); } -mixed b() { return 100000+2; } -.... -test 4488, expected result: EQ -mixed a() { return search(sprintf("SUNE"+"%'"+"+-*"+"'*n",100000+3),"SUNE"); } -mixed b() { return 0; } -.... -test 4489, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n" ,100000+3),"SUNE"); } -mixed b() { return -1; } -.... -test 4490, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+"SUNE",100000+3),"SUNE"); } -mixed b() { return 100000+3; } -.... -test 4491, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+"SUNE"+"%'"+"+-*"+"'*n",100000+3,100000+3),"SUNE"); } -mixed b() { return 100000+3; } -.... -test 4492, expected result: EQ -mixed a() { return search(sprintf("SUNE"+"%'"+("SUNE"[0..strlen("SUNE")-2])+"'*n",10),"SUNE"); } -mixed b() { return 0; } -.... -test 4493, expected result: EQ -mixed a() { return search(sprintf("%'"+("SUNE"[0..strlen("SUNE")-2])+"'*n" ,10),"SUNE"); } -mixed b() { return -1; } -.... -test 4494, expected result: EQ -mixed a() { return search(sprintf("%'"+("SUNE"[0..strlen("SUNE")-2])+"'*n"+"SUNE",10),"SUNE"); } -mixed b() { return 10; } -.... -test 4495, expected result: EQ -mixed a() { return search(sprintf("%'"+("SUNE"[0..strlen("SUNE")-2])+"'*n"+"SUNE"+"%'"+("SUNE"[0..strlen("SUNE")-2])+"'*n",10,10),"SUNE"); } -mixed b() { return 10; } -.... -test 4496, expected result: EQ -mixed a() { return search(sprintf("SUNE"+"%'"+("SUNE"[0..strlen("SUNE")-2])+"'*n",10+1),"SUNE"); } -mixed b() { return 0; } -.... -test 4497, expected result: EQ -mixed a() { return search(sprintf("%'"+("SUNE"[0..strlen("SUNE")-2])+"'*n" ,10+1),"SUNE"); } -mixed b() { return -1; } -.... -test 4498, expected result: EQ -mixed a() { return search(sprintf("%'"+("SUNE"[0..strlen("SUNE")-2])+"'*n"+"SUNE",10+1),"SUNE"); } -mixed b() { return 10+1; } -.... -test 4499, expected result: EQ -mixed a() { return search(sprintf("%'"+("SUNE"[0..strlen("SUNE")-2])+"'*n"+"SUNE"+"%'"+("SUNE"[0..strlen("SUNE")-2])+"'*n",10+1,10+1),"SUNE"); } -mixed b() { return 10+1; } -.... -test 4500, expected result: EQ -mixed a() { return search(sprintf("SUNE"+"%'"+("SUNE"[0..strlen("SUNE")-2])+"'*n",10+2),"SUNE"); } -mixed b() { return 0; } -.... -test 4501, expected result: EQ -mixed a() { return search(sprintf("%'"+("SUNE"[0..strlen("SUNE")-2])+"'*n" ,10+2),"SUNE"); } -mixed b() { return -1; } -.... -test 4502, expected result: EQ -mixed a() { return search(sprintf("%'"+("SUNE"[0..strlen("SUNE")-2])+"'*n"+"SUNE",10+2),"SUNE"); } -mixed b() { return 10+2; } -.... -test 4503, expected result: EQ -mixed a() { return search(sprintf("%'"+("SUNE"[0..strlen("SUNE")-2])+"'*n"+"SUNE"+"%'"+("SUNE"[0..strlen("SUNE")-2])+"'*n",10+2,10+2),"SUNE"); } -mixed b() { return 10+2; } -.... -test 4504, expected result: EQ -mixed a() { return search(sprintf("SUNE"+"%'"+("SUNE"[0..strlen("SUNE")-2])+"'*n",10+3),"SUNE"); } -mixed b() { return 0; } -.... -test 4505, expected result: EQ -mixed a() { return search(sprintf("%'"+("SUNE"[0..strlen("SUNE")-2])+"'*n" ,10+3),"SUNE"); } -mixed b() { return -1; } -.... -test 4506, expected result: EQ -mixed a() { return search(sprintf("%'"+("SUNE"[0..strlen("SUNE")-2])+"'*n"+"SUNE",10+3),"SUNE"); } -mixed b() { return 10+3; } -.... -test 4507, expected result: EQ -mixed a() { return search(sprintf("%'"+("SUNE"[0..strlen("SUNE")-2])+"'*n"+"SUNE"+"%'"+("SUNE"[0..strlen("SUNE")-2])+"'*n",10+3,10+3),"SUNE"); } -mixed b() { return 10+3; } -.... -test 4508, expected result: EQ -mixed a() { return search(sprintf("SUNE"+"%'"+("SUNE"[0..strlen("SUNE")-2])+"'*n",1000),"SUNE"); } -mixed b() { return 0; } -.... -test 4509, expected result: EQ -mixed a() { return search(sprintf("%'"+("SUNE"[0..strlen("SUNE")-2])+"'*n" ,1000),"SUNE"); } -mixed b() { return -1; } -.... -test 4510, expected result: EQ -mixed a() { return search(sprintf("%'"+("SUNE"[0..strlen("SUNE")-2])+"'*n"+"SUNE",1000),"SUNE"); } -mixed b() { return 1000; } -.... -test 4511, expected result: EQ -mixed a() { return search(sprintf("%'"+("SUNE"[0..strlen("SUNE")-2])+"'*n"+"SUNE"+"%'"+("SUNE"[0..strlen("SUNE")-2])+"'*n",1000,1000),"SUNE"); } -mixed b() { return 1000; } -.... -test 4512, expected result: EQ -mixed a() { return search(sprintf("SUNE"+"%'"+("SUNE"[0..strlen("SUNE")-2])+"'*n",1000+1),"SUNE"); } -mixed b() { return 0; } -.... -test 4513, expected result: EQ -mixed a() { return search(sprintf("%'"+("SUNE"[0..strlen("SUNE")-2])+"'*n" ,1000+1),"SUNE"); } -mixed b() { return -1; } -.... -test 4514, expected result: EQ -mixed a() { return search(sprintf("%'"+("SUNE"[0..strlen("SUNE")-2])+"'*n"+"SUNE",1000+1),"SUNE"); } -mixed b() { return 1000+1; } -.... -test 4515, expected result: EQ -mixed a() { return search(sprintf("%'"+("SUNE"[0..strlen("SUNE")-2])+"'*n"+"SUNE"+"%'"+("SUNE"[0..strlen("SUNE")-2])+"'*n",1000+1,1000+1),"SUNE"); } -mixed b() { return 1000+1; } -.... -test 4516, expected result: EQ -mixed a() { return search(sprintf("SUNE"+"%'"+("SUNE"[0..strlen("SUNE")-2])+"'*n",1000+2),"SUNE"); } -mixed b() { return 0; } -.... -test 4517, expected result: EQ -mixed a() { return search(sprintf("%'"+("SUNE"[0..strlen("SUNE")-2])+"'*n" ,1000+2),"SUNE"); } -mixed b() { return -1; } -.... -test 4518, expected result: EQ -mixed a() { return search(sprintf("%'"+("SUNE"[0..strlen("SUNE")-2])+"'*n"+"SUNE",1000+2),"SUNE"); } -mixed b() { return 1000+2; } -.... -test 4519, expected result: EQ -mixed a() { return search(sprintf("%'"+("SUNE"[0..strlen("SUNE")-2])+"'*n"+"SUNE"+"%'"+("SUNE"[0..strlen("SUNE")-2])+"'*n",1000+2,1000+2),"SUNE"); } -mixed b() { return 1000+2; } -.... -test 4520, expected result: EQ -mixed a() { return search(sprintf("SUNE"+"%'"+("SUNE"[0..strlen("SUNE")-2])+"'*n",1000+3),"SUNE"); } -mixed b() { return 0; } -.... -test 4521, expected result: EQ -mixed a() { return search(sprintf("%'"+("SUNE"[0..strlen("SUNE")-2])+"'*n" ,1000+3),"SUNE"); } -mixed b() { return -1; } -.... -test 4522, expected result: EQ -mixed a() { return search(sprintf("%'"+("SUNE"[0..strlen("SUNE")-2])+"'*n"+"SUNE",1000+3),"SUNE"); } -mixed b() { return 1000+3; } -.... -test 4523, expected result: EQ -mixed a() { return search(sprintf("%'"+("SUNE"[0..strlen("SUNE")-2])+"'*n"+"SUNE"+"%'"+("SUNE"[0..strlen("SUNE")-2])+"'*n",1000+3,1000+3),"SUNE"); } -mixed b() { return 1000+3; } -.... -test 4524, expected result: EQ -mixed a() { return search(sprintf("SUNE"+"%'"+("SUNE"[0..strlen("SUNE")-2])+"'*n",100000),"SUNE"); } -mixed b() { return 0; } -.... -test 4525, expected result: EQ -mixed a() { return search(sprintf("%'"+("SUNE"[0..strlen("SUNE")-2])+"'*n" ,100000),"SUNE"); } -mixed b() { return -1; } -.... -test 4526, expected result: EQ -mixed a() { return search(sprintf("%'"+("SUNE"[0..strlen("SUNE")-2])+"'*n"+"SUNE",100000),"SUNE"); } -mixed b() { return 100000; } -.... -test 4527, expected result: EQ -mixed a() { return search(sprintf("%'"+("SUNE"[0..strlen("SUNE")-2])+"'*n"+"SUNE"+"%'"+("SUNE"[0..strlen("SUNE")-2])+"'*n",100000,100000),"SUNE"); } -mixed b() { return 100000; } -.... -test 4528, expected result: EQ -mixed a() { return search(sprintf("SUNE"+"%'"+("SUNE"[0..strlen("SUNE")-2])+"'*n",100000+1),"SUNE"); } -mixed b() { return 0; } -.... -test 4529, expected result: EQ -mixed a() { return search(sprintf("%'"+("SUNE"[0..strlen("SUNE")-2])+"'*n" ,100000+1),"SUNE"); } -mixed b() { return -1; } -.... -test 4530, expected result: EQ -mixed a() { return search(sprintf("%'"+("SUNE"[0..strlen("SUNE")-2])+"'*n"+"SUNE",100000+1),"SUNE"); } -mixed b() { return 100000+1; } -.... -test 4531, expected result: EQ -mixed a() { return search(sprintf("%'"+("SUNE"[0..strlen("SUNE")-2])+"'*n"+"SUNE"+"%'"+("SUNE"[0..strlen("SUNE")-2])+"'*n",100000+1,100000+1),"SUNE"); } -mixed b() { return 100000+1; } -.... -test 4532, expected result: EQ -mixed a() { return search(sprintf("SUNE"+"%'"+("SUNE"[0..strlen("SUNE")-2])+"'*n",100000+2),"SUNE"); } -mixed b() { return 0; } -.... -test 4533, expected result: EQ -mixed a() { return search(sprintf("%'"+("SUNE"[0..strlen("SUNE")-2])+"'*n" ,100000+2),"SUNE"); } -mixed b() { return -1; } -.... -test 4534, expected result: EQ -mixed a() { return search(sprintf("%'"+("SUNE"[0..strlen("SUNE")-2])+"'*n"+"SUNE",100000+2),"SUNE"); } -mixed b() { return 100000+2; } -.... -test 4535, expected result: EQ -mixed a() { return search(sprintf("%'"+("SUNE"[0..strlen("SUNE")-2])+"'*n"+"SUNE"+"%'"+("SUNE"[0..strlen("SUNE")-2])+"'*n",100000+2,100000+2),"SUNE"); } -mixed b() { return 100000+2; } -.... -test 4536, expected result: EQ -mixed a() { return search(sprintf("SUNE"+"%'"+("SUNE"[0..strlen("SUNE")-2])+"'*n",100000+3),"SUNE"); } -mixed b() { return 0; } -.... -test 4537, expected result: EQ -mixed a() { return search(sprintf("%'"+("SUNE"[0..strlen("SUNE")-2])+"'*n" ,100000+3),"SUNE"); } -mixed b() { return -1; } -.... -test 4538, expected result: EQ -mixed a() { return search(sprintf("%'"+("SUNE"[0..strlen("SUNE")-2])+"'*n"+"SUNE",100000+3),"SUNE"); } -mixed b() { return 100000+3; } -.... -test 4539, expected result: EQ -mixed a() { return search(sprintf("%'"+("SUNE"[0..strlen("SUNE")-2])+"'*n"+"SUNE"+"%'"+("SUNE"[0..strlen("SUNE")-2])+"'*n",100000+3,100000+3),"SUNE"); } -mixed b() { return 100000+3; } -.... -test 4540, expected result: EQ -mixed a() { return search(sprintf("SUNE"+"%'"+("SUNE"[1..0x7fffffff])+"'*n",10),"SUNE"); } -mixed b() { return 0; } -.... -test 4541, expected result: EQ -mixed a() { return search(sprintf("%'"+("SUNE"[1..0x7fffffff])+"'*n" ,10),"SUNE"); } -mixed b() { return -1; } -.... -test 4542, expected result: EQ -mixed a() { return search(sprintf("%'"+("SUNE"[1..0x7fffffff])+"'*n"+"SUNE",10),"SUNE"); } -mixed b() { return 10; } -.... -test 4543, expected result: EQ -mixed a() { return search(sprintf("%'"+("SUNE"[1..0x7fffffff])+"'*n"+"SUNE"+"%'"+("SUNE"[1..0x7fffffff])+"'*n",10,10),"SUNE"); } -mixed b() { return 10; } -.... -test 4544, expected result: EQ -mixed a() { return search(sprintf("SUNE"+"%'"+("SUNE"[1..0x7fffffff])+"'*n",10+1),"SUNE"); } -mixed b() { return 0; } -.... -test 4545, expected result: EQ -mixed a() { return search(sprintf("%'"+("SUNE"[1..0x7fffffff])+"'*n" ,10+1),"SUNE"); } -mixed b() { return -1; } -.... -test 4546, expected result: EQ -mixed a() { return search(sprintf("%'"+("SUNE"[1..0x7fffffff])+"'*n"+"SUNE",10+1),"SUNE"); } -mixed b() { return 10+1; } -.... -test 4547, expected result: EQ -mixed a() { return search(sprintf("%'"+("SUNE"[1..0x7fffffff])+"'*n"+"SUNE"+"%'"+("SUNE"[1..0x7fffffff])+"'*n",10+1,10+1),"SUNE"); } -mixed b() { return 10+1; } -.... -test 4548, expected result: EQ -mixed a() { return search(sprintf("SUNE"+"%'"+("SUNE"[1..0x7fffffff])+"'*n",10+2),"SUNE"); } -mixed b() { return 0; } -.... -test 4549, expected result: EQ -mixed a() { return search(sprintf("%'"+("SUNE"[1..0x7fffffff])+"'*n" ,10+2),"SUNE"); } -mixed b() { return -1; } -.... -test 4550, expected result: EQ -mixed a() { return search(sprintf("%'"+("SUNE"[1..0x7fffffff])+"'*n"+"SUNE",10+2),"SUNE"); } -mixed b() { return 10+2; } -.... -test 4551, expected result: EQ -mixed a() { return search(sprintf("%'"+("SUNE"[1..0x7fffffff])+"'*n"+"SUNE"+"%'"+("SUNE"[1..0x7fffffff])+"'*n",10+2,10+2),"SUNE"); } -mixed b() { return 10+2; } -.... -test 4552, expected result: EQ -mixed a() { return search(sprintf("SUNE"+"%'"+("SUNE"[1..0x7fffffff])+"'*n",10+3),"SUNE"); } -mixed b() { return 0; } -.... -test 4553, expected result: EQ -mixed a() { return search(sprintf("%'"+("SUNE"[1..0x7fffffff])+"'*n" ,10+3),"SUNE"); } -mixed b() { return -1; } -.... -test 4554, expected result: EQ -mixed a() { return search(sprintf("%'"+("SUNE"[1..0x7fffffff])+"'*n"+"SUNE",10+3),"SUNE"); } -mixed b() { return 10+3; } -.... -test 4555, expected result: EQ -mixed a() { return search(sprintf("%'"+("SUNE"[1..0x7fffffff])+"'*n"+"SUNE"+"%'"+("SUNE"[1..0x7fffffff])+"'*n",10+3,10+3),"SUNE"); } -mixed b() { return 10+3; } -.... -test 4556, expected result: EQ -mixed a() { return search(sprintf("SUNE"+"%'"+("SUNE"[1..0x7fffffff])+"'*n",1000),"SUNE"); } -mixed b() { return 0; } -.... -test 4557, expected result: EQ -mixed a() { return search(sprintf("%'"+("SUNE"[1..0x7fffffff])+"'*n" ,1000),"SUNE"); } -mixed b() { return -1; } -.... -test 4558, expected result: EQ -mixed a() { return search(sprintf("%'"+("SUNE"[1..0x7fffffff])+"'*n"+"SUNE",1000),"SUNE"); } -mixed b() { return 1000; } -.... -test 4559, expected result: EQ -mixed a() { return search(sprintf("%'"+("SUNE"[1..0x7fffffff])+"'*n"+"SUNE"+"%'"+("SUNE"[1..0x7fffffff])+"'*n",1000,1000),"SUNE"); } -mixed b() { return 1000; } -.... -test 4560, expected result: EQ -mixed a() { return search(sprintf("SUNE"+"%'"+("SUNE"[1..0x7fffffff])+"'*n",1000+1),"SUNE"); } -mixed b() { return 0; } -.... -test 4561, expected result: EQ -mixed a() { return search(sprintf("%'"+("SUNE"[1..0x7fffffff])+"'*n" ,1000+1),"SUNE"); } -mixed b() { return -1; } -.... -test 4562, expected result: EQ -mixed a() { return search(sprintf("%'"+("SUNE"[1..0x7fffffff])+"'*n"+"SUNE",1000+1),"SUNE"); } -mixed b() { return 1000+1; } -.... -test 4563, expected result: EQ -mixed a() { return search(sprintf("%'"+("SUNE"[1..0x7fffffff])+"'*n"+"SUNE"+"%'"+("SUNE"[1..0x7fffffff])+"'*n",1000+1,1000+1),"SUNE"); } -mixed b() { return 1000+1; } -.... -test 4564, expected result: EQ -mixed a() { return search(sprintf("SUNE"+"%'"+("SUNE"[1..0x7fffffff])+"'*n",1000+2),"SUNE"); } -mixed b() { return 0; } -.... -test 4565, expected result: EQ -mixed a() { return search(sprintf("%'"+("SUNE"[1..0x7fffffff])+"'*n" ,1000+2),"SUNE"); } -mixed b() { return -1; } -.... -test 4566, expected result: EQ -mixed a() { return search(sprintf("%'"+("SUNE"[1..0x7fffffff])+"'*n"+"SUNE",1000+2),"SUNE"); } -mixed b() { return 1000+2; } -.... -test 4567, expected result: EQ -mixed a() { return search(sprintf("%'"+("SUNE"[1..0x7fffffff])+"'*n"+"SUNE"+"%'"+("SUNE"[1..0x7fffffff])+"'*n",1000+2,1000+2),"SUNE"); } -mixed b() { return 1000+2; } -.... -test 4568, expected result: EQ -mixed a() { return search(sprintf("SUNE"+"%'"+("SUNE"[1..0x7fffffff])+"'*n",1000+3),"SUNE"); } -mixed b() { return 0; } -.... -test 4569, expected result: EQ -mixed a() { return search(sprintf("%'"+("SUNE"[1..0x7fffffff])+"'*n" ,1000+3),"SUNE"); } -mixed b() { return -1; } -.... -test 4570, expected result: EQ -mixed a() { return search(sprintf("%'"+("SUNE"[1..0x7fffffff])+"'*n"+"SUNE",1000+3),"SUNE"); } -mixed b() { return 1000+3; } -.... -test 4571, expected result: EQ -mixed a() { return search(sprintf("%'"+("SUNE"[1..0x7fffffff])+"'*n"+"SUNE"+"%'"+("SUNE"[1..0x7fffffff])+"'*n",1000+3,1000+3),"SUNE"); } -mixed b() { return 1000+3; } -.... -test 4572, expected result: EQ -mixed a() { return search(sprintf("SUNE"+"%'"+("SUNE"[1..0x7fffffff])+"'*n",100000),"SUNE"); } -mixed b() { return 0; } -.... -test 4573, expected result: EQ -mixed a() { return search(sprintf("%'"+("SUNE"[1..0x7fffffff])+"'*n" ,100000),"SUNE"); } -mixed b() { return -1; } -.... -test 4574, expected result: EQ -mixed a() { return search(sprintf("%'"+("SUNE"[1..0x7fffffff])+"'*n"+"SUNE",100000),"SUNE"); } -mixed b() { return 100000; } -.... -test 4575, expected result: EQ -mixed a() { return search(sprintf("%'"+("SUNE"[1..0x7fffffff])+"'*n"+"SUNE"+"%'"+("SUNE"[1..0x7fffffff])+"'*n",100000,100000),"SUNE"); } -mixed b() { return 100000; } -.... -test 4576, expected result: EQ -mixed a() { return search(sprintf("SUNE"+"%'"+("SUNE"[1..0x7fffffff])+"'*n",100000+1),"SUNE"); } -mixed b() { return 0; } -.... -test 4577, expected result: EQ -mixed a() { return search(sprintf("%'"+("SUNE"[1..0x7fffffff])+"'*n" ,100000+1),"SUNE"); } -mixed b() { return -1; } -.... -test 4578, expected result: EQ -mixed a() { return search(sprintf("%'"+("SUNE"[1..0x7fffffff])+"'*n"+"SUNE",100000+1),"SUNE"); } -mixed b() { return 100000+1; } -.... -test 4579, expected result: EQ -mixed a() { return search(sprintf("%'"+("SUNE"[1..0x7fffffff])+"'*n"+"SUNE"+"%'"+("SUNE"[1..0x7fffffff])+"'*n",100000+1,100000+1),"SUNE"); } -mixed b() { return 100000+1; } -.... -test 4580, expected result: EQ -mixed a() { return search(sprintf("SUNE"+"%'"+("SUNE"[1..0x7fffffff])+"'*n",100000+2),"SUNE"); } -mixed b() { return 0; } -.... -test 4581, expected result: EQ -mixed a() { return search(sprintf("%'"+("SUNE"[1..0x7fffffff])+"'*n" ,100000+2),"SUNE"); } -mixed b() { return -1; } -.... -test 4582, expected result: EQ -mixed a() { return search(sprintf("%'"+("SUNE"[1..0x7fffffff])+"'*n"+"SUNE",100000+2),"SUNE"); } -mixed b() { return 100000+2; } -.... -test 4583, expected result: EQ -mixed a() { return search(sprintf("%'"+("SUNE"[1..0x7fffffff])+"'*n"+"SUNE"+"%'"+("SUNE"[1..0x7fffffff])+"'*n",100000+2,100000+2),"SUNE"); } -mixed b() { return 100000+2; } -.... -test 4584, expected result: EQ -mixed a() { return search(sprintf("SUNE"+"%'"+("SUNE"[1..0x7fffffff])+"'*n",100000+3),"SUNE"); } -mixed b() { return 0; } -.... -test 4585, expected result: EQ -mixed a() { return search(sprintf("%'"+("SUNE"[1..0x7fffffff])+"'*n" ,100000+3),"SUNE"); } -mixed b() { return -1; } -.... -test 4586, expected result: EQ -mixed a() { return search(sprintf("%'"+("SUNE"[1..0x7fffffff])+"'*n"+"SUNE",100000+3),"SUNE"); } -mixed b() { return 100000+3; } -.... -test 4587, expected result: EQ -mixed a() { return search(sprintf("%'"+("SUNE"[1..0x7fffffff])+"'*n"+"SUNE"+"%'"+("SUNE"[1..0x7fffffff])+"'*n",100000+3,100000+3),"SUNE"); } -mixed b() { return 100000+3; } -.... -test 4588, expected result: EQ -mixed a() { return search(sprintf("-------------------+"+"%'"+"+-*"+"'*n",10),"-------------------+"); } -mixed b() { return 0; } -.... -test 4589, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n" ,10),"-------------------+"); } -mixed b() { return -1; } -.... -test 4590, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+"-------------------+",10),"-------------------+"); } -mixed b() { return 10; } -.... -test 4591, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+"-------------------+"+"%'"+"+-*"+"'*n",10,10),"-------------------+"); } -mixed b() { return 10; } -.... -test 4592, expected result: EQ -mixed a() { return search(sprintf("-------------------+"+"%'"+"+-*"+"'*n",10+1),"-------------------+"); } -mixed b() { return 0; } -.... -test 4593, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n" ,10+1),"-------------------+"); } -mixed b() { return -1; } -.... -test 4594, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+"-------------------+",10+1),"-------------------+"); } -mixed b() { return 10+1; } -.... -test 4595, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+"-------------------+"+"%'"+"+-*"+"'*n",10+1,10+1),"-------------------+"); } -mixed b() { return 10+1; } -.... -test 4596, expected result: EQ -mixed a() { return search(sprintf("-------------------+"+"%'"+"+-*"+"'*n",10+2),"-------------------+"); } -mixed b() { return 0; } -.... -test 4597, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n" ,10+2),"-------------------+"); } -mixed b() { return -1; } -.... -test 4598, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+"-------------------+",10+2),"-------------------+"); } -mixed b() { return 10+2; } -.... -test 4599, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+"-------------------+"+"%'"+"+-*"+"'*n",10+2,10+2),"-------------------+"); } -mixed b() { return 10+2; } -.... -test 4600, expected result: EQ -mixed a() { return search(sprintf("-------------------+"+"%'"+"+-*"+"'*n",10+3),"-------------------+"); } -mixed b() { return 0; } -.... -test 4601, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n" ,10+3),"-------------------+"); } -mixed b() { return -1; } -.... -test 4602, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+"-------------------+",10+3),"-------------------+"); } -mixed b() { return 10+3; } -.... -test 4603, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+"-------------------+"+"%'"+"+-*"+"'*n",10+3,10+3),"-------------------+"); } -mixed b() { return 10+3; } -.... -test 4604, expected result: EQ -mixed a() { return search(sprintf("-------------------+"+"%'"+"+-*"+"'*n",1000),"-------------------+"); } -mixed b() { return 0; } -.... -test 4605, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n" ,1000),"-------------------+"); } -mixed b() { return -1; } -.... -test 4606, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+"-------------------+",1000),"-------------------+"); } -mixed b() { return 1000; } -.... -test 4607, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+"-------------------+"+"%'"+"+-*"+"'*n",1000,1000),"-------------------+"); } -mixed b() { return 1000; } -.... -test 4608, expected result: EQ -mixed a() { return search(sprintf("-------------------+"+"%'"+"+-*"+"'*n",1000+1),"-------------------+"); } -mixed b() { return 0; } -.... -test 4609, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n" ,1000+1),"-------------------+"); } -mixed b() { return -1; } -.... -test 4610, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+"-------------------+",1000+1),"-------------------+"); } -mixed b() { return 1000+1; } -.... -test 4611, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+"-------------------+"+"%'"+"+-*"+"'*n",1000+1,1000+1),"-------------------+"); } -mixed b() { return 1000+1; } -.... -test 4612, expected result: EQ -mixed a() { return search(sprintf("-------------------+"+"%'"+"+-*"+"'*n",1000+2),"-------------------+"); } -mixed b() { return 0; } -.... -test 4613, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n" ,1000+2),"-------------------+"); } -mixed b() { return -1; } -.... -test 4614, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+"-------------------+",1000+2),"-------------------+"); } -mixed b() { return 1000+2; } -.... -test 4615, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+"-------------------+"+"%'"+"+-*"+"'*n",1000+2,1000+2),"-------------------+"); } -mixed b() { return 1000+2; } -.... -test 4616, expected result: EQ -mixed a() { return search(sprintf("-------------------+"+"%'"+"+-*"+"'*n",1000+3),"-------------------+"); } -mixed b() { return 0; } -.... -test 4617, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n" ,1000+3),"-------------------+"); } -mixed b() { return -1; } -.... -test 4618, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+"-------------------+",1000+3),"-------------------+"); } -mixed b() { return 1000+3; } -.... -test 4619, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+"-------------------+"+"%'"+"+-*"+"'*n",1000+3,1000+3),"-------------------+"); } -mixed b() { return 1000+3; } -.... -test 4620, expected result: EQ -mixed a() { return search(sprintf("-------------------+"+"%'"+"+-*"+"'*n",100000),"-------------------+"); } -mixed b() { return 0; } -.... -test 4621, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n" ,100000),"-------------------+"); } -mixed b() { return -1; } -.... -test 4622, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+"-------------------+",100000),"-------------------+"); } -mixed b() { return 100000; } -.... -test 4623, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+"-------------------+"+"%'"+"+-*"+"'*n",100000,100000),"-------------------+"); } -mixed b() { return 100000; } -.... -test 4624, expected result: EQ -mixed a() { return search(sprintf("-------------------+"+"%'"+"+-*"+"'*n",100000+1),"-------------------+"); } -mixed b() { return 0; } -.... -test 4625, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n" ,100000+1),"-------------------+"); } -mixed b() { return -1; } -.... -test 4626, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+"-------------------+",100000+1),"-------------------+"); } -mixed b() { return 100000+1; } -.... -test 4627, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+"-------------------+"+"%'"+"+-*"+"'*n",100000+1,100000+1),"-------------------+"); } -mixed b() { return 100000+1; } -.... -test 4628, expected result: EQ -mixed a() { return search(sprintf("-------------------+"+"%'"+"+-*"+"'*n",100000+2),"-------------------+"); } -mixed b() { return 0; } -.... -test 4629, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n" ,100000+2),"-------------------+"); } -mixed b() { return -1; } -.... -test 4630, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+"-------------------+",100000+2),"-------------------+"); } -mixed b() { return 100000+2; } -.... -test 4631, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+"-------------------+"+"%'"+"+-*"+"'*n",100000+2,100000+2),"-------------------+"); } -mixed b() { return 100000+2; } -.... -test 4632, expected result: EQ -mixed a() { return search(sprintf("-------------------+"+"%'"+"+-*"+"'*n",100000+3),"-------------------+"); } -mixed b() { return 0; } -.... -test 4633, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n" ,100000+3),"-------------------+"); } -mixed b() { return -1; } -.... -test 4634, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+"-------------------+",100000+3),"-------------------+"); } -mixed b() { return 100000+3; } -.... -test 4635, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+"-------------------+"+"%'"+"+-*"+"'*n",100000+3,100000+3),"-------------------+"); } -mixed b() { return 100000+3; } -.... -test 4636, expected result: EQ -mixed a() { return search(sprintf("-------------------+"+"%'"+("-------------------+"[0..strlen("-------------------+")-2])+"'*n",10),"-------------------+"); } -mixed b() { return 0; } -.... -test 4637, expected result: EQ -mixed a() { return search(sprintf("%'"+("-------------------+"[0..strlen("-------------------+")-2])+"'*n" ,10),"-------------------+"); } -mixed b() { return -1; } -.... -test 4638, expected result: EQ -mixed a() { return search(sprintf("%'"+("-------------------+"[0..strlen("-------------------+")-2])+"'*n"+"-------------------+",10),"-------------------+"); } -mixed b() { return 10; } -.... -test 4639, expected result: EQ -mixed a() { return search(sprintf("%'"+("-------------------+"[0..strlen("-------------------+")-2])+"'*n"+"-------------------+"+"%'"+("-------------------+"[0..strlen("-------------------+")-2])+"'*n",10,10),"-------------------+"); } -mixed b() { return 10; } -.... -test 4640, expected result: EQ -mixed a() { return search(sprintf("-------------------+"+"%'"+("-------------------+"[0..strlen("-------------------+")-2])+"'*n",10+1),"-------------------+"); } -mixed b() { return 0; } -.... -test 4641, expected result: EQ -mixed a() { return search(sprintf("%'"+("-------------------+"[0..strlen("-------------------+")-2])+"'*n" ,10+1),"-------------------+"); } -mixed b() { return -1; } -.... -test 4642, expected result: EQ -mixed a() { return search(sprintf("%'"+("-------------------+"[0..strlen("-------------------+")-2])+"'*n"+"-------------------+",10+1),"-------------------+"); } -mixed b() { return 10+1; } -.... -test 4643, expected result: EQ -mixed a() { return search(sprintf("%'"+("-------------------+"[0..strlen("-------------------+")-2])+"'*n"+"-------------------+"+"%'"+("-------------------+"[0..strlen("-------------------+")-2])+"'*n",10+1,10+1),"-------------------+"); } -mixed b() { return 10+1; } -.... -test 4644, expected result: EQ -mixed a() { return search(sprintf("-------------------+"+"%'"+("-------------------+"[0..strlen("-------------------+")-2])+"'*n",10+2),"-------------------+"); } -mixed b() { return 0; } -.... -test 4645, expected result: EQ -mixed a() { return search(sprintf("%'"+("-------------------+"[0..strlen("-------------------+")-2])+"'*n" ,10+2),"-------------------+"); } -mixed b() { return -1; } -.... -test 4646, expected result: EQ -mixed a() { return search(sprintf("%'"+("-------------------+"[0..strlen("-------------------+")-2])+"'*n"+"-------------------+",10+2),"-------------------+"); } -mixed b() { return 10+2; } -.... -test 4647, expected result: EQ -mixed a() { return search(sprintf("%'"+("-------------------+"[0..strlen("-------------------+")-2])+"'*n"+"-------------------+"+"%'"+("-------------------+"[0..strlen("-------------------+")-2])+"'*n",10+2,10+2),"-------------------+"); } -mixed b() { return 10+2; } -.... -test 4648, expected result: EQ -mixed a() { return search(sprintf("-------------------+"+"%'"+("-------------------+"[0..strlen("-------------------+")-2])+"'*n",10+3),"-------------------+"); } -mixed b() { return 0; } -.... -test 4649, expected result: EQ -mixed a() { return search(sprintf("%'"+("-------------------+"[0..strlen("-------------------+")-2])+"'*n" ,10+3),"-------------------+"); } -mixed b() { return -1; } -.... -test 4650, expected result: EQ -mixed a() { return search(sprintf("%'"+("-------------------+"[0..strlen("-------------------+")-2])+"'*n"+"-------------------+",10+3),"-------------------+"); } -mixed b() { return 10+3; } -.... -test 4651, expected result: EQ -mixed a() { return search(sprintf("%'"+("-------------------+"[0..strlen("-------------------+")-2])+"'*n"+"-------------------+"+"%'"+("-------------------+"[0..strlen("-------------------+")-2])+"'*n",10+3,10+3),"-------------------+"); } -mixed b() { return 10+3; } -.... -test 4652, expected result: EQ -mixed a() { return search(sprintf("-------------------+"+"%'"+("-------------------+"[0..strlen("-------------------+")-2])+"'*n",1000),"-------------------+"); } -mixed b() { return 0; } -.... -test 4653, expected result: EQ -mixed a() { return search(sprintf("%'"+("-------------------+"[0..strlen("-------------------+")-2])+"'*n" ,1000),"-------------------+"); } -mixed b() { return -1; } -.... -test 4654, expected result: EQ -mixed a() { return search(sprintf("%'"+("-------------------+"[0..strlen("-------------------+")-2])+"'*n"+"-------------------+",1000),"-------------------+"); } -mixed b() { return 1000; } -.... -test 4655, expected result: EQ -mixed a() { return search(sprintf("%'"+("-------------------+"[0..strlen("-------------------+")-2])+"'*n"+"-------------------+"+"%'"+("-------------------+"[0..strlen("-------------------+")-2])+"'*n",1000,1000),"-------------------+"); } -mixed b() { return 1000; } -.... -test 4656, expected result: EQ -mixed a() { return search(sprintf("-------------------+"+"%'"+("-------------------+"[0..strlen("-------------------+")-2])+"'*n",1000+1),"-------------------+"); } -mixed b() { return 0; } -.... -test 4657, expected result: EQ -mixed a() { return search(sprintf("%'"+("-------------------+"[0..strlen("-------------------+")-2])+"'*n" ,1000+1),"-------------------+"); } -mixed b() { return -1; } -.... -test 4658, expected result: EQ -mixed a() { return search(sprintf("%'"+("-------------------+"[0..strlen("-------------------+")-2])+"'*n"+"-------------------+",1000+1),"-------------------+"); } -mixed b() { return 1000+1; } -.... -test 4659, expected result: EQ -mixed a() { return search(sprintf("%'"+("-------------------+"[0..strlen("-------------------+")-2])+"'*n"+"-------------------+"+"%'"+("-------------------+"[0..strlen("-------------------+")-2])+"'*n",1000+1,1000+1),"-------------------+"); } -mixed b() { return 1000+1; } -.... -test 4660, expected result: EQ -mixed a() { return search(sprintf("-------------------+"+"%'"+("-------------------+"[0..strlen("-------------------+")-2])+"'*n",1000+2),"-------------------+"); } -mixed b() { return 0; } -.... -test 4661, expected result: EQ -mixed a() { return search(sprintf("%'"+("-------------------+"[0..strlen("-------------------+")-2])+"'*n" ,1000+2),"-------------------+"); } -mixed b() { return -1; } -.... -test 4662, expected result: EQ -mixed a() { return search(sprintf("%'"+("-------------------+"[0..strlen("-------------------+")-2])+"'*n"+"-------------------+",1000+2),"-------------------+"); } -mixed b() { return 1000+2; } -.... -test 4663, expected result: EQ -mixed a() { return search(sprintf("%'"+("-------------------+"[0..strlen("-------------------+")-2])+"'*n"+"-------------------+"+"%'"+("-------------------+"[0..strlen("-------------------+")-2])+"'*n",1000+2,1000+2),"-------------------+"); } -mixed b() { return 1000+2; } -.... -test 4664, expected result: EQ -mixed a() { return search(sprintf("-------------------+"+"%'"+("-------------------+"[0..strlen("-------------------+")-2])+"'*n",1000+3),"-------------------+"); } -mixed b() { return 0; } -.... -test 4665, expected result: EQ -mixed a() { return search(sprintf("%'"+("-------------------+"[0..strlen("-------------------+")-2])+"'*n" ,1000+3),"-------------------+"); } -mixed b() { return -1; } -.... -test 4666, expected result: EQ -mixed a() { return search(sprintf("%'"+("-------------------+"[0..strlen("-------------------+")-2])+"'*n"+"-------------------+",1000+3),"-------------------+"); } -mixed b() { return 1000+3; } -.... -test 4667, expected result: EQ -mixed a() { return search(sprintf("%'"+("-------------------+"[0..strlen("-------------------+")-2])+"'*n"+"-------------------+"+"%'"+("-------------------+"[0..strlen("-------------------+")-2])+"'*n",1000+3,1000+3),"-------------------+"); } -mixed b() { return 1000+3; } -.... -test 4668, expected result: EQ -mixed a() { return search(sprintf("-------------------+"+"%'"+("-------------------+"[0..strlen("-------------------+")-2])+"'*n",100000),"-------------------+"); } -mixed b() { return 0; } -.... -test 4669, expected result: EQ -mixed a() { return search(sprintf("%'"+("-------------------+"[0..strlen("-------------------+")-2])+"'*n" ,100000),"-------------------+"); } -mixed b() { return -1; } -.... -test 4670, expected result: EQ -mixed a() { return search(sprintf("%'"+("-------------------+"[0..strlen("-------------------+")-2])+"'*n"+"-------------------+",100000),"-------------------+"); } -mixed b() { return 100000; } -.... -test 4671, expected result: EQ -mixed a() { return search(sprintf("%'"+("-------------------+"[0..strlen("-------------------+")-2])+"'*n"+"-------------------+"+"%'"+("-------------------+"[0..strlen("-------------------+")-2])+"'*n",100000,100000),"-------------------+"); } -mixed b() { return 100000; } -.... -test 4672, expected result: EQ -mixed a() { return search(sprintf("-------------------+"+"%'"+("-------------------+"[0..strlen("-------------------+")-2])+"'*n",100000+1),"-------------------+"); } -mixed b() { return 0; } -.... -test 4673, expected result: EQ -mixed a() { return search(sprintf("%'"+("-------------------+"[0..strlen("-------------------+")-2])+"'*n" ,100000+1),"-------------------+"); } -mixed b() { return -1; } -.... -test 4674, expected result: EQ -mixed a() { return search(sprintf("%'"+("-------------------+"[0..strlen("-------------------+")-2])+"'*n"+"-------------------+",100000+1),"-------------------+"); } -mixed b() { return 100000+1; } -.... -test 4675, expected result: EQ -mixed a() { return search(sprintf("%'"+("-------------------+"[0..strlen("-------------------+")-2])+"'*n"+"-------------------+"+"%'"+("-------------------+"[0..strlen("-------------------+")-2])+"'*n",100000+1,100000+1),"-------------------+"); } -mixed b() { return 100000+1; } -.... -test 4676, expected result: EQ -mixed a() { return search(sprintf("-------------------+"+"%'"+("-------------------+"[0..strlen("-------------------+")-2])+"'*n",100000+2),"-------------------+"); } -mixed b() { return 0; } -.... -test 4677, expected result: EQ -mixed a() { return search(sprintf("%'"+("-------------------+"[0..strlen("-------------------+")-2])+"'*n" ,100000+2),"-------------------+"); } -mixed b() { return -1; } -.... -test 4678, expected result: EQ -mixed a() { return search(sprintf("%'"+("-------------------+"[0..strlen("-------------------+")-2])+"'*n"+"-------------------+",100000+2),"-------------------+"); } -mixed b() { return 100000+2; } -.... -test 4679, expected result: EQ -mixed a() { return search(sprintf("%'"+("-------------------+"[0..strlen("-------------------+")-2])+"'*n"+"-------------------+"+"%'"+("-------------------+"[0..strlen("-------------------+")-2])+"'*n",100000+2,100000+2),"-------------------+"); } -mixed b() { return 100000+2; } -.... -test 4680, expected result: EQ -mixed a() { return search(sprintf("-------------------+"+"%'"+("-------------------+"[0..strlen("-------------------+")-2])+"'*n",100000+3),"-------------------+"); } -mixed b() { return 0; } -.... -test 4681, expected result: EQ -mixed a() { return search(sprintf("%'"+("-------------------+"[0..strlen("-------------------+")-2])+"'*n" ,100000+3),"-------------------+"); } -mixed b() { return -1; } -.... -test 4682, expected result: EQ -mixed a() { return search(sprintf("%'"+("-------------------+"[0..strlen("-------------------+")-2])+"'*n"+"-------------------+",100000+3),"-------------------+"); } -mixed b() { return 100000+3; } -.... -test 4683, expected result: EQ -mixed a() { return search(sprintf("%'"+("-------------------+"[0..strlen("-------------------+")-2])+"'*n"+"-------------------+"+"%'"+("-------------------+"[0..strlen("-------------------+")-2])+"'*n",100000+3,100000+3),"-------------------+"); } -mixed b() { return 100000+3; } -.... -test 4684, expected result: EQ -mixed a() { return search(sprintf("-------------------+"+"%'"+("-------------------+"[1..0x7fffffff])+"'*n",10),"-------------------+"); } -mixed b() { return 0; } -.... -test 4685, expected result: EQ -mixed a() { return search(sprintf("%'"+("-------------------+"[1..0x7fffffff])+"'*n" ,10),"-------------------+"); } -mixed b() { return -1; } -.... -test 4686, expected result: EQ -mixed a() { return search(sprintf("%'"+("-------------------+"[1..0x7fffffff])+"'*n"+"-------------------+",10),"-------------------+"); } -mixed b() { return 10; } -.... -test 4687, expected result: EQ -mixed a() { return search(sprintf("%'"+("-------------------+"[1..0x7fffffff])+"'*n"+"-------------------+"+"%'"+("-------------------+"[1..0x7fffffff])+"'*n",10,10),"-------------------+"); } -mixed b() { return 10; } -.... -test 4688, expected result: EQ -mixed a() { return search(sprintf("-------------------+"+"%'"+("-------------------+"[1..0x7fffffff])+"'*n",10+1),"-------------------+"); } -mixed b() { return 0; } -.... -test 4689, expected result: EQ -mixed a() { return search(sprintf("%'"+("-------------------+"[1..0x7fffffff])+"'*n" ,10+1),"-------------------+"); } -mixed b() { return -1; } -.... -test 4690, expected result: EQ -mixed a() { return search(sprintf("%'"+("-------------------+"[1..0x7fffffff])+"'*n"+"-------------------+",10+1),"-------------------+"); } -mixed b() { return 10+1; } -.... -test 4691, expected result: EQ -mixed a() { return search(sprintf("%'"+("-------------------+"[1..0x7fffffff])+"'*n"+"-------------------+"+"%'"+("-------------------+"[1..0x7fffffff])+"'*n",10+1,10+1),"-------------------+"); } -mixed b() { return 10+1; } -.... -test 4692, expected result: EQ -mixed a() { return search(sprintf("-------------------+"+"%'"+("-------------------+"[1..0x7fffffff])+"'*n",10+2),"-------------------+"); } -mixed b() { return 0; } -.... -test 4693, expected result: EQ -mixed a() { return search(sprintf("%'"+("-------------------+"[1..0x7fffffff])+"'*n" ,10+2),"-------------------+"); } -mixed b() { return -1; } -.... -test 4694, expected result: EQ -mixed a() { return search(sprintf("%'"+("-------------------+"[1..0x7fffffff])+"'*n"+"-------------------+",10+2),"-------------------+"); } -mixed b() { return 10+2; } -.... -test 4695, expected result: EQ -mixed a() { return search(sprintf("%'"+("-------------------+"[1..0x7fffffff])+"'*n"+"-------------------+"+"%'"+("-------------------+"[1..0x7fffffff])+"'*n",10+2,10+2),"-------------------+"); } -mixed b() { return 10+2; } -.... -test 4696, expected result: EQ -mixed a() { return search(sprintf("-------------------+"+"%'"+("-------------------+"[1..0x7fffffff])+"'*n",10+3),"-------------------+"); } -mixed b() { return 0; } -.... -test 4697, expected result: EQ -mixed a() { return search(sprintf("%'"+("-------------------+"[1..0x7fffffff])+"'*n" ,10+3),"-------------------+"); } -mixed b() { return -1; } -.... -test 4698, expected result: EQ -mixed a() { return search(sprintf("%'"+("-------------------+"[1..0x7fffffff])+"'*n"+"-------------------+",10+3),"-------------------+"); } -mixed b() { return 10+3; } -.... -test 4699, expected result: EQ -mixed a() { return search(sprintf("%'"+("-------------------+"[1..0x7fffffff])+"'*n"+"-------------------+"+"%'"+("-------------------+"[1..0x7fffffff])+"'*n",10+3,10+3),"-------------------+"); } -mixed b() { return 10+3; } -.... -test 4700, expected result: EQ -mixed a() { return search(sprintf("-------------------+"+"%'"+("-------------------+"[1..0x7fffffff])+"'*n",1000),"-------------------+"); } -mixed b() { return 0; } -.... -test 4701, expected result: EQ -mixed a() { return search(sprintf("%'"+("-------------------+"[1..0x7fffffff])+"'*n" ,1000),"-------------------+"); } -mixed b() { return -1; } -.... -test 4702, expected result: EQ -mixed a() { return search(sprintf("%'"+("-------------------+"[1..0x7fffffff])+"'*n"+"-------------------+",1000),"-------------------+"); } -mixed b() { return 1000; } -.... -test 4703, expected result: EQ -mixed a() { return search(sprintf("%'"+("-------------------+"[1..0x7fffffff])+"'*n"+"-------------------+"+"%'"+("-------------------+"[1..0x7fffffff])+"'*n",1000,1000),"-------------------+"); } -mixed b() { return 1000; } -.... -test 4704, expected result: EQ -mixed a() { return search(sprintf("-------------------+"+"%'"+("-------------------+"[1..0x7fffffff])+"'*n",1000+1),"-------------------+"); } -mixed b() { return 0; } -.... -test 4705, expected result: EQ -mixed a() { return search(sprintf("%'"+("-------------------+"[1..0x7fffffff])+"'*n" ,1000+1),"-------------------+"); } -mixed b() { return -1; } -.... -test 4706, expected result: EQ -mixed a() { return search(sprintf("%'"+("-------------------+"[1..0x7fffffff])+"'*n"+"-------------------+",1000+1),"-------------------+"); } -mixed b() { return 1000+1; } -.... -test 4707, expected result: EQ -mixed a() { return search(sprintf("%'"+("-------------------+"[1..0x7fffffff])+"'*n"+"-------------------+"+"%'"+("-------------------+"[1..0x7fffffff])+"'*n",1000+1,1000+1),"-------------------+"); } -mixed b() { return 1000+1; } -.... -test 4708, expected result: EQ -mixed a() { return search(sprintf("-------------------+"+"%'"+("-------------------+"[1..0x7fffffff])+"'*n",1000+2),"-------------------+"); } -mixed b() { return 0; } -.... -test 4709, expected result: EQ -mixed a() { return search(sprintf("%'"+("-------------------+"[1..0x7fffffff])+"'*n" ,1000+2),"-------------------+"); } -mixed b() { return -1; } -.... -test 4710, expected result: EQ -mixed a() { return search(sprintf("%'"+("-------------------+"[1..0x7fffffff])+"'*n"+"-------------------+",1000+2),"-------------------+"); } -mixed b() { return 1000+2; } -.... -test 4711, expected result: EQ -mixed a() { return search(sprintf("%'"+("-------------------+"[1..0x7fffffff])+"'*n"+"-------------------+"+"%'"+("-------------------+"[1..0x7fffffff])+"'*n",1000+2,1000+2),"-------------------+"); } -mixed b() { return 1000+2; } -.... -test 4712, expected result: EQ -mixed a() { return search(sprintf("-------------------+"+"%'"+("-------------------+"[1..0x7fffffff])+"'*n",1000+3),"-------------------+"); } -mixed b() { return 0; } -.... -test 4713, expected result: EQ -mixed a() { return search(sprintf("%'"+("-------------------+"[1..0x7fffffff])+"'*n" ,1000+3),"-------------------+"); } -mixed b() { return -1; } -.... -test 4714, expected result: EQ -mixed a() { return search(sprintf("%'"+("-------------------+"[1..0x7fffffff])+"'*n"+"-------------------+",1000+3),"-------------------+"); } -mixed b() { return 1000+3; } -.... -test 4715, expected result: EQ -mixed a() { return search(sprintf("%'"+("-------------------+"[1..0x7fffffff])+"'*n"+"-------------------+"+"%'"+("-------------------+"[1..0x7fffffff])+"'*n",1000+3,1000+3),"-------------------+"); } -mixed b() { return 1000+3; } -.... -test 4716, expected result: EQ -mixed a() { return search(sprintf("-------------------+"+"%'"+("-------------------+"[1..0x7fffffff])+"'*n",100000),"-------------------+"); } -mixed b() { return 0; } -.... -test 4717, expected result: EQ -mixed a() { return search(sprintf("%'"+("-------------------+"[1..0x7fffffff])+"'*n" ,100000),"-------------------+"); } -mixed b() { return -1; } -.... -test 4718, expected result: EQ -mixed a() { return search(sprintf("%'"+("-------------------+"[1..0x7fffffff])+"'*n"+"-------------------+",100000),"-------------------+"); } -mixed b() { return 100000; } -.... -test 4719, expected result: EQ -mixed a() { return search(sprintf("%'"+("-------------------+"[1..0x7fffffff])+"'*n"+"-------------------+"+"%'"+("-------------------+"[1..0x7fffffff])+"'*n",100000,100000),"-------------------+"); } -mixed b() { return 100000; } -.... -test 4720, expected result: EQ -mixed a() { return search(sprintf("-------------------+"+"%'"+("-------------------+"[1..0x7fffffff])+"'*n",100000+1),"-------------------+"); } -mixed b() { return 0; } -.... -test 4721, expected result: EQ -mixed a() { return search(sprintf("%'"+("-------------------+"[1..0x7fffffff])+"'*n" ,100000+1),"-------------------+"); } -mixed b() { return -1; } -.... -test 4722, expected result: EQ -mixed a() { return search(sprintf("%'"+("-------------------+"[1..0x7fffffff])+"'*n"+"-------------------+",100000+1),"-------------------+"); } -mixed b() { return 100000+1; } -.... -test 4723, expected result: EQ -mixed a() { return search(sprintf("%'"+("-------------------+"[1..0x7fffffff])+"'*n"+"-------------------+"+"%'"+("-------------------+"[1..0x7fffffff])+"'*n",100000+1,100000+1),"-------------------+"); } -mixed b() { return 100000+1; } -.... -test 4724, expected result: EQ -mixed a() { return search(sprintf("-------------------+"+"%'"+("-------------------+"[1..0x7fffffff])+"'*n",100000+2),"-------------------+"); } -mixed b() { return 0; } -.... -test 4725, expected result: EQ -mixed a() { return search(sprintf("%'"+("-------------------+"[1..0x7fffffff])+"'*n" ,100000+2),"-------------------+"); } -mixed b() { return -1; } -.... -test 4726, expected result: EQ -mixed a() { return search(sprintf("%'"+("-------------------+"[1..0x7fffffff])+"'*n"+"-------------------+",100000+2),"-------------------+"); } -mixed b() { return 100000+2; } -.... -test 4727, expected result: EQ -mixed a() { return search(sprintf("%'"+("-------------------+"[1..0x7fffffff])+"'*n"+"-------------------+"+"%'"+("-------------------+"[1..0x7fffffff])+"'*n",100000+2,100000+2),"-------------------+"); } -mixed b() { return 100000+2; } -.... -test 4728, expected result: EQ -mixed a() { return search(sprintf("-------------------+"+"%'"+("-------------------+"[1..0x7fffffff])+"'*n",100000+3),"-------------------+"); } -mixed b() { return 0; } -.... -test 4729, expected result: EQ -mixed a() { return search(sprintf("%'"+("-------------------+"[1..0x7fffffff])+"'*n" ,100000+3),"-------------------+"); } -mixed b() { return -1; } -.... -test 4730, expected result: EQ -mixed a() { return search(sprintf("%'"+("-------------------+"[1..0x7fffffff])+"'*n"+"-------------------+",100000+3),"-------------------+"); } -mixed b() { return 100000+3; } -.... -test 4731, expected result: EQ -mixed a() { return search(sprintf("%'"+("-------------------+"[1..0x7fffffff])+"'*n"+"-------------------+"+"%'"+("-------------------+"[1..0x7fffffff])+"'*n",100000+3,100000+3),"-------------------+"); } -mixed b() { return 100000+3; } -.... -test 4732, expected result: EQ -mixed a() { return search(sprintf("+-------------------"+"%'"+"+-*"+"'*n",10),"+-------------------"); } -mixed b() { return 0; } -.... -test 4733, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n" ,10),"+-------------------"); } -mixed b() { return -1; } -.... -test 4734, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+"+-------------------",10),"+-------------------"); } -mixed b() { return 10; } -.... -test 4735, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+"+-------------------"+"%'"+"+-*"+"'*n",10,10),"+-------------------"); } -mixed b() { return 10; } -.... -test 4736, expected result: EQ -mixed a() { return search(sprintf("+-------------------"+"%'"+"+-*"+"'*n",10+1),"+-------------------"); } -mixed b() { return 0; } -.... -test 4737, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n" ,10+1),"+-------------------"); } -mixed b() { return -1; } -.... -test 4738, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+"+-------------------",10+1),"+-------------------"); } -mixed b() { return 10+1; } -.... -test 4739, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+"+-------------------"+"%'"+"+-*"+"'*n",10+1,10+1),"+-------------------"); } -mixed b() { return 10+1; } -.... -test 4740, expected result: EQ -mixed a() { return search(sprintf("+-------------------"+"%'"+"+-*"+"'*n",10+2),"+-------------------"); } -mixed b() { return 0; } -.... -test 4741, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n" ,10+2),"+-------------------"); } -mixed b() { return -1; } -.... -test 4742, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+"+-------------------",10+2),"+-------------------"); } -mixed b() { return 10+2; } -.... -test 4743, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+"+-------------------"+"%'"+"+-*"+"'*n",10+2,10+2),"+-------------------"); } -mixed b() { return 10+2; } -.... -test 4744, expected result: EQ -mixed a() { return search(sprintf("+-------------------"+"%'"+"+-*"+"'*n",10+3),"+-------------------"); } -mixed b() { return 0; } -.... -test 4745, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n" ,10+3),"+-------------------"); } -mixed b() { return -1; } -.... -test 4746, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+"+-------------------",10+3),"+-------------------"); } -mixed b() { return 10+3; } -.... -test 4747, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+"+-------------------"+"%'"+"+-*"+"'*n",10+3,10+3),"+-------------------"); } -mixed b() { return 10+3; } -.... -test 4748, expected result: EQ -mixed a() { return search(sprintf("+-------------------"+"%'"+"+-*"+"'*n",1000),"+-------------------"); } -mixed b() { return 0; } -.... -test 4749, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n" ,1000),"+-------------------"); } -mixed b() { return -1; } -.... -test 4750, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+"+-------------------",1000),"+-------------------"); } -mixed b() { return 1000; } -.... -test 4751, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+"+-------------------"+"%'"+"+-*"+"'*n",1000,1000),"+-------------------"); } -mixed b() { return 1000; } -.... -test 4752, expected result: EQ -mixed a() { return search(sprintf("+-------------------"+"%'"+"+-*"+"'*n",1000+1),"+-------------------"); } -mixed b() { return 0; } -.... -test 4753, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n" ,1000+1),"+-------------------"); } -mixed b() { return -1; } -.... -test 4754, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+"+-------------------",1000+1),"+-------------------"); } -mixed b() { return 1000+1; } -.... -test 4755, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+"+-------------------"+"%'"+"+-*"+"'*n",1000+1,1000+1),"+-------------------"); } -mixed b() { return 1000+1; } -.... -test 4756, expected result: EQ -mixed a() { return search(sprintf("+-------------------"+"%'"+"+-*"+"'*n",1000+2),"+-------------------"); } -mixed b() { return 0; } -.... -test 4757, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n" ,1000+2),"+-------------------"); } -mixed b() { return -1; } -.... -test 4758, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+"+-------------------",1000+2),"+-------------------"); } -mixed b() { return 1000+2; } -.... -test 4759, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+"+-------------------"+"%'"+"+-*"+"'*n",1000+2,1000+2),"+-------------------"); } -mixed b() { return 1000+2; } -.... -test 4760, expected result: EQ -mixed a() { return search(sprintf("+-------------------"+"%'"+"+-*"+"'*n",1000+3),"+-------------------"); } -mixed b() { return 0; } -.... -test 4761, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n" ,1000+3),"+-------------------"); } -mixed b() { return -1; } -.... -test 4762, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+"+-------------------",1000+3),"+-------------------"); } -mixed b() { return 1000+3; } -.... -test 4763, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+"+-------------------"+"%'"+"+-*"+"'*n",1000+3,1000+3),"+-------------------"); } -mixed b() { return 1000+3; } -.... -test 4764, expected result: EQ -mixed a() { return search(sprintf("+-------------------"+"%'"+"+-*"+"'*n",100000),"+-------------------"); } -mixed b() { return 0; } -.... -test 4765, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n" ,100000),"+-------------------"); } -mixed b() { return -1; } -.... -test 4766, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+"+-------------------",100000),"+-------------------"); } -mixed b() { return 100000; } -.... -test 4767, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+"+-------------------"+"%'"+"+-*"+"'*n",100000,100000),"+-------------------"); } -mixed b() { return 100000; } -.... -test 4768, expected result: EQ -mixed a() { return search(sprintf("+-------------------"+"%'"+"+-*"+"'*n",100000+1),"+-------------------"); } -mixed b() { return 0; } -.... -test 4769, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n" ,100000+1),"+-------------------"); } -mixed b() { return -1; } -.... -test 4770, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+"+-------------------",100000+1),"+-------------------"); } -mixed b() { return 100000+1; } -.... -test 4771, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+"+-------------------"+"%'"+"+-*"+"'*n",100000+1,100000+1),"+-------------------"); } -mixed b() { return 100000+1; } -.... -test 4772, expected result: EQ -mixed a() { return search(sprintf("+-------------------"+"%'"+"+-*"+"'*n",100000+2),"+-------------------"); } -mixed b() { return 0; } -.... -test 4773, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n" ,100000+2),"+-------------------"); } -mixed b() { return -1; } -.... -test 4774, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+"+-------------------",100000+2),"+-------------------"); } -mixed b() { return 100000+2; } -.... -test 4775, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+"+-------------------"+"%'"+"+-*"+"'*n",100000+2,100000+2),"+-------------------"); } -mixed b() { return 100000+2; } -.... -test 4776, expected result: EQ -mixed a() { return search(sprintf("+-------------------"+"%'"+"+-*"+"'*n",100000+3),"+-------------------"); } -mixed b() { return 0; } -.... -test 4777, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n" ,100000+3),"+-------------------"); } -mixed b() { return -1; } -.... -test 4778, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+"+-------------------",100000+3),"+-------------------"); } -mixed b() { return 100000+3; } -.... -test 4779, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+"+-------------------"+"%'"+"+-*"+"'*n",100000+3,100000+3),"+-------------------"); } -mixed b() { return 100000+3; } -.... -test 4780, expected result: EQ -mixed a() { return search(sprintf("+-------------------"+"%'"+("+-------------------"[0..strlen("+-------------------")-2])+"'*n",10),"+-------------------"); } -mixed b() { return 0; } -.... -test 4781, expected result: EQ -mixed a() { return search(sprintf("%'"+("+-------------------"[0..strlen("+-------------------")-2])+"'*n" ,10),"+-------------------"); } -mixed b() { return -1; } -.... -test 4782, expected result: EQ -mixed a() { return search(sprintf("%'"+("+-------------------"[0..strlen("+-------------------")-2])+"'*n"+"+-------------------",10),"+-------------------"); } -mixed b() { return 10; } -.... -test 4783, expected result: EQ -mixed a() { return search(sprintf("%'"+("+-------------------"[0..strlen("+-------------------")-2])+"'*n"+"+-------------------"+"%'"+("+-------------------"[0..strlen("+-------------------")-2])+"'*n",10,10),"+-------------------"); } -mixed b() { return 10; } -.... -test 4784, expected result: EQ -mixed a() { return search(sprintf("+-------------------"+"%'"+("+-------------------"[0..strlen("+-------------------")-2])+"'*n",10+1),"+-------------------"); } -mixed b() { return 0; } -.... -test 4785, expected result: EQ -mixed a() { return search(sprintf("%'"+("+-------------------"[0..strlen("+-------------------")-2])+"'*n" ,10+1),"+-------------------"); } -mixed b() { return -1; } -.... -test 4786, expected result: EQ -mixed a() { return search(sprintf("%'"+("+-------------------"[0..strlen("+-------------------")-2])+"'*n"+"+-------------------",10+1),"+-------------------"); } -mixed b() { return 10+1; } -.... -test 4787, expected result: EQ -mixed a() { return search(sprintf("%'"+("+-------------------"[0..strlen("+-------------------")-2])+"'*n"+"+-------------------"+"%'"+("+-------------------"[0..strlen("+-------------------")-2])+"'*n",10+1,10+1),"+-------------------"); } -mixed b() { return 10+1; } -.... -test 4788, expected result: EQ -mixed a() { return search(sprintf("+-------------------"+"%'"+("+-------------------"[0..strlen("+-------------------")-2])+"'*n",10+2),"+-------------------"); } -mixed b() { return 0; } -.... -test 4789, expected result: EQ -mixed a() { return search(sprintf("%'"+("+-------------------"[0..strlen("+-------------------")-2])+"'*n" ,10+2),"+-------------------"); } -mixed b() { return -1; } -.... -test 4790, expected result: EQ -mixed a() { return search(sprintf("%'"+("+-------------------"[0..strlen("+-------------------")-2])+"'*n"+"+-------------------",10+2),"+-------------------"); } -mixed b() { return 10+2; } -.... -test 4791, expected result: EQ -mixed a() { return search(sprintf("%'"+("+-------------------"[0..strlen("+-------------------")-2])+"'*n"+"+-------------------"+"%'"+("+-------------------"[0..strlen("+-------------------")-2])+"'*n",10+2,10+2),"+-------------------"); } -mixed b() { return 10+2; } -.... -test 4792, expected result: EQ -mixed a() { return search(sprintf("+-------------------"+"%'"+("+-------------------"[0..strlen("+-------------------")-2])+"'*n",10+3),"+-------------------"); } -mixed b() { return 0; } -.... -test 4793, expected result: EQ -mixed a() { return search(sprintf("%'"+("+-------------------"[0..strlen("+-------------------")-2])+"'*n" ,10+3),"+-------------------"); } -mixed b() { return -1; } -.... -test 4794, expected result: EQ -mixed a() { return search(sprintf("%'"+("+-------------------"[0..strlen("+-------------------")-2])+"'*n"+"+-------------------",10+3),"+-------------------"); } -mixed b() { return 10+3; } -.... -test 4795, expected result: EQ -mixed a() { return search(sprintf("%'"+("+-------------------"[0..strlen("+-------------------")-2])+"'*n"+"+-------------------"+"%'"+("+-------------------"[0..strlen("+-------------------")-2])+"'*n",10+3,10+3),"+-------------------"); } -mixed b() { return 10+3; } -.... -test 4796, expected result: EQ -mixed a() { return search(sprintf("+-------------------"+"%'"+("+-------------------"[0..strlen("+-------------------")-2])+"'*n",1000),"+-------------------"); } -mixed b() { return 0; } -.... -test 4797, expected result: EQ -mixed a() { return search(sprintf("%'"+("+-------------------"[0..strlen("+-------------------")-2])+"'*n" ,1000),"+-------------------"); } -mixed b() { return -1; } -.... -test 4798, expected result: EQ -mixed a() { return search(sprintf("%'"+("+-------------------"[0..strlen("+-------------------")-2])+"'*n"+"+-------------------",1000),"+-------------------"); } -mixed b() { return 1000; } -.... -test 4799, expected result: EQ -mixed a() { return search(sprintf("%'"+("+-------------------"[0..strlen("+-------------------")-2])+"'*n"+"+-------------------"+"%'"+("+-------------------"[0..strlen("+-------------------")-2])+"'*n",1000,1000),"+-------------------"); } -mixed b() { return 1000; } -.... -test 4800, expected result: EQ -mixed a() { return search(sprintf("+-------------------"+"%'"+("+-------------------"[0..strlen("+-------------------")-2])+"'*n",1000+1),"+-------------------"); } -mixed b() { return 0; } -.... -test 4801, expected result: EQ -mixed a() { return search(sprintf("%'"+("+-------------------"[0..strlen("+-------------------")-2])+"'*n" ,1000+1),"+-------------------"); } -mixed b() { return -1; } -.... -test 4802, expected result: EQ -mixed a() { return search(sprintf("%'"+("+-------------------"[0..strlen("+-------------------")-2])+"'*n"+"+-------------------",1000+1),"+-------------------"); } -mixed b() { return 1000+1; } -.... -test 4803, expected result: EQ -mixed a() { return search(sprintf("%'"+("+-------------------"[0..strlen("+-------------------")-2])+"'*n"+"+-------------------"+"%'"+("+-------------------"[0..strlen("+-------------------")-2])+"'*n",1000+1,1000+1),"+-------------------"); } -mixed b() { return 1000+1; } -.... -test 4804, expected result: EQ -mixed a() { return search(sprintf("+-------------------"+"%'"+("+-------------------"[0..strlen("+-------------------")-2])+"'*n",1000+2),"+-------------------"); } -mixed b() { return 0; } -.... -test 4805, expected result: EQ -mixed a() { return search(sprintf("%'"+("+-------------------"[0..strlen("+-------------------")-2])+"'*n" ,1000+2),"+-------------------"); } -mixed b() { return -1; } -.... -test 4806, expected result: EQ -mixed a() { return search(sprintf("%'"+("+-------------------"[0..strlen("+-------------------")-2])+"'*n"+"+-------------------",1000+2),"+-------------------"); } -mixed b() { return 1000+2; } -.... -test 4807, expected result: EQ -mixed a() { return search(sprintf("%'"+("+-------------------"[0..strlen("+-------------------")-2])+"'*n"+"+-------------------"+"%'"+("+-------------------"[0..strlen("+-------------------")-2])+"'*n",1000+2,1000+2),"+-------------------"); } -mixed b() { return 1000+2; } -.... -test 4808, expected result: EQ -mixed a() { return search(sprintf("+-------------------"+"%'"+("+-------------------"[0..strlen("+-------------------")-2])+"'*n",1000+3),"+-------------------"); } -mixed b() { return 0; } -.... -test 4809, expected result: EQ -mixed a() { return search(sprintf("%'"+("+-------------------"[0..strlen("+-------------------")-2])+"'*n" ,1000+3),"+-------------------"); } -mixed b() { return -1; } -.... -test 4810, expected result: EQ -mixed a() { return search(sprintf("%'"+("+-------------------"[0..strlen("+-------------------")-2])+"'*n"+"+-------------------",1000+3),"+-------------------"); } -mixed b() { return 1000+3; } -.... -test 4811, expected result: EQ -mixed a() { return search(sprintf("%'"+("+-------------------"[0..strlen("+-------------------")-2])+"'*n"+"+-------------------"+"%'"+("+-------------------"[0..strlen("+-------------------")-2])+"'*n",1000+3,1000+3),"+-------------------"); } -mixed b() { return 1000+3; } -.... -test 4812, expected result: EQ -mixed a() { return search(sprintf("+-------------------"+"%'"+("+-------------------"[0..strlen("+-------------------")-2])+"'*n",100000),"+-------------------"); } -mixed b() { return 0; } -.... -test 4813, expected result: EQ -mixed a() { return search(sprintf("%'"+("+-------------------"[0..strlen("+-------------------")-2])+"'*n" ,100000),"+-------------------"); } -mixed b() { return -1; } -.... -test 4814, expected result: EQ -mixed a() { return search(sprintf("%'"+("+-------------------"[0..strlen("+-------------------")-2])+"'*n"+"+-------------------",100000),"+-------------------"); } -mixed b() { return 100000; } -.... -test 4815, expected result: EQ -mixed a() { return search(sprintf("%'"+("+-------------------"[0..strlen("+-------------------")-2])+"'*n"+"+-------------------"+"%'"+("+-------------------"[0..strlen("+-------------------")-2])+"'*n",100000,100000),"+-------------------"); } -mixed b() { return 100000; } -.... -test 4816, expected result: EQ -mixed a() { return search(sprintf("+-------------------"+"%'"+("+-------------------"[0..strlen("+-------------------")-2])+"'*n",100000+1),"+-------------------"); } -mixed b() { return 0; } -.... -test 4817, expected result: EQ -mixed a() { return search(sprintf("%'"+("+-------------------"[0..strlen("+-------------------")-2])+"'*n" ,100000+1),"+-------------------"); } -mixed b() { return -1; } -.... -test 4818, expected result: EQ -mixed a() { return search(sprintf("%'"+("+-------------------"[0..strlen("+-------------------")-2])+"'*n"+"+-------------------",100000+1),"+-------------------"); } -mixed b() { return 100000+1; } -.... -test 4819, expected result: EQ -mixed a() { return search(sprintf("%'"+("+-------------------"[0..strlen("+-------------------")-2])+"'*n"+"+-------------------"+"%'"+("+-------------------"[0..strlen("+-------------------")-2])+"'*n",100000+1,100000+1),"+-------------------"); } -mixed b() { return 100000+1; } -.... -test 4820, expected result: EQ -mixed a() { return search(sprintf("+-------------------"+"%'"+("+-------------------"[0..strlen("+-------------------")-2])+"'*n",100000+2),"+-------------------"); } -mixed b() { return 0; } -.... -test 4821, expected result: EQ -mixed a() { return search(sprintf("%'"+("+-------------------"[0..strlen("+-------------------")-2])+"'*n" ,100000+2),"+-------------------"); } -mixed b() { return -1; } -.... -test 4822, expected result: EQ -mixed a() { return search(sprintf("%'"+("+-------------------"[0..strlen("+-------------------")-2])+"'*n"+"+-------------------",100000+2),"+-------------------"); } -mixed b() { return 100000+2; } -.... -test 4823, expected result: EQ -mixed a() { return search(sprintf("%'"+("+-------------------"[0..strlen("+-------------------")-2])+"'*n"+"+-------------------"+"%'"+("+-------------------"[0..strlen("+-------------------")-2])+"'*n",100000+2,100000+2),"+-------------------"); } -mixed b() { return 100000+2; } -.... -test 4824, expected result: EQ -mixed a() { return search(sprintf("+-------------------"+"%'"+("+-------------------"[0..strlen("+-------------------")-2])+"'*n",100000+3),"+-------------------"); } -mixed b() { return 0; } -.... -test 4825, expected result: EQ -mixed a() { return search(sprintf("%'"+("+-------------------"[0..strlen("+-------------------")-2])+"'*n" ,100000+3),"+-------------------"); } -mixed b() { return -1; } -.... -test 4826, expected result: EQ -mixed a() { return search(sprintf("%'"+("+-------------------"[0..strlen("+-------------------")-2])+"'*n"+"+-------------------",100000+3),"+-------------------"); } -mixed b() { return 100000+3; } -.... -test 4827, expected result: EQ -mixed a() { return search(sprintf("%'"+("+-------------------"[0..strlen("+-------------------")-2])+"'*n"+"+-------------------"+"%'"+("+-------------------"[0..strlen("+-------------------")-2])+"'*n",100000+3,100000+3),"+-------------------"); } -mixed b() { return 100000+3; } -.... -test 4828, expected result: EQ -mixed a() { return search(sprintf("+-------------------"+"%'"+("+-------------------"[1..0x7fffffff])+"'*n",10),"+-------------------"); } -mixed b() { return 0; } -.... -test 4829, expected result: EQ -mixed a() { return search(sprintf("%'"+("+-------------------"[1..0x7fffffff])+"'*n" ,10),"+-------------------"); } -mixed b() { return -1; } -.... -test 4830, expected result: EQ -mixed a() { return search(sprintf("%'"+("+-------------------"[1..0x7fffffff])+"'*n"+"+-------------------",10),"+-------------------"); } -mixed b() { return 10; } -.... -test 4831, expected result: EQ -mixed a() { return search(sprintf("%'"+("+-------------------"[1..0x7fffffff])+"'*n"+"+-------------------"+"%'"+("+-------------------"[1..0x7fffffff])+"'*n",10,10),"+-------------------"); } -mixed b() { return 10; } -.... -test 4832, expected result: EQ -mixed a() { return search(sprintf("+-------------------"+"%'"+("+-------------------"[1..0x7fffffff])+"'*n",10+1),"+-------------------"); } -mixed b() { return 0; } -.... -test 4833, expected result: EQ -mixed a() { return search(sprintf("%'"+("+-------------------"[1..0x7fffffff])+"'*n" ,10+1),"+-------------------"); } -mixed b() { return -1; } -.... -test 4834, expected result: EQ -mixed a() { return search(sprintf("%'"+("+-------------------"[1..0x7fffffff])+"'*n"+"+-------------------",10+1),"+-------------------"); } -mixed b() { return 10+1; } -.... -test 4835, expected result: EQ -mixed a() { return search(sprintf("%'"+("+-------------------"[1..0x7fffffff])+"'*n"+"+-------------------"+"%'"+("+-------------------"[1..0x7fffffff])+"'*n",10+1,10+1),"+-------------------"); } -mixed b() { return 10+1; } -.... -test 4836, expected result: EQ -mixed a() { return search(sprintf("+-------------------"+"%'"+("+-------------------"[1..0x7fffffff])+"'*n",10+2),"+-------------------"); } -mixed b() { return 0; } -.... -test 4837, expected result: EQ -mixed a() { return search(sprintf("%'"+("+-------------------"[1..0x7fffffff])+"'*n" ,10+2),"+-------------------"); } -mixed b() { return -1; } -.... -test 4838, expected result: EQ -mixed a() { return search(sprintf("%'"+("+-------------------"[1..0x7fffffff])+"'*n"+"+-------------------",10+2),"+-------------------"); } -mixed b() { return 10+2; } -.... -test 4839, expected result: EQ -mixed a() { return search(sprintf("%'"+("+-------------------"[1..0x7fffffff])+"'*n"+"+-------------------"+"%'"+("+-------------------"[1..0x7fffffff])+"'*n",10+2,10+2),"+-------------------"); } -mixed b() { return 10+2; } -.... -test 4840, expected result: EQ -mixed a() { return search(sprintf("+-------------------"+"%'"+("+-------------------"[1..0x7fffffff])+"'*n",10+3),"+-------------------"); } -mixed b() { return 0; } -.... -test 4841, expected result: EQ -mixed a() { return search(sprintf("%'"+("+-------------------"[1..0x7fffffff])+"'*n" ,10+3),"+-------------------"); } -mixed b() { return -1; } -.... -test 4842, expected result: EQ -mixed a() { return search(sprintf("%'"+("+-------------------"[1..0x7fffffff])+"'*n"+"+-------------------",10+3),"+-------------------"); } -mixed b() { return 10+3; } -.... -test 4843, expected result: EQ -mixed a() { return search(sprintf("%'"+("+-------------------"[1..0x7fffffff])+"'*n"+"+-------------------"+"%'"+("+-------------------"[1..0x7fffffff])+"'*n",10+3,10+3),"+-------------------"); } -mixed b() { return 10+3; } -.... -test 4844, expected result: EQ -mixed a() { return search(sprintf("+-------------------"+"%'"+("+-------------------"[1..0x7fffffff])+"'*n",1000),"+-------------------"); } -mixed b() { return 0; } -.... -test 4845, expected result: EQ -mixed a() { return search(sprintf("%'"+("+-------------------"[1..0x7fffffff])+"'*n" ,1000),"+-------------------"); } -mixed b() { return -1; } -.... -test 4846, expected result: EQ -mixed a() { return search(sprintf("%'"+("+-------------------"[1..0x7fffffff])+"'*n"+"+-------------------",1000),"+-------------------"); } -mixed b() { return 1000; } -.... -test 4847, expected result: EQ -mixed a() { return search(sprintf("%'"+("+-------------------"[1..0x7fffffff])+"'*n"+"+-------------------"+"%'"+("+-------------------"[1..0x7fffffff])+"'*n",1000,1000),"+-------------------"); } -mixed b() { return 1000; } -.... -test 4848, expected result: EQ -mixed a() { return search(sprintf("+-------------------"+"%'"+("+-------------------"[1..0x7fffffff])+"'*n",1000+1),"+-------------------"); } -mixed b() { return 0; } -.... -test 4849, expected result: EQ -mixed a() { return search(sprintf("%'"+("+-------------------"[1..0x7fffffff])+"'*n" ,1000+1),"+-------------------"); } -mixed b() { return -1; } -.... -test 4850, expected result: EQ -mixed a() { return search(sprintf("%'"+("+-------------------"[1..0x7fffffff])+"'*n"+"+-------------------",1000+1),"+-------------------"); } -mixed b() { return 1000+1; } -.... -test 4851, expected result: EQ -mixed a() { return search(sprintf("%'"+("+-------------------"[1..0x7fffffff])+"'*n"+"+-------------------"+"%'"+("+-------------------"[1..0x7fffffff])+"'*n",1000+1,1000+1),"+-------------------"); } -mixed b() { return 1000+1; } -.... -test 4852, expected result: EQ -mixed a() { return search(sprintf("+-------------------"+"%'"+("+-------------------"[1..0x7fffffff])+"'*n",1000+2),"+-------------------"); } -mixed b() { return 0; } -.... -test 4853, expected result: EQ -mixed a() { return search(sprintf("%'"+("+-------------------"[1..0x7fffffff])+"'*n" ,1000+2),"+-------------------"); } -mixed b() { return -1; } -.... -test 4854, expected result: EQ -mixed a() { return search(sprintf("%'"+("+-------------------"[1..0x7fffffff])+"'*n"+"+-------------------",1000+2),"+-------------------"); } -mixed b() { return 1000+2; } -.... -test 4855, expected result: EQ -mixed a() { return search(sprintf("%'"+("+-------------------"[1..0x7fffffff])+"'*n"+"+-------------------"+"%'"+("+-------------------"[1..0x7fffffff])+"'*n",1000+2,1000+2),"+-------------------"); } -mixed b() { return 1000+2; } -.... -test 4856, expected result: EQ -mixed a() { return search(sprintf("+-------------------"+"%'"+("+-------------------"[1..0x7fffffff])+"'*n",1000+3),"+-------------------"); } -mixed b() { return 0; } -.... -test 4857, expected result: EQ -mixed a() { return search(sprintf("%'"+("+-------------------"[1..0x7fffffff])+"'*n" ,1000+3),"+-------------------"); } -mixed b() { return -1; } -.... -test 4858, expected result: EQ -mixed a() { return search(sprintf("%'"+("+-------------------"[1..0x7fffffff])+"'*n"+"+-------------------",1000+3),"+-------------------"); } -mixed b() { return 1000+3; } -.... -test 4859, expected result: EQ -mixed a() { return search(sprintf("%'"+("+-------------------"[1..0x7fffffff])+"'*n"+"+-------------------"+"%'"+("+-------------------"[1..0x7fffffff])+"'*n",1000+3,1000+3),"+-------------------"); } -mixed b() { return 1000+3; } -.... -test 4860, expected result: EQ -mixed a() { return search(sprintf("+-------------------"+"%'"+("+-------------------"[1..0x7fffffff])+"'*n",100000),"+-------------------"); } -mixed b() { return 0; } -.... -test 4861, expected result: EQ -mixed a() { return search(sprintf("%'"+("+-------------------"[1..0x7fffffff])+"'*n" ,100000),"+-------------------"); } -mixed b() { return -1; } -.... -test 4862, expected result: EQ -mixed a() { return search(sprintf("%'"+("+-------------------"[1..0x7fffffff])+"'*n"+"+-------------------",100000),"+-------------------"); } -mixed b() { return 100000; } -.... -test 4863, expected result: EQ -mixed a() { return search(sprintf("%'"+("+-------------------"[1..0x7fffffff])+"'*n"+"+-------------------"+"%'"+("+-------------------"[1..0x7fffffff])+"'*n",100000,100000),"+-------------------"); } -mixed b() { return 100000; } -.... -test 4864, expected result: EQ -mixed a() { return search(sprintf("+-------------------"+"%'"+("+-------------------"[1..0x7fffffff])+"'*n",100000+1),"+-------------------"); } -mixed b() { return 0; } -.... -test 4865, expected result: EQ -mixed a() { return search(sprintf("%'"+("+-------------------"[1..0x7fffffff])+"'*n" ,100000+1),"+-------------------"); } -mixed b() { return -1; } -.... -test 4866, expected result: EQ -mixed a() { return search(sprintf("%'"+("+-------------------"[1..0x7fffffff])+"'*n"+"+-------------------",100000+1),"+-------------------"); } -mixed b() { return 100000+1; } -.... -test 4867, expected result: EQ -mixed a() { return search(sprintf("%'"+("+-------------------"[1..0x7fffffff])+"'*n"+"+-------------------"+"%'"+("+-------------------"[1..0x7fffffff])+"'*n",100000+1,100000+1),"+-------------------"); } -mixed b() { return 100000+1; } -.... -test 4868, expected result: EQ -mixed a() { return search(sprintf("+-------------------"+"%'"+("+-------------------"[1..0x7fffffff])+"'*n",100000+2),"+-------------------"); } -mixed b() { return 0; } -.... -test 4869, expected result: EQ -mixed a() { return search(sprintf("%'"+("+-------------------"[1..0x7fffffff])+"'*n" ,100000+2),"+-------------------"); } -mixed b() { return -1; } -.... -test 4870, expected result: EQ -mixed a() { return search(sprintf("%'"+("+-------------------"[1..0x7fffffff])+"'*n"+"+-------------------",100000+2),"+-------------------"); } -mixed b() { return 100000+2; } -.... -test 4871, expected result: EQ -mixed a() { return search(sprintf("%'"+("+-------------------"[1..0x7fffffff])+"'*n"+"+-------------------"+"%'"+("+-------------------"[1..0x7fffffff])+"'*n",100000+2,100000+2),"+-------------------"); } -mixed b() { return 100000+2; } -.... -test 4872, expected result: EQ -mixed a() { return search(sprintf("+-------------------"+"%'"+("+-------------------"[1..0x7fffffff])+"'*n",100000+3),"+-------------------"); } -mixed b() { return 0; } -.... -test 4873, expected result: EQ -mixed a() { return search(sprintf("%'"+("+-------------------"[1..0x7fffffff])+"'*n" ,100000+3),"+-------------------"); } -mixed b() { return -1; } -.... -test 4874, expected result: EQ -mixed a() { return search(sprintf("%'"+("+-------------------"[1..0x7fffffff])+"'*n"+"+-------------------",100000+3),"+-------------------"); } -mixed b() { return 100000+3; } -.... -test 4875, expected result: EQ -mixed a() { return search(sprintf("%'"+("+-------------------"[1..0x7fffffff])+"'*n"+"+-------------------"+"%'"+("+-------------------"[1..0x7fffffff])+"'*n",100000+3,100000+3),"+-------------------"); } -mixed b() { return 100000+3; } -.... -test 4876, expected result: EQ -mixed a() { return search(sprintf(sprintf("%'argel-bargel glop-glyf?'2000n")+"%'"+"+-*"+"'*n",10),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 0; } -.... -test 4877, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n" ,10),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return -1; } -.... -test 4878, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+sprintf("%'argel-bargel glop-glyf?'2000n"),10),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 10; } -.... -test 4879, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+sprintf("%'argel-bargel glop-glyf?'2000n")+"%'"+"+-*"+"'*n",10,10),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 10; } -.... -test 4880, expected result: EQ -mixed a() { return search(sprintf(sprintf("%'argel-bargel glop-glyf?'2000n")+"%'"+"+-*"+"'*n",10+1),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 0; } -.... -test 4881, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n" ,10+1),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return -1; } -.... -test 4882, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+sprintf("%'argel-bargel glop-glyf?'2000n"),10+1),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 10+1; } -.... -test 4883, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+sprintf("%'argel-bargel glop-glyf?'2000n")+"%'"+"+-*"+"'*n",10+1,10+1),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 10+1; } -.... -test 4884, expected result: EQ -mixed a() { return search(sprintf(sprintf("%'argel-bargel glop-glyf?'2000n")+"%'"+"+-*"+"'*n",10+2),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 0; } -.... -test 4885, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n" ,10+2),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return -1; } -.... -test 4886, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+sprintf("%'argel-bargel glop-glyf?'2000n"),10+2),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 10+2; } -.... -test 4887, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+sprintf("%'argel-bargel glop-glyf?'2000n")+"%'"+"+-*"+"'*n",10+2,10+2),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 10+2; } -.... -test 4888, expected result: EQ -mixed a() { return search(sprintf(sprintf("%'argel-bargel glop-glyf?'2000n")+"%'"+"+-*"+"'*n",10+3),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 0; } -.... -test 4889, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n" ,10+3),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return -1; } -.... -test 4890, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+sprintf("%'argel-bargel glop-glyf?'2000n"),10+3),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 10+3; } -.... -test 4891, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+sprintf("%'argel-bargel glop-glyf?'2000n")+"%'"+"+-*"+"'*n",10+3,10+3),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 10+3; } -.... -test 4892, expected result: EQ -mixed a() { return search(sprintf(sprintf("%'argel-bargel glop-glyf?'2000n")+"%'"+"+-*"+"'*n",1000),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 0; } -.... -test 4893, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n" ,1000),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return -1; } -.... -test 4894, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+sprintf("%'argel-bargel glop-glyf?'2000n"),1000),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 1000; } -.... -test 4895, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+sprintf("%'argel-bargel glop-glyf?'2000n")+"%'"+"+-*"+"'*n",1000,1000),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 1000; } -.... -test 4896, expected result: EQ -mixed a() { return search(sprintf(sprintf("%'argel-bargel glop-glyf?'2000n")+"%'"+"+-*"+"'*n",1000+1),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 0; } -.... -test 4897, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n" ,1000+1),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return -1; } -.... -test 4898, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+sprintf("%'argel-bargel glop-glyf?'2000n"),1000+1),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 1000+1; } -.... -test 4899, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+sprintf("%'argel-bargel glop-glyf?'2000n")+"%'"+"+-*"+"'*n",1000+1,1000+1),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 1000+1; } -.... -test 4900, expected result: EQ -mixed a() { return search(sprintf(sprintf("%'argel-bargel glop-glyf?'2000n")+"%'"+"+-*"+"'*n",1000+2),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 0; } -.... -test 4901, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n" ,1000+2),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return -1; } -.... -test 4902, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+sprintf("%'argel-bargel glop-glyf?'2000n"),1000+2),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 1000+2; } -.... -test 4903, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+sprintf("%'argel-bargel glop-glyf?'2000n")+"%'"+"+-*"+"'*n",1000+2,1000+2),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 1000+2; } -.... -test 4904, expected result: EQ -mixed a() { return search(sprintf(sprintf("%'argel-bargel glop-glyf?'2000n")+"%'"+"+-*"+"'*n",1000+3),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 0; } -.... -test 4905, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n" ,1000+3),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return -1; } -.... -test 4906, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+sprintf("%'argel-bargel glop-glyf?'2000n"),1000+3),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 1000+3; } -.... -test 4907, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+sprintf("%'argel-bargel glop-glyf?'2000n")+"%'"+"+-*"+"'*n",1000+3,1000+3),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 1000+3; } -.... -test 4908, expected result: EQ -mixed a() { return search(sprintf(sprintf("%'argel-bargel glop-glyf?'2000n")+"%'"+"+-*"+"'*n",100000),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 0; } -.... -test 4909, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n" ,100000),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return -1; } -.... -test 4910, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+sprintf("%'argel-bargel glop-glyf?'2000n"),100000),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 100000; } -.... -test 4911, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+sprintf("%'argel-bargel glop-glyf?'2000n")+"%'"+"+-*"+"'*n",100000,100000),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 100000; } -.... -test 4912, expected result: EQ -mixed a() { return search(sprintf(sprintf("%'argel-bargel glop-glyf?'2000n")+"%'"+"+-*"+"'*n",100000+1),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 0; } -.... -test 4913, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n" ,100000+1),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return -1; } -.... -test 4914, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+sprintf("%'argel-bargel glop-glyf?'2000n"),100000+1),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 100000+1; } -.... -test 4915, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+sprintf("%'argel-bargel glop-glyf?'2000n")+"%'"+"+-*"+"'*n",100000+1,100000+1),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 100000+1; } -.... -test 4916, expected result: EQ -mixed a() { return search(sprintf(sprintf("%'argel-bargel glop-glyf?'2000n")+"%'"+"+-*"+"'*n",100000+2),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 0; } -.... -test 4917, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n" ,100000+2),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return -1; } -.... -test 4918, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+sprintf("%'argel-bargel glop-glyf?'2000n"),100000+2),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 100000+2; } -.... -test 4919, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+sprintf("%'argel-bargel glop-glyf?'2000n")+"%'"+"+-*"+"'*n",100000+2,100000+2),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 100000+2; } -.... -test 4920, expected result: EQ -mixed a() { return search(sprintf(sprintf("%'argel-bargel glop-glyf?'2000n")+"%'"+"+-*"+"'*n",100000+3),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 0; } -.... -test 4921, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n" ,100000+3),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return -1; } -.... -test 4922, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+sprintf("%'argel-bargel glop-glyf?'2000n"),100000+3),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 100000+3; } -.... -test 4923, expected result: EQ -mixed a() { return search(sprintf("%'"+"+-*"+"'*n"+sprintf("%'argel-bargel glop-glyf?'2000n")+"%'"+"+-*"+"'*n",100000+3,100000+3),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 100000+3; } -.... -test 4924, expected result: EQ -mixed a() { return search(sprintf(sprintf("%'argel-bargel glop-glyf?'2000n")+"%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[0..strlen(sprintf("%'argel-bargel glop-glyf?'2000n"))-2])+"'*n",10),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 0; } -.... -test 4925, expected result: EQ -mixed a() { return search(sprintf("%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[0..strlen(sprintf("%'argel-bargel glop-glyf?'2000n"))-2])+"'*n" ,10),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return -1; } -.... -test 4926, expected result: EQ -mixed a() { return search(sprintf("%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[0..strlen(sprintf("%'argel-bargel glop-glyf?'2000n"))-2])+"'*n"+sprintf("%'argel-bargel glop-glyf?'2000n"),10),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 10; } -.... -test 4927, expected result: EQ -mixed a() { return search(sprintf("%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[0..strlen(sprintf("%'argel-bargel glop-glyf?'2000n"))-2])+"'*n"+sprintf("%'argel-bargel glop-glyf?'2000n")+"%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[0..strlen(sprintf("%'argel-bargel glop-glyf?'2000n"))-2])+"'*n",10,10),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 10; } -.... -test 4928, expected result: EQ -mixed a() { return search(sprintf(sprintf("%'argel-bargel glop-glyf?'2000n")+"%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[0..strlen(sprintf("%'argel-bargel glop-glyf?'2000n"))-2])+"'*n",10+1),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 0; } -.... -test 4929, expected result: EQ -mixed a() { return search(sprintf("%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[0..strlen(sprintf("%'argel-bargel glop-glyf?'2000n"))-2])+"'*n" ,10+1),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return -1; } -.... -test 4930, expected result: EQ -mixed a() { return search(sprintf("%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[0..strlen(sprintf("%'argel-bargel glop-glyf?'2000n"))-2])+"'*n"+sprintf("%'argel-bargel glop-glyf?'2000n"),10+1),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 10+1; } -.... -test 4931, expected result: EQ -mixed a() { return search(sprintf("%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[0..strlen(sprintf("%'argel-bargel glop-glyf?'2000n"))-2])+"'*n"+sprintf("%'argel-bargel glop-glyf?'2000n")+"%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[0..strlen(sprintf("%'argel-bargel glop-glyf?'2000n"))-2])+"'*n",10+1,10+1),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 10+1; } -.... -test 4932, expected result: EQ -mixed a() { return search(sprintf(sprintf("%'argel-bargel glop-glyf?'2000n")+"%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[0..strlen(sprintf("%'argel-bargel glop-glyf?'2000n"))-2])+"'*n",10+2),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 0; } -.... -test 4933, expected result: EQ -mixed a() { return search(sprintf("%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[0..strlen(sprintf("%'argel-bargel glop-glyf?'2000n"))-2])+"'*n" ,10+2),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return -1; } -.... -test 4934, expected result: EQ -mixed a() { return search(sprintf("%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[0..strlen(sprintf("%'argel-bargel glop-glyf?'2000n"))-2])+"'*n"+sprintf("%'argel-bargel glop-glyf?'2000n"),10+2),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 10+2; } -.... -test 4935, expected result: EQ -mixed a() { return search(sprintf("%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[0..strlen(sprintf("%'argel-bargel glop-glyf?'2000n"))-2])+"'*n"+sprintf("%'argel-bargel glop-glyf?'2000n")+"%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[0..strlen(sprintf("%'argel-bargel glop-glyf?'2000n"))-2])+"'*n",10+2,10+2),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 10+2; } -.... -test 4936, expected result: EQ -mixed a() { return search(sprintf(sprintf("%'argel-bargel glop-glyf?'2000n")+"%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[0..strlen(sprintf("%'argel-bargel glop-glyf?'2000n"))-2])+"'*n",10+3),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 0; } -.... -test 4937, expected result: EQ -mixed a() { return search(sprintf("%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[0..strlen(sprintf("%'argel-bargel glop-glyf?'2000n"))-2])+"'*n" ,10+3),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return -1; } -.... -test 4938, expected result: EQ -mixed a() { return search(sprintf("%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[0..strlen(sprintf("%'argel-bargel glop-glyf?'2000n"))-2])+"'*n"+sprintf("%'argel-bargel glop-glyf?'2000n"),10+3),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 10+3; } -.... -test 4939, expected result: EQ -mixed a() { return search(sprintf("%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[0..strlen(sprintf("%'argel-bargel glop-glyf?'2000n"))-2])+"'*n"+sprintf("%'argel-bargel glop-glyf?'2000n")+"%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[0..strlen(sprintf("%'argel-bargel glop-glyf?'2000n"))-2])+"'*n",10+3,10+3),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 10+3; } -.... -test 4940, expected result: EQ -mixed a() { return search(sprintf(sprintf("%'argel-bargel glop-glyf?'2000n")+"%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[0..strlen(sprintf("%'argel-bargel glop-glyf?'2000n"))-2])+"'*n",1000),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 0; } -.... -test 4941, expected result: EQ -mixed a() { return search(sprintf("%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[0..strlen(sprintf("%'argel-bargel glop-glyf?'2000n"))-2])+"'*n" ,1000),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return -1; } -.... -test 4942, expected result: EQ -mixed a() { return search(sprintf("%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[0..strlen(sprintf("%'argel-bargel glop-glyf?'2000n"))-2])+"'*n"+sprintf("%'argel-bargel glop-glyf?'2000n"),1000),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 1000; } -.... -test 4943, expected result: EQ -mixed a() { return search(sprintf("%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[0..strlen(sprintf("%'argel-bargel glop-glyf?'2000n"))-2])+"'*n"+sprintf("%'argel-bargel glop-glyf?'2000n")+"%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[0..strlen(sprintf("%'argel-bargel glop-glyf?'2000n"))-2])+"'*n",1000,1000),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 1000; } -.... -test 4944, expected result: EQ -mixed a() { return search(sprintf(sprintf("%'argel-bargel glop-glyf?'2000n")+"%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[0..strlen(sprintf("%'argel-bargel glop-glyf?'2000n"))-2])+"'*n",1000+1),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 0; } -.... -test 4945, expected result: EQ -mixed a() { return search(sprintf("%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[0..strlen(sprintf("%'argel-bargel glop-glyf?'2000n"))-2])+"'*n" ,1000+1),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return -1; } -.... -test 4946, expected result: EQ -mixed a() { return search(sprintf("%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[0..strlen(sprintf("%'argel-bargel glop-glyf?'2000n"))-2])+"'*n"+sprintf("%'argel-bargel glop-glyf?'2000n"),1000+1),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 1000+1; } -.... -test 4947, expected result: EQ -mixed a() { return search(sprintf("%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[0..strlen(sprintf("%'argel-bargel glop-glyf?'2000n"))-2])+"'*n"+sprintf("%'argel-bargel glop-glyf?'2000n")+"%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[0..strlen(sprintf("%'argel-bargel glop-glyf?'2000n"))-2])+"'*n",1000+1,1000+1),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 1000+1; } -.... -test 4948, expected result: EQ -mixed a() { return search(sprintf(sprintf("%'argel-bargel glop-glyf?'2000n")+"%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[0..strlen(sprintf("%'argel-bargel glop-glyf?'2000n"))-2])+"'*n",1000+2),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 0; } -.... -test 4949, expected result: EQ -mixed a() { return search(sprintf("%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[0..strlen(sprintf("%'argel-bargel glop-glyf?'2000n"))-2])+"'*n" ,1000+2),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return -1; } -.... -test 4950, expected result: EQ -mixed a() { return search(sprintf("%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[0..strlen(sprintf("%'argel-bargel glop-glyf?'2000n"))-2])+"'*n"+sprintf("%'argel-bargel glop-glyf?'2000n"),1000+2),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 1000+2; } -.... -test 4951, expected result: EQ -mixed a() { return search(sprintf("%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[0..strlen(sprintf("%'argel-bargel glop-glyf?'2000n"))-2])+"'*n"+sprintf("%'argel-bargel glop-glyf?'2000n")+"%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[0..strlen(sprintf("%'argel-bargel glop-glyf?'2000n"))-2])+"'*n",1000+2,1000+2),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 1000+2; } -.... -test 4952, expected result: EQ -mixed a() { return search(sprintf(sprintf("%'argel-bargel glop-glyf?'2000n")+"%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[0..strlen(sprintf("%'argel-bargel glop-glyf?'2000n"))-2])+"'*n",1000+3),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 0; } -.... -test 4953, expected result: EQ -mixed a() { return search(sprintf("%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[0..strlen(sprintf("%'argel-bargel glop-glyf?'2000n"))-2])+"'*n" ,1000+3),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return -1; } -.... -test 4954, expected result: EQ -mixed a() { return search(sprintf("%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[0..strlen(sprintf("%'argel-bargel glop-glyf?'2000n"))-2])+"'*n"+sprintf("%'argel-bargel glop-glyf?'2000n"),1000+3),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 1000+3; } -.... -test 4955, expected result: EQ -mixed a() { return search(sprintf("%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[0..strlen(sprintf("%'argel-bargel glop-glyf?'2000n"))-2])+"'*n"+sprintf("%'argel-bargel glop-glyf?'2000n")+"%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[0..strlen(sprintf("%'argel-bargel glop-glyf?'2000n"))-2])+"'*n",1000+3,1000+3),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 1000+3; } -.... -test 4956, expected result: EQ -mixed a() { return search(sprintf(sprintf("%'argel-bargel glop-glyf?'2000n")+"%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[0..strlen(sprintf("%'argel-bargel glop-glyf?'2000n"))-2])+"'*n",100000),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 0; } -.... -test 4957, expected result: EQ -mixed a() { return search(sprintf("%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[0..strlen(sprintf("%'argel-bargel glop-glyf?'2000n"))-2])+"'*n" ,100000),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return -1; } -.... -test 4958, expected result: EQ -mixed a() { return search(sprintf("%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[0..strlen(sprintf("%'argel-bargel glop-glyf?'2000n"))-2])+"'*n"+sprintf("%'argel-bargel glop-glyf?'2000n"),100000),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 100000; } -.... -test 4959, expected result: EQ -mixed a() { return search(sprintf("%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[0..strlen(sprintf("%'argel-bargel glop-glyf?'2000n"))-2])+"'*n"+sprintf("%'argel-bargel glop-glyf?'2000n")+"%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[0..strlen(sprintf("%'argel-bargel glop-glyf?'2000n"))-2])+"'*n",100000,100000),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 100000; } -.... -test 4960, expected result: EQ -mixed a() { return search(sprintf(sprintf("%'argel-bargel glop-glyf?'2000n")+"%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[0..strlen(sprintf("%'argel-bargel glop-glyf?'2000n"))-2])+"'*n",100000+1),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 0; } -.... -test 4961, expected result: EQ -mixed a() { return search(sprintf("%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[0..strlen(sprintf("%'argel-bargel glop-glyf?'2000n"))-2])+"'*n" ,100000+1),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return -1; } -.... -test 4962, expected result: EQ -mixed a() { return search(sprintf("%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[0..strlen(sprintf("%'argel-bargel glop-glyf?'2000n"))-2])+"'*n"+sprintf("%'argel-bargel glop-glyf?'2000n"),100000+1),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 100000+1; } -.... -test 4963, expected result: EQ -mixed a() { return search(sprintf("%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[0..strlen(sprintf("%'argel-bargel glop-glyf?'2000n"))-2])+"'*n"+sprintf("%'argel-bargel glop-glyf?'2000n")+"%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[0..strlen(sprintf("%'argel-bargel glop-glyf?'2000n"))-2])+"'*n",100000+1,100000+1),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 100000+1; } -.... -test 4964, expected result: EQ -mixed a() { return search(sprintf(sprintf("%'argel-bargel glop-glyf?'2000n")+"%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[0..strlen(sprintf("%'argel-bargel glop-glyf?'2000n"))-2])+"'*n",100000+2),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 0; } -.... -test 4965, expected result: EQ -mixed a() { return search(sprintf("%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[0..strlen(sprintf("%'argel-bargel glop-glyf?'2000n"))-2])+"'*n" ,100000+2),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return -1; } -.... -test 4966, expected result: EQ -mixed a() { return search(sprintf("%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[0..strlen(sprintf("%'argel-bargel glop-glyf?'2000n"))-2])+"'*n"+sprintf("%'argel-bargel glop-glyf?'2000n"),100000+2),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 100000+2; } -.... -test 4967, expected result: EQ -mixed a() { return search(sprintf("%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[0..strlen(sprintf("%'argel-bargel glop-glyf?'2000n"))-2])+"'*n"+sprintf("%'argel-bargel glop-glyf?'2000n")+"%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[0..strlen(sprintf("%'argel-bargel glop-glyf?'2000n"))-2])+"'*n",100000+2,100000+2),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 100000+2; } -.... -test 4968, expected result: EQ -mixed a() { return search(sprintf(sprintf("%'argel-bargel glop-glyf?'2000n")+"%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[0..strlen(sprintf("%'argel-bargel glop-glyf?'2000n"))-2])+"'*n",100000+3),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 0; } -.... -test 4969, expected result: EQ -mixed a() { return search(sprintf("%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[0..strlen(sprintf("%'argel-bargel glop-glyf?'2000n"))-2])+"'*n" ,100000+3),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return -1; } -.... -test 4970, expected result: EQ -mixed a() { return search(sprintf("%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[0..strlen(sprintf("%'argel-bargel glop-glyf?'2000n"))-2])+"'*n"+sprintf("%'argel-bargel glop-glyf?'2000n"),100000+3),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 100000+3; } -.... -test 4971, expected result: EQ -mixed a() { return search(sprintf("%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[0..strlen(sprintf("%'argel-bargel glop-glyf?'2000n"))-2])+"'*n"+sprintf("%'argel-bargel glop-glyf?'2000n")+"%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[0..strlen(sprintf("%'argel-bargel glop-glyf?'2000n"))-2])+"'*n",100000+3,100000+3),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 100000+3; } -.... -test 4972, expected result: EQ -mixed a() { return search(sprintf(sprintf("%'argel-bargel glop-glyf?'2000n")+"%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[1..0x7fffffff])+"'*n",10),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 0; } -.... -test 4973, expected result: EQ -mixed a() { return search(sprintf("%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[1..0x7fffffff])+"'*n" ,10),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return -1; } -.... -test 4974, expected result: EQ -mixed a() { return search(sprintf("%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[1..0x7fffffff])+"'*n"+sprintf("%'argel-bargel glop-glyf?'2000n"),10),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 10; } -.... -test 4975, expected result: EQ -mixed a() { return search(sprintf("%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[1..0x7fffffff])+"'*n"+sprintf("%'argel-bargel glop-glyf?'2000n")+"%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[1..0x7fffffff])+"'*n",10,10),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 10; } -.... -test 4976, expected result: EQ -mixed a() { return search(sprintf(sprintf("%'argel-bargel glop-glyf?'2000n")+"%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[1..0x7fffffff])+"'*n",10+1),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 0; } -.... -test 4977, expected result: EQ -mixed a() { return search(sprintf("%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[1..0x7fffffff])+"'*n" ,10+1),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return -1; } -.... -test 4978, expected result: EQ -mixed a() { return search(sprintf("%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[1..0x7fffffff])+"'*n"+sprintf("%'argel-bargel glop-glyf?'2000n"),10+1),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 10+1; } -.... -test 4979, expected result: EQ -mixed a() { return search(sprintf("%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[1..0x7fffffff])+"'*n"+sprintf("%'argel-bargel glop-glyf?'2000n")+"%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[1..0x7fffffff])+"'*n",10+1,10+1),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 10+1; } -.... -test 4980, expected result: EQ -mixed a() { return search(sprintf(sprintf("%'argel-bargel glop-glyf?'2000n")+"%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[1..0x7fffffff])+"'*n",10+2),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 0; } -.... -test 4981, expected result: EQ -mixed a() { return search(sprintf("%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[1..0x7fffffff])+"'*n" ,10+2),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return -1; } -.... -test 4982, expected result: EQ -mixed a() { return search(sprintf("%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[1..0x7fffffff])+"'*n"+sprintf("%'argel-bargel glop-glyf?'2000n"),10+2),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 10+2; } -.... -test 4983, expected result: EQ -mixed a() { return search(sprintf("%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[1..0x7fffffff])+"'*n"+sprintf("%'argel-bargel glop-glyf?'2000n")+"%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[1..0x7fffffff])+"'*n",10+2,10+2),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 10+2; } -.... -test 4984, expected result: EQ -mixed a() { return search(sprintf(sprintf("%'argel-bargel glop-glyf?'2000n")+"%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[1..0x7fffffff])+"'*n",10+3),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 0; } -.... -test 4985, expected result: EQ -mixed a() { return search(sprintf("%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[1..0x7fffffff])+"'*n" ,10+3),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return -1; } -.... -test 4986, expected result: EQ -mixed a() { return search(sprintf("%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[1..0x7fffffff])+"'*n"+sprintf("%'argel-bargel glop-glyf?'2000n"),10+3),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 10+3; } -.... -test 4987, expected result: EQ -mixed a() { return search(sprintf("%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[1..0x7fffffff])+"'*n"+sprintf("%'argel-bargel glop-glyf?'2000n")+"%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[1..0x7fffffff])+"'*n",10+3,10+3),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 10+3; } -.... -test 4988, expected result: EQ -mixed a() { return search(sprintf(sprintf("%'argel-bargel glop-glyf?'2000n")+"%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[1..0x7fffffff])+"'*n",1000),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 0; } -.... -test 4989, expected result: EQ -mixed a() { return search(sprintf("%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[1..0x7fffffff])+"'*n" ,1000),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return -1; } -.... -test 4990, expected result: EQ -mixed a() { return search(sprintf("%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[1..0x7fffffff])+"'*n"+sprintf("%'argel-bargel glop-glyf?'2000n"),1000),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 1000; } -.... -test 4991, expected result: EQ -mixed a() { return search(sprintf("%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[1..0x7fffffff])+"'*n"+sprintf("%'argel-bargel glop-glyf?'2000n")+"%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[1..0x7fffffff])+"'*n",1000,1000),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 1000; } -.... -test 4992, expected result: EQ -mixed a() { return search(sprintf(sprintf("%'argel-bargel glop-glyf?'2000n")+"%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[1..0x7fffffff])+"'*n",1000+1),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 0; } -.... -test 4993, expected result: EQ -mixed a() { return search(sprintf("%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[1..0x7fffffff])+"'*n" ,1000+1),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return -1; } -.... -test 4994, expected result: EQ -mixed a() { return search(sprintf("%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[1..0x7fffffff])+"'*n"+sprintf("%'argel-bargel glop-glyf?'2000n"),1000+1),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 1000+1; } -.... -test 4995, expected result: EQ -mixed a() { return search(sprintf("%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[1..0x7fffffff])+"'*n"+sprintf("%'argel-bargel glop-glyf?'2000n")+"%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[1..0x7fffffff])+"'*n",1000+1,1000+1),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 1000+1; } -.... -test 4996, expected result: EQ -mixed a() { return search(sprintf(sprintf("%'argel-bargel glop-glyf?'2000n")+"%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[1..0x7fffffff])+"'*n",1000+2),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 0; } -.... -test 4997, expected result: EQ -mixed a() { return search(sprintf("%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[1..0x7fffffff])+"'*n" ,1000+2),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return -1; } -.... -test 4998, expected result: EQ -mixed a() { return search(sprintf("%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[1..0x7fffffff])+"'*n"+sprintf("%'argel-bargel glop-glyf?'2000n"),1000+2),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 1000+2; } -.... -test 4999, expected result: EQ -mixed a() { return search(sprintf("%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[1..0x7fffffff])+"'*n"+sprintf("%'argel-bargel glop-glyf?'2000n")+"%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[1..0x7fffffff])+"'*n",1000+2,1000+2),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 1000+2; } -.... -test 5000, expected result: EQ -mixed a() { return search(sprintf(sprintf("%'argel-bargel glop-glyf?'2000n")+"%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[1..0x7fffffff])+"'*n",1000+3),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 0; } -.... -test 5001, expected result: EQ -mixed a() { return search(sprintf("%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[1..0x7fffffff])+"'*n" ,1000+3),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return -1; } -.... -test 5002, expected result: EQ -mixed a() { return search(sprintf("%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[1..0x7fffffff])+"'*n"+sprintf("%'argel-bargel glop-glyf?'2000n"),1000+3),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 1000+3; } -.... -test 5003, expected result: EQ -mixed a() { return search(sprintf("%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[1..0x7fffffff])+"'*n"+sprintf("%'argel-bargel glop-glyf?'2000n")+"%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[1..0x7fffffff])+"'*n",1000+3,1000+3),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 1000+3; } -.... -test 5004, expected result: EQ -mixed a() { return search(sprintf(sprintf("%'argel-bargel glop-glyf?'2000n")+"%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[1..0x7fffffff])+"'*n",100000),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 0; } -.... -test 5005, expected result: EQ -mixed a() { return search(sprintf("%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[1..0x7fffffff])+"'*n" ,100000),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return -1; } -.... -test 5006, expected result: EQ -mixed a() { return search(sprintf("%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[1..0x7fffffff])+"'*n"+sprintf("%'argel-bargel glop-glyf?'2000n"),100000),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 100000; } -.... -test 5007, expected result: EQ -mixed a() { return search(sprintf("%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[1..0x7fffffff])+"'*n"+sprintf("%'argel-bargel glop-glyf?'2000n")+"%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[1..0x7fffffff])+"'*n",100000,100000),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 100000; } -.... -test 5008, expected result: EQ -mixed a() { return search(sprintf(sprintf("%'argel-bargel glop-glyf?'2000n")+"%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[1..0x7fffffff])+"'*n",100000+1),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 0; } -.... -test 5009, expected result: EQ -mixed a() { return search(sprintf("%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[1..0x7fffffff])+"'*n" ,100000+1),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return -1; } -.... -test 5010, expected result: EQ -mixed a() { return search(sprintf("%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[1..0x7fffffff])+"'*n"+sprintf("%'argel-bargel glop-glyf?'2000n"),100000+1),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 100000+1; } -.... -test 5011, expected result: EQ -mixed a() { return search(sprintf("%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[1..0x7fffffff])+"'*n"+sprintf("%'argel-bargel glop-glyf?'2000n")+"%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[1..0x7fffffff])+"'*n",100000+1,100000+1),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 100000+1; } -.... -test 5012, expected result: EQ -mixed a() { return search(sprintf(sprintf("%'argel-bargel glop-glyf?'2000n")+"%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[1..0x7fffffff])+"'*n",100000+2),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 0; } -.... -test 5013, expected result: EQ -mixed a() { return search(sprintf("%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[1..0x7fffffff])+"'*n" ,100000+2),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return -1; } -.... -test 5014, expected result: EQ -mixed a() { return search(sprintf("%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[1..0x7fffffff])+"'*n"+sprintf("%'argel-bargel glop-glyf?'2000n"),100000+2),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 100000+2; } -.... -test 5015, expected result: EQ -mixed a() { return search(sprintf("%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[1..0x7fffffff])+"'*n"+sprintf("%'argel-bargel glop-glyf?'2000n")+"%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[1..0x7fffffff])+"'*n",100000+2,100000+2),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 100000+2; } -.... -test 5016, expected result: EQ -mixed a() { return search(sprintf(sprintf("%'argel-bargel glop-glyf?'2000n")+"%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[1..0x7fffffff])+"'*n",100000+3),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 0; } -.... -test 5017, expected result: EQ -mixed a() { return search(sprintf("%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[1..0x7fffffff])+"'*n" ,100000+3),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return -1; } -.... -test 5018, expected result: EQ -mixed a() { return search(sprintf("%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[1..0x7fffffff])+"'*n"+sprintf("%'argel-bargel glop-glyf?'2000n"),100000+3),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 100000+3; } -.... -test 5019, expected result: EQ -mixed a() { return search(sprintf("%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[1..0x7fffffff])+"'*n"+sprintf("%'argel-bargel glop-glyf?'2000n")+"%'"+(sprintf("%'argel-bargel glop-glyf?'2000n")[1..0x7fffffff])+"'*n",100000+3,100000+3),sprintf("%'argel-bargel glop-glyf?'2000n")); } -mixed b() { return 100000+3; } -.... -test 5020, expected result: EQ -mixed a() { return sizeof("felbar"); } -mixed b() { return 6; } -.... -test 5021, expected result: EQ -mixed a() { return sizeof(({"fulbar","gazonk",7})); } -mixed b() { return 3; } -.... -test 5022, expected result: EQ -mixed a() { return sizeof(([8:3,6:6,7:0])); } -mixed b() { return 3; } -.... -test 5023, expected result: EQ -mixed a() { return sizeof((<8,7,6,5,4,7>)); } -mixed b() { return 6; } -.... -test 5024, expected result: RUN -mixed a() { sleep(1); } -.... -test 5025, expected result: EQ -mixed a() { return sum(1,1); } -mixed b() { return 2; } -.... -test 5026, expected result: EQ -mixed a() { return sum(1,-2); } -mixed b() { return -1; } -.... -test 5027, expected result: EQ -mixed a() { return sum(-2,-2); } -mixed b() { return -4; } -.... -test 5028, expected result: EQ -mixed a() { return sum("hi","there"); } -mixed b() { return "hithere"; } -.... -test 5029, expected result: EQ -mixed a() { return sum("human","number",666); } -mixed b() { return "humannumber666"; } -.... -test 5030, expected result: EQ -mixed a() { return sum("human","number",666); } -mixed b() { return "humannumber666"; } -.... -test 5031, expected result: EQ -mixed a() { return sum("human","number",666); } -mixed b() { return "humannumber666"; } -.... -test 5032, expected result: EQ -mixed a() { return sum("human","number",666,111); } -mixed b() { return "humannumber666111"; } -.... -test 5033, expected result: EQ -mixed a() { return sum("humannumber",sum(666+111)); } -mixed b() { return "humannumber777"; } -.... -test 5034, expected result: EQ -mixed a() { return sum("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","x","y"); } -mixed b() { return "abcdefghijklmnopqrstuvxy"; } -.... -test 5035, expected result: EQ -mixed a() { return sum(1.0+1.0); } -mixed b() { return 2.0; } -.... -test 5036, expected result: EQ -mixed a() { return sum(1.0,-1.0); } -mixed b() { return 0.0; } -.... -test 5037, expected result: EQ -mixed a() { return sum(-1.0,-1.0); } -mixed b() { return -2.0; } -.... -test 5038, expected result: EQUAL -mixed a() { return sum(({1,2,3}),({4,5,6})); } -mixed b() { return ({1,2,3,4,5,6}); } -.... -test 5039, expected result: EQUAL -mixed a() { return sum((<1,2,3,4>),(<4,5,6>)); } -mixed b() { return (<1,2,3,4,4,5,6>); } -.... -test 5040, expected result: EQUAL -mixed a() { return sum(([0:1,3:6]),([5:2,3:6])); } -mixed b() { return ([0:1,3:6,3:6,5:2]); } -.... -test 5041, expected result: TRUE -mixed a() { return objectp(this_object()); } -.... -test 5042, expected result: EQ -mixed a() { return 20; } -mixed b() { return catch(throw(a())); } -.... -test 5043, expected result: TRUE -mixed a() { return intp(time()); } -.... -test 5044, expected result: RUN -mixed a() { trace(0); } -.... -test 5045, expected result: EQ -mixed a() { return trace(0); } -mixed b() { return 0; } -.... -test 5046, expected result: EQUAL -mixed a() { return upper_case("fooq"); } -mixed b() { return "FOOQ"; } -.... -test 5047, expected result: EQUAL -mixed a() { return upper_case("FooR"); } -mixed b() { return "FOOR"; } -.... -test 5048, expected result: EQUAL -mixed a() { return upper_case("Foo1234-*~\n"); } -mixed b() { return "FOO1234-*~\n"; } -.... -test 5049, expected result: EQUAL -mixed a() { return values("foo"); } -mixed b() { return ({'f','o','o'}); } -.... -test 5050, expected result: EQUAL -mixed a() { return values(({'f','o','o'})); } -mixed b() { return ({'f','o','o'}); } -.... -test 5051, expected result: EQUAL -mixed a() { return sort_array(values(([7:3,8:9,99:12]))); } -mixed b() { return ({3,9,12}); } -.... -test 5052, expected result: EQUAL -mixed a() { return values((<7,8,99>)); } -mixed b() { return ({1,1,1}); } -.... -test 5053, expected result: EQUAL -mixed a() { return mklist(values(this_object())); } -mixed b() { return (<a,b>); } -.... -test 5054, expected result: EQ -mixed a() { return zero_type(0); } -mixed b() { return 0; } -.... -test 5055, expected result: EQ -mixed a() { return zero_type(([])[7]); } -mixed b() { return 1; } -.... -test 5056, expected result: RUN -mixed a() { call_out(a,100000); } -.... -test 5057, expected result: TRUE -mixed a() { return arrayp(call_out_info()); } -.... -test 5058, expected result: TRUE -mixed a() { return sizeof(call_out_info()) > 0; } -.... -test 5059, expected result: TRUE -mixed a() { return call_out_info()[-1][0] > 1; } -.... -test 5060, expected result: EQ -mixed a() { return find_call_out(call_out_info()[-1][2]); } -mixed b() { return call_out_info()[-1][0]; } -.... -test 5061, expected result: EQ -mixed a() { return find_call_out(a); } -mixed b() { return -1; } -.... -test 5062, expected result: TRUE -mixed a() { return zero_type(find_call_out(a)); } -.... -test 5063, expected result: RUN -mixed a() { remove_call_out(call_out_info()[-1][2]); } -.... -test 5064, expected result: TRUE -mixed a() { return !sizeof(call_out_info()) || function_name(call_out_info()[-1][2])!="a"; } -.... -test 5065, expected result: EQUAL -mixed a() { return ([1:1]); } -mixed b() { return m_delete(a(),0); } -.... -test 5066, expected result: EQUAL -mixed a() { return ([1:1]); } -mixed b() { return m_delete(([1:1,0:3]),0); } -.... -test 5067, expected result: EQ -mixed a() { mapping a=([1:1]); return a==m_delete(a,1); } -mixed b() { return 1; } -.... -test 5068, expected result: TRUE -int b=10; mixed a() { return 1; } -.... -test 5069, expected result: TRUE -mixed b=10; mixed a() { return 1;} -.... -test 5070, expected result: RUN -void a() { master()->add_precompiled_program("/test",class { - int q,w,e,r,t; mixed foo() { return 10; } -});} -.... -test 5071, expected result: TRUE -inherit "/test"; mixed a() { return foo()==10; } -.... -test 5072, expected result: TRUE -inherit "/test"; mixed a() { return test::foo()==10; } -.... -test 5073, expected result: TRUE -inherit "/test" : bar; mixed a() { return bar::foo()==10; } -.... -test 5074, expected result: RUN -void a() { master()->add_precompiled_program("/test2",class { - int z,x,c,v,b; mixed bar() { return 11; } -});} -.... -test 5075, expected result: TRUE -inherit "/test"; inherit "/test2"; mixed a() { return foo()==10 && bar()==11; } -.... -test 5076, expected result: TRUE -inherit "/test2"; inherit "/test"; mixed a() { return foo()==10 && bar()==11; } -.... -test 5077, expected result: RUN -void a() { master()->add_precompiled_program("/test",class { - int q,w,e,r; mixed t; mixed getw() { return w; } void setw(int _) { w=_; } -});} -.... -test 5078, expected result: RUN -void a() { master()->add_precompiled_program("/test2",class { - int z,x,c,v,b; mixed getb() { return b; } void setb(int _) { b=_; } -});} -.... -test 5079, expected result: TRUE -inherit "/test"; inherit "/test2"; mixed a() { w=20; b=22; return getw()==20 && getb()==22; } -.... -test 5080, expected result: TRUE -inherit "/test"; inherit "/test2"; mixed a() { setw(20); setb(22); return w==20 && b==22; } -.... -test 5081, expected result: TRUE -inherit "/test2"; inherit "/test"; mixed a() { w=20; b=22; return getw()==20 && getb()==22; } -.... -test 5082, expected result: TRUE -inherit "/test2"; inherit "/test"; mixed a() { setw(20); setb(22); return w==20 && b==22; } -.... diff --git a/src/test/verifymanual.lpc b/src/test/verifymanual.lpc deleted file mode 100644 index 5c89a9d57a625a8e33b383ff0560714b2ecd8c38..0000000000000000000000000000000000000000 --- a/src/test/verifymanual.lpc +++ /dev/null @@ -1,178 +0,0 @@ -#!/usr/local/bin/ulpc - -int errs=0; - -mapping efuns = all_efuns(); -mapping pages = ([]); -list see_also = (<>); - -inherit "/precompiled/regexp" : reg1; - -void read_page(string fname, string path) -{ - int headno; - string cont, section, name, part; - - cont=read_bytes(path); - if(sscanf(cont,"NAME\n\t%s -",name)) - { - if((name/"/")[-1] != fname) - { - perror("File name != header name for "+path+".\n"); - errs++; - } - - if(efuns[name]) - { - if(pages[name]) - { - perror("Double docs for "+name+" ("+pages[name]+" and "+path+")\n"); - errs++; - } - pages[name]=path; - } - - int partno; - foreach(explode(cont,"============================================================================\n"),part) - { - string part_name="error"; - list headers = (<>); - partno++; - - if(!strlen(part)) continue; - - foreach(explode(part,"\n\n"), section) - { - if(!strlen(section)) continue; - if(section[0]>='A' && section[0]<='Z') - { - string type, rest, a, b; - headno++; - if(!sscanf(section,"%s\n%s",type,rest)) - { - perror("Couldn't read header name in header "+headno+" in "+path+" part "+partno+".\n"); - errs++; - continue; - } - - if(!strlen(section)) - { - perror("Header "+type+" in "+path+" part "+partno+" empty.\n"); - errs++; - } - - if(headers[type]) - { - perror("Double "+type+" in "+path+" part "+partno+".\n"); - errs++; - } - - headers[type]=1; - - if(reg1::match(rest)) - { - perror("Header "+type+" in "+path+" part "+partno+" not properly indented.\n"); - errs++; - } - - switch(type) - { - case "NAME": - if(sscanf(rest,"\t%s - %s",part_name,b)!=2) - { - perror("Error in header "+type+" in "+path+" part "+partno+".\n"); - errs++; - } - if(sscanf(b,"%*s\n")) - { - perror("NAME header is more than one line in header "+type+" in "+path+" part "+partno+".\n"); - errs++; - } - break; - - case "SYNTAX": - if(efuns[name] && search(rest, part_name)==-1) - { - perror("SYNTAX header does not contain name in "+path+" part "+partno+".\n"); - errs++; - } - break; - - case "SEE ALSO": - rest=replace(rest,({"\n",",","\t"}),({" "," "," "})); - see_also|=mklist((rest/" ")-({" "})); - break; - } - } - } - - if(!headers["NAME"]) - { - perror(path+" part "+partno+" is missing NAME header.\n"); - errs++; - } - - if(!headers["DESCRIPTION"]) - { - perror(path+" part "+partno+" is missing DESCRIPTION header.\n"); - errs++; - } - - if(efuns[name]) - { - if(!headers["SYNTAX"]) - { - perror(path+" is missing SYNTAX header.\n"); - errs++; - } - } - } - } -} - -void traversedir(string path) -{ - string file; - foreach(get_dir(path) - ({"CVS","RCS"}),file) - { - string tmp; - if(file[-1]=='~') continue; - if(file[0]=='#' && file[-1]=='#') continue; - if(file[0]=='.' && file[1]=='#') continue; - - tmp=path+"/"+file; - - if(file_size(tmp)==-2) - { - traversedir(tmp); - }else{ - read_page(file,tmp); - - if(pages[file]) - { - }else{ - } - } - } -} - -int main(int argc, string *argv) -{ - string fun; - - if(argc < 2) - { - perror("Usage: verifymanual.lpc <dir with manuals>\n"); - exit(1); - } - - reg1::create("\n[^\t]"); - traversedir(argv[1]); - foreach(m_indices(efuns - pages), fun) - { - errs++; - perror("No page for efun "+fun+".\n"); - } - - exit(errs); -} diff --git a/src/time_stuff.h b/src/time_stuff.h new file mode 100644 index 0000000000000000000000000000000000000000..907aa613e37a4ef5445cc951086b3414df3157d5 --- /dev/null +++ b/src/time_stuff.h @@ -0,0 +1,64 @@ +/*\ +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) +||| See the files COPYING and DISCLAIMER for more information. +\*/ +#ifndef TIME_STUFF_H +#define TIME_STUFF_H + +#include "machine.h" + +#if TIME_WITH_SYS_TIME +# include <sys/time.h> +# include <time.h> +#else +# if HAVE_SYS_TIME_H +# include <sys/time.h> +# else +# if HAVE_TIME_H +# include <time.h> +# endif +# endif +#endif + +#undef HAVE_SYS_TIME_H +#undef HAVE_TIME_H +#undef TIME_WITH_SYS_TIME + +#define my_timercmp(tvp, cmp, uvp) \ + ( (tvp)->tv_sec == (uvp)->tv_sec ? \ + (tvp)->tv_usec cmp (uvp)->tv_usec : \ + (tvp)->tv_sec cmp (uvp)->tv_sec ) + +#define my_subtract_timeval(X, Y) \ + do { \ + struct timeval *_a=(X), *_b=(Y); \ + _a->tv_sec -= _b->tv_sec; \ + _a->tv_usec -= _b->tv_usec; \ + if(_a->tv_usec < 0) { \ + _a->tv_sec--; \ + _a->tv_usec+=1000000; \ + } \ + } while(0) + +#define my_add_timeval(X, Y) \ + do { \ + struct timeval *_a=(X), *_b=(Y); \ + _a->tv_sec += _b->tv_sec; \ + _a->tv_usec += _b->tv_usec; \ + if(_a->tv_usec >= 1000000) { \ + _a->tv_sec++; \ + _a->tv_usec-=1000000; \ + } \ + } while(0) + +#ifndef HAVE_STRUCT_TIMEVAL +struct timeval +{ + long tv_sec; + long tv_usec; +}; +#endif + + +#endif diff --git a/src/todo b/src/todo index 878868b83431361c948ba19069428dde445c092a..1aa36302f4a5134ac4c7067355e4cf4d80ee3f5a 100644 --- a/src/todo +++ b/src/todo @@ -142,46 +142,93 @@ patch byacc done (maybe needs more fixing) fix efun->foo (always copies value) + fixed? + +rewrite sort_array fixed -dokumentera mera! +putenv + fixed -ta bort MAX_LOCAL (& MAX_GLOBAL) +sort() + fixed -ta bort EXPANDMAX +++++ -> sum() + fixed -kommentera mera +update README + fixed -typkollen m}ste generera b{ttre felmeddelanden.. +move the check for libsocket to the file module + fixed -putenv? setugid? +add garbage collect + fixed function_exists() + not needed, just index the object. + +remove MAX_LOCAL (& MAX_GLOBAL) + +remove EXPANDMAX + +write more comments + +typkollen m}ste generera b{ttre felmeddelanden.. + +setugid? + inherit_list() function_args() get_function_list() fuzzymatch() -sort() this_function() -kolla upp |vriga efunnar som skall portas +check what other functions needs porting +add generic callbacks -++++ -> sum() +assert (check types explicitely) +generalize foreach() +constant +'type wish' -update README +document file::set_nonblocking better (prototype callbacks etc.) -flytta cheken f|r libsocket till modulen (och se till att moduler kan addera libs) -(eller s{tt tillbaka AC_HAVE_DIRENT (?) i configure.in) +fix 'private inherit' -add garbage collect +fix run time type checks. -addera generisk callback +make backtrace() show the arguments. -set_socket_nonblocking adderar ingen referens till objektet... +code_value() +decode_value() -assert (kolla typer explicit) -generalisera foreach() -constant -'type wish' -rewrite sort_array +threads + +dynamic stack + +command line option: -L libdir + +rename list->multiset +rename Pike +rename perror +make a new perror +rename add_efun -> add_constant +rename sizeof -> size? + +then make a compat.h + +remove some simulated functions or make the optional. + +change object/program naming strategy + +make a better module interface. (a struct maybe...) +make a C++ interface. + +allocate stack with MAP_NORESERV + +fix sprintf.html + +dynamic module loading +make autoconf test for mpz_get_d diff --git a/src/types.h b/src/types.h index 4f2d9948414b07a313f71d0205f81ffa6544de8f..5702bf9643b16e897ef6cdc064d59c6aac767128 100644 --- a/src/types.h +++ b/src/types.h @@ -1,6 +1,6 @@ /*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ #ifndef TYPES_H diff --git a/src/ualarm.c b/src/ualarm.c index 805f65e22a472b4be4ffb23b8786347cd2509afa..3a2d6183a305e23615f015a299b27560f50e9667 100644 --- a/src/ualarm.c +++ b/src/ualarm.c @@ -1,6 +1,6 @@ /*\ -||| This file a part of uLPC, and is copyright by Fredrik Hubinette -||| uLPC is distributed as GPL (General Public License) +||| This file a part of Pike, and is copyright by Fredrik Hubinette +||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ /*